/* 库存协作台 — 样式表 */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --border: #e4e9f2;
  --border-strong: #cfd8e6;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #7b8798;
  --accent: #2f6bff;
  --accent-2: #1d4ed8;
  --accent-soft: #eef3ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ok: #15803d;
  --warn: #b45309;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 48px rgba(15, 23, 42, .16);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- 基础控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-2);
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: #b9c5d8; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { background: var(--surface); border-color: #f3b6b6; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #eef2f9; border-color: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }

.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 76px; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 107, 255, .12); }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%237b8798' stroke-width='1.4' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-row { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 6px; background: #f1f5fb; color: var(--text-2); font-size: 12px;
}

/* ---------- 登录页 ---------- */
#auth-view {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
.auth-hero {
  background: linear-gradient(150deg, #eaf1ff 0%, #f7f9ff 55%, #eef7f4 100%);
  padding: 52px 56px; display: flex; flex-direction: column; justify-content: space-between;
  border-right: 1px solid var(--border);
}
.auth-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 17px; }
.auth-logo {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-size: 18px; box-shadow: var(--shadow-sm);
}
.auth-hero h1 { font-size: 32px; line-height: 1.32; margin: 26px 0 12px; letter-spacing: -.4px; }
.auth-hero p { color: var(--text-2); line-height: 1.75; margin: 0; max-width: 440px; }
.auth-flow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; max-width: 460px; }
.auth-flow .step {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .8); border: 1px solid #e0e8f7;
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; color: var(--text-2);
}
.auth-flow .step i {
  width: 17px; height: 17px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-2); font-style: normal; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.auth-foot { color: var(--muted); font-size: 12.5px; }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.auth-card { width: 100%; max-width: 372px; }
