/* 打单发货工作台 v2 */
.ps-hide { display: none !important; }

.ps-launch { display: flex; justify-content: flex-start; padding: 10px 14px 4px 0; }
.ps-launch button {
  border: 0; border-radius: 10px; padding: 9px 18px; cursor: pointer;
  background: #143d2e; color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(20, 61, 46, .18);
}
.ps-launch button:hover { background: #1a5039; }

/* ---------- 全屏工作台 ---------- */
.psw {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; flex-direction: column;
  background: #f2f6f3;
  font-family: -apple-system, "Microsoft YaHei", sans-serif;
  color: #23372f;
}
.psw-top {
  height: 56px; flex: none; display: flex; align-items: center; gap: 16px;
  padding: 0 18px; background: #143d2e; color: #fff;
}
.psw-top h2 { margin: 0; font-size: 17px; letter-spacing: .5px; }
.psw-top .sub { font-size: 12px; opacity: .7; }
.psw-top .sp { flex: 1; }
.psw-top button {
  border: 0; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff;
  padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.psw-top button:hover { background: rgba(255,255,255,.24); }
.psw-top .x { width: 34px; padding: 0; height: 34px; font-size: 18px; }

.psw-body { flex: 1; display: flex; min-height: 0; }

/* 左侧栏 */
.psw-side {
  width: 186px; flex: none; background: #fff; border-right: 1px solid #e2eae5;
  padding: 12px 10px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto;
}
.psw-side h3 {
  margin: 0 0 8px; font-size: 12px; color: #7d8f87; font-weight: 600;
  letter-spacing: .5px; padding-left: 6px;
}
.psw-tabs { display: flex; flex-direction: column; gap: 2px; }
.psw-tab {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 8px; border: 0; background: transparent; cursor: pointer;
  font-size: 13px; color: #40564d; text-align: left; width: 100%;
}
.psw-tab:hover { background: #f4f8f5; }
.psw-tab.on { background: #e8f4ec; color: #12572c; font-weight: 700; }
.psw-tab .n { margin-left: auto; font-size: 12px; color: #8b9c94; font-variant-numeric: tabular-nums; }
.psw-tab.on .n { color: #1a7a3d; }

.psw-side input[type="search"], .psw-side select {
  width: 100%; box-sizing: border-box; border: 1px solid #d5e0d9; border-radius: 8px;
  padding: 7px 9px; font-size: 12px; background: #fff; color: #23372f;
}

/* 主区 */
.psw-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.psw-toolbar {
  flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid #e2eae5;
  font-size: 13px;
}
.psw-toolbar label { display: flex; align-items: center; gap: 6px; color: #5a6f66; }
.psw-toolbar select {
  border: 1px solid #d5e0d9; border-radius: 8px; padding: 6px 8px;
  font-size: 13px; background: #fff; color: #143d2e;
}
.psw-toolbar select:disabled { background: #f3f5f4; color: #9aa9a2; }
.psw-toolbar .auto-badge {
  font-size: 11px; background: #e8f4ec; color: #1a7a3d; border-radius: 999px; padding: 2px 8px;
}
.psw-toolbar .sp { flex: 1; }

/* 表格 */
.psw-table-wrap { flex: 1; overflow: auto; background: #fff; }
.psw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.psw-table thead th {
  position: sticky; top: 0; z-index: 2; background: #f7faf8; color: #5a6f66;
  font-weight: 600; font-size: 12px; text-align: left; padding: 10px 12px;
  border-bottom: 1px solid #e2eae5; white-space: nowrap;
}
.psw-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f0f4f2; vertical-align: top; }
.psw-table tbody tr:hover { background: #fbfdfc; }
.psw-table tbody tr.sel { background: #f2faf5; }
.psw-table tbody tr.lock { background: #fafafa; color: #8b9c94; }
.psw-table .c-no { font-weight: 700; color: #143d2e; white-space: nowrap; }
.psw-table .c-addr { color: #5a6f66; max-width: 300px; }
.psw-table .c-goods { color: #7d8f87; max-width: 280px; font-size: 12px; }
.psw-table .c-amt { text-align: right; color: #b4610a; font-weight: 700; white-space: nowrap; }
.psw-table .c-op { white-space: nowrap; }

.psw-badge {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #eef2f0; color: #62736b; white-space: nowrap;
}
.psw-badge.ok { background: #e3f5e9; color: #126b34; }
.psw-badge.wait { background: #fff2dd; color: #9a5b06; }
.psw-badge.bad { background: #fdeaea; color: #b42626; }
.psw-badge.busy { background: #eef4fb; color: #25527f; }

/* 底部操作条 */
.psw-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; background: #fff; border-top: 1px solid #e2eae5;
  box-shadow: 0 -2px 10px rgba(20,61,46,.04);
}
.psw-stat { font-size: 13px; color: #5a6f66; }
.psw-stat b { color: #143d2e; font-size: 15px; }
.psw-actions { margin-left: auto; display: flex; gap: 8px; }
.psw-btn {
  border: 0; border-radius: 9px; padding: 10px 18px; font-size: 13px;
  font-weight: 700; cursor: pointer;
}
.psw-btn.main { background: #14772f; color: #fff; }
.psw-btn.main:hover { background: #0f6327; }
.psw-btn.ghost { background: #edf5f0; color: #175b45; }
.psw-btn.line { background: #fff; color: #40564d; border: 1px solid #d5e0d9; }
.psw-btn:disabled { opacity: .5; cursor: not-allowed; }

.psw-empty {
  padding: 60px 20px; text-align: center; color: #8b9c94; font-size: 13px; line-height: 1.9;
}
.psw-empty b { color: #143d2e; }

/* 弹层 */
.psw-modal {
  position: fixed; inset: 0; z-index: 10000; background: rgba(12,28,22,.42);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.psw-modal-box {
  background: #fff; border-radius: 14px; width: min(720px, 96vw); max-height: 86vh;
  display: flex; flex-direction: column; box-shadow: 0 18px 48px rgba(0,0,0,.24);
}
.psw-modal-box.wide { width: min(1000px, 96vw); }
.psw-modal-head {
  display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e2eae5;
  font-weight: 700; font-size: 15px; color: #143d2e;
}
.psw-modal-head .x {
  margin-left: auto; border: 0; background: #f2f5f3; width: 30px; height: 30px;
  border-radius: 8px; cursor: pointer; font-size: 16px; color: #5a6f66;
}
.psw-modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.psw-modal-foot {
  padding: 12px 20px; border-top: 1px solid #e2eae5; display: flex; gap: 8px;
  justify-content: flex-end;
}

/* 规则编辑 */
.psw-rule-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
}
.psw-rule-row input, .psw-rule-row select {
  border: 1px solid #d5e0d9; border-radius: 8px; padding: 7px 9px; font-size: 13px;
}
.psw-rule-row input { flex: 1; }
.psw-rule-row select { width: 160px; }
.psw-rule-row .del {
  border: 0; background: #fdeaea; color: #b42626; border-radius: 8px;
  padding: 7px 10px; cursor: pointer; font-size: 12px;
}

/* 批次 */
.psw-batch {
  border: 1px solid #e2eae5; border-radius: 10px; margin-bottom: 10px; overflow: hidden;
}
.psw-batch-head {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #f7faf8;
  font-size: 13px;
}
.psw-batch-head b { color: #143d2e; }
.psw-batch-head .meta { color: #7d8f87; font-size: 12px; }
.psw-batch-head .sp { flex: 1; }
.psw-batch-body { padding: 8px 14px 12px; font-size: 12px; color: #5a6f66; line-height: 1.8; }
