:root{--blue:#1e4e9e;--blue2:#2b62c4;--bg:#f2f4f8;--green:#1f8a3b;--red:#c0392b;--orange:#d97b16}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);font-size:14px;color:#222}
.topbar{background:linear-gradient(180deg,#1e4e9e,#173d7e);color:#fff;padding:10px 16px}
.topbar .row1{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.topbar h1{font-size:20px;font-weight:600}
.btn-refresh{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:16px;padding:4px 14px;cursor:pointer;font-size:13px}
.topbar .row2{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:6px;margin-top:4px;font-size:12px;color:#cfe0ff}
.version{background:rgba(255,255,255,.18);border-radius:10px;padding:2px 10px}
.topbtn{background:#fff;color:#333;border:none;border-radius:14px;padding:4px 12px;cursor:pointer;font-size:12px;font-weight:500}
/* 261121-80 顶部导航改为分段按钮（与客户端一致）：每项独立圆角按钮，选中蓝底白字 */
.tabs{display:flex;gap:4px;background:#fff;border-bottom:1px solid #edf1f7;overflow-x:auto;padding:5px 8px}
.tabs a{flex:1 1 0;min-width:max-content;padding:8px 14px;color:#44506a;cursor:pointer;font-size:15px;border-bottom:none;white-space:nowrap;text-decoration:none;text-align:center;background:#f2f5fa;border-radius:9px;transition:background .15s,color .15s}
/* 261121-81 电脑端导航按钮按内容宽度靠左排列，不铺满整屏；手机端保持均分 */
@media(min-width:768px){.tabs{justify-content:flex-start}.tabs a{flex:0 0 auto;padding:8px 18px}}
.tabs a.on{color:#fff;background:var(--blue);font-weight:700;box-shadow:0 2px 6px rgba(30,78,158,.28)}
.tabs a:not(.on):hover{background:#e6eefb;color:var(--blue)}
.wrap{width:100%;max-width:none;margin:0 auto;padding:12px}
.card{background:#fff;border-radius:10px;padding:14px;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.card h3{font-size:15px;margin-bottom:10px;color:#1a3a6b}
.grid{display:grid;gap:10px}
.g4{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.stat{background:#f7f9fd;border:1px solid #e3e8f0;border-radius:10px;padding:12px}
.stat .num{font-size:24px;font-weight:700;color:var(--blue)}
.stat .lbl{font-size:12px;color:#777;margin-top:2px}
label{font-size:12px;color:#666;display:block;margin-bottom:3px}
input,select,textarea{border:1px solid #ccd4e0;border-radius:6px;padding:7px 9px;font-size:14px;width:100%;background:#fff}
input:focus,select:focus{outline:2px solid #9dbdf5}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;justify-content:flex-start}
/* 输入控件一律按内容宽度靠左排列，不向右拉伸撑满 */
.row>div{flex:0 1 auto;width:160px;min-width:120px}
.row>div.wide{width:auto;flex:1 1 320px;min-width:240px;max-width:520px}
.row>div.narrow{width:max-content;min-width:112px;max-width:100%}
.row>.fix{flex:0 0 auto;width:auto;min-width:0}
/* 按钮组容器（fixwrap）：可收缩换行——按钮多时不撑破卡片/屏幕（如商品资料库按钮行） */
.row>.fix.fixwrap{flex:0 1 auto;min-width:0}
button.act{background:var(--blue);color:#fff;border:none;border-radius:6px;padding:8px 16px;cursor:pointer;font-size:14px;white-space:nowrap}
button.act.green{background:var(--green)}button.act.orange{background:var(--orange)}
button.act.gray{background:#8a93a3}button.act.red{background:var(--red)}button.act.blue{background:var(--blue)}
button.sm{padding:4px 10px;font-size:12px;border-radius:5px}
.tblwrap{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
/* 明细表内层滚动条：网点平铺条在容器外层（不被裁剪），表格单独横向滚动 */
.tscroll{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;max-width:100%}
.tscroll>table{width:auto;min-width:100%}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}
/* 配送明细筛选：从/至两个日期横向一行 */
.row.dl-filter-row{flex-wrap:wrap}
.dl-filter-row .dl-date{flex:0 0 auto;min-width:0;width:auto}
.dl-filter-row .dl-date input{width:150px}
.dl-filter-row .dl-cat{flex:0 0 auto;min-width:0;width:auto}
.dl-filter-row .dl-scope{flex:0 0 auto;min-width:0;width:auto}
.dl-filter-row .dl-scope select{width:150px;height:34px;box-sizing:border-box}
/* 检索框缩小回固定宽度（200px，空间不足可收缩），导出Excel 按钮跟随向左对齐 */
.dl-filter-row .dl-kw{flex:0 1 200px;min-width:0}
.dl-filter-row .dl-kw input{width:200px !important;min-width:0 !important;max-width:100%}
/* 网点平铺按钮：按分组分行（每行一个分组，组首为分组名标签）；按钮宽约 6 个汉字（≈96px） */
.dl-sites-bar{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px;padding-bottom:3px}
.dl-sites-bar>button.dl-site-btn{width:96px !important;flex:0 0 96px}
.dl-grp-wrap{flex:1 1 100%;display:flex;flex-direction:column;gap:5px;min-width:0}
.dl-grp-row{display:flex;align-items:stretch;gap:5px;min-width:0;width:100%;flex:0 0 auto}
.dl-grp-tag{flex:0 0 78px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:11px;font-weight:900;color:#3c4a63;background:#eef3fb;border:1px solid #dbe3f0;border-radius:7px;padding:2px 4px;cursor:pointer;line-height:1.15;word-break:break-all;user-select:none}
.dl-grp-row.on .dl-grp-tag{background:#2b5fc4;color:#fff;border-color:#2b5fc4}
.dl-grp-items{flex:1 1 auto;display:flex;flex-wrap:wrap;gap:5px;min-width:0}
.dl-grp-items .dl-site-btn{width:96px !important;flex:0 0 96px}
.dl-site-btn{width:100% !important;padding:4px 5px 5px 8px !important;border-radius:7px !important}
.dl-site-btn>span:first-child{width:3px !important}
.dl-site-btn .ds-nm{font-size:11.5px;font-weight:900;line-height:1.2;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* 下单明细平铺按钮：文字加大一倍、宽度缩小三分之一（仅限下单明细，配送明细不变）；
   窄屏（≤767px）取消 min-width，避免 5 列 ×83px 撑破屏幕（按钮内网点名自动省略号） */
#ol_chips .dl-site-btn{width:auto !important;min-width:83px;padding:8px 6px 8px 10px !important}
#ol_chips .dl-site-btn .ds-nm{font-size:15px !important}
@media (min-width:701px){
  #ol_chips{display:flex;flex-wrap:wrap;gap:4px}
  #ol_chips .dl-site-btn .ds-nm{font-size:23px !important}
}
@media (max-width:767px){
  #ol_chips .dl-site-btn{min-width:0}
}
.dl-site-btn .ds-row{display:flex;justify-content:space-between;align-items:baseline;gap:2px}
.dl-site-btn .ds-cnt{font-size:7.5px;font-weight:900;flex:0 0 auto}
.dl-site-btn .ds-sub{font-size:6.5px;color:#98a2b3;margin-top:2px;white-space:nowrap}
.dl-site-btn .ds-bar{height:2px;border-radius:1px;background:#edf0f6;margin-top:3px;overflow:hidden}
.dl-site-btn .ds-bar span{display:block;height:100%;border-radius:1px}
th{background:#eef2f9;color:#345;padding:8px 8px;border:1px solid #dde4ef;text-align:left;position:sticky;top:0}
td{padding:7px 8px;border:1px solid #e6eaf2}
tr:nth-child(even) td{background:#eef3fa}
td input{padding:4px 6px;font-size:13px}
.tag{display:inline-block;border-radius:10px;padding:1px 8px;font-size:11px}
.tag.w{background:#fff3e0;color:#b26a00}.tag.g{background:#e3f6e8;color:#1f8a3b}.tag.r{background:#fdeaea;color:#c0392b}.tag.b{background:#e5eefc;color:#1e4e9e}
.hint{font-size:12px;color:#888;line-height:1.7}
.muted{color:#999}
.mask{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;z-index:2000;align-items:center;justify-content:center;padding:3vh 12px}
/* 261122-49 弹窗层级高于顶栏账号按钮(z1000)，避免手机端弹窗右上角✕与账号退出按钮重叠误触 */
.mask.show{display:flex}
/* 弹窗自适应：宽度随内容撑开（上限 96vw），高度尽量显示全部（上限 94vh） */
.modal{background:#fff;border-radius:12px;width:auto;min-width:min(680px,94vw);max-width:96vw;max-height:94vh;overflow:auto;padding:18px}
.modal .tblwrap{max-height:none}
.modal h3{margin-bottom:12px;padding-right:30px}
.modal-x{position:absolute;top:10px;right:12px;background:#eef2f9;border:none;border-radius:50%;width:28px;height:28px;font-size:14px;color:#666;cursor:pointer;z-index:2}
.modal-x:hover{background:#fdeaea;color:#c0392b}
.modal{position:relative}
/* 261123-41：食谱设计下发独立窗口（?dsp=1）全屏铺满——无拖动条、无关闭按钮 */
.modal.modal-fs{width:100vw;height:100vh;min-width:100vw;max-width:100vw;max-height:100vh;border-radius:0;padding:16px 14px}
.mask:has(.modal-fs){padding:0}
/* 261123-52：全屏模式（食谱设计下发独立窗口）右上角固定「返回」按钮——手机端可随时退出 */
.modal-fs-x{position:fixed;top:10px;right:10px;z-index:96;border:1px solid #c9d8ee;border-radius:18px;padding:7px 13px;
  font-size:13px;line-height:1;color:#1e4e9e;background:rgba(255,255,255,.96);box-shadow:0 2px 10px rgba(20,50,90,.2);cursor:pointer}
.modal-fs-x:hover{background:#e8f1ff}
.modal-fs-x:active{transform:scale(.96)}
.modal.modal-fs>h3:first-of-type{padding-right:92px}
.sugdrop{position:fixed;background:#fff;border:1px solid #ccd4e0;border-radius:8px;box-shadow:0 6px 18px rgba(0,0,0,.18);z-index:2100;max-height:230px;overflow:auto}
.sugdrop div{padding:9px 12px;cursor:pointer;font-size:14px;white-space:nowrap}
.sugdrop div:hover{background:#eef2f9}
.sugdrop .muted{color:#999;font-size:12px}
.toolgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.toolgrid button{display:flex;gap:8px;align-items:center;background:#f7f9fd;border:1px solid #e3e8f0;border-radius:8px;padding:12px;font-size:14px;cursor:pointer;text-align:left}
.trace-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
.tcard{border:1px solid #e3e8f0;border-radius:8px;padding:8px;font-size:12px;position:relative}
.tcard img{width:100%;height:80px;object-fit:cover;border-radius:6px;margin-bottom:4px}
.tcard .del{position:absolute;top:4px;right:4px;background:var(--red);color:#fff;border:none;border-radius:50%;width:20px;height:20px;font-size:11px;cursor:pointer}
.cats{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0}
.cats button{border:1px solid var(--blue);color:var(--blue);background:#fff;border-radius:8px;padding:5px 12px;cursor:pointer;font-size:13px}
.cats button.on{background:var(--blue);color:#fff}
/* 平板 */
.row.tight{gap:6px}
.row.tight>div{min-width:110px;width:150px}
.row.tight>div.wide{width:auto;flex:1 1 300px;max-width:480px}
.row.tight input,.row.tight select{padding:6px 8px}
.row.tight .act{padding:7px 12px}
.row.tight label{margin-bottom:2px}
.card h3+.row{margin-top:2px}
@media (max-width:600px){
  .row.tight>div{min-width:calc(50% - 3px)}
  .row.tight .fix{flex:1 1 0;min-width:0}
  .row.tight .fix button{width:100%;margin:0}
}
/* 平板 */
/* 星期徽标 */
.wk-badge{display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;background:#e5eefc;color:#1e4e9e;font-weight:700;font-size:13px;border-radius:14px;box-sizing:border-box;flex:0 0 auto;white-space:nowrap}
.wk-badge.wk-warn{background:#fff3e0;color:#b26a00}

/* 日期左右三角箭头（蓝底） */
.date-arrow{flex:0 0 auto;width:30px;height:34px;border:none;border-radius:6px;background:var(--blue);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.date-arrow:hover{background:var(--blue2)}
.date-arrow:active{transform:scale(.94)}
.tri-l,.tri-r{display:inline-block;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent}
.tri-l{border-right:9px solid #fff}
.tri-r{border-left:9px solid #fff}
@media (max-width:600px){
  .date-arrow{width:34px;height:38px}
}

/* 平板 */
@media (max-width:900px){
  .wrap{padding:10px}
  .card{padding:12px;border-radius:8px}
}
/* 手机 */
@media (max-width:600px){
  body{font-size:15px}
  .topbar{padding:8px 10px}
  .topbar h1{font-size:16px}
  .topbar .row2{font-size:11px}
  .topbtn{padding:5px 9px;font-size:11px}
  .tabs a{padding:9px 12px;font-size:14px}
  .wrap{padding:8px}
  .card{padding:10px;margin-bottom:8px;border-radius:8px}
  .card h3{font-size:14px}
  .row{gap:6px}
  .row.dl-filter-row{gap:6px}
  /* 配送明细：从/至/类别 三件在一行内自适应，日期框不再占满整行 */
  .row.dl-filter-row .dl-date,.row.dl-filter-row .dl-cat{flex:1 1 0;min-width:0;width:auto}
  .row.dl-filter-row .dl-date input,.row.dl-filter-row .dl-cat select{width:100%;min-width:0;padding:8px 4px;font-size:14px}
  .row.dl-filter-row .dl-kw input{width:100% !important;min-width:0 !important}   /* 手机端检索框仍占满整行 */
  .row.dl-filter-row .wide.dl-sites-wide{flex:1 1 100%;max-width:none}
  .row>div{min-width:calc(50% - 3px);flex:1 1 calc(50% - 3px);width:auto}
  .row>div.wide{flex:1 1 100%;max-width:none}
  .row>.fix{min-width:0;flex:1 1 100%}
  .row>.fix button{width:100%;padding:9px 12px;margin:2px 0}
  .grid.g4{grid-template-columns:repeat(2,1fr)}
  .stat .num{font-size:20px}
  input,select{padding:10px;font-size:16px}  /* 16px 防 iOS 聚焦缩放 */
  button.act{padding:10px 14px}
  button.sm{padding:8px 12px}
  table{font-size:13px}
  th,td{padding:8px 6px}
  .tblwrap{margin:0 -10px;padding:0 10px}
  .mask{padding:8px 4px}
  .modal{padding:14px 12px;border-radius:10px;min-width:100%;max-width:100vw;max-height:96vh}
  .toolgrid{grid-template-columns:1fr 1fr;gap:8px}
  .toolgrid button{padding:10px 8px;font-size:13px;min-width:0}
  .trace-cards{grid-template-columns:repeat(auto-fill,minmax(104px,1fr))}
  .tcard img{height:64px}
  .cats button{padding:7px 11px}
}

/* 商品资料库：17 列宽表（横向滚动，首列与表头粘性） */
.tblwrap:has(.wide-tbl){border:1px solid #e6ecf5;border-radius:8px;background:#fff}
table.wide-tbl{font-size:12.5px}
table.wide-tbl th,table.wide-tbl td{padding:6px 8px;border-bottom:1px solid #eef2f9}
table.wide-tbl th{position:sticky;top:0;background:#f5f8fd;z-index:2;font-weight:700;color:#33475e}
table.wide-tbl td.pn{font-weight:600;color:#1b2a3d}
table.wide-tbl td.num{text-align:right;font-variant-numeric:tabular-nums}
table.wide-tbl th:nth-child(1),table.wide-tbl td:nth-child(1){position:sticky;left:0;background:#fff;z-index:1;min-width:210px;max-width:240px;white-space:normal;box-shadow:1px 0 0 #e6ecf5}
table.wide-tbl th:nth-child(1){background:#f5f8fd;z-index:3}
table.wide-tbl tr:hover td{background:#f9fbff}
table.wide-tbl tr:hover td:nth-child(1){background:#f9fbff}

/* 商品资料库：分组价列（可编辑） */
table.wide-tbl th.grp-h{background:#eaf3ff;color:#1e4e9e}
table.wide-tbl td.grp-cell{padding:3px 4px}
table.wide-tbl td.grp-cell input{border:1px solid #cfe0f7;background:#f7fbff;border-radius:4px}
table.wide-tbl td.grp-cell input:focus{background:#fff;outline:2px solid #9dbdf5}
table.wide-tbl td.grp-cell .tag.b{display:inline-block;margin-left:2px;font-size:10px;padding:0 4px;border-radius:3px;background:#e5eefc;color:#1e4e9e}
table.wide-tbl td .tag{font-size:10px;color:#6b7b90}

/* 商品资料库：分组价改为点击弹框修改 */
table.wide-tbl td.grp-cell{padding:4px 6px}
table.wide-tbl td.grp-cell .grp-val{display:inline-block;min-width:56px;padding:2px 8px;border:1px dashed #cfe0f7;border-radius:4px;background:#f7fbff;cursor:pointer;text-align:right}
table.wide-tbl td.grp-cell .grp-val:hover{background:#eaf3ff;border-color:#8fb6ee;color:#1e4e9e}

/* 商品资料库：表格按内容自适应宽度，向左对齐不撑满 */
table.wide-tbl{width:auto;min-width:0}
.tblwrap:has(.wide-tbl){max-width:fit-content}

/* 商品录入：必填标记 */
.req{color:#e03131;font-weight:700;margin-right:2px}
#pb_tbl{width:auto} /* 按内容自适应宽度，避免勾选列被拉伸 */
/* 批量录入表第一列是勾选框，覆盖 wide-tbl 首列的宽粘性列样式 */
#pb_tbl th:nth-child(1),#pb_tbl td:nth-child(1){position:static;min-width:24px;width:24px;max-width:24px;white-space:nowrap;box-shadow:none;background:transparent;text-align:center;padding:4px 2px}
#pb_tbl th:nth-child(1){background:#f5f8fd;position:sticky;z-index:3}
#pb_tbl tr:hover td:nth-child(1){background:transparent}
#pb_tbl input{border:1px solid #dde4ef;border-radius:5px;padding:5px 6px;font-size:13px}
#pb_tbl td{padding:4px 5px}

/* 已隐藏列标签（点击恢复） */
.colchip{display:inline-flex;align-items:center;gap:5px;background:#eef2f9;color:#345;border:1px solid #d6e0f0;
  border-radius:14px;padding:3px 10px;font-size:12px;cursor:pointer;margin:2px 4px 2px 0;user-select:none}
.colchip:hover{background:#dce7fa;border-color:#9dbdf5;color:#1a4c96}
.colchip b{color:#c0392b;font-weight:700}

/* 商品列表内类别下拉：平时像普通文字，悬浮/聚焦才显边框 */
select.cat-sel{background:transparent;border:1px solid transparent;border-radius:5px;padding:2px 4px;
  font-size:13px;color:#5a6b85;cursor:pointer;max-width:170px}
select.cat-sel:hover,select.cat-sel:focus{background:#fff;border-color:#9dbdf5;color:#1a4c96}
select.pb-sel{border:1px solid #dde4ef;border-radius:5px;padding:5px 4px;font-size:13px}

/* 价格只读单元格 */
td.ro-price{color:#345;cursor:default;user-select:text}

/* ================= 手机端优化（≤700px，电脑端不受影响） ================= */
@media (max-width:700px){
  /* 顶栏：标题与刷新按钮一行放不下时收窄 */
  .topbar h1{font-size:15px}
  .btn-refresh{padding:4px 10px;font-size:12px}

  /* 标签页：可横向滑动，去掉滚动条 */
  .tabs{scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs a{padding:10px 13px;font-size:14px}

  /* 表单行改单列：日期/网点/供应商各占一行，控件不再被截断
     （!important 覆盖行内 style 的 width/margin，仅手机端生效） */
  .row{gap:8px}
  .row>div:not(.fix){width:auto!important;flex:1 1 100%!important;min-width:0!important;margin-left:0!important}
  /* 配送明细筛选：从/至 各占近半行，类别独占一行（三个挤一行日期会被截断） */
  .row.dl-filter-row>div.dl-date{flex:0 0 auto !important;width:auto !important;max-width:100%;margin-inline:auto !important}
  .row.dl-filter-row>div.dl-cat{flex:1 1 100% !important;width:auto !important;max-width:none}
  .row.dl-filter-row .dl-date input{width:100% !important;min-width:0 !important}
  .row.dl-filter-row .dl-cat select{width:100% !important}
  .row.pu-filter-row>div.pu-date{flex:0 0 auto !important;width:auto !important;min-width:0 !important}
  .row.pu-filter-row>div.pu-sel{flex:1 1 120px !important;width:auto !important;min-width:0 !important}
  .row.pu-filter-row .pu-date input{width:118px !important;padding:8px 4px;font-size:14px}
  .row.pu-filter-row .pu-sel select{width:100% !important;padding:8px 4px;font-size:14px}
  .row.pu-btn-row>.fix{flex:1 1 calc(50% - 8px) !important;width:auto !important;min-width:calc(50% - 8px) !important}
  .row.pu-btn-row>.fix button{width:100%;padding:9px 4px;white-space:nowrap}
  .row.pu-btn-row>.fix select{min-width:0 !important;width:100% !important}
  /* 下单明细筛选：从/至 各占近半行（日期完整显示），商品检索独占一行 */
  .row.ol-filter-row>div.ol-date{flex:1 1 45% !important;width:auto !important;max-width:none}
  .row.ol-filter-row>div.ol-kw{flex:1 1 100% !important;width:auto !important;min-width:0 !important}
  .row.ol-filter-row>div.ol-date input{width:100% !important;padding:8px 4px;font-size:14px}
  .row.ol-filter-row>div.fix{flex:0 0 auto !important;width:auto !important}
  .row.ol-filter-row>div.fix button{width:auto !important;padding:9px 14px}
  .row>div.narrow{flex:0 0 46%!important}
  .row>.fix{margin-left:0!important;flex:1 1 100%!important;width:auto!important;
            display:flex;flex-wrap:wrap;gap:8px;min-width:0!important}
  /* 按钮不再强制通栏：并排自动换行，宽度随文字 */
  .row>.fix button{width:auto;padding:10px 15px;margin:0}
  /* 日期控件：输入框占满剩余宽度，左右箭头 + 星期徽标放得下 */
  .row input[type=date]{flex:1 1 auto;width:auto!important;min-width:0}
  .wk-badge{padding:0 10px;font-size:12px}
  .date-arrow{width:32px;height:36px}

  /* 账号管理「新增账号」表单：一行两个（新账号+密码、身份+绑定方式、绑定网点通栏） */
  .row.adm-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:end}
  .row.adm-form>div{width:auto!important;flex:initial!important;min-width:0!important;margin-left:0!important}
  .row.adm-form>div.adm-full{grid-column:1/-1}
  .row.adm-form>.fix{grid-column:1/-1;width:auto!important;flex:initial!important;display:flex}
  .row.adm-form>.fix button{flex:1 1 auto;padding:10px 15px}

  /* 工具栏按钮（商品页/分拣页）：两列网格，整齐且触控友好 */
  .card>.row>.fix .act{flex:1 1 calc(50% - 4px);text-align:center;box-sizing:border-box}

  /* 宽表格：横向滚动更顺滑，首列收窄 */
  .tblwrap{-webkit-overflow-scrolling:touch}
  /* 明细表每条记录压缩为一行：表格内控件恢复紧凑尺寸（不被全局手机端大控件规则撑高） */
  #orders_tbl input,#orders_tbl select,#dl_tbl input,#dl_tbl select,#pu_tbl input,#pu_tbl select,
  .tscroll input,.tscroll select{padding:3px 5px;font-size:13px;height:auto;line-height:1.3;border-radius:5px}
  #orders_tbl td,#dl_tbl td,#pu_tbl td{padding:5px 6px}
  #orders_tbl tr,#dl_tbl tr,#pu_tbl tr{height:34px}
  table.wide-tbl th:nth-child(1),table.wide-tbl td:nth-child(1){min-width:120px;max-width:150px}
  td input{font-size:16px}
  #pb_tbl input{font-size:16px}
  select.cat-sel{font-size:15px;max-width:130px}

  /* 弹窗：占满全屏，内部表格可横向滚动 */
  .mask{padding:0}
  .modal{min-width:100vw;max-width:100vw;max-height:100vh;height:100vh;border-radius:0;padding:14px 10px}
  .modal .tblwrap{max-height:calc(100vh - 150px)}

  /* 联想下拉：触控目标加大 */
  .sugdrop div{padding:12px 14px}

  /* 分拣/溯源页网点按钮：更大触控区 */
  .cats button{padding:9px 14px;font-size:14px}

  /* 打印页工具条（A5 预览）：按钮换行不溢出 */
  .bar{flex-wrap:wrap}

  /* 下单页：日期 + 网点 同一行（日期靠左，网点占余下宽度靠右）；
     允许换行：窄屏（≤400px）时「已下单/未下单」图例放不下会自动换到下一行，避免撑破屏幕 */
  .row.ord-top{flex-wrap:wrap;align-items:flex-end;gap:8px}
  .row.ord-top>div{width:auto!important;flex:0 0 auto!important;margin-left:0!important;min-width:0!important}
  .row.ord-top>div.ord-site{flex:1 1 auto!important}
  .row.ord-top .ord-site select{width:100%;min-width:0}
  /* 日期控件在窄屏下收紧：输入框变窄但不换行 */
  .row.ord-top input[type=date]{width:146px!important;min-width:140px;padding:9px 4px}
  .row.ord-top .date-arrow{width:26px;height:36px}
  .row.ord-top .ord-site{min-width:0}
  .row.ord-top .wk-badge{display:none}   /* 同行放不下星期徽标时隐藏，日期一行时仍显示 */

  /* 下单页第二行：商品名称 + 计划数量 同一行（名称占余宽，数量窄列），备注与按钮另起 */
  .row.ord-line2{flex-wrap:wrap;gap:8px}
  .row.ord-line2>div{margin-left:0!important}
  .row.ord-line2>div.wide{flex:1 1 auto!important;width:auto!important;min-width:0!important}
  .row.ord-line2>div.narrow{flex:0 0 104px!important;width:104px!important}
  .row.ord-line2>div:not(.wide):not(.narrow):not(.fix){flex:1 1 100%!important;width:auto!important}
  .row.ord-line2>.fix{flex:1 1 100%!important}
  .row.ord-line2>.fix .act{flex:1 1 calc(50% - 4px)}

  /* 下单明细筛选行：从 / 至 两个日期同一行（网点与查询按钮换行） */
  .row.ord-filter{flex-wrap:wrap;gap:8px}
  .row.ord-filter>div{margin-left:0!important;flex:1 1 calc(50% - 4px)!important;width:auto!important;min-width:0!important}
  .row.ord-filter input[type=date]{width:100%!important}
  .row.ord-filter>.fix{flex:1 1 100%!important}
  .row.ord-filter>.fix .act{flex:1 1 100%}

  /* 打印配送单行：网点/分组保持与日期同行、靠最右（不受单列规则影响） */
  .row>div.dp-date{flex:1 1 auto!important;width:auto!important;min-width:0!important;margin-left:0!important}
  .row>div.dp-date input[type=date]{flex:0 0 130px!important;width:130px!important;min-width:120px;padding:9px 4px}
  .row>div.dp-date .wk-badge{display:none}   /* 手机端与网点同行放不下星期，隐藏 */
  .row>div.dp-scope{flex:0 0 auto!important;width:auto!important;min-width:0!important;margin-left:auto!important}
  .row>div.dp-scope select{min-width:118px;max-width:180px}
}

/* 分拣页：电脑端网点/分组与按钮跟日期同行（星期后面）；平板及手机端换行显示（避免按钮挤压/遮挡日期） */
.sort-row{flex-wrap:wrap;gap:8px}
.sort-tools{flex:0 0 auto;width:auto;min-width:0;display:flex;gap:8px;align-items:flex-end;margin-left:16px}
@media (max-width:900px){
  .sort-row{flex-direction:column!important;align-items:flex-start!important;gap:10px!important}
  /* 允许换行：3 个下拉（各 min-width 150px）在手机上放不下一行，nowrap 会撑破屏幕 */
  .sort-tools{flex-wrap:wrap!important;margin-left:0!important;margin-top:0!important;width:auto!important}
  .sort-tools>.fix{flex:0 0 auto!important}
  .sort-tools .fix select{min-width:150px}
}
/* 分拣页网点平铺选择 */
.site-pick-bar{margin-top:10px;padding-top:10px;border-top:1px dashed var(--line,#e6e9ef)}
.site-pick-bar .sp-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.site-pick-bar .sp-t{font-weight:700;font-size:13px;color:#374151}
.site-pick-bar .sp-legend{display:flex;align-items:center;gap:4px;font-size:12px;color:#6b7280;margin-left:4px}
.sp-dot{width:10px;height:10px;border-radius:3px;display:inline-block;margin:0 4px 0 6px}
.sp-dot.ok{background:#16a34a}
.sp-dot.no{background:#2563eb}
.site-pick-bar .sp-grp{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:6px}
.site-pick-bar .sp-gt{font-size:12px;color:#6b7280;flex:0 0 auto;min-width:52px}
.site-pick-bar .sp-chip{border:1px solid #cbd5e1;background:#fff;color:#94a3b8;border-radius:7px;
  padding:4px 11px;font-size:12.5px;line-height:1.4;cursor:pointer;transition:all .12s;white-space:nowrap}
.site-pick-bar .sp-chip.none{background:#e8f0fe;border-color:#a8c7fa;color:#2563eb}
/* 分拣页（非下单页）：当日无商品的网点显示浅绿（无需分拣），已下单显示深绿 */
.site-pick-bar:not(.ord-pick) .sp-chip.none{background:#f0faf3;border-color:#9fdcb4;color:#15803d}
.site-pick-bar:not(.ord-pick) .sp-chip.none.on{background:#7bd09a;border-color:#7bd09a;color:#fff;box-shadow:0 0 0 2px rgba(22,163,74,.25)}
.site-pick-bar .sp-chip.ordered{background:#e7f7ec;border-color:#9fdcb4;color:#15803d}
.site-pick-bar .sp-chip.on{font-weight:700;box-shadow:0 0 0 2px rgba(37,99,235,.18)}
.site-pick-bar .sp-chip.none.on{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 0 0 2px rgba(37,99,235,.25)}
.site-pick-bar .sp-chip.ordered.on{background:#16a34a;border-color:#16a34a;color:#fff;box-shadow:0 0 0 2px rgba(22,163,74,.25)}
.site-pick-bar .sp-chip:hover{transform:translateY(-1px)}

/* 商品库：删除勾选列 */
#p_tbl th.pck,#p_tbl td.pck{width:52px;text-align:center;padding-left:4px;padding-right:4px}
#p_tbl th.pck{white-space:nowrap;font-size:12px}
#p_tbl td.pck input{width:15px;height:15px;cursor:pointer}

/* 下单页：网点平铺选择（每行 5 个整齐排列） */
.site-pick-bar .sp-lbl{display:block;font-weight:700;font-size:13px;color:#374151;margin-bottom:6px}
.site-pick-bar .site-chips{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
.site-pick-bar .site-chips .sp-grp{display:contents}
.site-pick-bar .site-chips .sp-gt{grid-column:1/-1;font-size:12px;color:#6b7280;margin:2px 0 0}
.site-pick-bar .site-chips .sp-chip{width:100%;box-sizing:border-box;text-align:center;overflow:hidden;text-overflow:ellipsis}
/* 下单明细：日期区间同行 + 宽度收窄、网点平铺 */
.ol-filter-row{flex-wrap:wrap}
.ol-filter-row .ol-date{flex:0 0 auto;min-width:0;width:auto}
.ol-filter-row{gap:10px}
.ol-filter-row .ol-date input{width:126px;padding:7px 6px;font-size:13px}
.ol-sitebar{margin-top:10px}
.ol-sitebar .sp-lbl{display:block;font-weight:700;font-size:13px;color:#374151;margin-bottom:6px}
.ol-sitebar .site-chips{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}
/* 进货明细：从/至 与 供应商/网点/类别 各占一行，按钮一行 */
.pu-filter-row{flex-wrap:wrap;gap:10px 8px}
.pu-filter-row .pu-date{flex:0 0 auto;min-width:0;width:auto}
/* 日期区间与下拉同一行：从/至 + 供应商 + 类别，网点平铺另起一行 */
.pu-filter-row::after{content:"";flex:1 1 0;height:0}
.pu-filter-row .pu-sel{flex:0 0 auto;width:180px;min-width:0}
.pu-filter-row .pu-date input{width:132px;padding:7px 6px;font-size:13px}
.pu-selrow{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;min-width:0}
.pu-selrow .pu-sel{min-width:0;width:auto}
.pu-selrow .pu-sel select{width:100%}
.pu-filter-row .pu-sel select{width:100%}
.pu-filter-row .pu-sel select{width:100%}
/* 按钮行：按内容宽度自动换行（按钮数可变，均分挤压会溢出或裁字），
   容器随行 flex-start + gap:8px 对齐（行内 align-items:flex-end 由页面内联样式控制底对齐） */
.pu-btn-row{flex-wrap:wrap}
.pu-btn-row>.fix{flex:0 0 auto;min-width:0}
.pu-btn-row>.fix button{width:100%;padding:6px 6px;font-size:12.5px;white-space:nowrap}
/* 配送明细：查询/导出Excel 一行平均分配 */
.dl-btn-row{flex-wrap:nowrap;align-items:flex-start}
.dl-btn-row>.fix{flex:1 1 0;min-width:0}
.dl-btn-row>.fix button{width:100%;padding:6px 10px;font-size:12.5px;white-space:nowrap}
/* 打印配送单：日期与网点分组控件上下对齐 */
.row:has(.dp-date){align-items:flex-end}
.dp-date input[type=date],.dp-scope select{height:38px;box-sizing:border-box}
.site-pick-bar .sp-legend .sp-dot{width:10px;height:10px;border-radius:3px;display:inline-block;margin:0 4px 0 8px}
.site-pick-bar .sp-legend .sp-dot.ok{background:#16a34a}
.site-pick-bar .sp-legend .sp-dot.no{background:#2563eb}
.site-pick-bar .sp-tail{margin-top:4px;font-size:12px}
.ord-pick{margin-top:6px;padding-top:8px}
.ord-pick .sp-grp{margin-bottom:6px}
@media (max-width:700px){
  .site-pick-bar .site-chips{grid-template-columns:repeat(5,1fr)}
}

/* 弹窗顶部拖动条 */
.modal-dragbar{display:flex;align-items:center;height:26px;margin:-12px -16px 6px;padding:0 40px 0 12px;
  background:linear-gradient(90deg,#eef2f9,#f7f9fd);border-bottom:1px solid #e3e8f0;border-radius:10px 10px 0 0;
  cursor:move;user-select:none}
.modal-dragbar span{font-size:11px;color:#8aa;letter-spacing:.5px}
.modal-dragbar:active{background:#e4ebf7}

/* 配送单：隐藏金额开关 */
.sw-wrap{display:inline-flex;align-items:center;gap:6px;font-weight:400;font-size:13px;color:#374151;cursor:pointer;
  border:1px solid #d7dfea;background:#f7f9fd;border-radius:8px;padding:7px 12px}
.sw-wrap input{width:auto;margin:0;cursor:pointer}
.sw-wrap:hover{background:#eef2f9;border-color:#b9c7da}
/* 桌面端：顶栏+导航固定，滚动时始终可见 */
@media (min-width:769px){
  .topfixed{position:sticky;top:0;z-index:60;box-shadow:0 2px 8px rgba(0,0,0,.12)}
  .topfixed .tabs{overflow-x:visible}
}

/* 商品名称可点击修改 */
td.pn .pn-edit{cursor:pointer;border-bottom:1px dashed #b9c6dd;padding-bottom:1px}
td.pn .pn-edit:hover{color:#1e4e9e;border-bottom-color:#1e4e9e;background:#eef3fc}
td.pn .pn-edit::after{content:' ✎';font-size:11px;color:#9aa8bd}

/* ===== 统一控件高度（桌面端） ===== */
/* 日期输入框、箭头、下拉、按钮统一高 34px，上下对齐 */
input[type=date]{height:34px;box-sizing:border-box}
.date-arrow{width:34px !important;height:34px !important;border-radius:6px}
/* 新增订单：日期与两侧箭头等大 */
.row.ord-top .ord-date input[type=date]{height:34px}
/* 配送明细：日期与类别同高 */
.dl-filter-row input[type=date],.dl-filter-row select{height:34px;box-sizing:border-box}
/* 配送明细：导出Excel按钮紧跟商品检索（与输入框同高、顶对齐） */
.dl-filter-row>div.dl-exp{flex:0 0 auto;width:auto;min-width:0}
.dl-filter-row>div.dl-exp button{height:34px;padding:0 14px;white-space:nowrap;font-size:13px}
/* 分拣页：日期 + 按钮同一行、同高 */
.sort-row{align-items:flex-end}
.sort-row>.sort-date{width:auto;flex:0 0 auto}   /* 覆盖 .row>div 的固定 150px：宽度随内容（箭头+输入框+星期徽标），徽标不被打印方式遮挡 */
.sort-date input[type=date]{height:34px;box-sizing:border-box}
.sort-tools .fix button{height:34px;box-sizing:border-box;padding:0 16px}
/* 打印方式：任何宽度下都不被压缩（标签不折行、下拉保持可选全宽度），也不遮挡日期/星期徽标 */
.sort-tools>.fix{flex:0 0 auto;min-width:0}
.sort-tools .fix label{white-space:nowrap}
.sort-tools .fix select{min-width:150px;width:150px}
/* 导出 Excel 按钮统一绿色 */
button.act.gray.export-xlsx,button.act.export-xlsx{background:var(--green) !important;color:#fff}

/* ===== 顶栏重排：版本号跟随标题，按钮一行右对齐 ===== */
.topbar .ver-inline{font-size:12px;font-weight:400;color:#cfe0ff;margin-left:10px;white-space:nowrap}
.topbar .ver-inline .version{color:#fff;font-weight:600}
.topbar .topbtns{display:flex;flex-wrap:wrap;gap:6px;align-items:center;white-space:nowrap;justify-content:flex-end;max-width:100%}
.topbar .row2{flex-wrap:wrap}
@media (max-width:900px){
  .topbar .topbtns{flex-wrap:wrap;justify-content:flex-end}
  .topbar .ver-inline{font-size:11px;margin-left:6px}
}
/* ===== 商品资料库筛选：类别+上架一行 / 来源+分组+条数一行 / 查询通栏 ===== */
.row>div.pf-line2,.row>div.pf-line3,.row>div.pf-full{flex:1 1 100%;width:100%;min-width:0;max-width:none}
.pf-line2>label,.pf-line3>label{display:none}
.pf-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pf-triple{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.pf-pair>div,.pf-triple>div{min-width:0}
.pf-pair select,.pf-triple select{width:100%;height:34px;box-sizing:border-box}
@media (max-width:600px){
  .row .pf-line2>div.pf-pair,.row .pf-line3>div.pf-triple{display:grid !important}
}

/* ===== 新增订单日期箭头：浅蓝底 + 放大三角 ===== */
.row.ord-top .date-arrow{background:#dce9fb !important;border:1px solid #b5cff0 !important}
.row.ord-top .date-arrow:hover{background:#c9dcf8 !important}
.row.ord-top .tri-l,.row.ord-top .tri-r{border-top-width:9px;border-bottom-width:9px}
.row.ord-top .tri-l{border-right:13px solid #2b5fc4}
.row.ord-top .tri-r{border-left:13px solid #2b5fc4}
/* 顶栏第二排：日期居左，按钮右对齐 */
.topbar .row2{justify-content:space-between}
.topbar .row2 .topbtns{margin-left:auto}

/* 商品库筛选：三联下拉在手机端缩小字号，保证「分组 ×结算率」完整显示 */
@media (max-width:767px){.pf-triple select{font-size:12px;padding:7px 3px}}
/* 商品库筛选：类别/上架状态/分组/来源/条数 下拉加高，文字完整显示 */
.pf-pair select,.pf-triple select{height:44px;font-size:15px;padding:4px 8px}
@media (max-width:767px){
  .pf-pair select,.pf-triple select{height:42px;font-size:14px;padding:6px 4px}
  .pf-triple{grid-template-columns:1.35fr 0.95fr 0.7fr}
  .pf-triple select{font-size:12.5px}
}

/* 桌面端：平铺网点按钮自适应——每个按钮等宽（=最宽按钮），自动平铺不限制每行个数 */
@media (min-width:701px){
  .site-pick-bar .site-chips,
  .ol-sitebar .site-chips{
    grid-template-columns:repeat(auto-fill,minmax(105px,1fr)) !important;
    justify-content:start;
    gap:5px;
  }
  .site-pick-bar .site-chips .sp-chip{width:auto;min-width:0;padding:4px 7px;font-size:18.75px;line-height:1.25}
  .dl-sites-bar{grid-template-columns:repeat(auto-fill,minmax(120px,1fr)) !important;justify-content:start;gap:4px}
  .dl-site-btn{padding:3px 5px 3px 8px !important}
  .dl-site-btn .ds-nm{font-size:17px !important}
  .dl-site-btn .ds-cnt{font-size:11px !important}
  .dl-site-btn .ds-sub{font-size:9.75px !important;margin-top:0 !important}
  .dl-site-btn .ds-bar{margin-top:2px !important;height:2px !important}
  .dl-sites-bar .ds-sub{margin-top:0 !important}
}

/* 桌面端：明细查询/导出按钮行、商品库查询按钮——左对齐自适应宽度，不撑满 */
@media (min-width:701px){
  .dl-btn-row>.fix,.pu-btn-row>.fix{flex:0 0 auto !important}
  .dl-btn-row>.fix button,.pu-btn-row>.fix button{width:auto !important;min-width:67px;padding:6px 12px}
  .row>div.pf-full{flex:0 0 auto !important;width:auto !important;max-width:none}
  .pf-full button{width:auto !important;padding:7px 17px}
}

/* 桌面端：所有按钮宽度收窄 30%（字号与高度不变，仅压缩左右留白） */
@media (min-width:701px){
  #view button{
    max-width:70% !important;
    padding-left:calc(12px * .7) !important;
    padding-right:calc(12px * .7) !important;
  }
}

/* ===== 手机端：下单/配送/进货明细表格自适应屏幕（仅手机端生效，桌面不受影响） ===== */
@media (max-width:700px){
  /* 通用压缩：小字号、紧凑内边距、允许换行 */
  #orders_tbl th,#orders_tbl td,#dl_tbl th,#dl_tbl td,#pu_tbl th,#pu_tbl td{
    font-size:12px;padding:5px 4px;white-space:normal;word-break:break-all}
  #orders_tbl input,#dl_tbl input,#pu_tbl input{width:52px !important;min-width:0;padding:3px 2px;font-size:13px}
  #dl_tbl select{width:74px !important}
  #orders_tbl select{width:64px !important}
  #orders_tbl .act.sm,#dl_tbl .act.sm,#pu_tbl .act.sm{padding:4px 7px;font-size:11px}
  /* 下单明细：隐藏 日期/结算价/金额（保留 网点/商品/餐次/单位/数量/备注/操作） */
  #orders_tbl tr>*:nth-child(1),
  #orders_tbl tr>*:nth-child(7),
  #orders_tbl tr>*:nth-child(8){display:none}
  /* 进货明细：隐藏 日期/类别/配送日期/采购价/供应商（保留 网点/商品/单位/数量/结算价/合计/核对/验收/备注） */
  #pu_tbl tr>*:nth-child(2),
  #pu_tbl tr>*:nth-child(6),
  #pu_tbl tr>*:nth-child(8),
  #pu_tbl tr>*:nth-child(9),
  #pu_tbl tr>*:nth-child(14){display:none}
  /* 配送明细：隐藏 日期/类别/计划/采购价/毛利/配送状态（保留 序号/网点/商品/单位/配送数量/验收数量/结算价/金额/验收状态/备注） */
  #dl_tbl [data-k="ddate"],#dl_tbl [data-k="category"],#dl_tbl [data-k="plan_qty"],
  #dl_tbl [data-k="purchase_price"],#dl_tbl [data-k="profit"],#dl_tbl [data-k="lock_status"]{display:none}
}
/* 下单明细：表头与列再压缩，确保 390px 屏幕无横向滚动 */
@media (max-width:700px){
  #orders_tbl th{font-size:11px;padding:4px 2px}
  #orders_tbl input{width:46px !important}
  #orders_tbl select{width:58px !important}
  #orders_tbl td{padding:5px 2px}
  /* 单位列信息量低，手机端隐藏，保证整表无横向滚动 */
  #orders_tbl tr>*:nth-child(5){display:none}
}

/* ===== 顶栏右上角账户按钮 ===== */
.topbar .row1 .me-top{margin-left:auto;flex:0 0 auto;background:rgba(255,255,255,.2);color:#fff;font-weight:600;font-size:13px;padding:5px 14px;border-radius:16px;border:1px solid rgba(255,255,255,.35);cursor:pointer;white-space:nowrap;position:relative;z-index:1000}
.topbar .row1 .me-top:hover{background:rgba(255,255,255,.32)}

/* 列表筛选日期控件（含左右箭头）：内层容器按内容自适应，避免箭头溢出遮挡相邻元素 */
.ol-date>div,.dl-date>div,.pu-date>div,.narrow>div{width:max-content;max-width:100%}
.row.tight .dl-date>div,.row.tight .ol-date>div,.row.tight .pu-date>div,.row.tight .narrow>div{width:max-content;max-width:100%}
.row.tight>div.dl-date,.row.tight>div.ol-date,.row.tight>div.pu-date,.row.tight>div.narrow{width:max-content;max-width:100%}
.row.tight>div.dp-date{width:max-content;max-width:100%}
.sort-date>div{width:max-content;max-width:100%}

/* ===== 溯源报告上传框（支持拖拽 / 点选 / 粘贴） ===== */
.updz{border:2px dashed #9db8e6;background:#f7faff;border-radius:12px;padding:20px 16px;text-align:center;
  cursor:pointer;transition:background .15s,border-color .15s,transform .1s;color:#33445f}
.updz:hover{background:#eef4ff;border-color:#5b8fe0}
.updz.over{background:#e3f0ff;border-color:#1e6fd9;transform:scale(1.005);box-shadow:inset 0 0 0 3px rgba(30,111,217,.08)}
.updz.over::after{content:''}
.uprow{display:flex;align-items:center;gap:8px;font-size:13px;padding:6px 9px;border:1px solid #e6ecf5;border-radius:8px;background:#fff;margin-bottom:5px}
.uprow .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#33445f}
/* 溯源商品表：内容多时锁定表头，只滚动表体 */
.tscroll{overflow:auto;-webkit-overflow-scrolling:touch;max-height:62vh;border-radius:8px}
.tscroll thead th{position:sticky;top:0;z-index:2;background:#f2f6fc;box-shadow:inset 0 -1px 0 #dfe6f0}
@media (max-width:700px){.updz{padding:16px 12px}}
/* 肉类上传：检疫证明/肉品合格证拖放区（拖到按钮上，两种都拖好后一次上传） */
.mqzone{transition:box-shadow .15s,background .15s}
.mqzone:hover{box-shadow:0 2px 10px rgba(30,78,158,.12)}
.mqzone.over{box-shadow:inset 0 0 0 3px #1e6fd9;background:#e3f0ff!important}

/* ===== 溯源明细：生效日期框 / 上传按钮 / 报告照片 上下居中对齐 ===== */
#t_detail td .act.sm,#t_detail td input[type=date],#t_detail td .tchip{vertical-align:middle}
#t_detail td .tchip img{display:block}

/* ===== 溯源品类按钮：只显示品类名（颜色表示状态），手机端等宽均匀排列；261126-57：整体放大 20% ===== */
#t_cats button.tcat{border:none;border-radius:21px;padding:7px 14px;font-size:16px;font-weight:700;
  color:#fff;cursor:pointer;white-space:nowrap;line-height:1.2}
@media (max-width:700px){
  #t_cats{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:10px}
  #t_cats button.tcat{width:100%;padding:12px 2px;font-size:15px;border-radius:13px;
    overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
  /* 261125-53：年检上传/留样打印独立按钮行；261126-55：手机端独占一行两列等宽 */
  #t_catops{display:grid !important;width:100%;grid-template-columns:repeat(2,1fr);gap:7px;margin:8px 0 0}
  #t_catops button{width:100% !important;padding:10px 2px !important;font-size:12.5px;box-sizing:border-box;border-radius:11px}
}

/* ===== 商品资料库：采购价可点击修改（与基准价同款样式） ===== */
table.wide-tbl td .pur-val{display:inline-block;min-width:52px;padding:2px 8px;border:1px dashed #d8e4f5;border-radius:4px;background:#fbfdff;cursor:pointer;text-align:right}
table.wide-tbl td .pur-val:hover{background:#eaf3ff;border-color:#8fb6ee;color:#1e4e9e}

/* ===== 长说明就地折叠：默认隐藏，点「📖 操作说明」展开 ===== */
.hinttgl{font-size:12px;color:#5a6b85;background:#f4f7fb;border:1px solid #d5deed;border-radius:8px;padding:3px 12px;cursor:pointer;margin:2px 0}
.hinttgl.open{color:#1e6fd9;background:#eaf3ff;border-color:#8fb6ee;font-weight:700}
.hbody{display:none!important}
.hbody.open{display:block!important;max-width:100%;overflow-wrap:anywhere;word-break:break-word}

/* ===== 商品库「新基准价」单元格：仅新价输入框（启用日期走表头 📅 图标全局设置） ===== */
table.wide-tbl td.nbp-cell{white-space:nowrap;padding:3px 6px;min-width:70px}
table.wide-tbl td.nbp-cell input{font-size:13px;border:1.5px solid #cdd7e6;border-radius:6px;padding:4px 5px;box-sizing:border-box}
table.wide-tbl td.nbp-cell .nbp-in{width:62px;text-align:right}

/* ===== 明细表表头锁定：表格容器自身纵向滚动，表头吸附在容器顶部（下单/配送/进货/分拣当日明细/商品库明细） ===== */
.stickwrap{max-height:calc(100vh - 240px);overflow:auto;scrollbar-width:thin;border-radius:8px}
.stickwrap table{margin:0}
.stickwrap th{position:sticky;top:0;z-index:6;box-shadow:inset 0 -1px 0 #dfe6f0}
.stickwrap table.wide-tbl th:nth-child(1){z-index:7}
@media (max-width:700px){.stickwrap{max-height:calc(100vh - 190px)}}

/* ===== 手机端补充调整（2026-11-18） ===== */
/* 窄屏（≤480px）：网点平铺按钮 4 个一行，长网点名少截断 */
@media (max-width:480px){
  .dl-sites-bar{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* 看板轮播：手机端工具条换行（原 nowrap 导致「退出全屏轮播」按钮够不着）；
   统计数字为电视大屏设计的 42px 在手机卡片里溢出，缩小 */
@media (max-width:700px){
  #car_bar{flex-wrap:wrap !important;row-gap:6px;padding:8px 10px}
  #car_bar>span{display:none}
  #car_bar>select,#car_bar>input{display:none}
  #dash_car_body{padding-top:104px !important}
  #dash_car .stat .num{font-size:26px !important}
  #dash_car .stat .lbl{font-size:13px !important}
}
/* 窄屏（≤480px）：下单筛选行日期各占整行（max-content 内部宽度在 360px 下并排放不下），
   商品检索框占满整行 */
@media (max-width:480px){
  .row.ol-filter-row>div.ol-date{flex:1 1 100% !important}
  .row.ol-filter-row .ol-date>div{width:100% !important;max-width:100% !important}
  .row.ol-filter-row .ol-date input{flex:1 1 auto;width:auto !important;min-width:0 !important}
  .row.ol-filter-row .ol-date .date-arrow{width:28px !important}
  .row.ol-filter-row .ol-kw{flex:1 1 100% !important}
  .row.ol-filter-row .ol-kw input{flex:1 1 auto;width:auto !important;min-width:0 !important}
}
/* 进货工具行导出块：窄屏占满整行，导出方式/选择分组/导出Excel 按内容自动换行 */
@media (max-width:767px){
  #pl_expwrap{flex:1 1 100%!important;width:auto!important;min-width:0!important}
  #pl_expwrap>div{flex:0 0 auto;min-width:0}
  #pl_expwrap select{max-width:100%}
}
/* 进货页网点平铺：按分组分行显示（组名在行首，组按网点数降序） */
.dl-sites-bar.pl-grps{display:block}
/* 按钮固定约 6 个汉字宽（88px），一行能放更多网点；auto-fill 自动换行 */
.dl-sites-bar.pl-grps .pl-grp-row{display:grid;grid-template-columns:repeat(auto-fill,88px);gap:5px;margin-top:4px}
.dl-sites-bar.pl-grps .sp-gt{grid-column:1/-1;font-size:12.5px;font-weight:700;color:#4a5b74;padding-top:2px}
/* 进货工具行：容器随按钮内容宽度（不再固定 150px），按钮宽度自适应，
   行 gap:8px 即视觉间距完全一致 */
.row.pu-btn-row>div{width:auto;min-width:0}
.pu-btn-row>.fix button{width:auto;box-sizing:border-box;padding:6px 12px}

/* 网点账号管理：表格内容左对齐 */
#su_tbl th,#su_tbl td{text-align:left;vertical-align:middle}

/* ===== 手机端：日期左右箭头缩小30%、时间段尽量排一行（2026-11-19） ===== */
@media (max-width:700px){
  /* 左右三角按钮 34×34 → 24×24（缩小30%），三角形同步缩小 */
  .date-arrow{width:24px !important;height:24px !important;border-radius:5px}
  .tri-l,.tri-r{border-top-width:4px;border-bottom-width:4px}
  .tri-l{border-right:6px solid #fff}
  .tri-r{border-left:6px solid #fff}
  /* 下单页的放大浅蓝箭头同步缩小 */
  .row.ord-top .date-arrow{width:24px !important;height:24px !important}
  .row.ord-top .tri-l,.row.ord-top .tri-r{border-top-width:6px;border-bottom-width:6px}
  .row.ord-top .tri-l{border-right:9px solid #2b5fc4}
  .row.ord-top .tri-r{border-left:9px solid #2b5fc4}
  /* 打印配送单：配送日期 + 至 同一行（平分整行宽度），网点/分组与打印按钮另起一行 */
  .row>div.dp-date{flex:1 1 0 !important;width:auto !important;min-width:0 !important;margin-left:0 !important}
  .row>div.dp-date input[type=date]{flex:1 1 auto !important;width:auto !important;min-width:0 !important}
  .row>div.dp-scope{flex:1 1 100% !important;width:auto !important;margin-left:0 !important}
  .row>div.dp-scope select{min-width:0;width:100%;max-width:none}
  /* 弹窗内 从/至（当日供货价/进货价录入）两个日期同一行 */
  .row>div.rng{flex:1 1 calc(50% - 4px) !important;width:auto !important;min-width:0 !important;margin-left:0 !important}
  .row>div.rng>div{width:100% !important;max-width:100% !important}
  .row>div.rng input[type=date]{flex:1 1 auto !important;width:auto !important;min-width:0 !important}
  /* 下单明细 ≤480：从/至 保持同一行（配合缩小后的箭头放得下） */
  .row.ol-filter-row>div.ol-date{flex:1 1 46% !important}
  .row.ol-filter-row .ol-date>div{width:100% !important;max-width:100% !important}
  .row.ol-filter-row .ol-date input{flex:1 1 auto;width:auto !important;min-width:0 !important}
  .row.ol-filter-row .ol-date .date-arrow{width:24px !important}
}

/* ===== 日期输入统一显示 YYYY-MM-DD（datefmt.js 覆盖层） ===== */
span.dfw{position:relative;display:inline-flex;min-width:0}
span.dfv{position:absolute;display:flex;align-items:center;pointer-events:none;white-space:nowrap;overflow:hidden;border-radius:2px}
span.dfw>input[type=date]:focus~span.dfv{display:none!important}
@media(max-width:700px){
  .row.dl-filter-row .dl-date span.dfw{width:auto !important;flex:0 0 auto !important;min-width:0}
  .row.dl-filter-row .dl-date span.dfw>input{width:100%!important;min-width:0!important;text-align:center}
  .row.ol-filter-row .ol-date span.dfw{width:100%;flex:1 1 auto;min-width:0}
  .row.ol-filter-row .ol-date span.dfw>input{width:100%!important;min-width:0!important}
  /* 手机端日期框高度缩小（上下 padding 收紧，文字垂直居中） */
  .row input[type=date]{padding:5px 4px!important;font-size:14px!important}
  /* 配送明细：分组/网点 + 类别 一行，商品检索 + 导出Excel 一行 */
  .row.dl-filter-row>div.dl-scope{flex:1 1 48% !important;width:auto !important;max-width:none;min-width:0 !important}
  .row.dl-filter-row>div.dl-cat{flex:1 1 48% !important;width:auto !important;max-width:none}
  .row.dl-filter-row .dl-scope select,.row.dl-filter-row .dl-cat select{width:100% !important;min-width:0 !important}
  .row.dl-filter-row>div.dl-kw{flex:1 1 62% !important;width:auto !important;max-width:none;min-width:0 !important}
  .row.dl-filter-row .dl-kw input{width:100% !important;min-width:0 !important}
  .row.dl-filter-row>div.dl-exp{flex:0 0 auto !important;width:auto !important;min-width:0 !important}
  .row.dl-filter-row>div.dl-exp label{display:none}
  .row.dl-filter-row>div.dl-exp button{height:34px;padding:0 8px;font-size:12px;white-space:nowrap}
  /* 进货打印：日期框适应数字宽度靠左；打印方式+选择分组一行；按钮另起通栏 */
  .row>div.pu-pdate{flex:0 0 auto !important;width:auto !important;min-width:0 !important}
  .row>div.pu-pdate span.dfw{flex:0 0 auto !important;width:auto !important}
  .row>div.pu-pdate span.dfw>input{flex:0 0 auto !important;width:auto !important;min-width:0 !important}
  #p_bywrap{flex:1 1 45% !important;width:auto !important;min-width:0 !important}
  #p_grpwrap{flex:1 1 45% !important;width:auto !important;min-width:0 !important}
  #p_bywrap select,#p_grpwrap select{width:100% !important;min-width:0 !important}
  .row>#p_grpwrap~.fix{flex:1 1 100% !important}
  .row>#p_grpwrap~.fix label{display:none}
  /* 商品库筛选紧凑：搜索+类别一行，价格分组/价格来源一行，每页条数+查询一行 */
  #p_kwwrap{flex:1 1 55% !important;width:auto !important;min-width:0 !important}
  #p_kwwrap input{padding:5px 8px;font-size:13px}
  #p_catrow{flex:0 0 42% !important;width:auto !important;min-width:0 !important}
  #p_catrow #p_cat_btn{padding:5px 8px;font-size:13px}
  #p_grprow,#p_psrcrow{flex:1 1 48% !important;width:auto !important;min-width:0 !important}
  #p_sizerow{flex:0 0 40% !important;width:auto !important;min-width:0 !important}
  .row>div.pf-full{flex:1 1 55% !important;width:auto !important;min-width:0 !important}
  #p_qbtn{order:9 !important}   /* 手机端查询按钮仍排行尾（桌面端紧跟搜索框） */
  #p_grprow select,#p_psrcrow select,#p_sizerow select{width:100% !important;min-width:0 !important;padding:5px 8px}
  #p_grprow label,#p_psrcrow label,#p_sizerow label{margin-bottom:2px}
  /* 进货页网点平铺按钮：一行 4 个 */
  .dl-sites-bar.pl-grps .pl-grp-row{grid-template-columns:repeat(4,minmax(0,1fr))}
  /* 配送明细网点平铺：分组标签收窄，组内按钮一行 4 个 */
  .dl-grp-tag{flex:0 0 52px !important;font-size:10px !important}
  .dl-grp-items .dl-site-btn{flex:0 0 calc((100% - 20px)/5) !important;width:calc((100% - 20px)/5) !important;min-width:0 !important}
  #ol_chips .dl-site-btn{padding:4px 1px 4px 4px !important}   /* 下单明细平铺：收窄内边距，四字简称完整显示 */
  #ol_chips .dl-site-btn>span{width:4px}
  #ol_chips .dl-site-btn .ds-nm{font-size:10.5px !important}
  .dl-sites-bar>button.dl-site-btn{flex:0 0 108px !important;width:108px !important}
  /* 进货明细：导出方式+选择分组+导出Excel 一行（按钮放分组后面，不再另起一行） */
  .row.pu-btn-row>#pl_expwrap{flex:1 1 100% !important;width:auto !important;min-width:0 !important;flex-wrap:nowrap !important}
  #pl_expwrap>div{flex:1 1 0 !important;min-width:0 !important}
  #pl_expwrap select{width:100% !important;min-width:0 !important;padding:7px 6px !important;font-size:13px !important}
}

/* ===== 日期框统一自适应文字大小：框宽=文字宽，区间两框居中、单框靠左（桌面 144px/手机 106px） ===== */
.row .dfw, .row>div span.dfw{width:auto !important;flex:0 0 auto !important}
.row .dfw>input[type=date]{width:100% !important;min-width:0 !important;text-align:center}
.row .dp-date span.dfw>input[type=date],.row .dl-date span.dfw>input[type=date],.row .pu-pdate span.dfw>input[type=date],.row .ord-date span.dfw>input[type=date],.row .sort-date span.dfw>input[type=date]{width:100% !important;min-width:0 !important;text-align:center}
.row>div.dp-date,.row>div.dl-date,.row>div.pu-pdate,.row>div.ord-date,.row>div.sort-date{flex:0 0 auto !important;width:auto !important;max-width:100%}
.row>div.dp-date,.row>div.pu-pdate,.row>div.ord-date,.row>div.sort-date{margin-inline:0 !important}   /* 桌面端统一靠左（手机端另有规则） */
@media(max-width:700px){
  .row>div.dl-date{margin-inline:auto !important}   /* 手机端区间居中保留 */
  .row .dfw>input[type=date],.row .dp-date span.dfw>input[type=date],.row .dl-date span.dfw>input[type=date],.row .pu-pdate span.dfw>input[type=date],.row .ord-date span.dfw>input[type=date],.row .sort-date span.dfw>input[type=date]{width:106px !important}
  .row>div.dp-date>div>span.wk-badge,.row>div.dl-date>div>span.wk-badge{flex:0 0 auto;min-width:0}
}

/* ===== 网点平铺统一：左侧分组标签模块 + 右侧网点按钮（下单/进货/分拣页，与配送页格式一致） ===== */
.site-pick-bar .site-chips{display:flex;flex-direction:column;gap:5px}
.site-pick-bar .site-chips .sp-grp2,.dl-sites-bar.pl-grps .sp-grp2{display:flex;align-items:stretch;gap:5px;min-width:0}
.site-pick-bar .site-chips .sp-grp-tag,.dl-sites-bar.pl-grps .sp-grp-tag{flex:0 0 78px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:12px;font-weight:900;color:#3c4a63;background:#eef3fb;border:1px solid #dbe3f0;border-radius:8px;padding:4px;cursor:pointer;line-height:1.15;word-break:break-all;user-select:none}
.site-pick-bar .site-chips .sp-grp-tag.static{cursor:default}
.site-pick-bar .site-chips .sp-grp2.on .sp-grp-tag,.dl-sites-bar.pl-grps .sp-grp2.on .sp-grp-tag{background:#2b5fc4;color:#fff;border-color:#2b5fc4}
.site-pick-bar .site-chips .sp-grp-items,.dl-sites-bar.pl-grps .sp-grp-items{flex:1 1 auto;display:flex;flex-wrap:wrap;gap:5px;min-width:0;align-items:stretch}
.dl-sites-bar.pl-grps .sp-grp-items .dl-site-btn{width:96px !important;flex:0 0 96px}
@media(max-width:700px){
  .site-pick-bar .site-chips{display:flex !important;flex-direction:column;gap:5px}
  .site-pick-bar .site-chips .sp-grp-tag,.dl-sites-bar.pl-grps .sp-grp-tag{flex:0 0 52px !important;font-size:10.5px !important;padding:3px 3px}
  .site-pick-bar .site-chips .sp-grp-items,.dl-sites-bar.pl-grps .sp-grp-items{display:grid !important;grid-template-columns:repeat(5,minmax(0,1fr)) !important;gap:5px}
  .site-pick-bar .site-chips .sp-grp-items .sp-chip{width:100% !important;min-width:0 !important;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center;padding:4px 2px;font-size:11px !important;line-height:1.25}
  .dl-sites-bar.pl-grps .sp-grp-items .dl-site-btn{padding:3px 2px 3px 4px !important}
  .dl-sites-bar.pl-grps .sp-grp-items .dl-site-btn .ds-nm{font-size:10.5px !important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0}
  .dl-sites-bar.pl-grps .sp-grp-items .dl-site-btn .ds-cnt{font-size:10px !important;flex:0 0 auto;margin-left:2px}
  .dl-sites-bar.pl-grps .sp-grp-items .dl-site-btn{width:100% !important;flex:1 1 auto !important}
  .dl-sites-bar.pl-grps .sp-grp2.allrow .sp-grp-items{display:flex !important}
  .dl-sites-bar.pl-grps .sp-grp2.allrow .sp-grp-items .dl-site-btn{flex:0 0 108px !important;width:108px !important}
}

/* ===== 分拣页补货推送弹窗（工作台版，与分拣打印页功能一致） ===== */
.pr-dlg .pr-hd{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px}
.pr-dlg .pr-title{font-size:20px;font-weight:900;color:#1e4e9e}
.pr-dlg .pr-sub{font-size:12.5px;color:#667;margin-top:2px}
.pr-dlg .prstat{flex:1;background:#eef2f8;border-radius:10px;padding:8px 10px;text-align:center;cursor:pointer;border:2px solid transparent;user-select:none}
.pr-dlg .prstat b{display:block;font-size:22px;color:#2b5fc4}
.pr-dlg .prstat span{font-size:12px;color:#667}
.pr-dlg .prstat.ok{background:#e9f7ef}.pr-dlg .prstat.ok b{color:#1e9e5a}
.pr-dlg .prstat.warn{background:#fdf3e0}.pr-dlg .prstat.warn b{color:#b3591e}
.pr-dlg .prstat.on{border-color:#2b5fc4;background:#e7effb}
.pr-dlg .prnum{color:#2b5fc4;cursor:pointer;text-decoration:underline dotted}
.pr-dlg #pr_detail .prt{font-size:13px;font-weight:800;color:#1e4e9e;margin:2px 0 6px}
.pr-dlg #pr_detail table{width:100%;border-collapse:collapse;font-size:12.5px}
.pr-dlg #pr_detail td{padding:4px;border-top:1px solid #eef1f6}
.pr-dlg .prmode{border:1px solid #c5d2e6;background:#fff;color:#445;border-radius:16px;padding:6px 14px;font-size:13px;font-weight:700;cursor:pointer}
.pr-dlg .prmode.on{background:#2b5fc4;border-color:#2b5fc4;color:#fff}
.pr-dlg .pr-tip{font-size:12.5px;color:#445;line-height:1.7;margin-bottom:8px;background:#f6f9fd;border:1px solid #e3ebf6;border-radius:8px;padding:6px 10px}
.pr-dlg .pr_items table{width:100%;border-collapse:collapse;font-size:12.5px}
.pr-dlg .pr_items td{padding:4px;border-top:1px dashed #e5eaf2}

/* 修复：全局 input{width:100%} 会把补货推送弹窗的勾选框拉伸到整行宽（勾选图标居中、商品名被挤到下一行） */
.pr-dlg .pr_ck,.pr-dlg .pr_it{width:14px !important;height:14px !important;flex:0 0 auto;padding:0;margin:0;vertical-align:middle;accent-color:#2b5fc4}

/* 修复：全局 input{width:100%} 会把弹窗内 label 里的勾选框/单选框拉伸到整行宽（图标远离文字、说明被挤到右边） */
.modal label input[type=checkbox],.modal label input[type=radio]{width:15px !important;height:15px !important;flex:0 0 auto;padding:0;margin:0;vertical-align:middle;accent-color:#2b5fc4}
.modal label{justify-content:flex-start;text-align:left}
.modal label>span{flex:1 1 auto;min-width:0;text-align:left}

/* 261120-52 权限与账号中心：手机端侧边导航改为顶部横向排列 */
@media (max-width:760px){
  #pcx_shell{flex-direction:column !important;min-height:0 !important;height:auto !important}
  #pcx_side{width:100% !important;flex:0 0 auto !important;display:flex;flex-wrap:wrap;gap:6px;border-right:none !important;border-bottom:1px solid #e3e8f0;padding:6px 2px 10px !important}
  #pcx_side > div{width:100%;padding:2px 4px 4px !important}
  #pcx_side [data-mod]{width:auto !important;flex:1 1 44%;text-align:center !important;margin-bottom:0 !important;padding:9px 8px !important}
  #pcx_side [data-mod] span{display:none}
  #pcx_body{max-height:none !important;padding:10px 2px 4px !important}
}

/* ===== 261123-12 食谱设计下发专用窗口（index.html?dsp=1）：隐藏工作台骨架，只显示设计下发弹窗 ===== */
body.dsponly>*:not(#mask):not(#loginov):not(#dsp_logout){display:none!important}   /* 261124-20：dsp 窗口右上角退出登录按钮放行 */
body.dsponly{background:#f2f5fa}
body.dsponly::after{content:'🍚 食谱设计下发专用窗口 —— 用完可直接关闭此标签页';position:fixed;inset:0;display:flex;align-items:center;justify-content:center;color:#9aa7bd;font-size:15px;letter-spacing:1px;z-index:0}

/* 261201-51 页面底部备案信息：ICP 备案号链接工信部备案系统，清晰可点但不喧宾夺主 */
.site-footer{text-align:center;padding:8px 0 18px;font-size:12px;color:#8894a7}
.site-footer .beian-line{margin-top:4px}
.site-footer .beian-line a{color:#6a7c98;text-decoration:none;transition:color .15s}
.site-footer .beian-line a:hover{color:#1e4e9e;text-decoration:underline}
