/* 二期列表页共用样式
   来源：一期的订单列表（DemoNew/mini/trade/clerk_orders.html）页面样式——**照搬**，只去掉外壳部分
   （外壳 stage/phone/statusbar/topbar/scroll/bottom-nav/toast 仍由各页自己的 phase2.css 提供）。
   凡是列表页都链上本文件，保证「采购／销售／加工／应收／库存／客户／供应商／消息」长得一样。 */

/* 摘要行 + 搜索 + 筛选按钮 */
.summary{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.summary strong{color:var(--ink);font-size:16px}
.summary span{color:var(--muted);font-size:11px}
.search-row{display:flex;gap:8px}
.search-wrap{position:relative;flex:1}
.search{width:100%;height:42px;padding:0 12px 0 35px;border:1px solid var(--line);border-radius:10px;outline:0;background:#fff;color:var(--ink);font-size:12px}
.search:focus{border-color:var(--green)}
.search-icon{position:absolute;left:12px;top:13px;color:var(--muted)}
input.search{padding-left:35px}
.filter-btn{position:relative;width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--body)}
.filter-btn.active{border-color:var(--green);background:var(--green-soft);color:var(--green-dark)}
.filter-count{position:absolute;right:-4px;top:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:var(--red);color:#fff;font-size:9px;line-height:16px;text-align:center}
.filter-count[hidden]{display:none}

/* 状态筛选（一行，可横滑） */
.filters{display:flex;gap:7px;overflow:auto;padding:10px 0}
.filter{flex:none;height:33px;padding:0 12px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--muted);font-size:11px}
.filter.active{border-color:var(--green);background:var(--green-soft);color:var(--green-dark);font-weight:700}

/* 来源分段（采购页在用，其他列表页需要时可直接用） */
.seg{display:flex;padding:3px;border-radius:10px;background:#eef4f1}
.seg button{height:28px;padding:0 14px;border:0;border-radius:8px;background:transparent;color:#7c918a;font-size:12px;font-weight:600}
.seg button.active{background:#fff;color:#172d28;box-shadow:0 1px 3px rgba(23,45,40,.12)}

/* 列表行 */
.list{display:flex;flex-direction:column}
.item{margin-bottom:10px;padding:14px;border:1px solid var(--line);border-radius:13px;background:#fff}
.item.cursor{cursor:pointer}
.item.cursor:active{border-color:#9fd8ba;background:#fbfffd}
.item-top,.item-line,.item-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}
.order{color:var(--ink);font-size:13px;font-weight:700}
.time,.meta{margin-top:4px;color:var(--muted);font-size:10px}
.item-line{margin-top:13px}
.farmer{color:var(--ink);font-size:13px;font-weight:600}
.amount{color:#df9242;font-size:17px;font-weight:800}
.status{display:inline-flex;align-items:center;padding:4px 7px;border-radius:5px;font-size:10px;white-space:nowrap}
.status.success{background:#e7f7ef;color:#169466}
.status.warn{background:#fff4df;color:#b77418}
.status.danger{background:#fdeae8;color:#bd433d}
.status.info{background:#e8f0ff;color:#5274b8}
.status.goods{background:#eaf3fa;color:#3d6f96}
.status.gray{background:#f1f4f1;color:var(--muted)}
.item-foot{justify-content:flex-start;flex-wrap:wrap;margin-top:12px;padding-top:10px;border-top:1px dashed var(--line)}
.item-foot .action-group{display:flex;gap:7px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.action{height:30px;display:inline-flex;align-items:center;gap:4px;padding:0 9px;border:1px solid #bfe7d4;border-radius:7px;background:#fff;color:var(--green-dark);font-size:11px}
.action.primary{border-color:var(--green);background:var(--green);color:#fff}
.action.danger{border-color:#f1c4c0;color:#bd433d}
.empty{padding:38px 15px;text-align:center;color:var(--muted);font-size:12px}

/* 抽屉（筛选／审核／取消）——与一期同一套 */
.sheet-backdrop{position:fixed;inset:0;z-index:20;display:none;align-items:flex-end;justify-content:center;background:rgba(18,33,24,.42)}
.sheet-backdrop.open{display:flex}

/* ★ 抽屉／弹层必须关在**手机画布内**（2026-09-22 修）：`.sheet-backdrop` 默认 position:fixed，
   参照的是**浏览器视口**而不是手机框——PC 预览时抽屉比手机框宽 40px、底边比框低 32px，
   内容掉到框外被窗口裁掉、页面上什么都看不到（销售／应收／售后退款／加工单／加工记录／库存都中招）。
   common-ui.css 里「我的」页那套 .xxx-backdrop 就是这么修的，这里把列表页的抽屉一并统一。
   前提：抽屉节点必须是手机框的**直接子元素**（放在 </main> 之前）；还挂在 </main> 之后的页面
   先按同一步搬进去，否则这条选择器管不到它。 */
.phone > .sheet-backdrop{position:absolute;inset:0}
/* 注意：phase2.css 里另有一条旧的 `.sheet{position:absolute;inset:0;display:none}`（给少数几页整屏弹层用）。
   这里必须把会打架的属性**显式归零**，否则抽屉会被那条规则拽到框外、页面上什么都看不到（B-25 上真踩过）。 */
.sheet-backdrop .sheet{position:relative;inset:auto;z-index:auto;display:block;width:min(430px,100%);max-height:88dvh;overflow:auto;padding:18px 16px calc(22px + env(safe-area-inset-bottom));border-radius:18px 18px 0 0;background:#fff;box-shadow:0 -12px 35px rgba(26,43,31,.18)}
.sheet-handle{width:38px;height:4px;margin:0 auto 15px;border-radius:99px;background:#d6ded6}
.sheet-title{display:flex;align-items:center;justify-content:space-between;color:var(--ink);font-size:17px}
.sheet-close{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--muted)}
.filter-grid{display:grid;gap:11px;margin-top:15px}
.filter-field{display:grid;gap:6px;color:var(--muted);font-size:11px}
.filter-field select{height:40px;padding:0 10px;border:1px solid var(--line);border-radius:8px;outline:0;background:#fff;color:var(--ink);font-size:12px}
.sheet-actions{display:flex;gap:9px;margin-top:18px}
.sheet-actions button{flex:1;height:42px;border-radius:9px;font-size:13px}
.sheet-actions .secondary{border:1px solid var(--line);background:#fff;color:var(--body)}
.sheet-actions .primary{border:0;background:var(--green);color:#fff}
.confirm-copy{margin:12px 0;color:var(--muted);font-size:12px;line-height:1.65}
.confirm-actions{display:flex;gap:9px;margin-top:14px}
.confirm-actions button{height:42px;flex:1;border-radius:9px;font-size:13px}
.confirm-actions .secondary{border:1px solid var(--line);background:#fff;color:var(--body)}
.confirm-actions .danger{border:1px solid #efc2bd;background:#fff;color:#bd433d}
