:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e3e8f0;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2f6fed;
  --primary-dark: #2559c9;
  --green: #10a37f;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------------- 左侧菜单栏 ---------------- */
body.has-sidebar { padding-left: 208px; }

/* ---------------- 首页 ---------------- */
.home-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef4ff, #f8fbff);
  border: 1px solid #dbe7ff;
}

.home-hero h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: .5px;
}

.home-hero .hh-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.hh-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hh-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: .12s;
}

.hh-btn:hover { border-color: var(--primary); color: var(--primary); }
.hh-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.hh-btn.primary:hover { background: var(--primary-dark); color: #fff; }

.todo-list { display: flex; flex-direction: column; }

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 6px;
  border-bottom: 1px dashed #eef1f6;
  cursor: pointer;
  transition: .12s;
}

.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: #f8fbff; }
.todo-item.is-zero { cursor: default; opacity: .55; }
.todo-item.is-zero:hover { background: transparent; }

.ti-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  flex: 0 0 auto;
}

.todo-item.is-zero .ti-dot { background: #d5dbe5; }
.ti-name { font-weight: 500; }
.ti-count { margin-left: auto; font-weight: 600; color: var(--primary); }
.todo-item.is-zero .ti-count { color: var(--muted); }
.ti-go { width: 66px; text-align: right; font-size: 12px; color: #9aa4b2; }
.todo-item:hover .ti-go { color: var(--primary); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.quick-grid a {
  display: block;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: .12s;
}

.quick-grid a:hover { border-color: var(--primary); background: #f8fbff; }
.quick-grid a b { font-size: 14px; }
.quick-grid a span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

/* 销售金额 */
.card-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.card-head-row h2 { margin: 0; }

.seg {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.seg button {
  border: 0;
  background: #fff;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
}

.seg button.on { background: #eaf0fe; color: var(--primary); font-weight: 600; }

.sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.sales-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fbfdff;
}

.si-cur { font-size: 12px; color: var(--muted); letter-spacing: .5px; font-weight: 600; }
.si-amt { font-size: 20px; font-weight: 700; margin-top: 2px; color: #10314f; }
.si-cnt { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sales-empty { color: var(--muted); font-size: 13px; padding: 6px 2px; }

/* 首页订单走势曲线 */
.trend-kpi { display: flex; gap: 30px; margin: 2px 0 8px 4px; flex-wrap: wrap; }
.trend-kpi > div { display: flex; flex-direction: column; }
.trend-kpi b { font-size: 20px; font-weight: 700; color: #10314f; line-height: 1.2; }
.trend-kpi span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.trend-chart { width: 100%; }
.trend-svg { width: 100%; height: 240px; display: block; }
.tc-grid { stroke: #eef2f7; stroke-width: 1; }
.tc-ytext, .tc-xtext { font-size: 11px; fill: #94a3b8; }
.tc-dot { fill: #fff; stroke: var(--primary); stroke-width: 1.6; }
.tc-dot.is-zero { stroke: #cbd5e1; }
.trend-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 208px;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 60;
}

.sb-brand {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sb-brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .15);
  flex: 0 0 auto;
}

/* 公司 LOGO（只留图案） */
.sb-brand .sb-logo {
  width: 28px; height: 28px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.sb-nav {
  flex: 1;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 8px;
  color: #374151;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: .12s;
  white-space: nowrap;
}

.sb-item i { font-style: normal; font-size: 15px; width: 18px; text-align: center; flex: 0 0 auto; }
.sb-item:hover { background: #f2f5fa; color: var(--text); }
.sb-item.active { background: #eaf0fe; color: var(--primary); font-weight: 600; }
.sb-item.is-soon { color: #9aa4b2; }

.sb-item.is-soon em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  color: #b6bdc9;
  border: 1px solid #e6eaf1;
  border-radius: 6px;
  padding: 0 4px;
  line-height: 15px;
}

/* 侧栏二级菜单 */
.sb-caret {
  margin-left: auto;
  font-size: 10px;
  color: #9aa4b2;
  padding: 2px 4px;
  border-radius: 4px;
  transition: transform .15s;
  line-height: 1;
}
.sb-caret:hover { background: #e8edf6; color: var(--text); }
.sb-item.open .sb-caret { transform: rotate(180deg); }

.sb-sub {
  display: none;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 4px 18px;
  padding-left: 9px;
  border-left: 1px dashed #e2e8f2;
}
.sb-sub.open { display: flex; }
.sb-sub a {
  padding: 7px 10px;
  border-radius: 7px;
  color: #5b6472;
  text-decoration: none;
  font-size: 12.5px;
  white-space: nowrap;
  transition: .12s;
}
.sb-sub a:hover { background: #f2f5fa; color: var(--text); }
.sb-sub a.active { background: #eaf0fe; color: var(--primary); font-weight: 600; }

.sb-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 1100px) {
  body.has-sidebar { padding-left: 0; }
  .sidebar { display: none; }
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .15);
}

.brand .brand-logo {
  width: 26px; height: 26px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.nav { display: flex; gap: 4px; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 500;
}

.nav a:hover { background: #f2f5fa; color: var(--text); }
.nav a.active { background: #eaf0fe; color: var(--primary); }

.topbar-right {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

/* ---------------- 布局 ---------------- */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 .step {
  background: var(--primary);
  color: #fff;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hint { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* ---------------- 表单 ---------------- */
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* 店铺：可输入 + 可上下滑动选择（只列有权限的店铺） */
.shop-combo { position: relative; width: 300px; max-width: 100%; }
.shop-combo input[type="text"] { width: 100%; min-width: 0; box-sizing: border-box; padding-right: 32px; }
.shop-combo .sc-toggle {
  position: absolute; right: 4px; top: 4px; width: 28px; height: 28px;
  padding: 0; border: 0; background: transparent; color: #94a3b8;
  font-size: 11px; line-height: 1; cursor: pointer; border-radius: 6px;
}
.shop-combo .sc-toggle:hover { background: #f1f5f9; color: #475569; }
.shop-combo.open .sc-toggle { transform: rotate(180deg); }
.shop-combo .sc-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .14);
  max-height: 234px; overflow-y: auto; padding: 4px;
}
.shop-combo .sc-item {
  padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: #334155;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.shop-combo .sc-item:hover, .shop-combo .sc-item.active { background: #eef4ff; color: var(--primary); font-weight: 600; }
.shop-combo .sc-empty { padding: 10px; font-size: 12.5px; color: var(--muted); }
.shop-combo .sc-list::-webkit-scrollbar { width: 8px; }
.shop-combo .sc-list::-webkit-scrollbar-thumb { background: #d7dde7; border-radius: 8px; }
.shop-combo .sc-list::-webkit-scrollbar-thumb:hover { background: #c2cad7; }
.shop-combo .sc-list::-webkit-scrollbar-track { background: transparent; }

input[type="text"], input[type="search"], select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  min-width: 160px;
}

input[type="text"]:focus, input[type="search"]:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}

input[type="file"] {
  font-size: 13px;
  padding: 7px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafbfd;
  width: 100%;
  max-width: 420px;
}

button {
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}

button:hover { background: #f6f8fc; }
button:disabled { opacity: .5; cursor: not-allowed; }

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

button.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; border-radius: 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  background: #fafbfd;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 12.5px;
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f4f9;
  vertical-align: top;
}

tbody tr:hover { background: #fafcff; }
tbody tr.clickable { cursor: pointer; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
  font-size: 13px;
}

/* ---------------- 标签 ---------------- */
.badge {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.badge.pending        { background: #eef2f7; color: #4b5563; }
.badge.in_production  { background: #fff4e5; color: #b45309; }
.badge.qc             { background: #e8f0ff; color: #2554b8; }
.badge.ready_to_ship  { background: #e6f7f2; color: #0b7a5f; }
.badge.shipped        { background: #e9f9ee; color: #15803d; }
.badge.cancelled      { background: #fdeaea; color: #b91c1c; }

.tag-warn {
  display: inline-block;
  background: #fff6e5;
  color: #b45309;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 11.5px;
}

/* ---------------- 结果/提示 ---------------- */
.result {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stat-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fafbfd;
}
.stat-box .n { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat-box .l { font-size: 12.5px; color: var(--muted); }
.stat-box.ok .n { color: var(--green); }
.stat-box.warn .n { color: var(--amber); }
.stat-box.err .n { color: var(--red); }

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
}
.alert.error { background: #fdeaea; color: #b91c1c; border: 1px solid #f7c9c9; }
.alert.ok    { background: #e9f9ee; color: #15803d; border: 1px solid #c3ebd1; }
.alert.info  { background: #eef4ff; color: #2554b8; border: 1px solid #d3e0fb; }
.alert.warn  { background: #fff8e6; color: #a16207; border: 1px solid #fce8b2; }
/* 导入记录里「这批单之前已导入过」的标记 */
.dup-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 16px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  vertical-align: middle;
}

/* ---------------- 映射表 ---------------- */
.map-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 14px;
  align-items: center;
}
.map-grid .label { font-size: 13px; color: #374151; }
.map-grid select { width: 100%; }

.preview-table td { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 抽屉 ---------------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(17, 24, 39, .35);
  display: none;
  z-index: 100;
}
.drawer-mask.show { display: block; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 520px;
  max-width: 92vw;
  background: #fff;
  box-shadow: -8px 0 24px rgba(16, 24, 40, .12);
  transform: translateX(100%);
  transition: transform .22s ease;
  z-index: 101;
  display: flex;
  flex-direction: column;
}
.drawer.show { transform: translateX(0); }

.drawer-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-head h3 { margin: 0; font-size: 15px; }
.drawer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.drawer-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }

.section-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 18px 0 8px;
}
.section-title:first-child { margin-top: 0; }

.item-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #fafbfd;
}
.item-card .t { font-weight: 600; font-size: 13px; }
.item-card .meta { color: var(--muted); font-size: 12.5px; }
.personal { margin-top: 6px; background: #fff; border-left: 3px solid var(--primary); padding: 6px 10px; border-radius: 4px; white-space: pre-wrap; font-size: 13px; }

/* ---------------- 统计卡 ---------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.metric {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px; box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.metric .l { font-size: 12.5px; color: var(--muted); margin: 0; }
.metric .v { font-size: 28px; font-weight: 700; line-height: 1.15; margin-top: 3px; }
.metric .sub { font-size: 12px; color: #9aa4b2; margin-top: 2px; line-height: 1.6; }

/* ---------------- 订单导入：拖拽上传 ---------------- */
.req {
  font-size: 11px;
  color: var(--red);
  font-weight: 500;
  margin-left: 4px;
}

.dropzone {
  border: 2px dashed #cfd9e6;
  border-radius: 12px;
  background: #fbfdff;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: .15s;
}

.dropzone:hover { border-color: var(--primary); background: #f6faff; }
.dropzone.over { border-color: var(--primary); background: #eef4ff; }

.dz-icon { font-size: 30px; line-height: 1; }
.dz-title { font-weight: 600; margin-top: 8px; }
.dz-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.dz-link { color: var(--primary); font-weight: 500; }

.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  font-size: 13px;
}

.fi-icon { font-size: 14px; }
.fi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fi-size { color: var(--muted); font-size: 12px; }
.fi-del { color: var(--red); font-size: 12px; cursor: pointer; }
.fi-del:hover { text-decoration: underline; }

/* ---------------- 订单生产跟踪 ---------------- */
.ring-hit { cursor: pointer; }
.ring-hit:hover .ring-fg { stroke: #2559c9; }

.tag.track-tag {
  color: #0b7a5f;
  background: #e6f7f2;
  cursor: pointer;
}
.tag.track-tag:hover { background: #d3f0e7; }

.tk-sum {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.tk-sum > div {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fbfdff;
}

.tk-sum span { display: block; font-size: 12px; color: var(--muted); }
.tk-sum b { font-size: 14px; }

.tk-list { display: flex; flex-direction: column; gap: 8px; }

.tk-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}

.tk-row.done { background: #f6fdfa; border-color: #d9f0e7; }
.tk-row.cur { background: #f5f9ff; border-color: #cfe0ff; }

.tk-name { width: 110px; flex: 0 0 auto; font-weight: 600; font-size: 13px; }
.tk-row.cur .tk-name { color: var(--primary); }
.tk-row.done .tk-name { color: #0b7a5f; }

.tk-steps { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

.tk-step {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 7px;
  background: #f2f5fa;
  color: #6b7280;
}

.tk-step.done { background: #e6f7f2; color: #0b7a5f; }
.tk-step i { font-style: normal; margin-left: 6px; color: #8b98a8; font-size: 11px; }

.bar-row { display: grid; grid-template-columns: 90px 1fr 60px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.bar { height: 8px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.pager .spacer { flex: 1; }
.pager .ps-pick { display: inline-flex; align-items: center; gap: 4px; }
.pager .ps-pick select { height: 26px; padding: 0 4px; }

/* ---------------- Toast ---------------- */
#toast {
  position: fixed;
  top: 20px; left: 50%;
  transform: translate(-50%, -20px);
  background: #1f2937;
  color: #fff;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  transition: .25s;
  z-index: 200;
  pointer-events: none;
  max-width: 80vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: #b91c1c; }

@media (max-width: 860px) {
  .result, .cards { grid-template-columns: repeat(2, 1fr); }
  .map-grid { grid-template-columns: 1fr; }
}

/* ---------------- 流程阶段 ---------------- */
.badge.stage-0 { background: #eef2f7; color: #4b5563; }
.badge.stage-1 { background: #fff4e5; color: #b45309; }
.badge.stage-2 { background: #e8f0ff; color: #2554b8; }
.badge.stage-3 { background: #f3e8ff; color: #7c3aed; }
.badge.stage-4 { background: #e6f7f2; color: #0b7a5f; }
.badge.stage-done { background: #e9f9ee; color: #15803d; }

.mini-bar {
  height: 4px;
  background: #eef2f7;
  border-radius: 3px;
  margin-top: 4px;
  width: 72px;
  overflow: hidden;
}
.mini-bar > i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }

/* 生产流程：旧版样式（顶部阶段条 + 五列竖向时间轴） */
.wf-top {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f7f8fa;
  border-radius: 10px;
  padding: 4px 6px;
  margin-bottom: 10px;
}
.wf-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  font-size: 13px;
  color: #a0a8b8;
  border-radius: 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: .12s;
}
.wf-tab b { font-weight: 600; }
.wf-tab .wf-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid #c8cedb;
  flex: none;
}
.wf-tab:hover { background: #fff; }
.wf-tab.on {
  color: #111827;
  font-weight: 600;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}
.wf-tab.on .wf-dot { border-color: #111827; border-width: 4px; }
.wf-tab.done { color: #4b5563; }
.wf-tab.done .wf-dot { border-color: #9aa3b2; background: #9aa3b2; }
.wf-arrow { color: #c8cedb; font-size: 15px; flex: none; }

.wf-flo { overflow-x: auto; padding-bottom: 2px; }
.wf-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); }
.wf-col { position: relative; padding: 6px 14px 6px 2px; }
.wf-col + .wf-col::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: #eceef2;
}
.wf-steps { list-style: none; margin: 0; padding: 0; }
.wf-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0 18px;
  font-size: 13.5px;
  color: #aab1bf;
  cursor: pointer;
}
.wf-step:last-child { padding-bottom: 4px; }
.wf-step::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: #e3e6ec;
}
.wf-step:last-child::before { display: none; }
.wf-step-num {
  flex: none;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1.5px solid #cdd3df;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  line-height: 1;
  color: #aab1bf;
  position: relative;
  z-index: 1;
}
.wf-step-txt { padding-top: 1px; }
.wf-step:hover .wf-step-txt { text-decoration: underline; }
.wf-step.done { color: #111827; font-weight: 600; }
.wf-step.done .wf-step-num { border-color: #111827; color: #111827; }
.wf-step.done::before { background: #c9cfd9; }
.wf-step.cur { color: var(--primary); font-weight: 600; }
.wf-step.cur .wf-step-num {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.wf-ico {
  font-style: normal;
  font-size: 11px;
  margin-left: 4px;
  color: #c58b00;
}

/* ---------------- 行内展开详情 ---------------- */
.caret {
  display: inline-block;
  width: 12px;
  color: var(--muted);
  transition: transform .15s ease;
}
.order-row.open .caret { transform: rotate(90deg); color: var(--primary); }
.order-row.open { background: #f5f8ff; }
.order-row.open td { border-bottom-color: #e2eaf8; }

tr.detail-row > td {
  padding: 0;
  background: #fbfcfe;
  border-bottom: 1px solid var(--border);
}

.detail {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 20px;
  padding: 16px 18px 18px;
  align-items: start;
  animation: expandIn .16s ease-out;
}
@keyframes expandIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.detail > .alert { grid-column: 1 / -1; }
.detail-col { min-width: 0; }
.detail-flow { grid-column: 1 / -1; min-width: 0; }
.detail-col .section-title:first-child { margin-top: 0; }
.detail .kv { grid-template-columns: 76px 1fr; font-size: 12.5px; }
.detail .item-card { background: #fff; }

@media (max-width: 1280px) {
  .detail { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
}

/* ================= 订单管理（ERP 风格） ================= */
.page {
  max-width: 1680px;
  margin: 0 auto;
  padding: 14px; 
}

.filter-card .fnote-wrap { display: flex; align-items: center; gap: 6px; }
.filter-card .fnote-wrap input { flex: 1; min-width: 0; }
/* 全局搜索框：右边内嵌「有备注」按钮，不挤压输入框宽度 */
.filter-card .fsearch-box { position: relative; flex: 1; min-width: 0; display: flex; }
.filter-card .fsearch-box > input { flex: 1; min-width: 0; padding-right: 76px; }
.filter-card .fsearch-box .fnote-only {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}
.filter-card .fsearch-box .fnote-only:hover { background: #eef4ff; }
.filter-card .fsearch-box .fnote-only.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-card .fsearch-box .fnote-only.on:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.filter-card .fnote-only { height: 32px; flex: none; white-space: nowrap; }
.filter-card .fnote-only.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-card .fnote-only.on:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.filter-card{ padding: 14px 16px; }

.fgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
}
@media (max-width: 1200px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .fgrid { grid-template-columns: 1fr; } }

.fitem { display: flex; align-items: center; gap: 8px; }
.fitem label {
  width: 62px;
  flex: none;
  font-size: 12.5px;
  color: #111827;
  text-align: right;
}
.fitem input, .fitem select {
  height: 32px;
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  padding: 0 10px;
  line-height: 30px;
}

/* 操作日期：起 ~ 止 */
.fdate-range { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.fdate-range input {
  flex: 1 1 0; min-width: 0;
  height: 32px; padding: 0 6px; font-size: 12.5px;
}
.fdate-sep { flex: none; color: #9ca3af; font-size: 12px; }

.frow {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.frow.actions { justify-content: flex-start; }
.frow .spacer { flex: 1; }
.flabel { font-size: 12.5px; color: #111827; }

.radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
  color: #111827;
  padding: 3px 2px;
}
.radio input { margin: 0; }

/* 流程筛选后面的数量，如 全部(12) */
.radio .fl-n {
  margin-left: 4px;
  font-size: 12px;
  color: #94a3b8;
}

/* 流程筛选一组选项：拉开间距，不挤在一起 */
#flowRadios {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  row-gap: 10px;
  margin-left: 4px;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.toolbar button { height: 30px; padding: 0 12px; font-size: 12.5px; }
.toolbar .spacer { flex: 1; min-width: 12px; }
.mini { height: 28px; font-size: 12px; padding: 0 8px; }
button.mini { height: 28px; }
.sel-info { font-size: 12px; color: var(--muted); }

/* 表格 */
.erp-table {
  width: 100%;
  min-width: 1440px;
  border-collapse: collapse;
  font-size: 12.5px;
  table-layout: fixed;
}
.erp-table th {
  position: sticky;
  top: 0;
  background: #fafbfd;
  z-index: 2;
  font-size: 12.5px;
}
.erp-table td { vertical-align: top; border-bottom: 1px solid #eef1f6; padding: 10px 8px; }
.col-check { width: 34px; }
.col-expand { width: 22px; }
.col-order { width: 262px; }
.col-goods { width: 440px; }
.col-custom { width: 330px; }
.col-buyer { width: 238px; }
.col-ops { width: 112px; }

.erp-table .l {
  line-height: 1.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.erp-table .l.wrap {
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: clip;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin-top: 2px;
  color: #111827;
}
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--muted); }

.copy { cursor: pointer; color: var(--primary); opacity: .55; }
.copy:hover { opacity: 1; }

.tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; align-items: center; }
.tag {
  background: #eef2f7;
  color: #4b5563;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 11.5px;
  white-space: nowrap;
}
.tag-gray { background: #f1f3f7; }
.tag-red { background: #fdeaea; color: #b91c1c; }

/* —— 商品图片：未展开 / 单击放大 / 双击全屏 —— */
.goods {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: flex-start;
  cursor: pointer;
}
.goods:last-child { margin-bottom: 0; }
.goods img, .goods .noimg {
  width: 150px; height: 150px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: #f1f3f7;
  transition: width .16s ease, height .16s ease;
}
.goods-main { min-width: 0; flex: 1; }
.goods.open img, .goods.open .noimg { width: 300px; height: 300px; }

/* 商品：图片 + 一键采购；SKU 在上、Etsy-店铺名在下 */
.goods-pic { flex: none; display: flex; flex-direction: column; gap: 6px; width: 150px; transition: width .16s ease; }
.goods.open .goods-pic { width: 300px; }
.goods .one-buy {
  width: 100%; height: 28px; border-radius: 6px; cursor: pointer;
  border: 1px solid #f3c2c2; background: #fff6f6; color: #d94a4a;
  font-size: 13px; font-family: inherit; line-height: 1;
}
.goods .one-buy:hover { background: #ffe8e8; border-color: #efa9a9; }
.goods .sku-line b { font-size: 13px; }
.goods .shop-line { color: #7b8598; font-size: 12.5px; }

.flow-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  background: #eef2f7;
  color: #4b5563;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-pill.stage-0 { background: #eef2f7; color: #4b5563; }
.flow-pill.stage-1 { background: #fff4e5; color: #b45309; }
.flow-pill.stage-2 { background: #e8f0ff; color: #2554b8; }
.flow-pill.stage-3 { background: #f3e8ff; color: #7c3aed; }
.flow-pill.stage-4 { background: #e6f7f2; color: #0b7a5f; }
.flow-pill.stage-done { background: #e9f9ee; color: #15803d; }

.op {
  display: block;
  cursor: pointer;
  color: var(--primary);
  line-height: 1.9;
  font-size: 12.5px;
}
.op:hover { text-decoration: underline; }
.op.muted { color: var(--muted); }
/* 订单加急：已加急时操作列文字标红 */
.op.op-urgent-on { color: #dc2626; font-weight: 600; }

/* 加急标签（商品信息 SKU 右侧，占满这行剩余宽度，够显眼） */
.erp-table .l.sku-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.erp-table .l.sku-line > b.mono {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.urgent-tag {
  flex: 1 1 auto;
  min-width: 76px;
  height: 26px;
  line-height: 24px;
  padding: 0 10px;
  text-align: center;
  border-radius: 6px;
  background: #fee2e2;
  color: #dc2626;
  border: 1px dashed #f87171;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  white-space: nowrap;
  box-sizing: border-box;
}

/* 薪资页里指向「人员考勤」页的提示 */
.pay-att-note {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.8;
}
.pay-att-note a { color: #2563eb; font-weight: 600; text-decoration: none; }
.pay-att-note a:hover { text-decoration: underline; }
.pay-att-link {
  font-size: 12.5px;
  color: #2563eb;
  text-decoration: none;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 6px;
  padding: 5px 10px;
}
.pay-att-link:hover { background: #dbeafe; }

/* 删除订单弹窗：常用原因 + 多行输入 */
.del-tip {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.7;
  margin-bottom: 12px;
}
.del-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.del-reasons .dr {
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #334155;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.del-reasons .dr:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.del-reasons .dr.on { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; font-weight: 600; }
.del-label { display: block; font-size: 12.5px; color: #475569; margin-bottom: 6px; }
.del-label .req { color: #dc2626; margin-left: 2px; }
#delReason {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

/* 列表里的迷你流程条 */
.mini-flow {
  display: flex;
  gap: 3px;
  margin: 6px 0 4px;
  cursor: pointer;
}
.mf-seg {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e8ecf3;
  transition: .15s;
}
.mf-seg.done { background: #10a37f; }
.mf-seg.cur { background: #2f6fed; box-shadow: 0 0 0 2px rgba(47,111,237,.15); }
.mini-flow:hover .mf-seg { background: #d9e0ec; }
.mini-flow:hover .mf-seg.done { background: #0e8d6e; }
.mini-flow:hover .mf-seg.cur { background: #2559c9; }
.flow-text { font-size: 12px; color: #374151; }

/* 买家信息列 · 阶段大圆环 */
.ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 8px auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ring {
  position: absolute;
  inset: 0;
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}
.ring-bg { fill: none; stroke: #e8eef7; stroke-width: 7; }
.ring-fg {
  fill: none;
  stroke: #1677ff;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset .35s ease;
}
.ring-text {
  position: relative;
  z-index: 1;
  max-width: 66px;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  color: #1677ff;
  font-weight: 500;
}
.ring-days {
  position: absolute;
  right: 0;
  bottom: 2px;
  background: #ff9a1f;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(255,154,31,.35);
}

/* 可点击的步骤 */
.step-chip.clickable { cursor: pointer; transition: .12s; }
.step-chip.clickable:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0f5ff;
}
.step-chip.clickable.current:hover { background: #dbe7ff; }
.step-chip.clickable.done:hover { background: #d9f5e5; border-color: #10a37f; color: #0b7a5f; }

.erp-row.abnormal { background: #fff8f8; }
.erp-row.open { background: #f5f8ff; }
.erp-row .caret { display: inline-block; color: var(--muted); transition: transform .15s; }
.erp-row.open .caret { transform: rotate(90deg); color: var(--primary); }

tr.detail-row > td { padding: 0; background: #fbfcfe; border-bottom: 1px solid var(--border); }

.timeline { max-height: 340px; overflow: auto; }
.tl-item {
  display: flex;
  gap: 8px;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed #eef1f6;
  flex-wrap: wrap;
}
.tl-time { color: var(--muted); flex: none; width: 118px; }
.tl-step { font-weight: 500; }
.tl-note { color: var(--muted); }

.detail .item-card img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 6px;
  float: right;
  margin-left: 8px;
}

/* ================= 弹窗（编辑客户定制信息） ================= */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .45);
  display: none;
  z-index: 300;
}
.modal-mask.show { display: block; }

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(.98);
  width: 920px;
  max-width: 94vw;
  max-height: 88vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(16, 24, 40, .25);
  display: none;
  flex-direction: column;
  z-index: 301;
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}
.modal.show {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head .spacer { flex: 1; }

.modal-body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  padding: 16px 18px;
  overflow: auto;
  flex: 1;
}
@media (max-width: 820px) {
  .modal-body { grid-template-columns: 1fr; }
}

/* ---- 编辑客户定制信息（双栏模板） ---- */
.modal.cm-modal { width: 1000px; }
.modal-body.cm-body { grid-template-columns: 1fr 1.08fr; gap: 28px; }
.cm-left, .cm-right { min-width: 0; }
.cm-right { display: flex; flex-direction: column; }

.cm-speed { display: flex; align-items: baseline; gap: 18px; margin-bottom: 18px; }
.cm-speed-t { font-size: 14px; font-weight: 600; color: #111827; flex: none; }
.cm-speed-h { font-size: 12.5px; color: var(--muted); }

.cm-lab { font-size: 13.5px; color: #374151; font-weight: 600; display: block; }
.cm-lab-row { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.cm-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.cm-link:hover { text-decoration: underline; }

.cm-attrs {
  max-height: 190px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 20px;
}
.cm-attr-line { padding: 1px 0; word-break: break-all; }

.cm-note {
  width: 100%;
  min-height: 96px;
  margin: 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
}
.cm-note:focus, .cm-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}

.cm-upload {
  width: 176px;
  height: 176px;
  margin-top: 8px;
  border: 1px dashed #d5dae4;
  border-radius: 8px;
  background: #fafbfd;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: .12s;
}
.cm-upload:hover { border-color: var(--primary); background: #f5f8ff; }
.cm-upload-ph { font-size: 36px; line-height: 1; color: #aab1bf; font-weight: 300; }
.cm-upload.has-img .cm-upload-ph { display: none; }
.cm-upload-prev { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.cm-upload-prev img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.cm-hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

.cm-right-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cm-load {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12.5px;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
}
.cm-load:hover { border-color: var(--primary); color: var(--primary); }
.cm-textarea {
  flex: 1;
  width: 100%;
  min-height: 330px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  outline: none;
  resize: vertical;
}

.cm-x {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  font-size: 16px;
  color: #98a2b3;
  cursor: pointer;
  border-radius: 6px;
  line-height: 1;
}
.cm-x:hover { background: #f2f4f7; color: #111827; }

.cm-foot { gap: 12px; }
.cm-foot .btn-gray {
  background: #98a2b3;
  border: 1px solid #98a2b3;
  color: #fff;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.cm-foot .btn-gray:hover { background: #8993a4; }
.cm-foot .btn-warn {
  background: #f59e0b;
  border: 1px solid #f59e0b;
  color: #fff;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.cm-foot .btn-warn:hover { background: #e08e05; }

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* 小尺寸弹窗（分配设计师） */
.modal.mini-modal { width: 440px; }
/* 通用确认框（订单流程调整等）：按钮居中显示 */
#cfModal .modal-foot { justify-content: center; }
.modal-body.single {
  display: block;
  padding: 16px 18px;
}
.modal-body.single .hint { color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ---- 重跑流程：选择回到哪一步 ---- */
.rf-list {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fff;
}
.rf-stage {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 4px;
  padding-left: 2px;
}
.rf-stage:first-child { margin-top: 2px; }
.rf-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.rf-item:hover { background: #f1f5fd; }
.rf-item.cur { background: #eef4ff; }
.rf-item input { margin: 0; }
.rf-item .rf-cur {
  font-style: normal;
  font-size: 11px;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 10px;
  padding: 0 6px;
}
.rf-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

/* ---- 库存新增 / 修改弹窗（label 在左，两列） ---- */
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
@media (max-width: 720px) { .inv-grid { grid-template-columns: 1fr; } }
.iv-f { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; }
.iv-f > label {
  font-size: 12.5px;
  color: #64748b;
  text-align: right;
  white-space: nowrap;
}
.iv-f > label em { color: #e5484d; font-style: normal; margin-right: 2px; }
.iv-f > input,
.iv-f > select {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  min-width: 0;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 10px;
  outline: none;
}
.iv-f > input:focus,
.iv-f > select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.iv-step {
  display: flex;
  align-items: stretch;
  height: 36px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.iv-step button {
  width: 34px;
  flex: 0 0 auto;
  border: 0;
  background: #f7f9fc;
  color: #64748b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.iv-step button:hover { background: #eef3fb; color: var(--primary); }
.iv-step input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  text-align: center;
  font-size: 13px;
  background: transparent;
  color: var(--text);
  border-radius: 0;
  padding: 0;
  -moz-appearance: textfield;
}
.iv-step input::-webkit-outer-spin-button,
.iv-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.iv-step:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }

/* 通用确认框正文（居中弹窗） */
.cf-text {
  font-size: 15px;
  line-height: 1.7;
  color: #1f2937;
  text-align: center;
  padding: 6px 4px;
}
.cf-text b { color: #111827; font-size: 16px; }

/* ============ 图片查看器 ============ */
img.zoomable { cursor: zoom-in; }
img.zoomable:hover { box-shadow: 0 0 0 2px var(--primary); }

.zoom {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  flex-direction: column;
  background: rgba(10, 13, 18, .93);
}
.zoom.show { display: flex; }

.zoom-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, .45);
  color: #e5e7eb;
  font-size: 13px;
  flex-wrap: wrap;
}
.zoom-bar .zoom-title { font-weight: 600; }
.zoom-bar .sm {
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #e5e7eb;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  height: auto;
}
.zoom-bar .sm:hover { background: rgba(255, 255, 255, .25); }

.zoom-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.zoom-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  background: #fff;
  border-radius: 4px;
}
.zoom-stage.actual { align-items: flex-start; justify-content: flex-start; }
.zoom-stage.actual img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}

/* ---------------- SKU 下拉（读 SKU 库） ---------------- */
.skupick { position: relative; flex: 1; min-width: 0; display: flex; }
.skupick > input {
  width: 100%;
  padding-right: 26px;
  cursor: pointer;
}
.skupick.open > input { border-color: var(--primary); }
.skupick-arrow {
  position: absolute;
  right: 1px; top: 1px;
  width: 24px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #98a2b3;
  font-size: 11px;
  cursor: pointer;
  border-radius: 0 6px 6px 0;
}
.skupick-arrow:hover { background: #f1f3f7; color: var(--primary); }

.skupick-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 420px;
  max-width: 92vw;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
  z-index: 300;
  overflow: hidden;
}
.skupick-search {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}
.skupick-search input {
  width: 100%;
  height: 30px;
  padding: 0 9px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}
.skupick-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .1);
}
.skupick-list { max-height: 320px; overflow: auto; }
.skupick-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f4f6fa;
  font-size: 12.5px;
}
.skupick-opt:hover { background: #eef4ff; }
.skupick-opt .op-main {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.skupick-opt .op-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.skupick-opt .op-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--muted);
}
.skupick-opt .op-count {
  font-size: 11px;
  color: #0f766e;
  background: #e6f7f2;
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 16px;
}
.skupick-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}
.skupick-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}
.skupick-foot .hint { margin: 0; }
.skupick-foot .spacer { flex: 1; }
.skupick-manage {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}
.skupick-manage:hover { text-decoration: underline; }

/* ---------------- SKU 库页面 ---------------- */
.sku-table td { vertical-align: middle; }
.sku-table .sku-name {
  max-width: 460px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.danger {
  color: #b91c1c;
  border-color: #f3d2d2;
  background: #fdf3f3;
}
button.danger:hover { background: #fbe6e6; }

/* ---------------- 采购状态标签 ---------------- */
.tag.tag-green { background: #e6f7f2; color: #0b7a5f; }
.tag.tag-orange { background: #fff2e0; color: #b45309; }

/* ---------------- 订单采购：状态卡片 ---------------- */
.pu-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}
.pu-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
  user-select: none;
}
.pu-card:hover { border-color: #c7d5f5; background: #f8faff; }
.pu-card.on {
  border-color: var(--primary);
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .08);
}
.pu-card-h {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.pu-card .pu-ico { font-size: 14px; }
.pu-card-n {
  font-size: 24px;
  font-weight: 700;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}
.pu-card.on .pu-card-n { color: var(--primary); }

@media (max-width: 1280px) {
  .pu-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------------- 订单采购：日期区间 ---------------- */
.pu-date {
  height: 32px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
  min-width: 0;
  flex: 1;
}
.pu-tilde { color: var(--muted); font-size: 12px; flex: none; }

/* ---------------- 订单采购：说明条 / 排序 / 最晚发货 ---------------- */
.pu-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #475569;
  background: #f6f8fc;
  border: 1px solid #e6ebf5;
  border-radius: 8px;
}
.pu-note b { color: #1f2937; }
.pu-note-i { color: #94a3b8; }
.pu-lv.ok { color: #0b7a5f; }
.pu-lv.warn { color: #b45309; }
.pu-lv.bad { color: #b91c1c; }

.pu-th-sort { cursor: pointer; user-select: none; white-space: nowrap; }
.pu-th-sort:hover { color: var(--primary); }
.pu-th-sort.on { color: var(--primary); }
.pu-th-sort .pu-arrow { font-style: normal; font-size: 11px; margin-left: 2px; }

.pu-left {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pu-left.ok { background: #e9f9f2; color: #0b7a5f; border-color: #bfe9d9; }
.pu-left.warn { background: #fff5e6; color: #b45309; border-color: #fbdcae; }
.pu-left.bad { background: #fdeceb; color: #c0392b; border-color: #f7c9c5; }
.pu-left.none { background: #f4f5f7; color: #98a2b3; border-color: #e6eaf1; }
.pu-left-day { margin-top: 2px; font-size: 11.5px; color: #98a2b3; font-variant-numeric: tabular-nums; }

.pu-no { color: var(--primary); font-weight: 600; text-decoration: none; font-size: 13.5px; }
.pu-no:hover { text-decoration: underline; }
.pu-no-sub { margin-top: 2px; font-size: 11.5px; color: #98a2b3; }
.pu-time { font-size: 12.5px; color: #475569; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pu-stage {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  background: #f2f4f8;
  color: #55627a;
  white-space: nowrap;
}
.pu-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pu-status.tag-green { background: #e9f9f2; color: #0b7a5f; border-color: #bfe9d9; }
.pu-status.tag-red { background: #fdeceb; color: #c0392b; border-color: #f7c9c5; }
.pu-status.tag-orange { background: #fff5e6; color: #b45309; border-color: #fbdcae; }
.pu-status.tag-gray { background: #fdeceb; color: #c0392b; border-color: #f7c9c5; }
.pu-sku { font-family: ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 600; color: #334155; }
.pu-sku-sub { margin-top: 2px; font-size: 11.5px; color: #98a2b3; }

.pu-caret {
  width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pu-caret:hover { border-color: #c7d5f5; color: var(--primary); background: #f8faff; }
.pu-caret.open { color: var(--primary); border-color: var(--primary); transform: rotate(90deg); }

.pu-detail-row > td { background: #fbfcfe; padding: 0 !important; }
.pu-detail-box { padding: 12px 16px 14px 48px; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.pu-items { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
.pu-items th {
  text-align: left; font-weight: 600; color: #7b8598;
  padding: 6px 10px; background: #f4f6fa; white-space: nowrap;
}
.pu-items th:first-child { border-radius: 6px 0 0 6px; }
.pu-items th:last-child { border-radius: 0 6px 6px 0; text-align: right; }
.pu-items td { padding: 7px 10px; border-bottom: 1px solid #eef1f6; color: #374151; word-break: break-word; overflow-wrap: anywhere; }
.pu-items tr:last-child td { border-bottom: 0; }
.pu-items .num { text-align: right; font-variant-numeric: tabular-nums; }
.pu-items td:nth-child(2) { line-height: 1.6; }
.pu-item-var { margin-top: 2px; font-size: 11.5px; color: #98a2b3; }
.pu-detail-empty { padding: 8px 0; font-size: 12.5px; color: var(--muted); }
.pu-detail-meta {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: #7b8598;
}

/* ---------------- 订单采购：表格 ---------------- */
.pu-table { table-layout: fixed; min-width: 1100px; }
.pu-table td { vertical-align: middle; word-break: break-word; }
.pu-table th { white-space: nowrap; }
.pu-goods { display: flex; align-items: center; gap: 8px; line-height: 1.7; }.pu-goods .pu-goods-title {
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 520px;
}

/* ---------------- 采购状态选择按钮 ---------------- */
.op-purchase {
  color: #0b7a5f;
  font-weight: 600;
}
.pu-opts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.pu-opt {
  height: 46px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pu-opt > span { text-align: center; width: 100%; }
/* 「当前」角标固定贴在右侧，不参与居中，保证三个按钮文字竖向对齐 */
.pu-opt em {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px;
  line-height: 15px;
}
.pu-opt.ok { color: #0b7a5f; border-color: #cfe9e0; background: #f2fbf8; }
.pu-opt.bad { color: #b91c1c; border-color: #f3d2d2; background: #fdf3f3; }
.pu-opt.warn { color: #b45309; border-color: #f6e0c3; background: #fff8ef; }
.pu-opt.wait { color: #4b5563; }
.pu-opt:hover { filter: brightness(.97); }
.pu-opt.on { box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); border-color: var(--primary); }

/* ---------------- SKU 信息：左右布局 ---------------- */
.sku-page {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.sku-side {
  padding: 10px;
  position: sticky;
  top: 68px;
}

.sku-add-cat {
  width: 100%;
  height: 32px;
  border: 1px dashed #c3d0e8;
  background: #f7faff;
  color: var(--primary);
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.sku-add-cat:hover { background: #eef4ff; border-color: var(--primary); }

.sku-cat-list { margin-top: 8px; }

.sku-cat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  line-height: 1.4;
}
.sku-cat-item:hover { background: #f5f7fb; }
.sku-cat-item.on { background: #eef4ff; color: var(--primary); font-weight: 600; }
.sku-cat-item .cat-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-cat-item .cat-n {
  font-size: 11px;
  color: var(--muted);
  background: #f1f3f7;
  border-radius: 999px;
  padding: 0 6px;
  line-height: 16px;
  flex: none;
}
.sku-cat-item.on .cat-n { background: #dbe7ff; color: var(--primary); }
.sku-cat-item .cat-del {
  flex: none;
  color: #c3c9d4;
  font-size: 11px;
  padding: 0 2px;
  visibility: hidden;
}
.sku-cat-item:hover .cat-del { visibility: visible; }
.sku-cat-item .cat-del:hover { color: #b91c1c; }

.sku-body { min-width: 0; }

/* ---------------- SKU 信息：表格 ---------------- */
.sku-table td { vertical-align: middle; }

/* 列宽、对齐统一：不再横向撑出滚动条，分类下拉不出格 */
.sku-table { width: 100%; min-width: 1088px; table-layout: fixed; }
.sku-table th {
  padding: 12px 12px;
  background: #f7f9fc;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid #e8edf5;
  text-align: left;
}
.sku-table td {
  padding: 12px;
  border-bottom: 1px solid #eef1f6;
  box-sizing: border-box;
  overflow: hidden;
}

.sku-cover {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f3f7;
  border: 1px solid var(--border);
  display: block;
}
img.sku-cover { cursor: zoom-in; }
img.sku-cover:hover { border-color: var(--primary); }
.sku-cover.none {
  background: repeating-linear-gradient(45deg, #f7f8fb, #f7f8fb 5px, #eef0f5 5px, #eef0f5 10px);
}

.sku-title { font-weight: 600; line-height: 1.45; }
.sku-sub { color: #6b7280; font-size: 12px; line-height: 1.45; }
.sku-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--primary);
  line-height: 1.55;
}

/* SKU 列表：编号为主，品名小字一行截断 */
.sku-code-lg {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.5;
  word-break: break-all;
}
.sku-title-mini {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #9aa3b2;
  font-size: 11.5px;
}
.sku-cat-sel,
.sku-proc-sel {
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-overflow: ellipsis;
}
.sku-cat-sel:hover,
.sku-proc-sel:hover { border-color: var(--primary); }

/* 工艺技术列：行内下拉面板（添加工艺在面板底部） */
.proc-cell { display: flex; align-items: center; gap: 4px; }
.proc-cell .sku-proc-sel { flex: 1 1 auto; min-width: 0; }
.proc-del-btn {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #94a3b8;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.proc-del-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

/* 工艺技术：列表内下拉（选项右侧可删除，底部可添加） */
.proc-cur {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  box-sizing: border-box;
  min-width: 0;
}
.proc-cur:hover { border-color: var(--primary); }
.proc-cur.none { color: #9aa3b2; }
.proc-cur span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-cur i { color: #94a3b8; font-style: normal; font-size: 10px; flex: 0 0 auto; }

.proc-pop {
  position: fixed;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}
.proc-pop[hidden] { display: none; }
.proc-pop-list { padding: 4px; overflow: auto; flex: 1 1 auto; }
.proc-pop-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: #374151;
  cursor: pointer;
}
.proc-pop-item:hover { background: #f1f5f9; }
.proc-pop-item.on { background: #eef4ff; color: var(--primary); font-weight: 600; }
.proc-pop-item span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc-pop-x {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  background: #fff;
}
.proc-pop-x:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.proc-pop-empty { padding: 8px; font-size: 12px; color: #9aa3b2; }
.proc-pop-foot {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}
.proc-pop-foot input {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
}
.proc-pop-foot button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
}

/* 图片大图预览 */
.zoom-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: none;
  z-index: 9998;
}
.zoom-mask.show { display: block; }
.zoom-wrap {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  cursor: zoom-out;
}
.zoom-wrap.show { display: flex; }
.zoom-wrap img {
  max-width: 94vw;
  max-height: 86vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}
.zoom-tip {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: #e5e7eb;
  font-size: 12.5px;
  pointer-events: none;
}

.sku-ops { white-space: nowrap; }
.sku-ops .op-del { color: #b91c1c; }

.sku-preview { margin-top: 8px; }.sku-preview img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}

@media (max-width: 1000px) {
  .sku-page { grid-template-columns: 1fr; }
  .sku-side { position: static; }
  .sku-cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .sku-cat-item { border: 1px solid var(--border); }
}

/* ---------------- 库存管理 ---------------- */
.inv-radios { display: flex; align-items: center; gap: 14px; }

/* 扫码入口 */
.scan-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  border-radius: 12px;
  border: 1px solid #d8e3fb;
  background: linear-gradient(90deg, #eef4ff 0%, #f8fbff 60%, #ffffff 100%);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.scan-entry:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(47, 111, 237, .12);
  transform: translateY(-1px);
}
.scan-entry .se-ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.scan-entry .se-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.scan-entry .se-title { font-size: 16px; font-weight: 700; line-height: 1.2; }
.scan-entry .se-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.scan-entry .se-btn {
  flex: none;
  height: 34px;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.inv-table td { vertical-align: middle; }
.inv-qty { font-variant-numeric: tabular-nums; }
.inv-qty.low { color: #b91c1c; }
.inv-remark {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ck-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow: auto; }
.ck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.ck-row .ck-name { min-width: 0; font-size: 13px; display: flex; gap: 6px; align-items: baseline; }
.ck-row .ck-nums { display: flex; align-items: center; gap: 10px; flex: none; font-size: 12.5px; }
.ck-row .ck-nums input {
  width: 90px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13px;
}

/* ---------------- 扫码入出库 ---------------- */
.scan-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.mode-btn {
  height: 84px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all .15s;
}
.mode-btn .mode-ico { font-size: 22px; font-weight: 700; line-height: 1; }
.mode-btn .mode-txt { font-size: 17px; font-weight: 700; }
.mode-btn .mode-sub { font-size: 11.5px; color: var(--muted); }
.mode-btn.in .mode-ico { color: #0b7a5f; }
.mode-btn.out .mode-ico { color: #b45309; }
.mode-btn.in.on { border-color: #10a37f; background: #f0fbf7; box-shadow: 0 0 0 4px rgba(16,163,127,.1); }
.mode-btn.out.on { border-color: #f59e0b; background: #fffaf0; box-shadow: 0 0 0 4px rgba(245,158,11,.12); }

.scan-card { padding: 16px; }
.scan-line { display: flex; gap: 12px; align-items: stretch; }
.scan-input-wrap { flex: 1; min-width: 0; }
.scan-input {
  width: 100%;
  height: 60px;
  font-size: 22px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .5px;
  padding: 0 14px;
  border: 2px solid var(--primary);
  border-radius: 10px;
  outline: none;
  box-shadow: 0 0 0 4px rgba(47,111,237,.1);
}
.scan-input::placeholder { color: #b6bdc9; font-size: 17px; letter-spacing: 0; }
.scan-qty { flex: none; display: flex; flex-direction: column; gap: 4px; }
.scan-qty label { font-size: 11.5px; color: var(--muted); }
.scan-qty input {
  width: 96px;
  height: 60px;
  font-size: 20px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}
.scan-qty input:focus { border-color: var(--primary); }

.scan-tip {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}
.dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10a37f;
  box-shadow: 0 0 0 3px rgba(16,163,127,.16);
  animation: pulseDot 1.6s infinite;
}
.dot-live.warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.16); }
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.scan-result {
  margin: 12px 0;
  border-radius: 12px;
  padding: 14px 16px;
  border: 2px solid transparent;
}
.scan-result.ok { background: #f0fbf7; border-color: #b7e8da; }
.scan-result.out { background: #fffaf0; border-color: #fadfae; }
.scan-result.err { background: #fdf3f3; border-color: #f3d2d2; }

.sr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.sr-tag { font-size: 15px; font-weight: 700; }
.scan-result.ok .sr-tag { color: #0b7a5f; }
.scan-result.out .sr-tag { color: #b45309; }
.scan-result.err .sr-tag { color: #b91c1c; }
.sr-note { font-size: 12px; color: #b45309; background: #fff4e0; border-radius: 999px; padding: 2px 9px; }

.sr-body { display: flex; align-items: center; gap: 14px; }
.sr-img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
.sr-info { flex: 1; min-width: 0; }
.sr-name { font-size: 17px; font-weight: 700; line-height: 1.35; }
.sr-sku { font-size: 13px; color: var(--primary); margin-top: 2px; }
.sr-nums { text-align: right; flex: none; }
.sr-qty { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.scan-result.ok .sr-qty { color: #0b7a5f; }
.scan-result.out .sr-qty { color: #b45309; }
.sr-stock { font-size: 13px; color: #374151; }
.sr-stock b { font-size: 16px; }
.sr-stock b.low { color: #b91c1c; }
.sr-warn { margin-top: 8px; font-size: 12.5px; color: #b91c1c; }

body.scan-out .scan-input { border-color: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.12); }

@media (max-width: 720px) {
  .scan-mode { grid-template-columns: 1fr; }
  .mode-btn { height: 64px; }
  .scan-line { flex-direction: column; }
  .scan-qty { flex-direction: row; align-items: center; gap: 8px; }
  .scan-qty input { flex: 1; height: 44px; }
}

/* ---------------- 数据统计子页面（骨架占位） ---------------- */
.stats-todo {
  padding: 54px 24px 60px;
  text-align: center;
}
.stats-todo .st-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: #eef3ff;
  color: #3b6ef6;
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stats-todo h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.stats-todo p {
  margin: 0 auto 6px;
  max-width: 520px;
  font-size: 13px;
  color: #5b6472;
  line-height: 1.7;
}
.stats-todo .hint { margin-top: 14px; }

/* ---------------- 销售看板（日收益大盘） ---------------- */
.board-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.board-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.board-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.board-head .spacer { flex: 1; }

.board-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bcard {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .15s, border-color .15s;
}
.bcard:hover { border-color: #d7e0ef; box-shadow: 0 4px 16px rgba(23, 43, 77, .06); }

.bc-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: #fff;
}
.bc-ico.blue   { background: linear-gradient(135deg, #5b8bf9, #2f6fed); }
.bc-ico.orange { background: linear-gradient(135deg, #fbbf31, #f0930f); }
.bc-ico.green  { background: linear-gradient(135deg, #34c27f, #10a05c); }

.bc-main { min-width: 0; flex: 1; }
.bc-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.4px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc-label { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.bc-cur { margin-top: 7px; font-size: 12px; color: #7b8598; line-height: 1.65; }
.bc-cmp { margin-top: 7px; font-size: 12px; }

/* 今日销售额：纯符号 2 列网格，超过 6 个币种折叠 */
.bc-sales-list {
  margin-top: 2px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 12px;
}
.bc-sale-line {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.36;
  letter-spacing: -.2px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
}
.bc-sale-line .bc-sale-sym { color: #2563eb; font-weight: 700; flex: none; }
.bc-sale-line .bc-sale-amt { font-variant-numeric: tabular-nums; }
.bc-sale-line.muted { color: var(--muted); font-weight: 500; }
.bc-sale-more {
  grid-column: 1 / -1;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  user-select: none;
}
.bc-sale-more:hover { text-decoration: underline; }

/* 每日销售明细（可折叠表格） */
.dt-card { margin-top: 16px; padding: 0; overflow: hidden; }.dt-card summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 15px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.dt-card summary::-webkit-details-marker { display: none; }
.dt-card summary::before {
  content: '▸';
  color: #7b8598;
  font-size: 12px;
}
.dt-card details[open] > summary::before { content: '▾'; }
.dt-title { font-size: 15px; font-weight: 600; color: var(--text); }
.dt-hint { font-size: 12px; color: var(--muted); }
.dt-wrap { max-height: 540px; overflow: auto; border-top: 1px solid #eef1f6; }
.dt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt-table th, .dt-table td {
  padding: 7px 14px;
  border-bottom: 1px solid #f1f4f9;
  text-align: right;
  white-space: nowrap;
}
.dt-table th:first-child, .dt-table td:first-child { text-align: left; }
.dt-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fc;
  color: #5b6473;
  font-weight: 600;
}
.dt-table tbody tr:hover { background: #f9fbff; }
.dt-table tbody tr.zero { color: #c0c7d2; }
.dt-table td.num { font-variant-numeric: tabular-nums; }
.dt-table tfoot td {
  position: sticky;
  bottom: 0;
  background: #f7f9fc;
  font-weight: 700;
  border-top: 2px solid #e3e8f0;
}
.dt-empty { text-align: center !important; color: var(--muted); padding: 18px !important; }

/* 统计口径切换 */
.basis-switch { display: inline-flex; gap: 6px; margin-right: 10px; }
.basis-switch .mini { padding: 5px 12px; border-radius: 8px; border: 1px solid #dbe2ec; background: #fff; color: #5b6473; cursor: pointer; font-size: 12.5px; }
.basis-switch .mini.on { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }

/* 订单「更多操作」浮动菜单 */
.more-menu {
  display: none;
  position: fixed;
  z-index: 2600;
  min-width: 150px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .18);
  text-align: left;
}
.more-menu.show { display: block; }
.more-menu .mi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
  cursor: pointer;
}
.more-menu .mi i { font-style: normal; width: 14px; text-align: center; color: #8b95a5; }
.more-menu .mi:hover { background: #eff4ff; color: #2563eb; }
.more-menu .mi:hover i { color: #2563eb; }
.more-menu .mi.danger { color: #dc2626; }
.more-menu .mi.danger i { color: #dc2626; }
.more-menu .mi.danger:hover { background: #fef2f2; color: #b91c1c; }

/* 更多操作弹窗 */
.mo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.mo-f { display: flex; flex-direction: column; gap: 5px; }
.mo-f.full { grid-column: 1 / -1; }
.mo-f label { font-size: 12.5px; color: #7b8598; }
.mo-f input, .mo-f select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.mo-f input:focus, .mo-f select:focus { outline: none; border-color: #2563eb; }
.mo-note textarea {
  width: 100%;
  min-height: 130px;
  padding: 10px 12px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.65;
  resize: vertical;
}
.mo-note textarea:focus { outline: none; border-color: #2563eb; }

.cmp-up   { color: #12a150; font-weight: 600; }
.cmp-down { color: #e5484d; font-weight: 600; }
.cmp-flat { color: #9aa4b2; }
.warn-text { color: #e08b00; }

.board-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.sku-cost { color: #b8560f; font-weight: 600; }

/* ---------------- 月销售统计 ---------------- */
.month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mcard {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px 16px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s;
}
.mcard:hover { border-color: #d7e0ef; box-shadow: 0 4px 14px rgba(23, 43, 77, .06); }
.mcard.on { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(47, 111, 237, .12); }

.mcard-h {
  font-size: 15px;
  font-weight: 600;
  padding-bottom: 9px;
  border-bottom: 2px solid #2f6fed;
  margin-bottom: 12px;
}

.mcard-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.mcard-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  color: #9aa4b2;
  font-size: 13px;
}

.mrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 0;
}
.mrow b { font-size: 13.5px; color: var(--text); font-weight: 600; }

/* 图标模式（紧凑列表） */
.ml-head, .mline {
  display: grid;
  grid-template-columns: 80px 1fr 90px 115px 115px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.ml-head { color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--border); }
.mline { border-bottom: 1px solid #f2f5fa; }
.mline:last-child { border-bottom: 0; }
.mline:hover { background: #fafbfd; }
.mline.on { background: #f4f8ff; }
.ml-m { font-weight: 600; }
.ml-v { color: var(--text); }
.ml-n, .ml-c { color: #5b6472; }

button.warn {
  background: #f59f00;
  border-color: #f59f00;
  color: #fff;
}
button.warn:hover { background: #e08f00; border-color: #e08f00; color: #fff; }

@media (max-width: 1100px) {
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .month-grid { grid-template-columns: 1fr; }
  .ml-head, .mline { grid-template-columns: 64px 1fr; }
  .ml-n, .ml-c { display: none; }
}

/* ---------------- 订单销量统计 ---------------- */
.os-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6a63e8 0%, #4a52d8 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(74, 82, 216, .18);
}
.os-banner-l { display: flex; align-items: center; gap: 12px; }
.os-banner-ico {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex: 0 0 auto;
}
.os-banner h2 { margin: 0; font-size: 16px; font-weight: 600; }
.os-banner p { margin: 3px 0 0; font-size: 12px; color: rgba(255, 255, 255, .78); }
.os-banner-r { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.os-banner-r button { border: 0; box-shadow: none; }
.os-banner-r button.warn { background: #f79c1f; }
.os-banner-r button.ok { background: #16b364; }
.os-banner-r button.primary { background: #ffffff; color: #4a52d8; }

/* 销售盘 */
.os-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}
.os-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 13px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
}
.os-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  color: #fff;
}
.os-ico.purple { background: linear-gradient(135deg, #8b7bf7, #6a5ae0); }
.os-ico.blue   { background: linear-gradient(135deg, #5b8bf9, #2f6fed); }
.os-ico.gray   { background: linear-gradient(135deg, #9aa4b2, #6f7987); }
.os-ico.green  { background: linear-gradient(135deg, #34c27f, #10a05c); }
.os-ico.orange { background: linear-gradient(135deg, #f7a45b, #ef7f2f); }

.os-main { min-width: 0; flex: 1; }
.os-num {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-label { margin-top: 3px; font-size: 12px; color: var(--muted); }
.os-cur-mini { margin-top: 4px; font-size: 11.5px; color: #7b8598; }
.os-cmp { margin-top: 5px; font-size: 11.5px; }

.os-daily {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 9px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #f5f7fb;
  font-size: 12.5px;
  color: var(--muted);
}
.os-daily b { color: var(--text); font-size: 13px; }
.os-daily-cur { margin-left: auto; color: #7b8598; }

.os-table { min-width: 0; }

/* 商品销量统计 */
.pd-table { min-width: 0; }
.pd-table th,
.pd-table td { padding-left: 12px; padding-right: 12px; }
.pd-table th:nth-child(2),
.pd-table td:nth-child(2) { text-align: right; white-space: nowrap; }
.pd-table th:nth-child(3),
.pd-table td:nth-child(3) { text-align: right; white-space: nowrap; }
.pd-table th:nth-child(4),
.pd-table td:nth-child(4) { text-align: center; white-space: nowrap; }
.os-cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-sku { color: var(--primary); font-family: ui-monospace, Consolas, monospace; font-weight: 600; font-size: 13.5px; }
.pd-qty { font-weight: 600; }
.pd-sales { font-variant-numeric: tabular-nums; }
.pd-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 4px 2px;
  font-size: 12.5px;
}
.pd-page { color: var(--muted); }
.os-table td { font-size: 13px; }
.os-table th:nth-child(n+3):nth-child(-n+7),
.os-table td:nth-child(n+3):nth-child(-n+7) {
  text-align: right;
  white-space: nowrap;
}
.os-table th:nth-child(2),
.os-table td:nth-child(2) { text-align: center; }
.os-shop-cur { margin-top: 3px; font-size: 11.5px; color: #9aa4b2; }
.os-cur { white-space: nowrap; }
.os-rate { margin-left: 5px; font-size: 12px; color: #7b8598; }
.os-rate-unset { margin-top: 3px; font-size: 11px; color: #e08b00; }

/* 店铺币种 / 汇率设置弹窗 */
.sr-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.sr-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid #f2f5fa;
  font-size: 13px;
}
.sr-row:last-child { border-bottom: 0; }
.sr-head {
  background: #f7f9fc;
  color: var(--muted);
  font-size: 12.5px;
  border-bottom: 1px solid var(--border);
}
.sr-row select,
.sr-row input {
  width: 100%;
  box-sizing: border-box;
  height: 34px;
}
.sr-shop {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.ok { background: #16b364; border-color: #16b364; color: #fff; }
button.ok:hover { background: #129454; border-color: #129454; color: #fff; }

@media (max-width: 1400px) {
  .os-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .os-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .os-banner { flex-direction: column; align-items: flex-start; }
  .os-banner-r { margin-left: 0; }
}



@media (max-width: 1000px) {
  .board-cards { grid-template-columns: 1fr; }
}

/* ============ 登录页 ============ */
.login-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
  background:
    radial-gradient(1000px 520px at 12% 18%, rgba(46, 104, 190, .35) 0%, transparent 62%),
    radial-gradient(820px 460px at 88% 84%, rgba(24, 78, 140, .38) 0%, transparent 58%),
    linear-gradient(135deg, #061426 0%, #0c2340 48%, #08182b 100%);
}

/* 新版登录卡片（login.html） */
.login-panel {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 26px 30px 14px;
  box-shadow: 0 28px 64px rgba(2, 10, 22, .45);
}
.login-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}
.login-head img { width: 22px; height: 22px; object-fit: contain; display: block; }
.login-title {
  margin: 12px 0 18px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  color: #111827;
  letter-spacing: 1px;
}
.login-panel label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px;
}
.li-wrap {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  margin-bottom: 12px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.li-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.li-ico {
  width: 42px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa4b6;
}
.li-ico svg { width: 17px; height: 17px; display: block; }
.li-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  padding: 0 10px 0 0;
}
.li-wrap input::placeholder { color: #b3bccb; }
.li-eye {
  width: 34px;
  height: 34px;
  margin-right: 6px;
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #8a93a5;
}
.li-eye:hover { background: #f1f4f9; }

/* 验证码：输入框 + 图片按钮 */
.li-cap-row { display: flex; gap: 10px; margin-bottom: 12px; }
.li-cap-row .li-wrap { flex: 1 1 auto; margin-bottom: 0; }
.li-cap-img {
  width: 118px;
  height: 44px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  background: #eef3fb;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #9aa4b6;
}
.li-cap-img svg { width: 100%; height: 100%; display: block; }

.login-remember { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.login-panel .li-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #4b5563;
  cursor: pointer;
}
.login-panel .li-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.li-tip { font-size: 12px; color: #9aa4b6; }

.login-panel .login-btn {
  width: 100%;
  height: 44px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 4px;
  border-radius: 10px;
}
.login-copy {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #b6bfcd;
}
.login-box {
  width: 360px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 14px;
  padding: 30px 28px 24px;
  box-shadow: 0 18px 44px rgba(31, 45, 61, .12);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
}
.login-brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green, #10a37f);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, .15);
}
.login-brand .brand-logo {
  width: 34px; height: 34px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}
.login-sub { margin: 6px 0 20px; font-size: 12.5px; color: var(--muted); }
.login-box label { display: block; font-size: 12.5px; color: #374151; margin: 0 0 6px; }
.login-box input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  margin-bottom: 14px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
  color: var(--text);
}
.login-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.login-btn { width: 100%; height: 40px; font-size: 14px; border-radius: 8px; }
.login-err { min-height: 18px; margin-top: 10px; font-size: 12.5px; color: #e5484d; text-align: center; }
.login-ok { min-height: 18px; margin-top: 6px; font-size: 12.5px; color: #0f9d58; text-align: center; }

/* 密码框 + 显示密码小眼睛 */
.login-box .pwd-wrap { position: relative; }
.login-box .pwd-wrap input { padding-right: 42px; }
.login-box .pwd-eye {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #8a93a5;
  border-radius: 6px;
}
.login-box .pwd-eye:hover { background: #f1f4f9; }
.login-tip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* ============ 顶栏右上角用户菜单 ============ */
.tb-user { position: relative; margin-left: 10px; }
.tb-user.is-float { position: fixed; top: 8px; right: 16px; margin: 0; z-index: 70; }
.tb-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 5px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  color: #374151;
  transition: .14s;
}
.tb-user-btn:hover { background: #f3f6fb; border-color: #e6ebf3; }
.tb-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6fed, #5b8cf7);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-uname { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-caret { font-size: 10px; color: #9aa4b6; }
.tb-menu {
  position: absolute;
  top: 44px;
  right: 0;
  min-width: 156px;
  padding: 6px;
  background: #fff;
  border: 1px solid #e6ebf3;
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(17, 32, 54, .16);
  display: none;
  z-index: 90;
}
.tb-menu.open { display: block; }
.tb-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #3a4557;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.tb-menu a:hover { background: #f2f6fd; color: var(--primary); }
.tb-sep { height: 1px; margin: 5px 4px; background: #eef2f8; }
.tb-menu a.is-danger:hover { background: #fff1f1; color: #e5484d; }

/* 个人中心弹窗内容 */
.me-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed #eef1f6;
  font-size: 13px;
}
.me-row:last-child { border-bottom: 0; }
.me-row .k { width: 74px; flex: 0 0 auto; color: var(--muted); }
.me-row .v { flex: 1 1 auto; color: var(--text); word-break: break-all; }

/* ============ 基础管理通用 ============ */
.bm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.bm-banner-l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bm-ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; flex: 0 0 auto;
  background: linear-gradient(135deg, #8b7bf7, #6a5ae0);
}
.bm-ico.blue { background: linear-gradient(135deg, #5b8bf9, #2f6fed); }
.bm-ico.green { background: linear-gradient(135deg, #34c27f, #10a05c); }
.bm-banner h2 { margin: 0; font-size: 16px; color: #111827; }
.bm-banner p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.bm-banner-r { display: flex; gap: 8px; flex: 0 0 auto; }

.bm-table { min-width: 0; }
.bm-table th,
.bm-table td { padding-left: 12px; padding-right: 12px; text-align: center; }
.bm-table td { vertical-align: middle; }
.bm-name { font-weight: 600; color: #111827; }
.bm-mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.bm-pill {
  display: inline-block;
  font-size: 11px;
  line-height: 18px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef7f1;
  color: #10915c;
  border: 1px solid #d5edde;
}
.bm-pill.off { background: #f4f5f7; color: #9aa4b2; border-color: #e6eaf1; }
.bm-pill.role { background: #eef3fe; color: var(--primary); border-color: #dbe6fd; }
.bm-pill.blue { background: #e8f1ff; color: #1d6ff2; border-color: #cfe1ff; }
.bm-ops { display: flex; gap: 10px; justify-content: center; }
.bm-ops a { font-size: 12.5px; color: var(--primary); text-decoration: none; }
.bm-ops a.danger { color: #e5484d; }
.bm-ops a:hover { text-decoration: underline; }

/* 员工可看店铺 */
.bm-shops {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bm-field .shop-all {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: #334155;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}
.bm-field .shop-all input[type=checkbox] { margin: 0; width: auto; flex: 0 0 auto; }
/* 权限规则说明：勾上 = 能看见，不勾 = 看不见 */
.bm-field .tip-key {
  margin: -2px 0 8px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #eef4ff;
  border: 1px solid #d6e2fb;
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
}
.bm-field .shop-pick {
  display: block;
  margin-top: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 208px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}
/* 店铺搜索框 */
.bm-field .shop-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.bm-field .shop-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  background: #fff;
}
.bm-field .shop-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.bm-field .shop-search .sc-cnt {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.bm-field .shop-pick label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: auto;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #374151;
  cursor: pointer;
  user-select: none;
}
.bm-field .shop-pick label:hover { background: #f3f6fb; }
.bm-field .shop-pick label:has(input:checked) { background: #eef4ff; color: var(--primary); font-weight: 600; }
.bm-field .shop-pick label + label { margin-top: 2px; }
.bm-field .shop-pick input[type=checkbox] { margin: 0; width: auto; height: auto; flex: 0 0 auto; }
.bm-field .shop-pick .bm-secret { display: block; padding: 8px 10px; }
/* 菜单权限：带子项的分组 */
.bm-field .shop-pick .mp-group { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #eceff4; }
.bm-field .shop-pick .mp-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.bm-field .shop-pick .mp-parent { font-weight: 600; color: #1f2937; }
.bm-field .shop-pick .mp-kids { padding-left: 24px; }
.bm-field .shop-pick .mp-kids label { font-size: 12.5px; color: #475569; }

.bm-empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: 13px; }
.bm-secret {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
/* 国家组（如「欧盟成员国」）标签 */
.bm-tag {
  display: inline-block; margin-left: 4px; padding: 1px 6px;
  border-radius: 999px; background: #eef2ff; color: #4338ca;
  font-size: 11px; font-weight: 600; vertical-align: middle;
}

/* 基础管理弹窗 */
.bm-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .42);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.bm-mask.show { display: flex; }
.bm-modal {
  width: 560px; max-width: 100%; max-height: calc(100vh - 60px);
  background: #fff; border-radius: 14px; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(17, 24, 39, .24);
}
.bm-modal-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 14.5px; font-weight: 700; color: #111827;
}
.bm-modal-h button {
  border: none; background: none; font-size: 18px; color: #9aa4b2;
  cursor: pointer; line-height: 1; padding: 2px 4px;
}
.bm-modal-h button:hover { color: #111827; }
.bm-modal-b { padding: 18px 20px; overflow: auto; }
.bm-modal-f {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.bm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.bm-grid .full { grid-column: 1 / -1; }
.bm-field label {
  display: block; font-size: 12.5px; color: #374151; margin-bottom: 5px;
}
.bm-field label em { color: #e5484d; font-style: normal; }
.bm-field input,
.bm-field select,
.bm-field textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid #dfe4ec; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; outline: none;
  background: #fff; color: var(--text); font-family: inherit;
}
.bm-field input:focus,
.bm-field select:focus,
.bm-field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
/* 单行输入框 / 下拉框：统一 36px 高，文字垂直居中 */
.bm-field input,
.bm-field select {
  height: 36px;
  padding: 0 10px;
  line-height: 34px;
}
.bm-field input[readonly] { background: #f8fafc; color: #475569; cursor: default; }
/* 弹窗里的「可搜索下拉 + 新增」行 */
.bm-field .sk-proc-row > .skupick { flex: 1 1 auto; min-width: 0; }
.bm-field .skupick > input { height: 36px; padding-right: 30px; cursor: pointer; }
.bm-field .skupick-arrow { top: 0; height: 100%; width: 28px; border-radius: 0 8px 8px 0; }
.bm-field .sk-proc-add { height: 36px; }
.tip-inline { font-size: 11.5px; color: #94a3b8; font-weight: 400; }
.bm-field .tip { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.bm-sec {
  grid-column: 1 / -1;
  font-size: 12.5px; font-weight: 700; color: #374151;
  padding-top: 6px; border-top: 1px dashed var(--border); margin-top: 4px;
}
.bm-test-out {
  grid-column: 1 / -1;
  font-size: 12px; font-family: ui-monospace, Consolas, monospace;
  background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; max-height: 160px; overflow: auto; white-space: pre-wrap;
  color: #374151;
}

/* ---------- 一键预报：填写物流信息弹窗 ---------- */
.rp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.rp-f { display: flex; flex-direction: column; gap: 4px; }
.rp-f label { font-size: 12px; color: #64748b; }
.rp-f label em { color: #dc2626; font-style: normal; }
.rp-f input, .rp-f select { height: 34px; width: 100%; }








/* ---------------- 定制信息列（旧版样式） ---------------- */
.cu-pill {
  display: inline-block;
  margin: 4px 0 2px;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #f0453f;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
  transition: .12s;
}
.cu-pill:hover { filter: brightness(.95); }
.cu-pill.done {
  background: #f2fbf7;
  border-color: #bfe7d6;
  color: #0b7a5f;
}
.cu-head {
  margin-top: 8px;
  font-size: 12.5px;
  color: #374151;
}
/* 订单商品行：SKU 后面的工艺标签（取「SKU 信息 → 工艺技术」） */
.sku-craft {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}
/* 订单商品列底部：已发货标识（打印过面单 / 已进入物流配送） */
.ship-mark {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #86efac;
  border-radius: 8px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
}
/* 订单行：净利润（= 实际所得 × 实时汇率 - 商品成本 - 生产成本 - 云途运费） */
.net-profit {
  margin-top: 6px;
  color: #334155;
  font-weight: 700;
}
.net-profit b {
  font-size: 14px;
  font-weight: 800;
}
.net-profit b.pos {
  color: #15803d;
}
.net-profit b.neg {
  color: #dc2626;
}
.loss-mark {
  margin-top: 8px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
}
.ship-fee { margin-top: 6px; color: #b45309; }
.ship-fee b { color: #ea580c; font-size: 14px; font-weight: 800; }
/* 买家信息列里的「备注」：标题加大加粗 */
.buyer-note {  margin-top: 8px;
  padding: 6px 8px;
  border: 1px dashed #99d3c6;
  border-radius: 6px;
  background: #f2fbf8;
}
.buyer-note-head {
  font-size: 15px;
  font-weight: 800;
  color: #0f766e;
  letter-spacing: .5px;
  line-height: 1.3;
}
.buyer-note-body {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #0f766e;
  word-break: break-word;
  white-space: pre-wrap;
}
.cu-block {
  padding-left: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #111827;
  word-break: break-word;
}
.cu-lines { padding-left: 10px; }
.cu-line {
  font-size: 12.5px;
  line-height: 1.75;
  color: #111827;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ---- 定制信息多图缩略图（定制信息弹窗） ---- */
.cm-upload-prev { flex-wrap: wrap; gap: 4px; overflow: auto; align-items: flex-start; }
.cm-thumb { position: relative; width: 78px; height: 78px; border: 1px solid #e4e7ee; border-radius: 4px; overflow: hidden; background: #fff; }
.cm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-thumb-x { position: absolute; top: 0; right: 0; width: 16px; height: 16px; line-height: 14px; text-align: center; font-size: 12px; font-weight: 400; color: #fff; background: rgba(0,0,0,.55); border-radius: 0 0 0 4px; cursor: pointer; }
.cm-thumb-x:hover { background: #dc2626; }

/* 普货订单：商品图片（列表缩略图 + 上传弹窗） */
.gi-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.gi-thumb {
  width: 42px; height: 42px; object-fit: cover; border: 1px solid #e4e7ee;
  border-radius: 4px; cursor: pointer; display: block;
}
.gi-thumb:hover { border-color: var(--primary); }
.gi-more { font-size: 12px; color: var(--muted); }
.gi-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.gi-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; min-height: 10px; }
.gi-cell {
  position: relative; width: 84px; height: 84px; border: 1px solid #e4e7ee;
  border-radius: 4px; overflow: hidden;
}
.gi-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gi-x {
  position: absolute; top: 0; right: 0; width: 18px; height: 18px; line-height: 16px;
  text-align: center; font-size: 12px; font-style: normal; color: #fff;
  background: rgba(15, 23, 42, .55); cursor: pointer;
}
.gi-x:hover { background: #dc2626; }
.gi-empty { font-size: 12.5px; color: #9ca3af; }
.gi-upload {
  height: 54px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed #cfd9e8; border-radius: 6px; color: #64748b;
  font-size: 13px; cursor: pointer; background: #fff;
}
.gi-upload:hover { border-color: var(--primary); background: #f5f8ff; color: var(--primary); }

/* 订单页：批量搜索 */
.bulk-search-btn {
  background: #d97706; border-color: #d97706; color: #fff; font-weight: 600;
}
.bulk-search-btn:hover { background: #b45309; border-color: #b45309; color: #fff; }
.bulk-search-btn.on { background: #dc2626; border-color: #dc2626; color: #fff; }
/* 订单页：批量采购 / 批量派单（与批量搜索并排） */
.bulk-act-btn {
  background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 600;
}
.bulk-act-btn:hover { background: #115e59; border-color: #115e59; color: #fff; }
.bulk-act-btn.blue { background: #2563eb; border-color: #2563eb; }
.bulk-act-btn.blue:hover { background: #1d4ed8; border-color: #1d4ed8; }
.bulk-act-btn.violet { background: #7c3aed; border-color: #7c3aed; }
.bulk-act-btn.violet:hover { background: #6d28d9; border-color: #6d28d9; }
.bsq-row { display: flex; gap: 10px; align-items: flex-start; }
.bsq-label { width: 72px; flex: none; padding-top: 9px; font-size: 13px; color: #475569; }
.bsq-row textarea {
  flex: 1; min-width: 0; min-height: 150px; padding: 9px 11px;
  border: 1px solid #d8dee9; border-radius: 6px; font-size: 13px;
  line-height: 1.6; resize: vertical; font-family: inherit;
}
.bsq-row textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* ---- 已提交的客户定制信息（展开行 · 生产流程下方） ---- */
.ci-box { margin-top: 10px; padding: 10px 12px; background: #f7f9fc; border: 1px solid #e6eaf2; border-radius: 6px; font-size: 13px; color: #3a4253; line-height: 1.75; }
.ci-head { font-weight: 600; color: #2b3444; margin-bottom: 4px; }
.ci-head::before { content: '① '; color: #2563eb; font-weight: 700; }
.ci-line { word-break: break-all; }
.ci-text { color: #1f2937; }
.ci-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.ci-imgs img { width: 66px; height: 66px; object-fit: cover; border: 1px solid #e0e4ec; border-radius: 4px; background: #fff; display: block; }
.ci-imgs a:hover img { border-color: var(--primary); }
.ci-done { color: #9ca3af; font-weight: 600; }
.ci-done.on { color: #16a34a; }

/* ---- 定制信息图片画廊（站内查看） ---- */
.ci-imgs .ci-img { cursor: zoom-in; }
.ci-imgs .ci-img:hover { border-color: var(--primary); }
.iv { position: fixed; inset: 0; z-index: 9998; display: none; flex-direction: column; align-items: center; justify-content: center; background: rgba(24, 30, 42, .55); padding: 36px 16px 10px; }
.iv.show { display: flex; }
.iv-stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.iv-stage img { max-width: 92vw; max-height: 74vh; object-fit: contain; background: #fff; padding: 8px; border-radius: 4px; box-shadow: 0 12px 44px rgba(0, 0, 0, .35); }
.iv-thumbs { display: flex; gap: 8px; justify-content: center; padding: 14px 0 6px; flex-wrap: wrap; }
.iv-thumbs img { width: 62px; height: 62px; object-fit: cover; border: 2px solid transparent; border-radius: 4px; cursor: pointer; opacity: .7; background: #fff; }
.iv-thumbs img:hover { opacity: 1; }
.iv-thumbs img.on { border-color: #3b82f6; opacity: 1; }
.iv-x { position: fixed; top: 10px; right: 16px; width: 34px; height: 34px; line-height: 30px; text-align: center; font-size: 22px; color: #6b7280; background: #fff; border: 1px solid #e5e7eb; border-radius: 50%; cursor: pointer; z-index: 9999; }
.iv-x:hover { color: #dc2626; border-color: #fca5a5; }

/* ---- 生产流程：竖排步骤 + 每步详情（对齐旧版） ---- */
.wf-list { padding-top: 8px; }
.wf-stage-block { margin: 0 0 10px; }
.wf-stage-block + .wf-stage-block { border-top: 1px dashed #eceef3; padding-top: 8px; }
.wf-stage-cap { font-size: 12px; color: #8b93a3; font-weight: 600; margin: 2px 0 6px; }
.wf-stage-cap b { font-weight: 600; margin-left: 4px; color: #aab1bf; }
.wf-stage-block.on .wf-stage-cap { color: var(--primary); }
.wf-stage-block.on .wf-stage-cap b { color: var(--primary); }
.wf-step { display: block; padding: 4px 0 10px; }
.wf-step-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wf-step-row:hover .wf-step-txt { text-decoration: underline; }
.wf-step-txt { font-size: 14px; }
.wf-step.done .wf-step-txt { color: #2f6fed; }
.wf-step.cur .wf-step-txt { color: var(--primary); }
.wf-step::before { left: 10px; top: 28px; }
.wf-ico { font-size: 12px; margin-left: 2px; color: #c58b00; }
.wf-ico.on { color: #e0a800; }
.wf-info {
  margin: 6px 0 0 31px;
  padding: 8px 12px 8px 12px;
  background: #f7f9fc;
  border-left: 2px solid #dbe3f0;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
  color: #3a4253;
  line-height: 1.85;
  font-weight: 400;
}
.wf-info .wi-line { word-break: break-all; }
.wf-info .wi-text { color: #1f2937; }
.wf-info .wi-done { color: #16a34a; font-weight: 600; }
.wf-info .ci-imgs { margin: 4px 0 2px; }
.wf-info .ci-imgs img { width: 58px; height: 58px; }

/* ---- 生产流程：列内步骤标题 + 步骤详情块（对齐旧版） ---- */
.wf-cols { align-items: start; }
.wf-col .wf-steps { min-width: 0; }
.wf-step-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wf-step-row:hover .wf-step-txt { text-decoration: underline; }
.wf-ico { font-size: 12px; margin-left: 2px; color: #c58b00; font-style: normal; }
.wf-ico.on { color: #e0a800; }
/* 物流取货 / 上网 / 尾程：系统自动读取轨迹，不可手动点击 */
.wf-step-row[data-auto] { cursor: default; }
.wf-step-row[data-auto]:hover .wf-step-txt { text-decoration: none; }
.wf-auto-tag {
  font-style: normal; font-size: 11px; line-height: 1.4;
  color: #0f766e; background: #ccfbf1; border: 1px solid #99f6e4;
  border-radius: 4px; padding: 0 4px; margin-left: 4px;
}
.wf-step.done .wf-step-txt { color: #2f6fed; }
.wf-info {
  margin: 6px 0 4px 0;
  padding: 7px 10px;
  background: #f7f9fc;
  border: 1px solid #e6eaf2;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: #3a4253;
  line-height: 1.8;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
}
.wf-info .wi-line { word-break: break-all; white-space: normal; }
.wf-info .wi-text { color: #1f2937; }
.wf-info .wi-done { color: #16a34a; font-weight: 600; }
.wf-info .ci-imgs { margin: 5px 0 2px; gap: 5px; }
.wf-info .ci-imgs img { width: 54px; height: 54px; }

/* 派单生产列里的生产员标签 */
.wf-producer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 12.5px;
  color: #1d4ed8;
  max-width: 100%;
  box-sizing: border-box;
}
.wf-producer span { color: #64748b; }
.wf-producer b { font-weight: 600; color: #1d4ed8; }
.wf-producer.none { background: #f8fafc; border-color: #e2e8f0; color: #94a3b8; }
.wf-producer.none b { color: #94a3b8; font-weight: 400; }

/* ---- 运单号 + 同步物流 ---- */
.lg-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: #4b5563; }
.lg-row .mono { font-family: ui-monospace, Menlo, Consolas, monospace; color: #111827; }

/* ---------------- 尾程物流：选择 与 预报 分开 ---------------- */
.lg-pick-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:2px 0}
.lg-pick-row .cu-pill{max-width:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* 预报订单 / 打印面单：靠到这一行最右边，上下排列 */
.lg-act-group{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin-left:auto}
.lg-report-btn{padding:3px 10px;font-size:12px;border-radius:6px;border:1px solid #16a34a;background:#16a34a;color:#fff;font-weight:600;cursor:pointer}
.lg-report-btn:hover{background:#15803d;border-color:#15803d}
.lg-report-btn.is-done{background:#fff;border-color:#cbd5e1;color:#94a3b8;font-weight:400;cursor:default}
.lg-report-btn.is-done:hover{background:#fff;border-color:#cbd5e1}
.lg-print-btn{padding:3px 9px;font-size:12px;border-radius:6px;border:1px solid #2563eb;background:#fff;color:#2563eb;cursor:pointer}
.lg-print-btn:hover{background:#eff6ff}
.lg-print-btn.is-printed{border-color:#16a34a;color:#0b7a5f;background:#ecfdf5}

/* ---------------- SKU 详情弹窗（页签式） ---------------- */
.modal.sku-modal { width: 820px; max-width: 96vw; }
/* 弹窗头部：一键复制全部信息 */
.sk-copy-all {
  height: 28px;
  padding: 0 12px;
  font-size: 12.5px;
  font-family: inherit;
  color: #33415c;
  background: #fff;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.sk-copy-all:hover { color: var(--primary); border-color: var(--primary); background: #f2f6ff; }
.sk-copy-all:active { transform: translateY(1px); }
/* 拷贝模式提示条 */
.sk-copy-tip {
  margin: 0 18px 0;
  padding: 8px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
}
.sk-copy-tip b { color: #b45309; }
.sku-tabs {
  display: flex;
  gap: 26px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.sku-tab {
  height: 38px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-size: 13.5px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.sku-tab:hover { color: var(--primary); }
.sku-tab.on { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

.modal-body.sku-modal-body { display: block; padding: 18px 20px 20px; }
.sku-pane-empty { padding: 60px 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- SKU 规格库存页签 ---- */
.sk-var-tip { font-size: 12px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.sk-var-list { display: flex; flex-direction: column; gap: 8px; }
.sk-var-row {
  display: grid;
  grid-template-columns: 170px 1fr 92px 62px;
  gap: 8px;
  align-items: center;
}
.sk-var-row.sk-var-new { grid-template-columns: 170px 1fr 92px auto; }
.sk-var-code,
.sk-var-name {
  height: 36px;
  box-sizing: border-box;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  background: #fff;
  min-width: 0;
}
.sk-var-code:focus,
.sk-var-name:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.sk-var-code[readonly] { background: #f7f9fc; color: #64748b; }
.sk-var-qty { font-size: 12.5px; color: #374151; text-align: center; white-space: nowrap; }
.sk-var-qty.is-zero { color: #9aa4b6; }
.sk-var-del,
.sk-var-ok,
.sk-var-cancel,
.sk-var-add {
  height: 36px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.sk-var-del { color: #e5484d; border-color: #f6d5d7; }
.sk-var-del:hover { background: #fff5f5; }
.sk-var-ok { border-color: var(--primary); background: var(--primary); color: #fff; padding: 0 12px; }
.sk-var-ok:hover { background: var(--primary-dark); }
.sk-var-cancel { padding: 0 12px; color: #64748b; }
.sk-var-cancel:hover { background: #f4f7fc; }
.sk-var-newbtns { display: flex; gap: 6px; }
.sk-var-actions { margin-top: 12px; }
.sk-var-add { padding: 0 14px; color: var(--primary); border-style: dashed; border-color: #bfd3f7; }
.sk-var-add:hover { background: #f4f8ff; }
.sk-var-add:disabled { color: #b3bccb; border-color: #e3e8f0; cursor: not-allowed; background: #fafbfd; }
.sk-var-empty { font-size: 12.5px; color: var(--muted); padding: 14px 0; }

.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.sk-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sk-f.full { grid-column: 1 / -1; }
.sk-f > label { font-size: 12.5px; color: #64748b; }
.sk-f > label em { color: #e5484d; font-style: normal; }
.sk-f input, .sk-f select, .sk-f textarea {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
.sk-f textarea { height: auto; min-height: 76px; padding: 9px 10px; resize: vertical; line-height: 1.6; }
.sk-f input:focus, .sk-f select:focus, .sk-f textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.sk-f input:disabled { background: #f6f7fa; color: #94a3b8; }
.sk-tip { color: #98a2b3; font-size: 12px; margin-left: 4px; }

/* 生产工艺：输入框 + 新增按钮 */
.sk-proc-row { display: flex; gap: 8px; align-items: center; }
.sk-proc-row > input { flex: 1 1 auto; }
.sk-proc-add {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.sk-proc-add:hover { background: #e2ecff; }

/* 生产工艺：可搜索、可上下滑动的下拉 */
#procPick { flex: 1 1 auto; min-width: 0; }
#procPick > input { width: 100%; padding-right: 26px; cursor: text; }
#procPick .skupick-arrow { height: 36px; }
.proc-panel {
  position: fixed;
  display: flex;
  flex-direction: column;
  width: 240px;
  z-index: 2800;
}
.proc-panel[hidden] { display: none; }
.proc-panel .skupick-list { flex: 1 1 auto; min-height: 0; max-height: none; }
.proc-panel .skupick-manage { cursor: pointer; }

/* 生产工艺管理弹窗 */
#procMask { z-index: 2700; }
.proc-add-row { display: flex; gap: 8px; align-items: center; }
.proc-add-row > input { flex: 1 1 auto; }
.proc-add-row > button { flex: 0 0 auto; height: 36px; padding: 0 18px; white-space: nowrap; }
.proc-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 46px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  max-height: 200px;
  overflow-y: auto;
}
.proc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12.5px;
}
.proc-tag i { font-style: normal; color: #94a3b8; cursor: pointer; }
.proc-tag i:hover { color: #e5484d; }

.sk-step {
  display: flex;
  align-items: center;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.sk-step input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  text-align: center;
  box-shadow: none !important;
  cursor: text;
}
.sk-step:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

/* SKU 列表：产品名称（中文名 / 英文名 两行） */
.sku-name { line-height: 1.5; min-width: 0; }
.sku-name-cn {
  font-size: 13.5px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sku-name-en {
  font-size: 12px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* SKU 列表：SKU 编号（等宽字体标签，过长时省略） */
.sku-code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* SKU 列表：生产周期步进器（紧凑版，可直接输入或加减天） */
.sku-days { height: 30px; width: 100%; max-width: none; margin: 0; }
.sku-days .sk-step-b { width: 26px; font-size: 13px; }
.sku-days input { font-size: 12.5px; }

/* SKU 分类授权：筛选区的「授权查看」按钮 + 弹窗 */
.ca-btn {
  height: 38px;
  width: 100%;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #f7f9fc;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.ca-btn:hover { border-color: var(--primary); color: var(--primary); background: #f0f6ff; }

/* 弹窗整体：单列纵向排版（覆盖 .modal-body 的双栏 grid） */
.modal.ca-modal { width: 560px; max-width: calc(100vw - 40px); }
.modal-body.ca-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 18px;
  overflow: auto;
}

/* 选择人员 */
.ca-field { display: flex; align-items: center; gap: 10px; }
.ca-field .ca-label { flex: none; font-size: 13px; color: #374151; }
.ca-field select {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
}
.ca-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.ca-btn-reset {
  flex: none;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 12.5px;
  color: #4b5563;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.ca-btn-reset:hover { border-color: #f3b6a3; color: #c0392b; background: #fff5f2; }

/* 说明 */
.ca-tip {
  font-size: 12.5px;
  line-height: 1.7;
  color: #6b7280;
  background: #f7f9fc;
  border: 1px dashed #e2e8f2;
  border-radius: 8px;
  padding: 10px 12px;
}

/* 工具条 */
.ca-bar { display: flex; align-items: center; gap: 8px; }
.ca-bar .spacer { flex: 1; }
.ca-mini {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #dfe4ec;
  border-radius: 7px;
  background: #fff;
  color: #4b5563;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
}
.ca-mini:hover { border-color: var(--primary); color: var(--primary); }
.ca-count { font-size: 12.5px; color: #6b7280; }

/* 分类勾选列表 */
.ca-list {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 44vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  align-content: start;
}
.ca-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  min-width: 0;
}
.ca-row:hover { background: #f5f8fd; }
.ca-row input { flex: none; margin: 0; }
.ca-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-empty { padding: 22px; text-align: center; color: #9ca3af; font-size: 13px; grid-column: 1 / -1; }

/* 底部按钮（固定在弹窗底部，不随内容滚动） */
.ca-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
  border-radius: 0 0 12px 12px;
}
.ca-foot .spacer { flex: 1; }
.ca-foot-hint { font-size: 12px; color: #9ca3af; }
.ca-foot button {
  height: 34px;
  min-width: 72px;
  padding: 0 16px;
  border: 1px solid #dfe4ec;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.ca-foot button:hover { border-color: #c7d2e2; background: #f7f9fc; }
.ca-foot button.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.ca-foot button.primary:hover { filter: brightness(1.06); }

/* 一线岗位（运营等）：产品分类 / 生产周期只看不改 */
.sku-cat-sel.ro,
.sku-cat-sel:disabled {
  background: #f4f6f9;
  color: #6b7280;
  border-color: #e5e9f0;
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: #6b7280;
}
.sk-step.ro { background: #f4f6f9; border-color: #e5e9f0; }
.sk-step.ro input { background: transparent; color: #6b7280; cursor: not-allowed; }
.sk-step.ro .sk-step-b { color: #c3cad6; cursor: not-allowed; background: #f4f6f9; }
.sk-step.ro .sk-step-b:hover { background: #f4f6f9; color: #c3cad6; }

/* 初始定价：输入框 + 固定 USD 后缀 */
.sku-price {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
}
.sku-price-inp {
  flex: 1 1 auto;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: #1f2937;
  box-sizing: border-box;
  text-align: left;
}
.sku-price-inp::placeholder { color: #b6bec9; }
.sku-price-inp:hover { border-color: var(--primary); }
.sku-price-inp:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}
/* 无权限：只读（灰底，不能点击编辑） */
.sku-price-inp.ro {
  background: #f4f6f9;
  color: #6b7280;
  cursor: default;
}
.sku-price-inp.ro:hover { border-color: var(--border); }
.sku-price-cur {
  flex: 0 0 auto;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* 订单历史时间线 */
.hist-list { max-height: 56vh; overflow: auto; padding: 6px 2px 2px; }
.hist-empty { color: #94a3b8; font-size: 13px; text-align: center; padding: 26px 0; }
.hist-item {
  position: relative;
  padding: 0 0 14px 20px;
  border-left: 2px solid #e6ebf3;
  margin-left: 6px;
}
.hist-item:last-child { border-left-color: transparent; padding-bottom: 2px; }
.hist-dot {
  position: absolute;
  left: -6px;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7d2e5;
  box-shadow: 0 0 0 3px #fff;
}
.hist-create .hist-dot { background: #2f6fed; }
.hist-purchase .hist-dot { background: #16a34a; }
.hist-label .hist-dot { background: #f59e0b; }
.hist-undo .hist-dot { background: #dc2626; }
.hist-line1 { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #111827; flex-wrap: wrap; }
.hist-op {
  font-size: 12px;
  color: #2f6fed;
  background: #eef4ff;
  border-radius: 10px;
  padding: 1px 8px;
}
.hist-tag { font-size: 11.5px; color: #6b7280; }
.hist-line2 { font-size: 12.5px; color: #6b7280; margin-top: 3px; }
.hist-time { font-size: 12px; color: #9aa4b2; margin-top: 2px; }
.sk-step-b {
  width: 36px;
  height: 100%;
  border: 0;
  background: #f7f9fc;
  color: #64748b;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.sk-step-b:hover { background: #eef2f9; color: var(--primary); }

.sk-radios { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; min-height: 38px; }
.sk-triple { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sk-triple .sk-step { flex: 1 1 120px; min-width: 110px; }
.sk-triple-lb { font-size: 12.5px; color: #64748b; flex: none; }

/* 预计成本（按市场分行） */
.sk-est-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sk-est-add {
  height: 26px;
  padding: 0 10px;
  border: 1px dashed #c7d0dd;
  border-radius: 6px;
  background: #fbfcfe;
  color: #5b6b82;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.sk-est-add:hover { border-color: var(--primary); color: var(--primary); background: #f4f8ff; }
.sk-est-list { display: flex; flex-direction: column; gap: 8px; }
.sk-est-row { display: grid; grid-template-columns: 1fr 1fr 1fr 26px; gap: 8px; align-items: center; }
.sk-est-headrow { font-size: 12px; color: #8a93a3; }
.sk-est-headrow span:nth-child(2), .sk-est-headrow span:nth-child(3) { padding-left: 2px; }
.sk-est-del {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #f4f5f8;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.sk-est-del:hover { background: #feebec; color: #dc2626; }
.sk-est-empty { font-size: 12.5px; color: #98a2b3; padding: 8px 0 2px; }
.sk-est-tip { font-size: 11.5px; color: #98a2b3; font-weight: 400; }
.sk-est-auto {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.sk-est-auto-row {
  display: grid;
  grid-template-columns: 1fr 70px 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 12px;
  font-size: 12.5px;
  border-top: 1px solid #f1f4f9;
}
.sk-est-auto-row:first-child { border-top: 0; }
.sk-est-auto-row > span:not(:first-child) { text-align: right; }
.sk-est-auto-head {
  background: #f7f9fc;
  color: #8a93a3;
  font-size: 12px;
  border-top: 0;
}
.sk-est-auto-head > span { text-align: right; }
.sk-est-auto-head > span:first-child { text-align: left; }
.sk-est-strong { font-weight: 600; color: var(--text); }
.sk-est-na { color: #98a2b3; font-size: 12px; }
.sk-est-sub {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: #98a2b3;
  font-weight: 400;
}
.sk-r {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}
.sk-r input[type=radio] { margin: 0; accent-color: var(--primary); cursor: pointer; }

.sk-sec {
  margin: 22px 0 14px;
  padding-top: 16px;
  border-top: 1px solid #eef1f6;
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
}

.sku-imgs { display: flex; flex-wrap: wrap; gap: 10px; }
.sku-img-tile {
  position: relative;
  width: 96px;
  height: 96px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
.sku-img-tile img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.sku-img-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 24, 39, .55);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.sku-img-del:hover { background: #dc2626; }
.sku-img-add {
  width: 96px;
  height: 96px;
  padding: 0;
  border: 1px dashed #c7d0dd;
  border-radius: 8px;
  background: #fbfcfe;
  color: #9aa4b2;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.sku-img-add:hover { border-color: var(--primary); color: var(--primary); background: #f4f8ff; }

@media (max-width: 900px) {
  .sk-grid { grid-template-columns: 1fr; }
  .sk-est-row { grid-template-columns: 1fr; }
  .sk-est-row .sk-est-del { width: 100%; }
  .sk-est-headrow { display: none; }
}

/* ============ SKU 列表：行内快捷修改小按钮 ============ */
.sku-name-wrap { position: relative; padding-right: 24px; min-width: 0; }
.sku-name-wrap > .row-edit { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.sku-code-wrap { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.sku-code-wrap > .sku-code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.row-edit {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  background: #fff;
  color: #9aa3b2;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  opacity: .65;
  transition: opacity .12s, color .12s, border-color .12s, background .12s;
}
tr[data-code]:hover .row-edit { opacity: 1; }
.row-edit:hover { color: var(--primary); border-color: var(--primary); background: #f5f9ff; }
.row-edit[data-perm-hidden] { display: none !important; }

/* 行内快捷修改浮层 */
.qedit-pop {
  position: fixed;
  z-index: 9100;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}
.qedit-pop[hidden] { display: none; }
.qedit-head { font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 10px; }
.qedit-f { margin-bottom: 9px; }
.qedit-f label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.qedit-f input {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: #1f2937;
  box-sizing: border-box;
}
.qedit-f input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}
.qedit-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.qedit-foot button {
  height: 30px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

/* 订单页流程筛选：异常订单（红色提示） */
.radio-abn { color: #b91c1c; }
.radio-abn input[type="radio"] { accent-color: #b91c1c; }
.radio-abn .fl-n { color: #b91c1c; }


/* ================= 待办提醒（铃铛） ================= */
.sb-bell {
  margin: 8px 12px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
}
.sb-bell:hover { background: #fef3c7; }
.sb-bell em {
  margin-left: auto;
  font-style: normal;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 11px;
  padding: 0 5px;
}

/* 提醒面板 / 模态 */
.nt-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 24px;
  overflow: auto;
}
.nt-panel {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
  overflow: hidden;
}
.nt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.nt-head strong { font-size: 15px; }
.nt-x {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}
.nt-hint { padding: 12px 18px 0; color: var(--amber); font-size: 12.5px; }
.nt-body { max-height: 60vh; overflow: auto; padding: 12px 18px 6px; }
.nt-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.nt-title { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.nt-desc { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.nt-ops { display: flex; gap: 8px; flex-wrap: wrap; }
.nt-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.nt-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.nt-btn.primary:hover { background: var(--primary-dark); }
.nt-btn:disabled { opacity: .5; cursor: not-allowed; }
.nt-empty { color: var(--muted); text-align: center; padding: 30px 0; }
.nt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
}
.cost-tip { font-size: 12.5px; color: var(--muted); }
.cost-panel { max-width: 560px; }
.cost-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.cost-info { min-width: 0; flex: 1 1 auto; }
.cost-code { font-weight: 600; font-size: 13px; }
.cost-name {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cost-inp-wrap { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.cost-inp {
  width: 100px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
}
.cost-cur { font-size: 11.5px; color: var(--muted); }

/* ================= 利润大盘 ================= */
.pf-wrap { padding: 16px 18px 44px; max-width: 1580px; }
.pf-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.pf-title { font-size: 17px; font-weight: 700; margin-right: 6px; }
.pf-top input[type="date"],
.pf-top select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
}
.pf-tilde { color: var(--muted); font-size: 12.5px; }
.pf-btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.pf-btn:hover { border-color: #c9d4e5; }
.pf-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.pf-btn.primary:hover { background: var(--primary-dark); }
.pf-btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.pf-spacer { margin-left: auto; }

.pf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.pf-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.pf-card .k { font-size: 12.5px; color: var(--muted); }
.pf-card .v {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.pf-card .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pf-card.win .v { color: var(--green); }
.pf-card.loss .v { color: var(--red); }
.pf-card.warn .v { color: var(--amber); }

.pf-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff8e6;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.8px;
}
.pf-alert.red { background: #fdf0f0; border-color: #fecaca; color: #b91c1c; }

.pf-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.pf-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.pf-panel-head strong { font-size: 14px; }
.pf-tabs { display: flex; gap: 6px; margin-left: auto; }
.pf-tab {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
}
.pf-tab.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.pf-scroll { overflow-x: auto; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pf-table th,
.pf-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef1f6;
  text-align: right;
  white-space: nowrap;
}
.pf-table th {
  background: #f7f9fc;
  font-weight: 600;
  color: #475569;
  font-size: 12.5px;
}
.pf-table th:first-child,
.pf-table td:first-child { text-align: left; }
.pf-table tbody tr:hover { background: #fafcff; }
.pf-table .num { font-variant-numeric: tabular-nums; }
.pf-win { color: var(--green); font-weight: 600; }
.pf-loss { color: var(--red); font-weight: 600; }
.pf-muted { color: var(--muted); }
.pf-sub { display: block; font-size: 11px; color: var(--muted); }
.pf-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; }
.pf-tag.ok { background: #e7f7f2; color: #0b7a5e; }
.pf-tag.bad { background: #fdecec; color: #b91c1c; }
.pf-tag.wait { background: #fff6e5; color: #92400e; }
.pf-tag.none { background: #eef1f6; color: #5b6472; }
.pf-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.pf-pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.pf-pager .pf-btn { height: 30px; padding: 0 12px; }
.pf-rate-inp {
  width: 70px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 12.5px;
}


/* ================= 订单详情·利润核算 ================= */
.pf-detail {
  border-top: 1px dashed var(--border);
  margin-top: 12px;
  padding-top: 12px;
}
.pf-detail .pf-fx {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 400;
  margin-left: 8px;
}
.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.pf-cell {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}
.pf-cell .k {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 2px;
}
.pf-cell .v {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.pf-cell .v i {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.pf-cell .v.win { color: var(--green); }
.pf-cell .v.loss { color: var(--red); }
.pf-cell .v.warn { color: var(--amber); }
.pf-fee-wrap { display: flex; align-items: center; gap: 6px; }
.pf-fee {
  width: 96px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pf-fee:focus { outline: none; border-color: var(--primary); }
.pf-fee-wrap i { font-style: normal; font-size: 11px; color: var(--muted); }
.pf-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
}
.pf-foot .pf-tip { color: var(--muted); }

/* 系统参数·利润设置 */
.pf-set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.pf-set-row label { min-width: 150px; font-size: 13px; }
.pf-set-row input {
  width: 110px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
}
.pf-set-row .hint { color: var(--muted); font-size: 12px; }


/* 销售额 / 运费：上下两行，数值右对齐 */
.pf-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.pf-kv span {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.pf-kv b {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}

.nt-mask[hidden] { display: none !important; }

/* ---------- 批量填申报单价弹窗（SKU 信息页） ---------- */
.dp-modal { width: 780px; max-width: 96vw; }
.dp-tip {
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f4f7fe;
  border: 1px solid #e2ebfb;
  color: #4a5a75;
  font-size: 12.5px;
  line-height: 1.6;
}
.dp-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dp-bar input[type="text"] { width: 220px; }
.dp-bar input[type="number"] {
  width: 100px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.dp-bar input[type="number"]:focus,
.dp-row input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.dp-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}
.dp-chk input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
.dp-lb { font-size: 13px; color: var(--muted); white-space: nowrap; }
.dp-list {
  max-height: 46vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.dp-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid #f1f4f9;
}
.dp-row:last-child { border-bottom: none; }
.dp-row:nth-child(even) { background: #fafbfd; }
.dp-code {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-name {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dp-row input[type="number"] {
  height: 32px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 8px;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.dp-row.is-filled .dp-code { color: #199a56; }
.dp-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.dp-foot { margin-top: 12px; }
.dp-foot .hint { font-size: 12.5px; }

/* ---------- 订单销量统计：广告消耗录入弹窗 ---------- */
.pf-card .k .pf-mini {
  margin-left: auto;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--primary);
  font-size: 11.5px;
  line-height: 1;
  cursor: pointer;
}
.pf-card .k .pf-mini:hover { border-color: var(--primary); background: #f4f7fe; }
#cardAdCost .k { display: flex; align-items: center; gap: 8px; }

.pf-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  display: none;
  z-index: 60;
}
.pf-mask.show { display: block; }

.pf-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  max-width: 94vw;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .22);
  display: none;
  z-index: 61;
  overflow: hidden;
}
.pf-modal.show { display: block; }
.pf-modal-h {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pf-modal-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pf-modal-b { padding: 14px 16px; max-height: 56vh; overflow: auto; }
.pf-modal-f {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.pf-x {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.pf-x:hover { color: #dc2626; border-color: #fca5a5; }

.ad-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ad-bar label { font-size: 13px; color: var(--muted); }
.ad-bar input[type="month"] {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
}
.ad-bar input[type="month"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.ad-tip { font-size: 12px; color: var(--muted); }
.ad-scope {
  font-size: 12px;
  color: #2f6fed;
  background: #eef4ff;
  border: 1px solid #d7e4ff;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.ad-list {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.ad-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid #f1f4f9;
}
.ad-row:last-child { border-bottom: none; }
.ad-row:nth-child(even) { background: #fafbfd; }
.ad-row .nm {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-row input[type="number"] {
  height: 32px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 8px;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.ad-row input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.ad-total { font-size: 13px; color: var(--muted); }

/* ---------------- 薪资考勤 ---------------- */
.pay-month {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
}
.pay-month:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}

.pay-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.pay-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.pay-stat .k { font-size: 12.5px; color: var(--muted); }
.pay-stat .v {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}
.pay-stat .s { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.pay-stat-paid { border-color: #cfe3d6; background: #fbfefc; }
.pay-stat-paid .v { color: #14804a; }
@media (max-width: 1280px) {
  .pay-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.pay-nm { font-size: 13px; color: #111827; font-weight: 600; }
.pay-sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.pay-num { font-variant-numeric: tabular-nums; text-align: right; }
.pay-strong { font-weight: 700; color: #111827; }
.pay-muted { color: #b6bfcc; }
.pay-loss { color: #dc2626; }
.pay-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1.6;
}
.pay-tag.ok { background: #e8f7ee; color: #14804a; }
.pay-tag.wait,
.pay-tag.warn { background: #fff4e5; color: #b25c00; }

/* ---- 历史记录（月度薪资台账） ---- */
.pay-hist { margin-top: 16px; }
.pay-hist-nav {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
.pay-hist-nav:hover { border-color: var(--primary); color: var(--primary); }
.pay-hist-year {
  min-width: 62px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.pay-hist-total { display: flex; gap: 34px; padding: 4px 2px 14px; flex-wrap: wrap; }
.pay-hist-total-item { display: flex; flex-direction: column; gap: 5px; }
.pay-hist-total-item span { font-size: 12px; color: var(--muted); }
.pay-hist-total-item b {
  font-size: 19px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.3px;
}
.pay-hist-table { max-width: 860px; }
.pay-hist-table th { text-align: right; }
.pay-hist-table th:first-child,
.pay-hist-table td:first-child { text-align: left; }
.pay-hist-table tbody tr[data-month] { cursor: pointer; }
.pay-hist-table tbody tr[data-month]:hover td { background: #f6f9ff; }
.pay-hist-table tbody tr.on td { background: #eef4ff; }
.pay-hist-note { font-size: 11.5px; color: #b6bfcc; }
.pay-hist-detail { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.pay-hist-detail-h { font-size: 12.5px; font-weight: 700; color: #374151; margin-bottom: 10px; }
.pay-mini {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.pay-mini:hover { border-color: var(--primary); color: var(--primary); }

.pay-modal { width: 700px; }
.pay-modal-lg { width: 940px; }
/* 内容多时内部滚动，底部按钮始终可点 */
.pay-modal .bm-modal-b,
.pay-modal-lg .bm-modal-b { flex: 1 1 auto; min-height: 0; }
.pay-modal .bm-modal-f,
.pay-modal-lg .bm-modal-f { flex: 0 0 auto; }
.pay-modal .shop-pick { max-height: 150px; overflow: auto; }
.pay-sec {
  font-size: 12.5px;
  font-weight: 700;
  color: #2f6fed;
  background: #f2f6ff;
  border-radius: 8px;
  padding: 7px 12px;
  margin: 4px 0 12px;
}
.pay-sec-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-save-btn {
  height: 30px;
  padding: 0 14px;
  font-size: 12.5px;
  border-radius: 7px;
}
.pay-sec:nth-of-type(n + 2) { margin-top: 18px; }

.pay-calc {
  margin-top: 16px;
  padding: 12px 14px;
  background: #fafbfd;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pay-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #475569;
  padding: 3px 0;
}
.pay-calc-row b { font-variant-numeric: tabular-nums; color: #111827; }
.pay-calc-row.total {
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.pay-calc-row.total b { font-size: 18px; color: #2f6fed; }

.pay-in {
  height: 32px;
  width: 100%;
  box-sizing: border-box;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}
.pay-in:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
input.pay-in { text-align: right; font-variant-numeric: tabular-nums; }
.pay-rate-table td { vertical-align: middle; }
.pay-rate-sum { font-size: 13px; color: #111827; font-weight: 700; }

/* 左上角人员选择条 */
.pay-pick-card { padding: 12px 16px; margin-bottom: 16px; }
.pay-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pay-pick-label { font-size: 13px; font-weight: 700; color: #111827; white-space: nowrap; }
.pay-select {
  height: 36px;
  min-width: 260px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
}
.pay-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
/* 薪资页：人员下拉（每行带 ✕ 可移除不要的人） */
.staff-pick { position: relative; }
.staff-btn { text-align: left; cursor: pointer; }
.staff-panel {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0;
  width: max(300px, 100%); max-height: 340px; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .14); padding: 6px;
}
.staff-panel .staff-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 6px; font-size: 13.5px; cursor: pointer;
  color: #1f2937;
}
.staff-panel .staff-row:hover { background: #eef4ff; }
.staff-panel .staff-row.on { background: #e0ecff; font-weight: 700; color: #1d4ed8; }
.staff-panel .staff-row .sr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-panel .staff-row .sr-tag { flex: none; font-size: 11.5px; color: #64748b; }
.staff-panel .staff-row .sr-x {
  flex: none; width: 20px; height: 20px; line-height: 18px; text-align: center;
  border-radius: 50%; color: #94a3b8; font-size: 12px;
}
.staff-panel .staff-row .sr-x:hover { background: #fee2e2; color: #dc2626; }
.staff-panel .staff-row.hidden { color: #94a3b8; }
.staff-panel .staff-row.hidden .sr-x:hover { background: #dcfce7; color: #16a34a; }
.staff-panel .sr-sep { margin: 6px 4px 2px; padding-top: 6px; border-top: 1px dashed #e2e8f0; font-size: 12px; color: #94a3b8; }
.staff-panel .sr-empty { padding: 10px; text-align: center; font-size: 12.5px; color: #94a3b8; }
.pay-who {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: #111827;
}
.pay-who-sub { font-size: 12px; color: var(--muted); }

/* 人员快捷搜索（输入姓名/手机号/账号自动过滤） */
.pay-search { position: relative; flex: 0 1 240px; min-width: 170px; }
.pay-search-input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
}
.pay-search-input::placeholder { color: #9aa5b5; }
.pay-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .12);
}
.pay-search-clear {
  position: absolute;
  right: 5px;
  top: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}
.pay-search-clear:hover { background: #eef2f8; color: #111827; }
.pay-search-list {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: 40px;
  max-height: 280px;
  overflow: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
}
.pay-search-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  cursor: pointer;
}
.pay-search-item span { font-size: 12px; color: var(--muted); }
.pay-search-item:hover,
.pay-search-item.active { background: #f2f7ff; }
.pay-search-item.on { background: #eef4ff; }
.pay-search-item.on b { color: var(--primary); }
.pay-search-empty { padding: 12px; text-align: center; font-size: 12.5px; color: var(--muted); }
/* 搜索命中「请假 / 补休 / 旷工」时的查名单入口 */
.pay-search-hit {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  padding: 9px 10px;
  border: 1px solid #ffe0b2;
  border-radius: 8px;
  background: #fff8ec;
  color: #8a5300;
  font-size: 13px;
  cursor: pointer;
}
.pay-search-hit b { margin-left: auto; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pay-search-hit:hover { background: #ffefd6; border-color: #f6c66a; }

/* 本月名单弹窗 */
.pay-rec-modal { width: 680px; max-width: calc(100vw - 40px); }
.pay-rec-sum { margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.pay-rec-sum b { font-size: 15px; color: #111827; font-variant-numeric: tabular-nums; }
.pay-rec-list {
  max-height: 52vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pay-rec-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
}
.pay-rec-row:last-child { border-bottom: 0; }
.pay-rec-row:hover { background: #f7fbff; }
.pay-rec-who b { font-size: 13.5px; color: #111827; }
.pay-rec-who span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.pay-rec-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-rec-day {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f8;
  color: #374151;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.pay-rec-num { text-align: right; font-size: 12.5px; font-weight: 700; color: #b25c00; font-variant-numeric: tabular-nums; }
.pay-rec-empty { padding: 28px; text-align: center; font-size: 13px; color: var(--muted); }

/* 商品销量统计：非管理员隐藏销售额（表头 / 列 / 汇总卡） */
body.no-sales #cardSales,
body.no-sales #colSales,
body.no-sales .col-sales { display: none !important; }
body.no-sales .os-cards.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* 快捷标记今天 */
.pay-quick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px dashed #c7d2e2;
  border-radius: 10px;
  background: #f9fbfe;
}
.pay-quick-label { padding: 0 2px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pay-quick button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: #374151;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.pay-quick button:hover { border-color: var(--primary); color: var(--primary); }
.pay-quick button.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}

/* 添加薪资人员（只算薪资，不建账号） */
.pay-add-staff {
  height: 34px;
  padding: 0 14px;
  border: 1px dashed #c7d2e2;
  border-radius: 8px;
  background: #f7f9fc;
  color: #374151;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.pay-add-staff:hover { border-color: var(--primary); color: var(--primary); background: #f0f6ff; border-style: solid; }
.pay-ext-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b45309;
  font-size: 11.5px;
  line-height: 18px;
  vertical-align: 1px;
}
.pay-del-staff {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #f0d5cd;
  border-radius: 8px;
  background: #fff7f5;
  color: #c0392b;
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.pay-del-staff:hover { background: #fdece7; border-color: #e8b4a6; }
.pay-staff-modal { width: 520px; max-width: calc(100vw - 40px); }
.pay-staff-modal .bm-grid { grid-template-columns: 1fr 1fr; }
.pay-req { color: #e04b3a; }

/* 临时薪资（日历框架） */
.pay-temp { padding: 18px 20px; margin-top: 16px; }
.pay-temp .pay-sec-row { margin-bottom: 12px; }
.pay-temp-month { font-size: 12.5px; color: var(--muted); }
.pay-temp-sum { font-size: 13px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; }
.pay-temp .pay-cal { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pay-temp-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pay-temp-modal { width: 460px; max-width: calc(100vw - 40px); }
.pay-temp-modal .pay-day-status { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pay-temp-modal .pay-day-status button { height: 36px; font-size: 12.5px; }
/* 单天登记：当天应付提示 */
.pay-temp-calc {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f4f8ff;
  color: #24405f;
  font-size: 12.5px;
  line-height: 1.6;
}
.pay-temp-calc b { color: var(--primary); font-variant-numeric: tabular-nums; }

.pay-panel { padding: 18px 20px; }
.pay-empty {
  padding: 64px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.pay-comm-table { max-width: 1040px; }.pay-comm-table td { vertical-align: middle; padding-top: 11px; padding-bottom: 11px; }
.pay-comm-table th { text-align: right; font-variant-numeric: tabular-nums; }
.pay-comm-table th:first-child,
.pay-comm-table td.pay-shop { text-align: left; }
.pay-comm-table .pay-num { text-align: right; font-variant-numeric: tabular-nums; }
.pay-comm-table .pay-rate-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2f6fed;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.pay-comm-table tr.pay-sum-row td {
  background: #fafbfd;
  font-weight: 700;
  border-top: 1px solid var(--border);
}

/* ---------- 考勤日历 ---------- */
.pay-att-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.pay-att-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: var(--muted);
}
.pay-att-item b {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
.pay-att-item.leave b { color: #b25c00; }
.pay-att-item.off b { color: #2f6fed; }
.pay-att-item.absent b { color: #dc2626; }

.pay-cal {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 1040px;
}
.pay-cal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
}
.pay-cal-title { font-size: 13.5px; font-weight: 700; color: #111827; }
.pay-cal-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.pay-cal-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.pay-cal-legend .dot.work { background: #cbd5e1; }
.pay-cal-legend .dot.leave { background: #f59e0b; }
.pay-cal-legend .dot.off { background: #2f6fed; }
.pay-cal-legend .dot.absent { background: #dc2626; }

.pay-cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.pay-cal-week span {
  padding: 8px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.pay-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}
.pay-cal-cell {
  min-height: 74px;
  padding: 6px 7px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background .12s;
}
.pay-cal-cell:hover { background: #f5f8ff; }
.pay-cal-cell.blank { background: #fff; cursor: default; }
.pay-cal-cell.rest { cursor: default; }
.pay-cal-cell.rest:hover { background: #fff; }
.pay-cal-cell .cd {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  font-variant-numeric: tabular-nums;
}
.pay-cal-cell.rest .cd { color: #94a3b8; }
.pay-cal-cell .ctag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.6;
}
.pay-cal-cell .ctag.leave { background: #fff4e5; color: #b25c00; }
.pay-cal-cell .ctag.off { background: #eef4ff; color: #2f6fed; }
.pay-cal-cell .ctag.absent { background: #fdecec; color: #dc2626; }
.pay-cal-cell .ctag.rest { background: #f1f5f9; color: #94a3b8; }
.pay-cal-cell .cnote {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-day-modal { width: 420px; }.pay-day-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pay-day-status button {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.pay-day-status button:hover { border-color: #c7d7f5; }
.pay-day-status button.on {
  border-color: var(--primary);
  background: #eef4ff;
  color: #2f6fed;
  font-weight: 700;
}

/* ---------- 可折叠区块（岗位按钮 / 账号店铺 / 账号功能） ---------- */
.fold { width: 100%; }
.fold-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 40px; padding: 0 12px; box-sizing: border-box;
  background: #fff; border: 1px solid #e3e8f0; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; color: var(--text);
  cursor: pointer; text-align: left;
}
.fold-head:hover { border-color: #c7d7f5; background: #fbfcff; }
.fold.open .fold-head {
  border-color: #c7d7f5;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.fold-t { font-weight: 600; }
.fold-sub {
  font-size: 11.5px; font-weight: 400; color: #64748b;
  background: #f1f4f9; border: 1px solid #e3e8f0;
  border-radius: 4px; padding: 1px 6px; white-space: nowrap;
}
.fold-n { margin-left: auto; font-size: 12px; color: #8b95a5; }
.fold.open .fold-n { color: #2f6fed; }
.fold-arrow {
  flex: none; width: 16px; text-align: center; font-size: 13px;
  color: #8b95a5; transition: transform .16s ease;
}
.fold.open .fold-arrow { transform: rotate(180deg); }
.fold-body {
  border: 1px solid #c7d7f5; border-top: 0;
  border-radius: 0 0 8px 8px;
  padding: 10px 12px 12px;
  background: #fbfcff;
}
.fold-body .shop-pick { max-height: 240px; overflow: auto; }
.fold-body .tip { margin-top: 8px; }

/* 批量设置 SKU */
.bs-top { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; }
.bs-top input { flex: 1; padding: 7px 10px; border: 1px solid #cfd8e6; border-radius: 7px; font-size: 13px; }
.bs-top button {
  flex: none; padding: 7px 12px; border: 1px solid #cfd8e6; border-radius: 7px;
  background: #fff; cursor: pointer; font-size: 13px; white-space: nowrap;
}
.bs-top button:hover { border-color: #2563eb; color: #2563eb; }
.bs-body { max-height: 52vh; overflow: auto; margin-top: 6px; }
.bs-order { border: 1px solid #e5ebf5; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fbfcff; }
.bs-h { font-weight: 600; font-size: 13px; color: #22314f; margin-bottom: 6px; }
.bs-row { display: flex; gap: 10px; align-items: center; padding: 4px 0; }
.bs-t {
  flex: 1; min-width: 0; font-size: 12.5px; color: #5a6a85;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bs-row input {
  flex: none; width: 190px; padding: 6px 9px; border: 1px solid #cfd8e6;
  border-radius: 7px; font-size: 13px; font-family: inherit;
}
.bs-row input:focus { border-color: #2563eb; outline: none; }

/* ================= 设计图库 ================= */
.dg-filter { padding: 14px 16px; margin-bottom: 14px; }
.dg-search { display: flex; align-items: center; gap: 10px; }
.dg-search input {
  width: 320px; max-width: 46vw; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 13.5px; font-family: inherit;
}
.dg-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.dg-search .spacer { flex: 1; }
.dg-total { font-size: 12.5px; color: var(--muted); }
.dg-cats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.dg-cat {
  height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; color: #4b5563; font-size: 12.5px; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.dg-cat em { font-style: normal; color: #9ca3af; font-size: 11.5px; }
.dg-cat:hover { border-color: #bfd2f5; color: var(--primary); }
.dg-cat.on { border-color: var(--primary); background: #eef4ff; color: var(--primary); font-weight: 700; }
.dg-cat.on em { color: var(--primary); }

.dg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.dg-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.dg-card:hover { box-shadow: 0 6px 20px rgba(17,32,58,.09); transform: translateY(-1px); }
.dg-thumb {
  height: 170px; background: #f4f6fa; cursor: zoom-in;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.dg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dg-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.dg-name {
  font-size: 13px; font-weight: 600; color: #111827;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dg-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 18px; }
.dg-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #f1f5f9; color: #64748b; font-size: 11.5px; line-height: 18px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dg-tag.cat { background: #eef4ff; color: #2563eb; }
.dg-foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.dg-foot .spacer { flex: 1; }
.dg-who { font-size: 11.5px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-mini {
  height: 26px; padding: 0 10px; border: 1px solid #dfe4ec; border-radius: 6px;
  background: #fff; color: #4b5563; font-size: 12px; font-family: inherit; cursor: pointer;
}
.dg-mini:hover { border-color: var(--primary); color: var(--primary); }
.dg-mini.danger { color: #c0392b; border-color: #f0d5cd; }
.dg-mini.danger:hover { background: #fdece7; border-color: #e8b4a6; color: #c0392b; }

.dg-modal { width: 560px; max-width: calc(100vw - 40px); }
.dg-drop {
  border: 2px dashed #cfdaea; border-radius: 12px; background: #f9fbfe;
  padding: 26px 16px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dg-drop:hover, .dg-drop.over { border-color: var(--primary); background: #f0f6ff; }
.dg-drop-ico { font-size: 26px; }
.dg-drop-txt { margin-top: 6px; font-size: 13.5px; color: #374151; font-weight: 600; }
.dg-drop-sub { margin-top: 4px; font-size: 12px; color: #9ca3af; }
.dg-picked { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dg-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px; background: #eef4ff; color: #2563eb; font-size: 12px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dg-chip b { cursor: pointer; color: #94a3b8; font-weight: 400; }
.dg-chip b:hover { color: #c0392b; }
.dg-progress { font-size: 12.5px; color: #6b7280; }

.dg-lightbox {
  position: fixed; inset: 0; background: rgba(9,16,28,.86);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  gap: 14px; z-index: 9999; padding: 24px;
}
.dg-lightbox.show { display: flex; }
.dg-lightbox img {
  max-width: 92vw; max-height: 78vh; object-fit: contain;
  border-radius: 8px; background: #fff; cursor: zoom-out;
}
.dg-lb-bar {
  display: flex; align-items: center; gap: 14px;
  color: #e5e7eb; font-size: 13px; max-width: 92vw;
}
.dg-lb-bar .spacer { flex: 1; }
.dg-lb-bar a { color: #93c5fd; text-decoration: none; }
.dg-lb-bar a:hover { text-decoration: underline; }
.dg-lb-bar button {
  height: 30px; padding: 0 14px; border-radius: 7px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12); color: #fff; font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.dg-lb-bar button:hover { background: rgba(255,255,255,.22); }

/* 面单预览弹窗：页面内加载云途原始 PDF 并直接调打印，不再跳 label.html / PDF 窗口 */.lbl-modal {
  width: 720px;
}
.lbl-modal .lbl-tip {
  font-size: 12px;
  color: #64748b;
}
.lbl-modal .lbl-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  padding: 12px;
  background: #eef2f7;
  overflow: hidden;
}
.lbl-modal .lbl-body iframe {
  flex: 1 1 auto;
  width: 100%;
  height: 66vh;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.lbl-modal .lbl-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
}
.lbl-modal .lbl-foot .spacer { flex: 1; }
.lbl-modal .lbl-hint { font-size: 12px; color: #64748b; }

/* 「生产完成」步骤里的快捷完成按钮 */
.wf-done-btn {
  margin: 6px 0 0 26px;
  padding: 4px 12px;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #f0fdf4;
  color: #15803d;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.wf-done-btn:hover { background: #dcfce7; }







/* ICP filing number footer */
#icpFooter{position:fixed;left:0;right:0;bottom:0;z-index:60;text-align:center;font-size:12px;line-height:22px;padding:3px 0;background:rgba(255,255,255,.92);border-top:1px solid #eef0f4;pointer-events:none}
#icpFooter a{color:#8a94a6;text-decoration:none;pointer-events:auto}
#icpFooter a:hover{color:#2f6fed;text-decoration:underline}
body.has-icp-footer{padding-bottom:26px}