.auth-card h2 { margin: 0 0 6px; font-size: 21px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.tabs { display: flex; gap: 4px; background: #f1f4fa; padding: 4px; border-radius: 10px; margin-bottom: 20px; }
.tabs button {
  flex: 1; height: 32px; border: 0; border-radius: 7px; background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 13px; transition: background .15s, color .15s;
}
.tabs button.active { background: var(--surface); color: var(--accent-2); font-weight: 600; box-shadow: var(--shadow-sm); }
.auth-msg { margin-top: 14px; font-size: 13px; line-height: 1.6; padding: 9px 11px; border-radius: 8px; }
.auth-msg.error { background: var(--danger-soft); color: #b91c1c; border: 1px solid #fbd5d5; }
.auth-msg.ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }
.auth-msg.info { background: var(--accent-soft); color: var(--accent-2); border: 1px solid #d7e3ff; }
/* 20261117m：弹窗标题右侧的「这一票」信息（采购订单号 / 采购日期 / 批次号） */
/* 三个号放标题下面一行（标题够长也不用挤），整行铺满、左对齐 */
.modal-head { flex-wrap: wrap; }
.modal-head-extra { flex: 1 1 100%; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 4px 0 0; font-size: 12px; color: #475569; min-width: 0; order: 3; }
.modal-head h3 { min-width: 0; }
.modal-head-extra b { color: #0f172a; font-weight: 600; }
.modal-head-extra .mono { font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 11.5px; }
@media (max-width: 900px) { .modal-head-extra { gap: 8px; } }
/* 20261118a：损耗台账「表格第一行直接录入」—— 单元格里的输入框压扁，别把行撑高 */
/* 20261118c：损耗台账按「店铺 + 提仓货件 + 日期」合并分组，块与块之间加一条粗线 */
.xlt tbody tr.loss-grp-start > td { border-top: 2px solid #dbe3ef; }
.xlt tbody tr.loss-grp-start:first-child > td { border-top: 0; }
.loss-cell-shared { vertical-align: top !important; background: #fcfdff; }
/* 加产品行不重复显示日期/店铺：空格子淡底，视觉上跟第一行连成一块 */
.loss-entry-extra .loss-le-shared { background: #f8fafc; }

/* 「＋ 添加产品」要显眼：虚线蓝框 + 蓝字，别跟旁边的说明文字混在一起 */
.loss-add-btn { border: 1px dashed #7aa7f0; color: #1d4ed8; background: #f3f8ff; font-weight: 600; }
.loss-add-btn:hover { background: #e6f0ff; border-color: #3b82f6; }
/* 20261119e：问题件里的「处理码」输入框（提仓单号 / 丢弃凭证码） */
.issue-code { height: 26px; font-size: 11.5px; padding: 2px 6px; width: 150px; min-width: 0; }
.issue-code::placeholder { color: #94a3b8; }

/* 20261121l：抽屉里链接旁的「复制」小按钮 */
.copy-link { border: 1px solid #dbe4f2; background: #f8fbff; color: #1d4ed8; border-radius: 6px;
  padding: 1px 6px; font-size: 11.5px; line-height: 1.5; cursor: pointer; vertical-align: middle; }
.copy-link:hover { background: #e8f0ff; border-color: #93b4ef; }

.loss-entry td { padding: 4px 5px; vertical-align: middle; }
.loss-entry .input.le { height: 27px; font-size: 11.5px; padding: 2px 6px; width: 100%; min-width: 0; }
.loss-entry select.input.le { padding-right: 4px; }
.loss-entry input[type="number"].le { text-align: right; }
.auth-msg.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }   /* 20261117b：混箱提示 */
.auth-switch { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-tip { margin: 2px 0 12px; padding: 9px 11px; border-radius: 8px; background: #f1f6ff; border: 1px solid #d8e5fb;
  font-size: 12px; line-height: 1.65; color: #33507a; }
.otp-row { display: flex; gap: 10px; align-items: flex-end; }

/* ---------- 应用骨架 ---------- */
#main-view { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-head { padding: 18px 16px 14px; display: flex; align-items: center; gap: 10px; }
.side-head .auth-logo { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
.side-head b { font-size: 14.5px; }
.side-head span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.nav-group { padding: 14px 8px 6px; font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 11px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text-2); cursor: pointer; text-align: left; font-size: 13.5px;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: #f2f5fb; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }
.nav-item .n {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px; border-radius: 999px;
  background: #eef2f9; color: var(--text-2); font-size: 11.5px; font-weight: 600;
  display: grid; place-items: center;
}
.nav-item.active .n { background: #dbe6ff; color: var(--accent-2); }

/* ---------- 侧边栏「流程」十步 ---------- */
.nav-group { display: flex; align-items: center; }
.nav-group .nav-edit { margin-left: auto; font-size: 13px; line-height: 1; }
.nav-item .step-no {
  width: 18px; flex: none; text-align: center;
  font-size: 11px; font-weight: 700; color: #9aa8bd;
}
.nav-item.active .step-no { color: var(--accent-2); }
.nav-item .nav-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 「流程」环节落地页顶部的环节横条 ---------- */
.step-banner { border-color: #ddd6fe; background: #fbfaff; }
.step-pill {
  background: var(--accent-soft); color: var(--accent-2);
  font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .3px;
}

/* ---------- 待采购：已采购批次（按采购顺序，各批独立） ---------- */
.pt-hist-tr > td { background: #f7f9fd; border-bottom: 1px solid #e6ecf6; padding: 7px 13px 9px; }
.pt-hist { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #475569; }
.pt-hist-t { font-size: 11.5px; color: #64748b; margin-right: 2px; }
.pt-hist-item {
  display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 9px;
}
.pt-hist-item b { color: #0f172a; }
.pt-hist-item .mono { font-size: 11.5px; }
.pt-hist-arrow { color: #cbd5e1; font-weight: 700; }

/* ---------- 批次序号标签 ---------- */
.batch-no-tag {
  display: inline-block; background: #eef2ff; color: #4338ca;
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; margin-bottom: 2px;
}

/* ---------- 调整「流程」顺序弹窗 ---------- */
.fo-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.fo-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: #fff;
}
.fo-no { width: 20px; flex: none; text-align: center; font-weight: 700; color: #94a3b8; font-size: 12px; }
.fo-name { min-width: 110px; flex: none; font-size: 13.5px; font-weight: 600; }
.fo-desc {
  flex: 1; min-width: 0; font-size: 12px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-foot { border-top: 1px solid var(--border); padding: 12px; }
.me-card { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-2); font-weight: 700; font-size: 13px; flex: none;
}
.me-card .who { min-width: 0; }
.me-card .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .who span { font-size: 11.5px; color: var(--muted); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 13px 24px; display: flex; align-items: center; gap: 14px;
}
.topbar h1 { margin: 0; font-size: 17px; letter-spacing: -.2px; }
.topbar .page-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar .spacer { flex: 1; }
.page { padding: 20px 24px 56px; }

/* ---------- 总搜索：顶栏常驻搜索框 + 结果页（一票一行，直接给当前环节） ---------- */
.gs-box { position: relative; display: flex; align-items: center; flex: 1 1 460px; max-width: 720px; min-width: 230px; }
.gs-ico { position: absolute; left: 12px; font-size: 20px; line-height: 1; color: #64748b; pointer-events: none; }
.gs-input { height: 38px; padding-left: 35px; padding-right: 30px; border-radius: 10px; border-color: #c9d6ec; font-size: 13px; box-shadow: var(--shadow-sm); }
.gs-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.gs-input::placeholder { color: #94a3b8; }
.gs-clear {
  position: absolute; right: 7px; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%; background: #eef2f9; color: #64748b;
  font-size: 15px; line-height: 20px; cursor: pointer; display: none;
}
.gs-box.has-q .gs-clear { display: block; }
.gs-clear:hover { background: #dbe4f3; color: var(--text); }
.gs-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px 18px; margin-bottom: 14px; }
.gs-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gs-bigbox { position: relative; flex: 1 1 520px; min-width: 260px; }
.gs-bigbox .gs-ico { left: 14px; font-size: 23px; }
.gs-biginput { height: 44px; font-size: 15px; padding-left: 42px; padding-right: 34px; }
.gs-tip { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.gs-tip b { color: var(--text-2); }
.gs-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 10px; font-size: 13px; }
.gs-summary .n { font-size: 16px; font-weight: 700; color: var(--accent-2); }
.gs-all, .gs-other {
  height: 30px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--text-2); cursor: pointer; font-size: 12.5px;
}
.gs-all.active, .gs-other.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.gs-steps { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.gs-step {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px;
  padding: 9px 8px 8px; text-align: left; cursor: pointer; min-width: 0;
}
.gs-step:hover { border-color: #b9c5d8; background: #f4f7ff; }
.gs-step.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.gs-step .sn { display: block; font-size: 10.5px; color: var(--muted); }
.gs-step .sl { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-step .sc { display: block; font-size: 17px; font-weight: 700; color: var(--accent-2); margin-top: 3px; }
.gs-step.dim .sc { color: #b7c2d3; }
.gs-stage { font-size: 12.5px; }
.gs-hit { display: inline-block; padding: 1px 6px; margin: 0 3px 3px 0; border-radius: 5px; background: #eef3ff; color: #1d4ed8; font-size: 11px; }
.gs-none { text-align: center; padding: 34px 16px; color: var(--muted); font-size: 13.5px; line-height: 1.9; }
.gs-none .e { font-size: 30px; display: block; margin-bottom: 6px; color: #b7c2d3; }
@media (max-width: 1180px) { .gs-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 720px) { .gs-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gs-box { max-width: none; } }

/* ---------- 卡片 / 面板 ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.panel-head h3 { margin: 0; font-size: 14.5px; }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px; }

/* KPI */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(198px, 1fr)); gap: 14px; margin-bottom: 18px; }
/* 工作台 10 张 KPI 正好 5 + 5 铺满，不在右下留一格空白 */
.kpi-row.dash-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi .k-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.kpi .k-val { font-size: 27px; font-weight: 700; margin-top: 8px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); opacity: .85; }

/* 流程漏斗 */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pipe-step {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  background: var(--surface-2); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pipe-step:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.pipe-step .p-idx { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.pipe-step .p-name { font-size: 13.5px; font-weight: 600; margin: 5px 0 3px; }
.pipe-step .p-n { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pipe-step .p-bar { height: 4px; border-radius: 2px; background: #e6ecf6; margin-top: 9px; overflow: hidden; }
.pipe-step .p-bar i { display: block; height: 100%; border-radius: 2px; }
.pipe-step .p-desc { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.arrow-cell { display: grid; place-items: center; color: var(--border-strong); }

/* 看板 */
.kanban { display: grid; grid-template-columns: repeat(8, minmax(186px, 1fr)); gap: 13px; overflow-x: auto; padding-bottom: 8px; }
.kb-col { background: #f7f9fd; border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 200px; }
.kb-head { padding: 11px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 7px; }
.kb-head .t { font-size: 13px; font-weight: 600; }
.kb-head .c { margin-left: auto; font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.kb-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; max-height: calc(100vh - 250px); }
.kb-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.kb-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: var(--border-strong); }
.kb-card .kc-top { display: flex; align-items: flex-start; gap: 8px; }
.kb-card .kc-name { font-weight: 600; font-size: 13.5px; line-height: 1.4; }
.kb-card .kc-code { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.kb-card .kc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.kb-card .kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border); }
.kb-empty { text-align: center; color: var(--muted); font-size: 12.5px; padding: 22px 8px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; }
table.tb th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 11px 13px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
table.tb td { padding: 12px 13px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
table.tb tbody tr:hover { background: #fafcff; }
table.tb tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.toolbar .search { flex: 1; min-width: 190px; }

/* ---------- 环节页平铺筛选条（替代下拉，20261111b） ---------- */
.sf-bar { border-bottom: 1px solid var(--border); }
.sf-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.sf-l { font-size: 12px; color: var(--muted); margin: 0 2px 0 8px; white-space: nowrap; }
.sf-row > .sf-search:first-child { margin-left: 0; }
.sf-search { flex: 0 1 250px; min-width: 180px; height: 30px; font-size: 12.5px; }
.sf-l:first-child { margin-left: 0; }
.sf-chip {
  height: 27px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.sf-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.sf-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
.sf-end { flex: 1 1 180px; min-width: 120px; text-align: right; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- 预约到期的常驻标注（不弹窗） ---------- */
.arrive-tip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 10px 14px; border: 1px solid #fcd34d; border-radius: 10px;
  background: #fffbeb; color: #92400e; font-size: 12.5px; line-height: 1.6;
}
.arrive-tip b { color: #b45309; }
.arrive-tip-ico {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; background: #f59e0b; color: #fff;
  font-size: 13px; font-weight: 700; text-align: center; line-height: 20px;
}
.arrive-due-row { background: #fffbeb !important; }
.arrive-due-row:hover { background: #fef3c7 !important; }
.arrive-due-date { color: #b45309; font-weight: 700; }
.arrive-due-badge { background: #fde68a; color: #92400e; white-space: nowrap; font-weight: 600; }
.side-due-tip {
  display: block; width: calc(100% - 12px); margin: 4px 6px 8px; padding: 7px 9px;
  border: 1px solid #fcd34d; border-radius: 8px; background: #fffbeb; color: #92400e;
  font-size: 11.5px; text-align: left; cursor: pointer; line-height: 1.5;
}
.side-due-tip:hover { background: #fef3c7; }
.empty-state { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty-state .e-ico { font-size: 30px; opacity: .5; }
.empty-state p { margin: 10px 0 0; font-size: 13.5px; }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -22px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent);
}
.tl-item.sys::before { border-color: var(--border-strong); }
.tl-item .tl-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .tl-act { font-weight: 600; font-size: 13px; }
.tl-item .tl-time { font-size: 12px; color: var(--muted); margin-left: auto; }
.tl-item .tl-body { font-size: 13px; color: var(--text-2); margin-top: 5px; line-height: 1.6; }
.tl-item .tl-who { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* 抽屉 / 弹窗 */
#drawer-root, #modal-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .34); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.scrim.show { opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(1180px, 97vw);
  background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; pointer-events: auto;
  transform: translateX(14px); opacity: 0; transition: transform .22s, opacity .22s;
}
.drawer.show { transform: none; opacity: 1; }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.drawer-head h3 { margin: 0; font-size: 16px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.drawer-foot { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 9px; background: var(--surface-2); }
.drawer-foot .spacer { flex: 1; }
.modal {
  position: absolute; top: 50%; left: 50%; width: min(660px, 94vw); max-height: 90vh;
  transform: translate(-50%, -46%) scale(.98); opacity: 0;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; pointer-events: auto; transition: transform .2s, opacity .2s;
}
.modal.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--border); display: flex; gap: 9px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.x-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 19px; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.x-btn:hover { background: #f1f4fa; color: var(--text); }

/* 详情字段 */
.kv { display: grid; grid-template-columns: 106px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.section-title { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .5px; margin: 22px 0 12px; display: flex; align-items: center; gap: 9px; }
.section-title:first-child { margin-top: 0; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* 提示条 */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .2s ease-out;
  max-width: 76vw;
}
.toast.error { background: #b91c1c; }
.toast.ok { background: #15803d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 流程步骤条 */
.steps { display: flex; align-items: center; gap: 0; margin: 4px 0 18px; overflow-x: auto; }
.step-node { display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.step-node .sn { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: #eef2f9; color: var(--muted); flex: none; }
.step-node.done .sn { background: #dcfce7; color: var(--ok); }
.step-node.cur .sn { background: var(--accent); color: #fff; }
.step-node.cur { color: var(--accent-2); font-weight: 600; }
.step-line { width: 22px; height: 1px; background: var(--border-strong); flex: none; margin-right: 12px; }

/* 加载 */
#boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 80; }
.boot-box { text-align: center; color: var(--muted); font-size: 13.5px; }
.spinner {
  width: 28px; height: 28px; margin: 0 auto 14px; border-radius: 50%;
  border: 2.5px solid #dfe6f2; border-top-color: var(--accent); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #eef2f8 25%, #f7f9fd 37%, #eef2f8 63%); background-size: 400% 100%; animation: sk 1.3s ease-in-out infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 响应式 */
@media (max-width: 1180px) {
  .kpi-row, .kpi-row.dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  #auth-view { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  #main-view { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; padding: 8px; }
  .nav-group { display: none; }
  .nav-item { white-space: nowrap; }
  .kanban { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ===== 核算预览条（体积重 / 头程 / 利润率 / 库存变化） ===== */
.calc-preview {
  display: flex; flex-wrap: wrap; gap: 16px;
  padding: 13px 15px; margin-top: 4px;
  background: #f5f8ff; border: 1px solid #dbe6fb; border-radius: 10px;
}
.calc-preview:empty { display: none; }

/* ===== 宽版弹窗（选品 / 采购 / 入仓表单） ===== */
.modal .pack-row .x-btn { font-size: 16px; }
.modal input[readonly] { color: var(--muted); cursor: default; }

/* ===== 七列看板响应式 ===== */
@media (max-width: 1500px) { .kanban { grid-template-columns: repeat(4, minmax(186px, 1fr)); } }
@media (max-width: 1180px) { .kanban { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }

/* ===== 四栏栅格（箱规快填） ===== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

/* ===== 选品区：表格格局（白=手填，蓝=固定公式） ===== */
.sheet { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #d8e3f3; border-radius: 10px; overflow: hidden; background: #fff; }
.sh-head { grid-column: 1 / -1; background: #e3edfd; color: #1e50a2; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-bottom: 1px solid #d8e3f3; }
.sh-cell { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 9px; border-right: 1px solid #e7eef8; border-bottom: 1px solid #e7eef8; background: #fff; min-width: 0; }
.sh-cell.span2 { grid-column: span 2; }
.sh-l { font-size: 11px; color: #6b7a90; line-height: 1.25; }
.sh-l i { font-style: normal; color: #94a3b8; font-size: 10.5px; }
.sh-cell .input { border: none; box-shadow: none; height: auto; padding: 0; font-size: 13.5px; background: transparent; border-radius: 0; }
.sh-cell .input:focus { box-shadow: none; outline: none; border-bottom: 2px solid #3b82f6; }
.sh-cell.calc { background: #dbeafe; }
.sh-cell.calc .sh-l { color: #3b6bb0; }
.sh-v { font-size: 14px; font-weight: 600; color: #1e3a8a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sh-v.neg { color: #b91c1c; }
@media (max-width: 760px) { .sheet { grid-template-columns: repeat(2, 1fr); } }

/* 选品区：内联在流程看板里，白格手填、蓝格自动算 */
.sheet .sh-cell:not(.calc):hover { background: #fbfdff; }
.sh-cell .input::placeholder { color: #b6c2d4; }
.sel-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-foot .spacer { flex: 1; min-width: 20px; }

/* ---------- 选品区 / 手工录入：产品图片格（链接 / 粘贴图片 / 上传本地图片） ---------- */
.img-cell { gap: 6px; }
.img-cell .img-src { min-height: 44px; line-height: 1.45; resize: vertical; font-size: 12.5px; }
.img-cell .img-src:focus { border-bottom: 2px solid #3b82f6; }
.img-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-hint { font-size: 11.5px; }
.img-thumbs { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-start; min-height: 0; }
.img-thumbs .img-count { font-size: 11.5px; align-self: center; }
.img-th { position: relative; width: 60px; height: 60px; border: 1px solid #e4e9f2; border-radius: 8px; background: #f1f5f9; overflow: hidden; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.img-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-th .img-ph { font-size: 10.5px; color: #94a3b8; text-align: center; padding: 0 4px; }
.img-th .img-main { position: absolute; left: 0; bottom: 0; background: #6d28d9; color: #fff; font-size: 10px; line-height: 1.5; padding: 0 4px; border-radius: 0 6px 0 0; }
.img-th .img-x { position: absolute; top: 1px; right: 1px; width: 17px; height: 17px; line-height: 15px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .66); color: #fff; font-size: 12px; cursor: pointer; }
.img-th .img-x:hover { background: #b91c1c; }
.img-cell.drag-on { outline: 2px dashed #a78bfa; outline-offset: -3px; background: #faf9ff; }

/* ---------- SKU 分区筛选条（产品库 / 待采购 / 商品明细 / 到仓识别 / 运营统计 共用） ---------- */
.part-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.part-bar .part-l { font-size: 12px; color: var(--muted); margin-right: 2px; }
.part-bar .part-spacer { flex: 1; }
.part-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border-radius: 7px; border: 1px solid var(--border-strong); background: #fff;
  color: var(--text-2); font-size: 12.5px; cursor: pointer; white-space: nowrap;
}
.part-chip:hover { border-color: var(--accent); color: var(--accent-2); }
.part-chip b { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.part-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
.part-chip.active b { color: var(--accent-2); }
.part-chip .p-manual { font-size: 10px; color: #7c3aed; }
.part-chip .p-none { font-size: 10px; color: var(--warn); }
/* 利润表表头筛选（20261112d）：表头小漏斗 + 勾选面板（像 Excel / 飞书表格的列筛选） */
.pfx-th { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.pfx-th .pfx-arrow { font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent-2); line-height: 1; }
.pfx-sort { display: flex; align-items: center; gap: 6px; padding: 0 12px 9px; flex-wrap: wrap; }
.pfx-sort .pfx-sl { font-size: 11.5px; color: var(--muted); margin-right: 1px; }
.pfx-sbtn {
  height: 24px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: #fff; color: var(--text-2); font-size: 11.5px; cursor: pointer; white-space: nowrap;
}
.pfx-sbtn:hover { border-color: var(--accent); color: var(--accent-2); }
.pfx-sbtn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); font-weight: 600; }
/* 销售分析（20261112l） */
.sa-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.sa-adv { font-size: 11.5px; line-height: 1.6; min-width: 300px; padding: 6px 10px; }
.sa-adv b { color: var(--text-2); font-weight: 600; }
.sa-adv .muted { color: var(--muted); }
.sa-note { padding: 10px 16px 14px; font-size: 11.5px; line-height: 1.7; color: var(--muted); border-top: 1px dashed var(--border); }
.pfx-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; padding: 0; flex: none;
  border: 1px solid transparent; border-radius: 3px; background: transparent;
  color: #94a3b8; cursor: pointer;
}
.pfx-btn:hover { background: #eef2f7; color: var(--accent); border-color: #dbe3ee; }
.pfx-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.pfx-pop {
  position: fixed; z-index: 90; width: 300px;
  background: #fff; border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .18); overflow: hidden;
  font-size: 12.5px; color: var(--text);
}
.pfx-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; font-weight: 600; }
.pfx-hd .pfx-n { margin-left: auto; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.pfx-search { padding: 0 12px 9px; }
.pfx-search input {
  width: 100%; height: 28px; padding: 0 9px; border: 1px solid var(--border-strong);
  border-radius: 7px; font-size: 12px; background: #fff;
}
.pfx-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pfx-list { max-height: 246px; overflow-y: auto; padding: 2px 6px 6px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pfx-item { display: flex; align-items: center; gap: 7px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.pfx-item:hover { background: #f5f8fc; }
.pfx-item input { width: 14px; height: 14px; margin: 0; flex: none; accent-color: var(--accent); }
.pfx-item .pfx-lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.pfx-item .pfx-cnt { font-size: 11.5px; color: var(--muted); flex: none; }
.pfx-all { border-bottom: 1px dashed var(--border); border-radius: 0; margin-bottom: 2px; padding-bottom: 7px; }
.pfx-all .pfx-lab { font-weight: 600; }
.pfx-ft { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.pfx-ft .spacer { flex: 1; }
.pfx-ft .btn { min-width: 56px; justify-content: center; }
.pfx-hint { padding: 0 12px 10px; font-size: 11px; color: var(--muted); }
.part-mk { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; }
.part-mk .p-sub { color: var(--muted); font-weight: 400; }

/* ---------- 利润表 ---------- */
.profit-tb th, .profit-tb td { white-space: nowrap; }
.profit-in {
  width: 100%; min-width: 56px; height: 26px; padding: 0 6px;
  border: 1px solid transparent; border-radius: 5px; background: transparent;
  font-family: var(--font-mono); font-size: 12px; text-align: right; color: var(--text);
}
.profit-in:hover { border-color: var(--border-strong); background: #fff; }
.profit-in:focus { border-color: var(--accent); background: #fff; outline: none; }
.profit-stock { min-width: 44px; }
.profit-tb tbody tr:hover .profit-in { border-color: var(--border); }

/* ---------- 待采购：行内录入表格 ---------- */
.pt-stack { display: flex; flex-direction: column; gap: 4px; width: 138px; }
.pt-stack .pt-in { width: 100%; min-width: 0; height: 27px; font-size: 12.5px; }
.pt-in { height: 28px; min-width: 68px; width: 100%; font-size: 12.5px; }
.pt-mini { height: 25px; font-size: 11.5px; color: #64748b; background: #f8fafc; }
.pt-mini::placeholder { color: #94a3b8; }
.btn-stack { display: flex; flex-direction: column; gap: 4px; width: 74px; }
.btn-stack .btn { width: 100%; padding: 3px 0; font-size: 12px; }
/* SKU 分块：块与块之间留出间隔条，详情行淡紫底色，一眼看清一共有几个采购项 */
table.tb tr.pt-gap td { height: 18px; padding: 0; background: transparent; border-bottom: 0; }
table.tb tbody tr.pt-gap:hover { background: transparent; }
table.tb tr.pt-band-tr > td,
table.tb tr.pt-extra-tr > td { background: #faf9ff; }
table.tb tr.pt-main-tr > td { border-top: 2px solid #ddd6fe; }
table.tb tbody tr.pt-band-tr:hover > td,
table.tb tbody tr.pt-extra-tr:hover > td { background: #f5f2fd; }

/* 商品明细·已采购环节：第二批次起的续行（淡紫底区分，与主行同列对齐） */
table.tb tr.pb2-tr > td { background: #fbfaff; border-top: 1px dashed #ddd6fe; }
table.tb tbody tr.pb2-tr:hover > td { background: #f7f5ff; }
/* 「第 N 批」小标签：贴在商品名上方 */
.batch-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #ede9fe; color: #6d28d9;
  font-size: 11px; font-weight: 600; margin-bottom: 3px; white-space: nowrap; }
/* 已采购环节：操作按钮竖排（发货录入 / 删除 上下排） */
.acts-v { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.acts-v .btn { margin-right: 0 !important; }
/* 已采购环节：批次卡（20261017）——左列信息两行铺开（图片·名称在上，三块信息在下），右列发货录入 + 展开的分箱明细 */
.pc-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pc-card { background: var(--surface); border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; }
.pc-card:hover { border-color: #c7d2fe; box-shadow: 0 2px 10px rgba(79, 70, 229, .07); }
.pc-body { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; }
.pc-info { flex: 1 1 380px; min-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.pc-top { display: flex; gap: 12px; align-items: flex-start; }
.pc-photo { width: 52px; flex: none; }
.pc-name { flex: 1 1 auto; min-width: 0; }
.pc-name .cell-sub { font-size: 11.5px; }
.pc-del { flex: none; margin-left: auto; }
.pc-blocks { display: flex; gap: 26px; flex-wrap: wrap; padding-left: 64px; }
.pc-block { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pl-row { display: flex; flex-direction: column; gap: 1px; }
.pl { font-size: 11px; color: #94a3b8; line-height: 1.2; }
.pv { font-size: 13px; color: var(--text); line-height: 1.35; }
.pc-meta { flex: 0 0 auto; min-width: 92px; }
.pc-batch { flex: 0 0 auto; min-width: 150px; }
.pc-amount { flex: 0 0 auto; min-width: 105px; }
.pc-dispatch { flex: 1 1 460px; min-width: 440px; border-left: 1px dashed #dbe3f0; padding-left: 18px; }
/* 在途批次卡（20261029a）：信息块 grid 四列（8 块 4×2 整齐两行）**均匀铺满整行**，不留右侧空白；
   块内每行「标签左 · 数值右」横排（同已到仓卡），比竖排更紧凑；窄屏降为 3 列 / 2 列 */
.tc-blocks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 22px; padding-left: 64px; }
.tc-blocks .pc-block { min-width: 0; gap: 6px; }
.tc-blocks .pl-row { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #dfe6f2; padding-bottom: 4px; }
.tc-blocks .pl-row .pl { flex: none; }
.tc-blocks .pl-row .pv { flex: 1 1 auto; text-align: right; min-width: 0; }
@media (max-width: 1180px) { .tc-blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .tc-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 在途页三级下钻：年份 → 月份 → 批次（20261030） */
.tr-crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 16px 7px; }
.tr-cb { border: 1px solid var(--border); background: #fff; color: #4f46e5; border-radius: 7px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.tr-cb:hover { background: #eef2ff; border-color: #c7d2fe; }
.tr-cur { font-size: 13px; font-weight: 600; color: var(--text); }
.tr-sep { color: #c7cbd6; font-size: 13px; }
.tr-hint { font-size: 12px; color: #94a3b8; margin-left: 4px; }
.tr-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 16px 11px; border-top: 1px dashed var(--border); margin-top: 2px; }
.tr-sum { font-size: 12.5px; color: #64748b; margin-left: auto; }
.tr-sum b { color: var(--text); }
.tr-ops .chip > span { margin-left: 4px; }
.tr-tree { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 16px; }
.tr-node { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 11px; padding: 13px 16px; cursor: pointer; font-family: inherit; transition: .15s; }
.tr-node:hover { border-color: #c7d2fe; box-shadow: 0 2px 10px rgba(79, 70, 229, .08); background: #fbfcff; }
.tr-k { font-size: 15px; font-weight: 600; color: #1e293b; min-width: 92px; }
.tr-sub { font-size: 12.5px; color: #94a3b8; min-width: 84px; }
.tr-g { flex: 1 1 0; min-width: 0; font-size: 12.5px; color: #475569; }
.tr-g b { color: #b45309; font-weight: 600; }
.tr-go { margin-left: auto; font-size: 12.5px; color: #4f46e5; font-weight: 600; white-space: nowrap; }
@media (max-width: 900px) {
  .tr-node { flex-wrap: wrap; gap: 6px 14px; }
  .tr-go { margin-left: 0; }
  .tr-sum { margin-left: 0; }
}
/* 产品库：配件合并进主品行的「商品」格里（20261030） */
.lib-acc { display: flex; align-items: center; gap: 4px; margin-top: 5px; max-width: 100%;
  cursor: pointer; color: #92400e; font-size: 11.5px; line-height: 1.5; }
.lib-acc:hover .lib-acc-txt { color: #b45309; text-decoration: underline; }
.lib-acc-tag { flex: none; background: #fbbf24; color: #fff; border-radius: 4px; padding: 0 4px; font-size: 10px; font-weight: 600; }
.lib-acc-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* 已到仓卡（20261019j）：三块信息铺满整行；每行标签在左、数值在右，不留列内空白（20261019j 二稿） */
.wh-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 26px; padding-left: 64px; margin-top: 10px; }
.wh-blocks .pc-block { min-width: 0; gap: 7px; }
.wh-blocks .pl-row { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #eef1f7; padding-bottom: 5px; }
.wh-blocks .pl-row .pl { flex: none; }
.wh-blocks .pl-row .pv { flex: 1 1 auto; text-align: right; min-width: 0; }
@media (max-width: 1180px) { .wh-blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .wh-blocks { grid-template-columns: 1fr; } }
.pc-dtitle { font-size: 13px; font-weight: 600; color: #4338ca; margin-bottom: 8px; }
.pc-dform .field label { font-size: 12px; }
.pc-ctn-box { margin-top: 4px; }
.pc-ctn-box summary { cursor: pointer; font-size: 12.5px; color: #4f46e5; user-select: none; }
.pc-ctn-box[open] summary { margin-bottom: 10px; }
.pc-ctn-box > *:not(summary) { margin-top: 6px; }

/* 商品明细：批次明细区（每个采购批次一行、字段带标签平铺，铺在商品行正下方） */
table.tb tr.pbatch-tr > td { background: #fbfaff; padding: 10px 16px 14px 52px; border-top: 1px dashed #ddd6fe; border-bottom: 1px solid #eee9fd; }
table.tb tbody tr.pbatch-tr:hover > td { background: #f7f5ff; }
.pbatch-head { font-size: 12.5px; color: #6d28d9; font-weight: 600; margin-bottom: 7px; }
.pbatch-head .muted { margin-left: 6px; font-weight: 400; }
.pbatch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; background: #fff; border: 1px solid #eee9fd; border-radius: 8px; padding: 7px 14px; margin-bottom: 6px; }
.pbatch-row:last-child { margin-bottom: 0; }
.pb-idx { font-weight: 700; color: #6d28d9; font-size: 13px; white-space: nowrap; min-width: 46px; }
.pb-item { display: flex; flex-direction: column; line-height: 1.3; font-size: 12.5px; color: #334155; }
.pb-item i { font-style: normal; font-size: 10px; color: #94a3b8; white-space: nowrap; }
.pb-item b { font-weight: 600; color: #0f172a; }
.pb-item .badge { align-self: flex-start; }

/* 长文本：只显示一行，鼠标滑过用浏览器原生提示显示全文 */
.clamp1 { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================= 利润表卡片布局（20261020e） =================
   每个采购批次一张卡：上排信息块（图片+名称 ｜ 订单/入仓/货件 ｜ 数量/SKU/箱数/金额/单价 ｜ 三个日期 ｜ 计算利润 ｜ 已售完按钮），
   下排每日剩余库存小格子，整卡铺满可用宽度。 */
.pf-list { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.pf-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.pf-card:hover { border-color: var(--border-strong); }
.pf-main { display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap; }
.pf-block { flex: 0 0 auto; padding: 11px 14px; border-right: 1px dashed var(--border); display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0; }
.pf-block:last-child { border-right: none; }
.pf-kv { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; white-space: nowrap; }
.pf-kv .pk { color: var(--muted); flex: 0 0 auto; }
.pf-kv .pv { min-width: 0; }
/* 块 1：图片 + 中文名称标题 */
.pf-block.pf-id { flex: 0 0 196px; flex-direction: row; align-items: center; gap: 10px; }
.pf-idtxt { min-width: 0; }
.pf-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
/* 块 5：计算利润 —— 弹性占满剩余宽度（保底宽度防公式挤压，放不下整卡横向滚） */
.pf-block.pf-calc { flex: 1 0 540px; min-width: 0; gap: 7px; }
.pf-calc-t { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.pf-calc-row { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.pf-f { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pf-f .profit-in { width: 88px; }
.pf-fx { font-size: 12.5px; white-space: nowrap; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 3px 9px; }
.pf-fx i { font-style: normal; font-size: 11px; }
/* 右侧已售完按钮 */
.pf-sold { flex: 0 0 92px; padding: 11px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.pf-sold-btn { background: #fee2e2; color: #b91c1c; border-color: #fecaca; font-weight: 600; white-space: nowrap; }
.pf-sold-btn:hover { background: #fecaca; }
/* 下排：每日剩余库存小格子 —— 31 格均分整行铺满，不换行、不留右空白（20261028d） */
.pf-days { border-top: 1px solid var(--border); background: #fbfcfe; padding: 8px 14px 10px; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.pf-days > div:first-child { flex: 0 0 auto; align-self: center; }
.pf-days-t { font-size: 11.5px; color: var(--muted); font-weight: 600; align-self: center; margin-right: 8px; white-space: nowrap; }
.pf-day { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; flex: 1 1 0; min-width: 0; }
.pf-day i { font-style: normal; font-size: 10px; color: var(--muted); line-height: 1; }
.pf-day .profit-in { width: 100%; min-width: 0; padding: 3px 2px; font-size: 11.5px; text-align: center; }
/* 小格子不显示数字微调箭头（会把 3 位数挤掉），直接键盘输入 */
.pf-day .profit-in::-webkit-outer-spin-button,
.pf-day .profit-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pf-day .profit-in { appearance: textfield; -moz-appearance: textfield; }
/* 利润表顶部条 + SKU 搜索（20261028d） */
.pf-head { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pf-searchbox { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 1 auto; }
.pf-searchbox .input.search { width: 250px; max-width: 40vw; }
/* 已填库存的日子：浅青底提示；格子下面是当天剩余货值小字（20261029） */
.pf-day.filled .profit-in { background: #f0fdfa; border-color: #99f6e4; }
/* 与上一条记录相同 = 那天没出单（20261107c 用户要求：标红） */
.pf-day.nosale .profit-in { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; font-weight: 700; }
.pf-day.nosale i { color: #dc2626; font-weight: 700; }
.pf-day.nosale em { color: #dc2626; }
.pf-dayv { font-style: normal; font-size: 9px; color: #64748b; line-height: 1.15; white-space: nowrap; }
/* 卡片内联编辑：销售店铺 / 进仓日期 */
.pf-shop { width: 130px; padding: 3px 6px; font-size: 12px; }
.pf-date { width: 132px; padding: 3px 6px; font-size: 12px; }
/* 运营个人在售货值小徽标 */
.pf-op { display: inline-flex; align-items: center; gap: 5px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; font-size: 11.5px; white-space: nowrap; }
.pf-opk { color: var(--muted); }

/* 撤回上一步（20261107d）：管理员专用的小按钮，低调但看得出是「倒回去」 */
.pf-undo {
  padding: 2px 7px;
  font-size: 11px;
  line-height: 1.6;
  color: #b45309;
  border-color: #fcd34d;
  background: #fffbeb;
  margin-left: 4px;
}
.pf-undo:hover { background: #fef3c7; color: #92400e; }
/* 撤回后定位：被退回上一步的那一行闪一下（20261107e） */
@keyframes rowFlash {
  0% { background: #fef08a; box-shadow: inset 3px 0 0 #f59e0b; }
  70% { background: #fef9c3; box-shadow: inset 3px 0 0 #f59e0b; }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}
tr.row-flash > td, .tc-card.row-flash, .xcard.row-flash { animation: rowFlash 3s ease forwards; }
/* ===== 利润表紧凑版（20261106h）：行高 / 格子收紧 + 只读的店铺·日期·单号 ===== */
.pf-panel .pf-head { gap: 14px; padding: 9px 14px; }
.pf-panel .xlt tbody td { padding: 3px 5px; }
.pf-panel .xlt tbody tr.pfinfo td { padding-bottom: 2px; }
.pf-panel tr.pfdays td { padding: 0 5px 4px; }
.pf-panel .pf-strip { gap: 2px; }
.pf-panel .pf-strip .pf-day { padding: 0; border-radius: 3px; }
.pf-panel .pf-strip .pf-day i { font-size: 8.5px; line-height: 10px; }
.pf-panel .pf-strip .pf-day .profit-in { height: 17px; font-size: 10.5px; }
.pf-panel .pf-day em { font-size: 8px; line-height: 10px; min-height: 10px; }
.pf-panel .pf-mini { height: 22px; font-size: 11px; padding: 0 3px; }
/* 20261114g：利润表 21 列，数值（如 290.28 / ¥148.00）在原来的字号下会被截断 ——
   只把这张表的字号收 0.5px，列宽保持不动，数字能完整显示 */
/* 20261117k：在途表 22 列（新增混箱明细）—— 只把这张表的字号和内边距收一点，列宽不用再挤 */
.tbl-transit table.tb.xlt { font-size: 12px; }
.tbl-transit table.tb.xlt tbody td, .tbl-transit table.tb.xlt thead th { padding-left: 4px; padding-right: 4px; }
.tbl-transit table.tb.xlt .cell-sub { font-size: 10.5px; }
/* 混箱格在「在途」里只有 150px：去掉已到仓那套 min-width，按列宽换行，别被截断 */
.tbl-transit .mix-ticket-cell { min-width: 0; }
.tbl-transit .mix-ticket-total { white-space: normal; }
/* 混箱格在「在途」里只有 150px：去掉已到仓那套 min-width，按列宽换行，别被截断 */
.tbl-transit .mix-ticket-cell { min-width: 0; }
.tbl-transit .mix-ticket-total { white-space: normal; }
.pf-panel table.tb.xlt { font-size: 12px; }
.pf-panel table.tb.xlt tbody td, .pf-panel table.tb.xlt thead th { padding-left: 4px; padding-right: 4px; }
/* 21 列后「已售完 / 记录调整 / 撤回」三个按钮挤不下 —— 只把这排按钮收小一点，列宽不动 */
.pf-panel table.tb.xlt td.xact .btn { padding: 0 5px; font-size: 11.5px; margin-left: 3px; }
.pf-panel .pf-mini[type=number]::-webkit-inner-spin-button,
.pf-panel .pf-mini[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pf-panel .pf-days-t { font-size: 10.5px; margin-right: 2px; }
.pf-ro { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-size: 12px; color: #334155; }
/* 20261117a（用户口径）：入仓号 / 货件号必须**显示完全** ——
   原来是 nowrap + ellipsis，长号（UMZX2602231012、一票多个货件号）直接被截成「UMZX2602/23…」。
   现在这一格允许换行（overflow-wrap:anywhere 让超长串也能折），不再出省略号。 */
.pf-panel td.pf-no { white-space: normal; overflow: visible; }
.pf-no .mono { font-size: 11px; line-height: 1.3; white-space: normal; overflow: visible;
  text-overflow: clip; overflow-wrap: anywhere; word-break: break-word; }
.pf-no .mono.muted { color: #94a3b8; }
/* 表头 / 合计不换行，窄列也不挤成两行 */
.pf-panel .xlt thead th { white-space: nowrap; }
.pf-panel .xlt tfoot td { white-space: nowrap; }
.pf-panel .xlt thead th i { display: inline; margin-left: 3px; }
@media (max-width: 1100px) {
  .pf-main { flex-wrap: wrap; }
  .pf-block { border-bottom: 1px dashed var(--border); }
  .pf-block.pf-id { flex: 1 1 240px; }
  .pf-block.pf-calc { flex: 1 1 100%; order: 9; }
  .pf-sold { flex: 0 0 auto; order: 10; }
  /* 窄屏放不下 31 格时按 40px 换行，标签单独占一行，避免挤成一条 */
  .pf-days { flex-wrap: wrap; }
  .pf-days > div:first-child { flex: 1 1 100%; }
  .pf-day { flex: 0 0 40px; }
}

/* ================= 我的资料弹窗（20261020i） ================= */
.prof-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0.5px solid var(--border); border-radius: 10px; background: #f8fafc; margin-bottom: 14px; }
.prof-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 600; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.prof-headtxt { flex: 1; min-width: 0; }
.prof-sku { flex: 0 0 auto; text-align: right; background: #fff; border: 1px dashed var(--border-strong, #cbd5e1); border-radius: 8px; padding: 6px 12px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.prof-sku b { display: block; font-size: 13.5px; color: #4338ca; margin-top: 1px; }
.prof-note { margin-top: 12px; font-size: 12.5px; line-height: 1.7; padding: 9px 12px; border-radius: 8px; background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
#form-profile { display: flex; flex-direction: column; gap: 14px; }

/* ================= 抽屉头部缩略图 + 今日运营动态分区（20261020k） ================= */
.dh-thumb { flex: 0 0 auto; display: flex; align-items: center; }
.act-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.act-card { border: 0.5px solid var(--border); border-radius: 10px; background: #fff; padding: 10px 12px 8px; min-width: 0; }
.act-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.act-head b { font-size: 13px; font-weight: 600; }
.act-step { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 20px; letter-spacing: .3px; white-space: nowrap; }
.act-n { font-size: 11.5px; color: var(--muted); background: #f1f5f9; border-radius: 20px; padding: 1px 8px; white-space: nowrap; }
.act-go { margin-left: auto; font-size: 11.5px; color: #4f46e5; background: none; border: 0; cursor: pointer; padding: 2px 4px; white-space: nowrap; }
.act-go:hover { text-decoration: underline; }
.act-who { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.act-chip { font-size: 11.5px; color: #334155; background: #f8fafc; border: 0.5px solid var(--border); border-radius: 20px; padding: 1px 8px; white-space: nowrap; }
.act-chip b { color: #4f46e5; }
.act-row { display: flex; align-items: center; gap: 7px; padding: 4px 0; border-top: 1px dashed #f1f5f9; font-size: 12px; min-width: 0; }
.act-row:first-of-type { border-top: 0; }
.act-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.act-txt b { color: #0f172a; font-weight: 600; }
.act-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.act-more { font-size: 11.5px; color: var(--muted); padding-top: 4px; }
@media (max-width: 1100px) { .act-grid { grid-template-columns: 1fr; } }

/* ================= 月度存根（20261020k） ================= */
.af-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.af-kpi { border: 0.5px solid var(--border); border-radius: 10px; background: #fbfcfe; padding: 10px 12px; min-width: 0; }
.af-k { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.af-v { font-size: 19px; font-weight: 700; color: #0f172a; margin: 3px 0 1px; letter-spacing: .2px; }
.af-s { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1400px) { .af-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .af-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ================= 发放账号（邀请码，20261020k） ================= */
/* 新建成员表单：flex 自适应，宽屏一行排满、窄屏自动换行（20261109b） */
.inv-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inv-form .select { flex: 0 0 118px; width: 118px; height: 34px; }
.inv-form .input { flex: 1 1 130px; min-width: 124px; height: 34px; }
.inv-form .input[data-inv-email] { flex: 1.4 1 200px; }
.inv-form .input[data-inv-password] { flex: 1.1 1 170px; }
.inv-form .input[data-inv-note] { flex: 1 1 120px; }
.inv-form .btn { flex: 0 0 auto; margin-left: auto; }

/* 建号后的凭据卡（20261109d）：把地址 / 邮箱 / 初始密码直接摊开，一键复制 */
.inv-cred { border: 1px solid #bfdbfe; background: #f5f9ff; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.inv-cred-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #1e3a8a; }
.inv-cred-head .spacer { flex: 1; }
.inv-cred-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.inv-cred-grid > div { background: #fff; border: 1px solid #dbe6f6; border-radius: 8px; padding: 8px 10px; min-width: 0; }
.inv-cred-grid .k { display: block; font-size: 11.5px; color: #64748b; margin-bottom: 3px; }
.inv-cred-grid .v { display: block; font-size: 13px; color: #0f172a; word-break: break-all; }
.inv-cred-note { margin-top: 10px; font-size: 12px; line-height: 1.65; color: #475569; }
.inv-ops { display: flex; gap: 6px; }
.pwd-cell { display: flex; align-items: center; gap: 6px; }
.pwd-cell code { font-size: 12.5px; background: #f1f5f9; border-radius: 5px; padding: 2px 7px; color: #0f172a; }
@media (max-width: 900px) { .inv-cred-grid { grid-template-columns: 1fr; } }

/* ================= 注册页角色（管理者分配，只读展示，20261109a） ================= */
.onboard-rolebox { border: 1px solid #e2e8f2; border-radius: 10px; background: #f8fafc; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.6; min-height: 46px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.onboard-rolebox.locked { background: #eff6ff; border-color: #cfe1ff; }
.onboard-rolebox.pending { background: #fff8ec; border-color: #f4dfb8; }
.onboard-rolebox.invalid { background: #fef2f2; border-color: #fecaca; }
.onboard-role-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.onboard-role-desc { color: #475569; }
.onboard-role-src { color: #94a3b8; font-size: 11.5px; }
.onboard-rolebox.pending .onboard-role-desc { color: #92400e; }
.onboard-rolebox.invalid .onboard-role-desc { color: #b91c1c; }

/* ================= 表格版页面（20261031 用户定稿：全站环节统一 Excel 风格表格） ================= */
.xlt-wrap { max-height: calc(100vh - 250px); }
table.xlt { width: 100%; min-width: 1140px; table-layout: fixed; font-size: 12.5px; }
.xlt thead th { position: sticky; top: 0; z-index: 3; background: #f2f6fc; color: #334155;
  font-size: 11.5px; font-weight: 600; text-align: left; padding: 6px 6px; border-bottom: 1px solid #cfd9e8;
  white-space: normal; overflow: hidden; }
.xlt thead th i { display: block; font-style: normal; font-size: 9.5px; font-weight: 400; color: #94a3b8; line-height: 1.2; }
.xlt tbody td { padding: 5px 6px; border-bottom: 1px solid #edf1f7; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
/* 入仓号 / 货件号：长号码完整显示，允许折行、不省略号截断 */
.xlt tbody td.xcode-full { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-all; line-height: 1.3; }
.xlt tbody tr:nth-child(even) td { background: #fbfcfe; }
.xlt tbody tr:hover td { background: #f2f7ff; }
.xlt tbody tr.xrow-link { cursor: pointer; }
.xlt .xr { text-align: right; font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-variant-numeric: tabular-nums; }
.xlt .xact { text-align: right; }
/* 操作列钉在右侧：窄屏横向滚动时按钮永远可见 */
.xlt thead th.xact, .xlt tbody td.xact { position: sticky; right: 0; z-index: 2; background: #fff; }
.xlt thead th.xact { z-index: 4; background: #f2f6fc; box-shadow: -7px 0 7px -7px rgba(15,23,42,.22); }
.xlt .xact .btn { margin-left: 4px; padding: 0 7px; }
.xlt .xact .btn:first-child { margin-left: 0; }
/* 20261202b：资金台账的三张表不用钉右侧 —— 表宽已按 1680 屏铺满，
   钉住反而会盖住左边「净利 / 备注」列（用户要求任何数字都不能被遮） */
.xlt thead th.xact-free, .xlt tbody td.xact-free { position: static; text-align: right; white-space: nowrap; background: inherit; }
.xlt .xact-free .btn { margin-left: 4px; padding: 0 7px; }
.xlt .xact-free .btn:first-child { margin-left: 0; }
.xlt .xlt-prod { min-width: 0; }
.xlt .xlt-prod .cell-main { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xlt .xlt-prod .cell-sub { font-size: 11px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xlt .k { font-weight: 600; }
.xlt .ka { color: #b45309; font-weight: 600; }
.xlt .kg { color: #15803d; }
.xlt .kr { color: #dc2626; font-weight: 600; }
.xlt .muted { color: #94a3b8; }
/* 在途三级下钻的运营条 / 面包屑 */
.xlt-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 0 10px; }
.xlt-bar .xl-t { font-size: 12px; color: #94a3b8; margin-right: 2px; }
.xlt-crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 0 10px; font-size: 13px; }
.xlt-crumb b { font-size: 13.5px; }
.chip.on { background: #2563eb; color: #fff; border-color: #2563eb; }
.chip.on em { color: rgba(255,255,255,.8); }
/* 其余页面（待采购 / 产品库 / 选品 / 问题件）的普通表格统一成同一套表皮：
   只在配色与字号上跟表格版对齐，不动列宽与行结构（那些表有行内录入 / 展开行） */
table.tb.xtb { font-size: 12.5px; }
table.tb.xtb thead th { background: #f2f6fc; color: #334155; font-size: 11.5px; font-weight: 600;
  padding: 7px 7px; border-bottom: 1px solid #cfd9e8; }
table.tb.xtb tbody td { padding: 6px 7px; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
table.tb.xtb tbody tr:nth-child(even) td { background: #fbfcfe; }
table.tb.xtb tbody tr:hover td { background: #f2f7ff; }
/* 产品库表：固定列宽，各分区呈现一致、铺满不留白（20261201）。长中文名/备注允许折行，不撑列 */
table.tb.xtb.libtb { table-layout: fixed; }
table.tb.xtb.libtb thead th, table.tb.xtb.libtb tbody td { overflow-wrap: break-word; word-break: break-word; }
table.tb.xtb.libtb td.mono { white-space: normal; }

/* 利润表（表格版 20261031）：一行商品 + 一行 31 格每日库存 */
.pfinfo td { border-bottom: 0; }
tr.pfdays td { padding: 0 6px 7px; border-bottom: 1px solid #edf1f7; }
.pf-strip { display: flex; gap: 3px; min-width: 0; }
.pf-strip .pf-day { flex: 1 1 0; min-width: 0; overflow: hidden; background: #fff; border: 1px solid #e2e9f4; border-radius: 4px; padding: 1px 1px 0; }
.pf-strip .pf-day i { font-size: 9px; color: #a8b3c2; font-weight: 600; }
.pf-strip .pf-day .profit-in { width: 100%; min-width: 0; border: 0; border-top: 1px solid #f1f5fa; border-radius: 0; height: 20px; font-size: 11px; font-weight: 600; padding: 0; }
.pf-strip .pf-day.filled { background: #f2fbf7; border-color: #b6e6d4; }
.pf-strip .pf-day.filled .profit-in { background: transparent; }
.pf-strip .pf-day.future { opacity: .45; }
.pf-day em { display: block; font-style: normal; font-size: 8.5px; color: #94a3b8; line-height: 11px; min-height: 11px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.pf-mini { width: 100%; height: 25px; border: 1px solid #e2e8f2; border-radius: 5px; padding: 0 5px;
  font: 11.5px/1 -apple-system, "PingFang SC", sans-serif; color: #0f172a; background: #fff; outline: none; }
.pf-mini:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.pf-mini.xr { text-align: right; font-family: var(--font-mono, ui-monospace, Menlo, monospace); }
.pf-ns { display: inline-block; font-size: 10px; line-height: 14px; background: #ffedd5; color: #c2410c; border-radius: 3px; padding: 0 4px; vertical-align: 1px; }

/* ===== 物流费用页（20261105d）：通用右对齐数字 / 右侧操作列 ===== */
table.tb td.r { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
table.tb.xtb td.xact { text-align: right; white-space: nowrap; }
table.tb.xtb td.xact .btn { margin-left: 4px; padding: 0 7px; }
table.tb.xtb td.xact .btn:first-child { margin-left: 0; }
.logi-kpis .kpi { min-width: 0; }

/* ===== 悬停放大镜（20261111d）：产品图 / 中文名 / 标题 ===== */
.zm-src { cursor: zoom-in; }
.zm-src::after {
  content: '⌕'; position: absolute; right: 0; bottom: 0; z-index: 3;
  width: 15px; height: 15px; border-radius: 50%;
  background: rgba(15, 23, 42, .82); color: #fff; font-size: 11px; line-height: 15px;
  text-align: center; opacity: 0; transition: opacity .12s; pointer-events: none;
}
.zm-src:hover::after { opacity: 1; }
[data-open-product]:hover, .xlt-prod .cell-sub:hover { color: var(--accent-2); }
.zm-pop {
  position: fixed; z-index: 99999; width: 320px; display: none;
  background: #fff; border: 1px solid #dbe3ef; border-radius: 14px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .22); overflow: hidden; pointer-events: none;
}
.zm-pop.show { display: block; }
/* 即时提示浮层（20261201c）：产品库在途批次明细，鼠标进入即显示、无延迟 */
.tip-pop {
  position: fixed; z-index: 100000; display: none; max-width: 460px;
  padding: 9px 12px; background: #fff; border: 1px solid #dbe3ef; border-radius: 9px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18); color: #334155;
  font-size: 12px; line-height: 1.7; white-space: normal; pointer-events: none;
}
.tip-pop.show { display: block; }
.tip-pop .tip-hd { font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.zm-photo {
  position: relative; height: 230px; background: #f5f8fc;
  display: flex; align-items: center; justify-content: center;
}
.zm-photo img { width: 100%; height: 100%; object-fit: contain; }
.zm-noimg { color: #94a3b8; font-size: 34px; text-align: center; }
.zm-noimg span { display: block; font-size: 12px; color: #64748b; margin-top: 6px; }
.zm-lens {
  position: absolute; right: 10px; top: 10px; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(15, 23, 42, .78); color: #fff;
  font-size: 17px; line-height: 26px; text-align: center;
}
.zm-info { padding: 11px 14px 13px; }
.zm-sku { font: 600 12px var(--font-mono, ui-monospace, Menlo, monospace); color: #0369a1; }
.zm-name { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 4px; word-break: break-word; }
.zm-title { font-size: 12px; color: var(--text-2); margin-top: 5px; line-height: 1.5; word-break: break-word; }
.zm-meta { font-size: 11.5px; color: var(--muted); margin-top: 8px; border-top: 1px solid #eef2f8; padding-top: 7px; }

/* ===== 工作台 SKU 分区（20261111d）：平铺 chip，选中后本页全部数据按区统计 ===== */
.dash-part { overflow: hidden; }
.dash-part-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 16px 10px; }
.dash-part-head .spacer { flex: 1; }
.dash-part-ico { width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent-2); font-size: 14px; line-height: 24px; text-align: center; }
.dash-part-now { font-size: 12px; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.dash-part-now.on { background: #eef3ff; color: var(--accent-2); font-weight: 600; }
.dash-part .part-bar { border-top: 1px solid var(--border); border-bottom: 0; background: #fff; }

/* ===== 混箱整票提示（20261111f）：平铺列出混了哪些 SKU / 各多少套 / 整票总套数 ===== */
.mix-ticket-td { vertical-align: top; background: #fffdf7; }
.mix-ticket-cell { font-size: 11.5px; line-height: 1.5; white-space: normal; min-width: 240px; }
.mix-ticket-cell .badge { font-size: 10.5px; font-weight: 600; margin-bottom: 3px; }
.mix-ticket-list { color: #475569; word-break: break-word; margin-top: 3px; }
.mix-ticket-total { margin-top: 3px; color: #b45309; font-weight: 600; white-space: nowrap; }
.mix-ticket-total b { font-size: 13px; }

/* ===== 预约弹窗：这一票核对条（20261111f），铺满弹窗宽度、不折叠 ===== */
.reserve-ticket-bar { width: 100%; box-sizing: border-box; padding: 10px 14px; background: #fffdf7; border: 1px solid #fde3b0; border-radius: 10px; }
.rtb-head { font-size: 12.5px; color: #334155; }
.rtb-mix { margin-top: 6px; font-size: 12.5px; color: #475569; line-height: 1.6; }
.rtb-mix b { color: #b45309; }

/* ===== 物流丢件赔付台账（20261111g）：KPI 均分铺满，台账表拉通容器宽度 ===== */
.claim-panel .panel-head { gap: 8px; }
.claim-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 16px 4px; }
.claim-kpi { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e4e9f2; border-radius: 9px; min-width: 0; }
.claim-kpi > span { font-size: 12px; color: #64748b; }
.claim-kpi > b { font-size: 19px; line-height: 1.25; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.claim-kpi > small { font-size: 11.5px; color: #94a3b8; }
.claim-groups { display: flex; flex-direction: column; gap: 6px; padding: 8px 16px 12px; font-size: 12px; color: #475569; }
.claim-groups > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.claim-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 11.5px; white-space: nowrap; }
.claim-chip b { margin-right: 4px; }
.claim-table { width: 100%; min-width: 1420px; }
.claim-table td { vertical-align: top; }
@media (max-width: 1100px) { .claim-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 站点开关（20261113e）：墨西哥站 / 巴西站 */
.site-switch { display: inline-flex; align-items: center; gap: 3px; background: #eef2f7; border: 1px solid #e2e8f0; border-radius: 9px; padding: 2px; margin-right: 8px; }
.site-chip { border: none; background: transparent; color: #64748b; font-size: 12.5px; padding: 4px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.site-chip:hover { color: #0f172a; }
.site-chip.active { background: #fff; color: var(--accent-2, #0369a1); font-weight: 600; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
