:root {
  --green: #2F5D3A;
  --green-deep: #244a2e;
  --amber: #C8893A;
  --cream: #FAF6EE;
  --grey: #8A7E6D;
  --line: #ECE6D6;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--cream);
  color: #2c2a25;
}
.hidden { display: none !important; }
.err { color: #c0392b; }

/* 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
}
.login-card {
  background: #fff;
  padding: 40rpx 36rpx;
  padding: 40px 36px;
  border-radius: 16px;
  width: 320px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.login-card .logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 2px;
}
.login-card h1 { font-size: 18px; margin: 0 0 6px; color: #444; }
.login-card input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.login-card input:focus { border-color: var(--green); }
.login-card button {
  padding: 12px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}
.login-card button:hover { background: var(--green-deep); }

/* 布局 */
.panel { display: flex; min-height: 100vh; }
.side {
  width: 200px;
  background: var(--green);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.side .brand { text-align: center; font-size: 22px; font-weight: 700; line-height: 1.2; padding-bottom: 18px; }
.side .brand small { font-size: 12px; font-weight: 400; opacity: .8; }
.side nav { flex: 1; display: flex; flex-direction: column; }
.side nav button {
  background: transparent;
  border: none;
  color: #e8efe8;
  text-align: left;
  padding: 14px 22px;
  font-size: 15px;
  cursor: pointer;
}
.side nav button:hover { background: rgba(255,255,255,.08); }
.side nav button.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.side .logout {
  margin: 12px 18px 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.main { flex: 1; padding: 28px 32px; overflow: auto; }
.main h2 { margin: 0 0 18px; font-size: 22px; }

/* 卡片 */
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  min-width: 150px;
  flex: 1;
}
.card .n { font-size: 26px; font-weight: 700; color: var(--green); }
.card .l { font-size: 13px; color: var(--grey); margin-top: 4px; }

/* 工具栏 */
.toolbar { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.toolbar button, .ops button {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.toolbar button:hover, .ops button:hover { background: var(--green-deep); }
.toolbar select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; }
/* 订单搜索栏 */
.order-search-bar { gap: 8px; flex-wrap: wrap; }
.order-search-bar input[type="text"] { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; width: 200px; font-size: 13px; outline: none; }
.order-search-bar input[type="text"]:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(47,93,58,.12); }
.order-search-bar input[type="date"] { padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: #555; outline: none; }
.order-search-bar input[type="date"]:focus { border-color: var(--green); }
.search-sep { color: #aaa; font-size: 14px; user-select: none; }
.toolbar button.ghost, .filter-actions .ghost { background: #fff; color: var(--green-deep); border: 1px solid var(--green); }
.toolbar button.ghost:hover, .filter-actions .ghost:hover { background: #f3efe6; }

/* 商品筛选面板（展开式多字段查询） */
.filter-panel { margin-bottom: 14px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
.filter-row { display: flex; align-items: center; gap: 8px; }
.filter-label { width: 72px; flex: none; font-size: 13px; color: var(--grey); text-align: right; }
.filter-input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.filter-input:focus { outline: none; border-color: var(--green); }
.filter-mode { padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: #fff; }
.filter-actions { margin-top: 14px; display: flex; gap: 10px; justify-content: flex-end; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { padding: 11px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
th { background: #f3efe6; color: #5a5346; font-weight: 600; }
tbody tr:hover { background: #fafaf5; }
.ops { white-space: nowrap; }
.ops button { margin-right: 6px; }
.ops button.btn-warn { background: #c0392b; color: #fff; border-color: #c0392b; }
.ops button.btn-warn:hover { background: #a93226; }
.badge { background: #eef3ec; color: var(--green); padding: 2px 8px; border-radius: 999px; font-size: 12px; }

/* 推广员搜索栏 */
.promoter-search-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.promoter-search-bar input[type="text"] {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  width: 200px;
  outline: none;
}
.promoter-search-bar input:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(47,93,58,.1); }
.promoter-search-bar button { padding: 7px 16px; }

/* Tab 激活态 */
.toolbar button.active { background: var(--green); color: #fff; }

/* 分页器（服务端） */
.pager-info { text-align: center; font-size: 12px; color: #888; margin: 10px 0 6px; }
.pager-btns { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; }
.pager-btns button {
  min-width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  padding: 0 8px;
}
.pager-btns button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.pager-btns button:disabled { opacity: .4; cursor: default; }
.pager-btns button.pg-current {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* 当前用户 */
.me { font-size: 12px; color: #e8efe8; text-align: center; padding: 0 12px 14px; opacity: .9; }
.me .role { font-style: normal; background: rgba(255,255,255,.18); padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
.side-btn {
  margin: 8px 18px 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.side-btn:hover { background: rgba(255,255,255,.2); }
.side-btn.logout { background: rgba(0,0,0,.18); }

/* 权限表格标记 */
.yes { color: var(--green); font-weight: 700; }
.no { color: #bbb; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 26px 28px;
  width: 340px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-box h3 { margin: 0 0 4px; font-size: 18px; color: var(--green); }
.modal-box input[type="password"], .modal-box input:not([type]) {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.modal-box input:focus { border-color: var(--green); }
.perm-section { padding: 6px 0; border-bottom: 1px solid #f2f0ea; }
.perm-section:last-of-type { border-bottom: none; }
.perm-title { font-size: 12px; color: var(--grey); margin: 0 0 4px; font-weight: 600; letter-spacing: .3px; }
.perm-grid { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 2px 0 8px; }
.perm-grid label { font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }

/* 编辑员工弹窗：加宽 + 滚动 + 右上角关闭按钮 */
.modal-box.user-modal {
  position: relative;
  width: 500px;
  max-width: 92vw;
  max-height: 86vh;
  overflow-y: auto;
}
.modal-box.user-modal h3 {
  margin-right: 36px; /* 为 × 关闭按钮留空间 */
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.modal-actions button {
  padding: 9px 18px; border: none; border-radius: 8px; font-size: 14px; cursor: pointer;
  background: var(--green); color: #fff;
}
.modal-actions button:hover { background: var(--green-deep); }
.modal-actions button.ghost { background: #eee; color: #555; }
.modal-actions button.ghost:hover { background: #e2e2e2; }
/* 危险/主要操作按钮（二次确认弹窗） */
.modal-actions button.danger { background: #c0392b; color: #fff; }
.modal-actions button.danger:hover { background: #a93226; }
.modal-actions button.primary { background: var(--green); color: #fff; }
.modal-actions button.primary:hover { background: var(--green-deep); }
/* 二次确认弹窗 */
.modal-box.confirm {
  width: 400px; max-width: 92vw;
  padding: 0; gap: 0; overflow: hidden;
  animation: cf-pop .18s ease;
}
@keyframes cf-pop { from { transform: translateY(10px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-box.confirm .cf-head {
  display: flex; align-items: center; gap: 13px;
  padding: 22px 24px 12px;
}
.modal-box.confirm .cf-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.modal-box.confirm .cf-icon svg { width: 22px; height: 22px; }
.modal-box.confirm h3 { margin: 0; font-size: 17px; font-weight: 700; }
.cf-msg { margin: 0; padding: 0 24px 20px; font-size: 14px; color: #5b554c; line-height: 1.7; }
.cf-msg .cf-strong { font-weight: 700; }
.modal-box.confirm .modal-actions { padding: 14px 24px 20px; justify-content: flex-end; }
/* danger 警示色调（删除） */
.modal-box.confirm.tone-danger .cf-icon { background: #fdecea; color: #c0392b; }
.modal-box.confirm.tone-danger h3 { color: #c0392b; }
.modal-box.confirm.tone-danger .cf-msg .cf-strong { color: #c0392b; }
/* accent 提示色调（发货 / 结算佣金等非删除重要操作） */
.modal-box.confirm.tone-accent .cf-icon { background: #fbf0dc; color: var(--amber); }
.modal-box.confirm.tone-accent h3 { color: var(--amber); }
.modal-box.confirm.tone-accent .cf-msg .cf-strong { color: var(--amber); }

/* 运费模板弹窗 */
.fr-paid { margin: 6px 0 2px; border-top: 1px dashed var(--line); padding-top: 8px; }
/* 适用范围多选网格（分类/商品） */
.cp-check-grid { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 2px; max-height: 200px; overflow-y: auto; }
.cp-check-grid label {
  font-size: 13px; display: inline-flex; align-items: center; gap: 5px;
  padding: 5rpx 12rpx; border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer; background: #fafafa; transition: background .15s;
}
.cp-check-grid label:hover { background: #f0f0e8; }
.cp-check-grid input:checked + span { color: var(--green); font-weight: 600; }

/* 优惠券编辑弹窗：宽版 + 关闭按钮 */
.cp-modal { position: relative; width: 500px; max-width: 94vw; max-height: 88vh; overflow-y: auto; }
.cp-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: #999;
  font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
  z-index: 3; padding: 0;
}
.cp-close:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.cp-close:active { transform: scale(.94); }

/* 商品选择器搜索框 */
.cp-prod-search {
  width: 100%; padding: 7px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; outline: none; font-family: inherit; box-sizing: border-box;
}
.cp-prod-search:focus { border-color: var(--green); }
.cp-prod-search::placeholder { color: #bbb; }
.fr-row { display: flex; align-items: center; justify-content: space-between; margin: 7px 0; gap: 10px; }
.fr-row label { font-size: 13px; color: #555; flex: 1; }
.fr-row input {
  width: 180px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; text-align: right;
}
.fr-row input:focus { border-color: var(--green); outline: none; }
/* 发货录入弹窗字段 */
#modal-ship label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #555; }
#modal-ship select, #modal-ship input {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; outline: none; background: #fff; color: #333;
}
#modal-ship select:focus, #modal-ship input:focus { border-color: var(--green); }
.fr-def { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 13px; color: #444; cursor: pointer; }
.muted { color: var(--grey); font-size: 13px; line-height: 1.6; margin: 0 0 10px; }

/* 运营报表 */
.toolbar label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--grey); }
.toolbar input[type="date"] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
#report-tabs { flex-wrap: wrap; }
#report-tabs button {
  background: #fff; color: var(--green); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
#report-tabs button:hover { border-color: var(--green); }
#report-tabs button.active { background: var(--green); color: #fff; border-color: var(--green); }
.badge.danger { background: #fdecea; color: #c0392b; }
.badge.warn { background: #fdf3e7; color: #C8893A; }
.badge.ok { background: #eef3ec; color: var(--green); }
.badge.draft { background: #eee; color: #888; }   /* 草稿：灰 */

/* 商品发布按钮（金色，强调定时/立即发布动作） */
.modal-actions button.gold { background: #C8893A; color: #fff; }
.modal-actions button.gold:hover { background: #b3772f; }
.modal-actions button.gold:disabled { background: #e6d3b8; color: #fff; cursor: not-allowed; }

/* 商品列表批量操作条 */
.batch-bar { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin: 4px 0 10px; }
.batch-bar .batch-count { font-size: 13px; color: #555; }
.batch-bar .batch-count b { color: var(--green); }
.batch-bar button.primary { background: var(--green); color: #fff; border: none; border-radius: 8px; padding: 6px 16px; cursor: pointer; }
.batch-bar button.primary:hover { background: var(--green-deep); }
.col-check { width: 34px; text-align: center; }

/* 自提订单核销明细弹窗（v2 团购部分核销 stepper） */
.verify-progress { background: #eef3ec; color: #2F5D3A; border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin: 8px 0 12px; }
.verify-items { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.verify-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid #eee; border-radius: 10px; }
.vi-info { min-width: 0; }
.vi-name { font-size: 14px; font-weight: 600; color: #222; }
.vi-meta { font-size: 12px; color: #888; margin-top: 3px; }
.vi-step { display: flex; align-items: center; gap: 8px; }
.vstep { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #ddd; background: #f6f8f5; color: #2F5D3A; font-size: 18px; line-height: 1; cursor: pointer; }
.vstep:hover { background: #e7efe7; }
.vstep-num { min-width: 34px; text-align: center; font-size: 15px; font-weight: 700; color: #222; }

/* 多包裹发货弹窗 */
.ship-orderinfo { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 12px; background: #faf7f0; border-radius: 8px; font-size: 13px; color: #5b554c; }
.ship-orderinfo b { color: #2f4d2e; }
.ship-pkg { border: 1px solid #ece8df; border-radius: 10px; padding: 12px 14px; margin-top: 12px; background: #fff; }
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sp-tag { display: inline-block; background: #eef3ec; color: var(--green-deep); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.sp-del { background: none; border: none; color: #c0392b; font-size: 13px; cursor: pointer; padding: 2px 4px; }
.sp-del:hover { text-decoration: underline; }
.sp-row { display: flex; gap: 12px; }
.sp-row .sp-lab { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5b554c; }
.sp-row .sp-lab select, .sp-row .sp-lab input { padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; }
.sp-row .sp-lab select:focus, .sp-row .sp-lab input:focus { border-color: var(--green); }
.sp-track-lab { flex: 1.4; }
.sp-goods-title { font-size: 12px; color: var(--grey); margin: 10px 0 6px; }
.sp-goods { display: flex; flex-direction: column; gap: 6px; }
.sp-good { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border: 1px solid #f2efe8; border-radius: 8px; background: #fcfbf8; }
.sp-good-chk { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.sp-good-name { color: #333; }
.sp-good-qty { color: var(--grey); font-size: 12px; }
.sp-good-step { display: flex; align-items: center; gap: 8px; }
.spstep { width: 26px; height: 26px; border-radius: 7px; border: 1px solid #ddd; background: #f6f8f5; color: #2F5D3A; font-size: 16px; line-height: 1; cursor: pointer; }
.spstep:hover { background: #e7efe7; }
.spstep-num { min-width: 24px; text-align: center; font-size: 14px; font-weight: 700; color: #222; }
.ship-add-btn { margin-top: 12px; width: 100%; padding: 9px; border: 1px dashed var(--amber); background: #fcf6ea; color: var(--amber); border-radius: 8px; font-size: 14px; cursor: pointer; }
.ship-add-btn:hover { background: #f8efd9; }
.c-red { color: #c0392b; font-weight: 700; }
.c-amber { color: var(--amber); font-weight: 700; }
.link-tel { color: var(--green); text-decoration: none; }
.link-tel:hover { text-decoration: underline; }
.c-green { color: var(--green); }
.c-amber { color: #C8893A; }
.empty { color: var(--grey); text-align: center; padding: 24px 0; }
/* 导出 Excel 按钮 */
.btn-export {
  background: var(--amber); color: #fff; border: none; border-radius: 6px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.btn-export:hover { background: #b57a2f; }
.btn-export::before { content: "\2B07"; margin-right: 4px; }

/* 商品新增/编辑弹窗 */
.modal-box.product { position: relative; width: 760px; max-width: 94vw; max-height: 90vh; overflow: auto; }
/* 商品编辑弹窗右上角关闭按钮 */
.pd-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: #888;
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
  z-index: 3;
}
.pd-close:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.pd-close:active { transform: scale(.94); }
.pd-section { margin: 6px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.pd-sec-title { font-size: 14px; font-weight: 700; color: var(--green); }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.pd-cell { display: flex; flex-direction: column; gap: 6px; }
.pd-cell.pd-full { grid-column: 1 / -1; }
.pd-cell label { font-size: 13px; color: #6b665d; }
.pd-cell .req { color: #c0392b; font-style: normal; }
.pd-cell input, .pd-cell select, .pd-cell textarea {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; outline: none; width: 100%; font-family: inherit; background: #fff;
}
.pd-cell input:focus, .pd-cell select:focus, .pd-cell textarea:focus { border-color: var(--green); }
.pd-cell textarea { resize: vertical; }
.pd-twocol { display: flex; gap: 18px; }
.pd-twocol .pd-cell { flex: 1; }
.upload-zone {
  border: 1.5px dashed var(--amber); border-radius: 10px; background: var(--cream);
  height: 168px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; position: relative; text-align: center;
}
.up-hint { color: #8a7a5e; font-size: 13px; line-height: 1.6; }
.up-plus { font-size: 30px; color: var(--amber); display: block; }
.upload-zone .up-preview { max-width: 100%; max-height: 100%; object-fit: contain; }
.pd-rm-btn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.45); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer;
}
.pd-rm-btn:hover { background: #c0392b; }
.pd-full { grid-column: 1 / -1; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.ig-item { position: relative; width: 92px; height: 92px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.ig-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.ig-del:hover { background: #c0392b; }
.ig-tag { position: absolute; left: 0; bottom: 0; background: var(--green); color: #fff; font-size: 11px; padding: 1px 6px; border-top-right-radius: 6px; }
.ig-pending-item { border-color: var(--amber); }
.ig-pending-item img { opacity: 0.85; }
.ig-pending { position: absolute; right: 0; bottom: 0; background: var(--amber); color: #fff; font-size: 10px; padding: 1px 6px; border-top-left-radius: 6px; }
.img-add { display: inline-block; padding: 8px 14px; border: 1.5px dashed var(--amber); border-radius: 8px; color: var(--amber); font-size: 13px; cursor: pointer; background: var(--cream); }
.img-add:hover { background: #f6ead2; }
/* 产地/地区：八县两市复选框组（单选） */
.region-group { display: flex; flex-wrap: wrap; gap: 10px; }
.region-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 14px; cursor: pointer; background: #fff; color: #555;
  transition: all 0.15s ease; user-select: none;
}
.region-chip:hover { border-color: var(--green); background: #f2f7ef; }
.region-chip input[type="radio"] { appearance: none; -webkit-appearance: none; width: 0; height: 0; margin: 0; position: absolute; opacity: 0; }
/* 选中态：品牌绿底白字 */
.region-chip:has(input:checked) {
  border-color: var(--green); background: var(--green); color: #fff; font-weight: 600;
}
.pd-detail-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pd-mini-btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; color: var(--green); }
.pd-mini-btn:hover { background: var(--cream); }
.pd-detail-bar .pd-hint { margin: 0; }
.pd-rows { display: flex; flex-direction: column; gap: 14px; }
.pd-row { display: flex; align-items: center; justify-content: space-between; }
.pd-row > label { font-size: 13px; color: #6b665d; width: 96px; flex-shrink: 0; }
.pd-select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; min-width: 240px; background: #fff; }
.pd-input-sm { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; width: 240px; }
.pd-custom { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: -4px; }
.seg { display: inline-flex; gap: 8px; }
.seg button {
  padding: 7px 18px; border: 1px solid var(--line); background: #f1ece2; color: #6b665d;
  border-radius: 8px; font-size: 13px; cursor: pointer;
}
.seg button.active { background: var(--green); color: #fff; border-color: var(--green); }
.seg.amber button.active { background: var(--amber); border-color: var(--amber); }

/* 商品分类：下拉 + 「新增分类」按钮同行 */
.pd-cat-row { display: flex; gap: 8px; align-items: center; }
.pd-cat-row select { flex: 1; min-width: 0; }
.pd-add-cat {
  flex-shrink: 0; padding: 9px 12px; border: 1px solid var(--amber);
  background: #fff; color: var(--amber); border-radius: 8px; font-size: 13px;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.pd-add-cat:hover { background: var(--amber); color: #fff; }

/* 多规格 SKU 管理区 */
.sku-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.sku-empty { margin: 0 0 8px; }
.sku-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fffdf8; }
.sku-row-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.sku-row-head .sku-spec { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.sku-row-head .sku-enabled { font-size: 13px; color: #6b665d; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sku-row-head .sku-del { padding: 6px 12px; border: 1px solid #c0392b; background: #fff; color: #c0392b; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.sku-row-head .sku-del:hover { background: #c0392b; color: #fff; }
.sku-row-body { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sku-img-wrap { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.sku-img-box { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #f3efe6; display: flex; align-items: center; justify-content: center; }
.sku-img-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sku-img-box .sku-img-ph { color: #b3a98f; font-size: 12px; }
.sku-img-box .sku-img-rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.sku-img-box .sku-img-rm:hover { background: #c0392b; }
.sku-img-pick { padding: 6px 12px; border: 1px solid var(--amber); background: #fff; color: var(--amber); border-radius: 8px; font-size: 12px; cursor: pointer; }
.sku-img-pick:hover { background: var(--amber); color: #fff; }
.sku-fields { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.sku-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #6b665d; }
.sku-fields input { width: 120px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

/* 商品列表缩略图 */
.pd-thumb {
  width: 44px; height: 44px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); vertical-align: middle; background: #fff;
}
.pd-thumb-empty {
  display: inline-block; width: 44px; height: 44px; line-height: 44px;
  text-align: center; font-size: 12px; color: #a9a39a;
  background: var(--cream); border-radius: 6px;
}

/* 订单取件码（等宽高亮） */
.code { font-family: "SF Mono", "Consolas", monospace; letter-spacing: 2px; font-weight: 700; color: var(--green); }

/* 订单详情弹窗（宽版，含历次核销明细） */
.modal-box.wide { position: relative; width: 640px; max-width: 94vw; max-height: 88vh; overflow: auto; }
.modal-box.wide h3 { margin-right: 36px; }

/* 售后详情弹窗（超级管理员） */
.as-d-body { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 1.7; }
.as-d-section { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #faf9f6; }
.as-d-h { margin: 0 0 10px; font-size: 14px; color: var(--green); font-weight: 700; }
.as-d-row { display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; padding: 3px 0; }
.as-d-row > span:first-child { color: var(--grey); }
.as-d-row > span:not(.badge):last-child, .as-d-row > a { color: #2b2b2b; word-break: break-all; }
.as-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.as-img { display: block; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.as-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-order-no { font-family: "SF Mono", "Consolas", monospace; letter-spacing: .5px; color: var(--green); }
/* 自提点编辑弹窗（字段多，需要更宽 + 可滚动） */
.modal-box.pickup {
  width: 580px; max-width: 92vw;
  max-height: 88vh; overflow-y: auto;
}
.modal-box.pickup .fr-row input { width: 320px; }
.modal-box.pickup .fr-row select { width: 320px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; text-align: right; background: #fff; }
.modal-box.pickup .coord-inputs { display: flex; gap: 8px; flex: 1; }
.modal-box.pickup .coord-inputs input { flex: 1; width: auto; }
.order-detail-body { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 1.7; }
.order-detail-body .od-section { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #faf9f6; }
.order-detail-body .od-section h4 { margin: 0 0 10px; font-size: 14px; color: var(--green); font-weight: 700; }
.order-detail-body .od-grid { display: grid; grid-template-columns: 96px 1fr; gap: 4px 12px; }
.order-detail-body .od-grid .k { color: var(--gray); }
.order-detail-body .od-grid .v { color: #2b2b2b; word-break: break-all; }
.order-detail-body .od-items { width: 100%; border-collapse: collapse; font-size: 13px; }
.order-detail-body .od-items th, .order-detail-body .od-items td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.order-detail-body .od-items th { color: var(--gray); font-weight: 600; }
.order-detail-body .od-items .qty-ok { color: var(--green); font-weight: 600; }
.order-detail-body .od-logs { display: flex; flex-direction: column; gap: 10px; }
.order-detail-body .od-log { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 8px; padding: 10px 12px; background: #fff; }
.order-detail-body .od-log .od-log-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.order-detail-body .od-log .od-log-no { color: var(--gray); font-size: 12px; }
.order-detail-body .od-log .od-log-items { font-size: 13px; color: #444; }
.order-detail-body .od-log .od-log-empty { color: var(--gray); font-size: 13px; }

/* 核销员绑定自提点复选框 */
.vf-points { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 6px 2px 10px; }
.vf-pt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.vf-pt input { width: auto; }

/* 列表分页（每页 15 条） */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pg-nav { display: flex; align-items: center; gap: 6px; }
.pager button {
  background: #fff; color: var(--green); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-width: 34px;
}
.pager button:hover:not(:disabled) { border-color: var(--green); background: #f2f7ef; }
.pager button.active { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }
.pager button:disabled { color: #bbb; cursor: not-allowed; background: #fafafa; }
.pg-info { font-size: 13px; color: var(--grey); }

/* 自提点经纬度（手动输入） */
.coord-inputs { display: flex; align-items: center; gap: 8px; flex: 2; }
.coord-inputs input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; text-align: left; }
.coord-inputs input:focus { border-color: var(--green); outline: none; }

/* ============ 新设备「待授权」卡片（登录态，密码已验证通过，等待管理员放行） ============ */
.pending-card { width: 340px; max-width: 88vw; }
.pending-card .pending-msg { font-size: 14px; color: #444; margin: 0; line-height: 1.6; }
.pending-card .pending-tip { font-size: 12.5px; color: var(--grey); line-height: 1.6; margin: 0; }
.pending-dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 2px; }
.pending-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--amber);
  animation: pendingBlink 1.2s infinite ease-in-out both;
}
.pending-dots span:nth-child(2) { animation-delay: .2s; }
.pending-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pendingBlink {
  0%, 80%, 100% { opacity: .25; transform: scale(.8); }
  40% { opacity: 1; transform: scale(1); }
}
/* 「返回登录」幽灵按钮：覆盖 .login-card button 的实心绿底 */
.pending-card .ghost {
  background: #fff; color: var(--green-deep); border: 1px solid var(--green);
  font-size: 14px;
}
.pending-card .ghost:hover { background: #f3efe6; }

/* ============ 设备审批页：行内迷你操作按钮（绿 / 幽灵 / 危险 三态，对齐 .toolbar 体系） ============ */
.mini {
  display: inline-block; padding: 5px 12px; margin: 2px 4px 2px 0;
  border: 1px solid var(--green); background: var(--green); color: #fff;
  border-radius: 6px; font-size: 12px; line-height: 1.4; cursor: pointer; font-family: inherit;
}
.mini:hover { background: var(--green-deep); border-color: var(--green-deep); }
.mini.ghost { background: #fff; color: var(--green-deep); }
.mini.ghost:hover { background: #f3efe6; }
.mini.danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.mini.danger:hover { background: #a93226; border-color: #a93226; }

/* ============ 移动端顶栏 + 抽屉导航（窄屏专用，PC 端由下方 display:none 隐藏，零影响） ============ */
.mtopbar { display: none; }
.side-mask { display: none; }

@media (max-width: 768px) {
  /* 主面板改为纵向：顶栏在顶、内容在下 */
  .panel { flex-direction: column; }
  .mtopbar {
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 20;
    height: 52px; padding: 0 14px;
    background: var(--green); color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
  }
  .mtopbar-btn {
    background: transparent; border: none; color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer;
    width: 36px; height: 36px; border-radius: 8px;
  }
  .mtopbar-btn:hover { background: rgba(255,255,255,.12); }
  .mtopbar-title { font-size: 16px; font-weight: 600; }

  /* 侧边栏改为抽屉：默认滑出屏幕外，body.side-open 时滑入 */
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
    width: 78vw; max-width: 280px;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
    padding-top: 56px; /* 给 sticky 顶栏留位，避免品牌/导航被遮挡 */
    /* 移动端导航项较多，超出一屏时必须可滚动，否则底部「设备审批」等会被裁掉、滑不到 */
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  body.side-open .side { transform: translateX(0); }
  .side-mask {
    display: block; position: fixed; inset: 0; z-index: 30;
    background: rgba(0,0,0,.45);
  }
  .main { padding: 16px 14px; }
  .main h2 { font-size: 20px; }
  /* 表格在窄屏横向滚动，避免 7 列挤压错位 */
  .tab table { display: block; overflow-x: auto; white-space: nowrap; }
  .tab table th, .tab table td { white-space: nowrap; }
}

/* 操作日志（B5） */
.audit-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.audit-filters select, .audit-filters input { height: 34px; }
.audit-table { min-width: 100%; }
.audit-table td, .audit-table th { white-space: normal; vertical-align: top; }
.audit-table td:first-child { white-space: nowrap; }
.audit-detail { white-space: pre-wrap; word-break: break-all; margin: 0; max-width: 340px; max-height: 180px; overflow: auto; background: #f6f3ec; border: 1px solid #e6dcc6; border-radius: 6px; padding: 6px 8px; font-size: 12px; line-height: 1.5; }
.pager { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

