/* ================= 产销协同平台 · 样式（方案 A · 清爽数据台） ================= */
:root {
  /* 基础色 */
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e7e9ee;
  --line-2: #f0f2f6;
  --ink: #121926;
  --ink-2: #475467;
  --muted: #8a94a6;

  /* 品牌与语义色 */
  --brand: #2f6bff;
  --brand-d: #1f52d6;
  --brand-w: #eef3ff;
  --green: #0b8a5b;
  --green-w: #e8f8f0;
  --amber: #b25e09;
  --amber-w: #fdf2e3;
  --red: #c9382b;
  --red-w: #fdecea;
  --purple: #6b46c1;
  --purple-w: #f2eefe;
  --gray-w: #f0f2f5;

  --r: 14px;
  --r-sm: 9px;
  --sh: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -20px rgba(16, 24, 40, .28);

  /* 兼容旧变量名（历史代码里引用的） */
  --text: #121926;
  --text-2: #475467;
  --primary: #2f6bff;
  --primary-d: #1f52d6;
  --primary-w: #eef3ff;
  --ok: #0b8a5b;
  --ok-w: #e8f8f0;
  --warn: #b25e09;
  --warn-w: #fdf2e3;
  --danger: #c9382b;
  --danger-w: #fdecea;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -20px rgba(16, 24, 40, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: none; }
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
b { font-weight: 600; }
input, select, textarea, button { font-family: inherit; font-size: 14px; color: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cfd6e2; border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c3d3; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 登录 ---------------- */
.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 420px at 12% -10%, #e8effd 0%, transparent 62%),
    radial-gradient(800px 380px at 100% 110%, #eef2fa 0%, transparent 58%),
    var(--bg);
  padding: 24px;
}
.login-card {
  width: 372px; background: #fff; border-radius: 16px; padding: 32px 30px 28px;
  box-shadow: 0 20px 50px -30px rgba(16, 24, 40, .5), 0 1px 2px rgba(16, 24, 40, .05);
  border: 1px solid var(--line);
}
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; }
.login-brand h1 { font-size: 19px; letter-spacing: .3px; }
.login-brand p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.login-err { min-height: 20px; color: var(--red); font-size: 12.5px; margin: 2px 0 8px; }
.mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(150deg, #4d84ff, #2f6bff 55%, #1f52d6);
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 6px 14px -8px rgba(47, 107, 255, .9); flex: 0 0 auto;
}
.login-brand .mark { width: 42px; height: 42px; border-radius: 12px; font-size: 20px; }

/* ---------------- 顶栏 ---------------- */
.app { display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 26px;
  height: 60px; padding: 0 26px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.8) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
.brand-txt b { font-size: 14px; letter-spacing: .2px; }
.brand-txt i { font-style: normal; font-size: 10.5px; color: var(--muted); letter-spacing: .6px; margin-top: 1px; }

.nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13.5px; white-space: nowrap;
  transition: .16s;
}
.nav a .ico { width: 15px; height: 15px; flex: 0 0 15px; opacity: .62; }
.nav a:hover { background: #f3f5f9; color: var(--ink); text-decoration: none; }
.nav a:hover .ico { opacity: .9; }
.nav a.on { background: var(--brand-w); color: var(--brand); font-weight: 500; }
.nav a.on .ico { opacity: 1; }

.tb-user { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tb-user .who { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }
.tb-user .who .ava {
  width: 28px; height: 28px; border-radius: 50%; background: #e9edf6; color: #3d4a63;
  display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: 0 0 28px;
}
.tb-user .who .uname { line-height: 1.2; }
.tb-user .who .uname small { display: block; color: var(--muted); font-size: 11px; }
.tb-user .btn { color: var(--ink-2); height: 30px; padding: 0 11px; font-size: 12.5px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { padding: 24px 26px 26px; max-width: 1520px; width: 100%; margin: 0 auto; flex: 1; }
.ver { text-align: center; font-size: 11px; color: #b9c3d2; padding: 0 0 16px; }

@media (max-width: 860px) {
  .topbar { gap: 12px; padding: 0 12px; }
  .brand-txt { display: none; }
  .tb-user .who .uname { display: none; }
  .view { padding: 16px 12px 24px; }
}

/* ---------------- 页面头 ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-head h1 { font-size: 22px; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.page-head .acts { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; white-space: nowrap; font-size: 13.5px; transition: .16s;
}
.btn:hover { border-color: #ccd5e6; background: #fbfcfe; color: var(--ink); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 8px 18px -12px rgba(47, 107, 255, .95);
}
.btn.primary:hover { background: var(--brand-d); border-color: var(--brand-d); color: #fff; }
.btn.danger { color: var(--red); border-color: #f2cdc8; background: #fff; }
.btn.danger:hover { background: var(--red-w); color: var(--red); border-color: #e9b4ad; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: #f5f7fb; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.link { border: none; background: none; color: var(--brand); padding: 0 3px; height: auto; font-size: 12.5px; }
.btn.link:hover { color: var(--brand-d); text-decoration: underline; background: none; }
.btn.block { width: 100%; height: 40px; font-size: 14px; }

/* ---------------- 统计条（KPI 五连） ---------------- */
.stats {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); margin-bottom: 16px; overflow: hidden;
}
.stat { padding: 15px 18px 14px; border-right: 1px solid var(--line-2); position: relative; min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .lb { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .n, .stat > b {
  display: block; font-size: 26px; font-weight: 650; letter-spacing: .5px; margin-top: 5px;
  font-variant-numeric: tabular-nums; line-height: 1.1; color: var(--ink);
}
.stat .hint, .stat > span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.stat::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px;
  background: transparent; border-radius: 2px;
}
.stat.b1 .n, .stat.b1 > b { color: var(--brand); }
.stat.b2 .n, .stat.b2 > b { color: var(--amber); }
.stat.b3 .n, .stat.b3 > b { color: var(--green); }
.stat.b4 .n, .stat.b4 > b { color: var(--red); }
.stat.b1::after { background: linear-gradient(90deg, #2f6bff, transparent); }
.stat.b2::after { background: linear-gradient(90deg, #d98a1a, transparent); }
.stat.b3::after { background: linear-gradient(90deg, #0b8a5b, transparent); }
.stat.b4::after { background: linear-gradient(90deg, #c9382b, transparent); }

/* ---------------- 工具条 ---------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; flex: 1 1 320px; max-width: 440px; }
.search input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  padding: 0 14px 0 38px; background: #fff; color: var(--ink); font-size: 13.5px;
  outline: none; transition: .16s;
}
.search input::placeholder { color: #a6b0c0; }
.search input:focus { border-color: #b9cdff; box-shadow: 0 0 0 4px rgba(47, 107, 255, .1); }
.search::before {
  content: ""; position: absolute; left: 13px; top: 12px; width: 13px; height: 13px;
  border: 2px solid #9aa6b8; border-radius: 50%; pointer-events: none;
}
.search::after {
  content: ""; position: absolute; left: 24px; top: 23px; width: 6px; height: 2px;
  background: #9aa6b8; transform: rotate(45deg); border-radius: 2px; pointer-events: none;
}

select, input[type="date"], input[type="text"], input[type="number"], input[type="password"], input[type="datetime-local"], textarea {
  height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px;
  background: #fff; color: var(--ink); font-size: 13.5px; outline: none; transition: .16s;
}
textarea { height: auto; padding: 9px 11px; line-height: 1.6; resize: vertical; }
/* 没写 type 的 input（登录框、部分搜索框）也套同一套外观，否则会露出浏览器默认黑边框 */
input:not([type]), input[type="search"] {
  height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 11px;
  background: #fff; color: var(--ink); font-size: 13.5px; outline: none; transition: .16s;
  box-shadow: none; -webkit-appearance: none; appearance: none;
}
select:focus, input:focus, textarea:focus { border-color: #b9cdff; box-shadow: 0 0 0 4px rgba(47, 107, 255, .1); }
/* 搜索框里的 input 不写 type，别被上面的通用规则改掉内边距 */
.search input, .search input:not([type]) { height: 38px; padding: 0 14px 0 38px; border-radius: 10px; }
.login-card .fld { margin-bottom: 13px; }
.login-card .fld > span { font-size: 12.5px; }
.login-card .fld input { height: 40px; font-size: 14px; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip, .chips .chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; cursor: pointer;
  transition: .16s; user-select: none; display: inline-flex; align-items: center; gap: 6px;
  height: auto;
}
.chip:hover { border-color: #ccd5e6; color: var(--ink); }
.chip .c { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.on { background: #121926; border-color: #121926; color: #fff; font-weight: 500; }
.chip.on .c { color: rgba(255, 255, 255, .62); }
/* 状态筛选 chip 上的小圆点 = 项目行左侧色条的颜色，方便把「橙＝未确认」这类对应关系记住 */
.chip .cdot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: #c8d0dc; }
.chip .cdot.amber { background: #e09b20; }
.chip .cdot.blue { background: #2f6bff; }
.chip .cdot.green { background: #0b8a5b; }
.chip .cdot.gray { background: #aab4c4; }
.chip.on .cdot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .28); }

/* ---------------- 卡片 / 表格 ---------------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh); margin-bottom: 16px; overflow: hidden;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.card-head .n { font-size: 12px; color: var(--muted); font-weight: 400; }
.card-body { padding: 16px 18px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 11.8px;
  padding: 10px 12px; background: #fbfcfd; border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: 1; white-space: nowrap; letter-spacing: .2px;
}
.tbl td { padding: 10px 12px; border-bottom: 1px solid #f3f5f9; vertical-align: middle; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl-wrap { overflow: auto; max-height: calc(100vh - 300px); }
.tbl input, .tbl select { height: 30px; font-size: 13px; }
.tbl td.tight { padding: 6px 8px; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 26px; opacity: .3; margin-bottom: 10px; }
.empty p { font-size: 13px; margin-bottom: 14px; }

/* ---------------- 标签 / 状态 ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--gray-w); color: #616e85;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; flex: 0 0 5px; }
.badge.blue { background: var(--brand-w); color: var(--brand); }
.badge.green { background: var(--green-w); color: var(--green); }
.badge.orange { background: var(--amber-w); color: var(--amber); }
.badge.red { background: var(--red-w); color: var(--red); }
.badge.purple { background: var(--purple-w); color: var(--purple); }
.badge.gray { background: var(--gray-w); color: #616e85; }
.badge.line { background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 400; }
.badge.line::before { display: none; }
.tag-mini, .tag {
  display: inline-block; padding: 1px 7px; border-radius: 5px; background: #f2f4f8;
  color: #54627a; font-size: 11px; margin: 0 4px 2px 0; white-space: nowrap;
}
.tag-mini:last-child, .tag:last-child { margin-right: 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.fld > span .req { color: var(--red); margin-left: 2px; font-style: normal; }
.fld input, .fld select, .fld textarea { width: 100%; }
.fld .hint { font-size: 11.5px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 10px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

/* 人员自动补全 */
.ac { position: relative; }
.ac-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px -14px rgba(16, 24, 40, .4);
  max-height: 210px; overflow: auto; padding: 4px;
}
.ac-item { padding: 7px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; }
.ac-item:hover, .ac-item.on { background: var(--brand-w); color: var(--brand); }
.ac-item small { color: var(--muted); font-size: 11.5px; }
.ac-new { color: var(--brand); }

/* ---------------- 弹窗 ---------------- */
.modal-root { position: fixed; inset: 0; z-index: 900; }
.modal-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .42); backdrop-filter: blur(2px); }
.modal {
  position: relative; background: #fff; border-radius: var(--r); max-width: 100%;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 70px -24px rgba(10, 20, 40, .55); animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(8px) scale(.995); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 15.5px; }
.modal-head .x { border: none; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal-head .x:hover { color: var(--ink); }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: #fcfdff; border-radius: 0 0 var(--r) var(--r); }
.modal-foot .left { margin-right: auto; }

/* ---------------- 提示 ---------------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #121926; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13.5px;
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .6); animation: slideIn .18s ease-out; max-width: 430px;
}
.toast.ok { background: #0b7a51; }
.toast.err { background: #c03327; }
@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 通用文本 / 进度 ---------------- */
.grid2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, "SF Mono", monospace; }
.right { text-align: right; }
.center { text-align: center; }

.prog { display: inline-flex; align-items: center; gap: 9px; }
.prog .bar { flex: 0 0 92px; width: 92px; height: 5px; border-radius: 3px; background: #edf0f5; overflow: hidden; }
.prog .bar u { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #5b8cff, #2f6bff); }
.prog .bar u.g { background: linear-gradient(90deg, #25b57f, #0b8a5b); }
.prog .pn { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prog .pn b { color: var(--ink); font-weight: 600; }
.prog .od, .od {
  font-size: 11px; color: var(--red); background: var(--red-w);
  border-radius: 5px; padding: 1px 6px; margin-left: 6px; white-space: nowrap;
}
/* 旧进度条写法（保留） */
.prog > i { display: block; height: 100%; background: linear-gradient(90deg, #5b8cff, #2f6bff); border-radius: 99px; }
.prog > i.done { background: linear-gradient(90deg, #25b57f, #0b8a5b); }

.due-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.due-row:last-child { border-bottom: none; }
.due-row .lb { font-size: 12.5px; color: var(--muted); }
.due-row .vl { display: flex; align-items: center; gap: 8px; }
.due-row .dt { font-size: 14px; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .2px; }
.due-row .dt.none { color: var(--muted); font-weight: 400; font-size: 13px; }

/* 确认方案弹窗 */
.confirm-steps { display: flex; gap: 8px; margin-bottom: 14px; font-size: 12.5px; color: var(--muted); }
.confirm-steps b { color: var(--brand); }
.paste-area { width: 100%; min-height: 150px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.preview-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 340px; }
.preview-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.preview-tbl th { background: #f9fafc; padding: 4px 6px; border-bottom: 1px solid var(--line-2); font-weight: 500; }
.preview-tbl td { padding: 2px 4px; border-bottom: 1px solid var(--line-2); }
.preview-tbl input { width: 100%; height: 28px; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 0 6px; }
.preview-tbl input:hover { border-color: var(--line); background: #fff; }
.preview-tbl input:focus { border-color: var(--brand); background: #fff; }
.preview-tbl select { height: 26px; font-size: 12px; padding: 0 4px; border-radius: 6px; }
.warn-line {
  background: #fffaeb; color: #b54708; border: 1px solid #fedf89;
  border-radius: 10px; padding: 10px 13px; font-size: 12.5px; line-height: 1.7; margin-bottom: 10px;
}
.conflict-item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 9px; }
.conflict-item .msg { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.conflict-item .opts { display: flex; gap: 16px; flex-wrap: wrap; }
.conflict-item label { display: flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer; }

/* ---------------- 积分池 ---------------- */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.acct {
  border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; background: #fff;
  box-shadow: var(--sh); transition: .16s;
}
.acct:hover { border-color: #d3dcea; }
.acct .nm { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.acct .sc { font-size: 27px; font-weight: 650; letter-spacing: .5px; margin: 7px 0 3px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.acct .sc.pos { color: var(--green); }
.acct .sc.neg { color: var(--red); }
.acct .sc.zero { color: var(--ink); }
.acct .sub2 { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button {
  border: none; background: none; padding: 9px 14px; font-size: 13.5px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #fff; }
.seg button { border: none; background: #fff; padding: 7px 12px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--brand-w); color: var(--brand); font-weight: 500; }
.range-box { display: flex; align-items: center; gap: 6px; }

/* ---------------- 标准品备货 ---------------- */
.pick-list { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pick-item { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #f4f6fa; font-size: 13px; }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: #f7faff; }
.pick-item.on { background: var(--brand-w); color: var(--brand); font-weight: 500; }
.stock-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh);
}
.sh-name { font-size: 15px; font-weight: 650; }
.sh-nums { display: flex; gap: 24px; }
.sh-kv { text-align: right; }
.sh-kv b { display: block; font-size: 19px; font-weight: 650; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.sh-kv span { font-size: 11.5px; color: var(--muted); }
.sh-kv.b1 b { color: var(--brand); }
.sh-kv.b2 b { color: var(--amber); }
.sh-kv.b3 b { color: var(--green); }
.sh-kv.b4 b { color: var(--red); }

/* ---------------- 标准品列表：项目占用展开 ---------------- */
.occ-btn {
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px;
  padding: 2px 4px; margin: -2px -4px; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--ink); border-radius: 6px; transition: background .14s;
}
.occ-btn:hover { background: #eef3ff; }
.occ-btn b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.occ-btn .ob-sub { font-size: 11px; color: var(--brand); white-space: nowrap; }
.occ-btn .car { margin-left: 3px; font-size: 9px; }
.occ-btn.on { background: #eef3ff; }
.occ-btn.on .car { transform: rotate(180deg); }
.tbl tbody tr.st-open > td { background: #f4f8ff; }
.tbl tbody tr.st-open > td:first-child { box-shadow: inset 3px 0 0 var(--brand); }

.tbl .occ-row > td { padding: 0; background: #f7faff; border-top: 0; }
.oc-box { padding: 13px 16px 15px; }
.oc-head { font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; line-height: 1.7; }
.oc-head b { font-variant-numeric: tabular-nums; }
.oc-pname { font-size: 13px; color: var(--ink); font-weight: 600; }
.oc-pcode { font-size: 11.5px; color: var(--muted); margin-right: 10px; }
.oc-tip { color: var(--muted); margin-left: 10px; font-size: 11.5px; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 8px; }
.oc-card {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  padding: 9px 11px; background: #fff; border: 1px solid #e3eaf6; border-radius: 9px;
  cursor: pointer; font: inherit; color: inherit; transition: border-color .14s, box-shadow .14s;
}
.oc-card:hover { border-color: var(--brand); box-shadow: 0 2px 9px rgba(18, 25, 38, .08); }
.oc-card:active { transform: translateY(1px); }
.oc-qty {
  flex: 0 0 auto; min-width: 50px; text-align: center; padding: 4px 8px 5px;
  border-radius: 7px; background: #e6eeff; color: var(--brand);
}
.oc-qty b { display: block; font-size: 18px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.oc-qty i { font-style: normal; font-size: 10.5px; opacity: .72; }
.oc-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.oc-name {
  font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.oc-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-card.overdue { border-color: #f6d5d1; background: #fffafa; }
.oc-card.overdue .oc-qty { background: #fdecea; color: #b42318; }
.oc-od { color: #d92d20; }
.oc-np { color: #98a2b3; }
.tbl tbody tr.occ-link { cursor: pointer; }
.tbl tbody tr.occ-link:hover td { background: #f3f8ff; }
.sec-t {
  margin: 20px 0 9px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.sec-t .n { font-weight: 400; color: var(--muted); font-size: 11.5px; }

/* ---------------- 交付清单批量操作条 ---------------- */
.batch-bar {
  display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; margin-bottom: 10px; border-radius: 10px;
  background: var(--brand-w); border: 1px solid #dbe7ff; font-size: 13px;
}
.batch-bar.on { display: flex; }
.batch-bar .cnt { font-weight: 600; color: var(--brand); }
.batch-bar input[type=date] { height: 30px; font-size: 12.5px; width: 142px; }
.batch-bar select { height: 30px; font-size: 12.5px; width: 122px; }
.tbl th.ck, .tbl td.ck { width: 34px; text-align: center; padding-left: 6px; padding-right: 4px; }
.tbl td.ck input, .tbl th.ck input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--brand); }
tr.row-sel td { background: #f4f8ff; }
.std-tag {
  display: inline-block; margin-left: 6px; font-size: 10.5px; color: #0a6b47;
  background: #eafaf1; border: 1px solid #c3ecd7; border-radius: 5px;
  padding: 0 5px; line-height: 16px; white-space: nowrap; vertical-align: 1px;
}
.std-tag.short { color: #a02a1f; background: var(--red-w); border-color: #f6c9c3; }

/* ---------------- 项目列表 · 行内展开交付清单 ---------------- */
.plist { font-size: 13px; }
.phead, .prow {
  display: grid;
  grid-template-columns: 20px minmax(200px, 2.2fr) minmax(84px, .85fr) minmax(120px, 1.1fr)
    minmax(96px, .95fr) 72px 72px minmax(140px, 1.25fr) 76px;
  gap: 0 14px; align-items: center; padding: 0 18px;
}
.phead {
  height: 42px; background: #fbfcfd; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12px; letter-spacing: .2px;
}
.prow { padding-top: 13px; padding-bottom: 13px; border-bottom: 1px solid var(--line-2); }
.prow.clickable { cursor: pointer; }
.prow { transition: background .14s; }
.prow:hover { background: #fafbff; }
.prow.open { background: #f7faff; border-bottom-color: #e8eefa; }
.prow.open:hover { background: #f7faff; }
.pcell { min-width: 0; overflow-wrap: break-word; }
.pcell.caret-col { text-align: left; padding-right: 0; }
.pname { font-weight: 550; font-size: 13.5px; letter-spacing: .1px; display: flex; align-items: center; gap: 8px; line-height: 1.4; }
.pname .dot { width: 6px; height: 6px; border-radius: 50%; background: #cbd3e1; flex: 0 0 6px; }
.prow.open .pname .dot { background: var(--brand); }
.pcode {
  font-size: 11.5px; color: var(--muted); margin-top: 2px;
  font-family: ui-monospace, Consolas, "SF Mono", monospace; font-variant-numeric: tabular-nums;
}
.who2 { font-size: 12.8px; color: var(--ink-2); }
.who2 span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.mini { font-size: 12.8px; color: var(--ink-2); }
.mini .m, .mini.m { color: var(--muted); font-size: 11.5px; }
.arrow, .car { color: #b3bccb; font-size: 10px; line-height: 1; transition: transform .16s; display: inline-block; }
.prow:hover .arrow, .prow:hover .car { color: #8c99ad; }
.prow.open .arrow, .prow.open .car { transform: rotate(90deg); color: var(--brand); }

/* ---- 项目行底色 = 项目状态 ----
 * 用「极淡底色 + 行首 4px 竖条 + 名字前圆点」三重提示，
 * 扫一列就能分出 未确认(橙) / 跟踪中(蓝) / 完成(绿) / 已结项(灰)。
 * 状态类必须写在 .prow:hover / .prow.open 之后，否则会被默认底色盖掉。
 */
.prow {
  --stbar: transparent;
  box-shadow: inset 4px 0 0 var(--stbar);
}
.prow.st-awarded { --stbar: #e09b20; background: #fffbf2; }
.prow.st-awarded:hover { background: #fff6e4; }
.prow.st-awarded.open, .prow.st-awarded.open:hover { background: #fff1d8; }
.prow.st-confirmed { --stbar: #2f6bff; background: #f8fbfe; }
.prow.st-confirmed:hover { background: #eff6ff; }
.prow.st-confirmed.open, .prow.st-confirmed.open:hover { background: #e6f0ff; }
.prow.st-delivered { --stbar: #0b8a5b; background: #f7fdfa; }
.prow.st-delivered:hover { background: #ecfaf2; }
.prow.st-delivered.open, .prow.st-delivered.open:hover { background: #dff6ea; }
.prow.st-closed { --stbar: #b6c0ce; background: #fafbfc; }
.prow.st-closed:hover { background: #f4f6f9; }
.prow.st-closed.open, .prow.st-closed.open:hover { background: #eef1f5; }

/* 名字前的圆点跟着状态走（含 open 态） */
.prow.st-awarded .pname .dot { background: #e09b20; }
.prow.st-confirmed .pname .dot { background: #2f6bff; }
.prow.st-delivered .pname .dot { background: #0b8a5b; }
.prow.st-closed .pname .dot { background: #b6c0ce; }
.prow.st-closed .pcell { opacity: .72; }
.prow.st-closed .pname { color: #63708a; }
.prow.open .pname .dot { box-shadow: 0 0 0 4px rgba(47, 107, 255, .14); }
.prow.st-awarded.open .pname .dot { box-shadow: 0 0 0 4px rgba(224, 155, 32, .16); }
.prow.st-delivered.open .pname .dot { box-shadow: 0 0 0 4px rgba(11, 138, 91, .14); }

.pexp {
  background: #f2f5fa; border-bottom: 1px solid var(--line-2);
  animation: fade .16s ease-out;
}
@keyframes fade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
/* 展开区左侧竖条跟随项目状态，和上方行的色条接起来 */
.exp-inner {
  padding: 0 18px 20px 44px;
  border-left: 4px solid var(--stbar, var(--brand));
}
.pexp.st-awarded { --stbar: #e09b20; }
.pexp.st-confirmed { --stbar: #2f6bff; }
.pexp.st-delivered { --stbar: #0b8a5b; }
.pexp.st-closed { --stbar: #b6c0ce; }

/* ===== 展开面板 ===== */
.xp { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }

/* ① 概览条：状态 + 四个数字 + 操作。白卡片，最重的一块 */
.xp-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.xp-hero-main { min-width: 0; flex: 1 1 520px; }
.xp-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.xp-hint { font-size: 12.5px; color: var(--muted); }
.xp-kpis { display: flex; align-items: flex-end; gap: 26px; flex-wrap: wrap; margin-top: 12px; }
.xp-kpis .kpi { display: inline-flex; align-items: baseline; gap: 3px; }
.xp-kpis .kpi i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-right: 5px; }
.xp-kpis .kpi b {
  font-size: 21px; font-weight: 650; letter-spacing: .3px; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.xp-kpis .kpi u { text-decoration: none; font-size: 11.5px; color: var(--muted); margin-left: 1px; }
.xp-kpis .kpi.b b { color: var(--brand); }
.xp-kpis .kpi.g b { color: var(--green); }
.xp-kpis .kpi.w b { color: var(--amber); }
.xp-none { font-size: 12.5px; color: var(--muted); }
.xp-alert, .xp-warn, .xp-cancel {
  font-size: 11.5px; line-height: 1; padding: 4px 8px; border-radius: 999px; white-space: nowrap;
}
.xp-alert { background: var(--red-w); color: var(--red); }
.xp-warn { background: var(--amber-w); color: var(--amber); }
.xp-cancel { background: var(--gray-w); color: #616e85; }
.xp-hero .acts { display: flex; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }

/* ② 两栏信息卡（等高，避免右侧留一大块空白） */
.xp-cols { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.xp-cols > .xcard { display: flex; flex-direction: column; }
.xp-cols > .xcard > .xcard-b { flex: 1; }

/* 通用卡片：标题条 + 内容区，把展开区切成互不干扰的几块 */
.xcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.xcard-h {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: #fbfcfd; border-bottom: 1px solid var(--line-2);
}
.xcard-h h4 {
  font-size: 12.8px; font-weight: 600; color: var(--ink); letter-spacing: .2px;
  display: flex; align-items: baseline; gap: 8px; padding-left: 9px; position: relative;
}
.xcard-h h4::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 12px; border-radius: 2px; background: var(--brand);
}
.xcard-h .n { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.xcard-x { font-size: 11.5px; color: var(--muted); }
a.xcard-x { color: var(--brand); }
a.xcard-x:hover { text-decoration: underline; }
.xcard-b { padding: 12px 14px; font-size: 13px; }
.xcard-b.flush { padding: 0; }
.xcard-b.flush > .batch-bar { margin: 10px 12px; }
.xcard-empty {
  padding: 16px; text-align: center; color: var(--muted); font-size: 12.5px;
}

/* 项目信息（键值两列） */
.xp-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 0; }
.xp-kv > div { min-width: 0; }
.xp-kv dt { font-size: 11.5px; color: var(--muted); }
.xp-kv dd { margin: 2px 0 0; font-size: 13px; color: var(--ink); word-break: break-word; }
.xp-kv dd.muted { color: var(--muted); }
.xp-note {
  margin-top: 12px; padding: 9px 11px; font-size: 12.5px; line-height: 1.7;
  background: #fafbfd; border: 1px dashed var(--line); border-radius: 8px; color: var(--ink-2);
}
.xp-note i { font-style: normal; display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }

/* 交付时间：一行一个，标签在左、日期在右 */
.xp-due .due-row { border-bottom: 1px dashed var(--line-2); }
.xp-due .due-row:last-child { border-bottom: none; }
.xp-due .due-row:first-child { padding-top: 2px; }
.xp-due .btn.sm { border-color: var(--line); background: #fff; color: var(--ink-2); }
.xp-due .btn.sm:hover { border-color: #c9d3e6; color: var(--ink); }

/* 卡片里的表格：贴边、去掉自己的圆角边框 */
.xcard-b.flush .tbl-wrap { border: 0; border-radius: 0; background: #fff; max-height: none; }
.xcard-b.flush .tbl { border-radius: 0; }
.exp-inner .tbl th { position: static; }
.exp-inner .tbl th, .exp-inner .tbl td { padding: 9px 11px; }
.exp-inner .tbl input[type=date] { width: 100% !important; }
.itbl td select { width: 100%; font-size: 12px; padding: 0 4px 0 7px; }
.exp-inner .batch-bar { background: #eef3ff; border-color: #dbe7ff; }
.xp-hero .btn.sm, .xp-hero .btn.sm.primary { height: 30px; padding: 0 12px; font-size: 12.5px; }

/* 交付清单行底色 = 该行产品状态
 * 同样用「极淡底 + 行首 3px 色条」，8 种状态分冷暖：未开工(灰/琥珀) → 进行中(紫/蓝/青) → 已发货(橙) → 签收(绿) → 取消(灰)
 */
.itbl { table-layout: fixed; }
.itbl td, .itbl th { overflow-wrap: break-word; }
.itbl tbody tr.ist td { background: var(--ibg); }
.itbl tbody tr.ist:hover td { background: var(--ibg-h); }
.itbl tbody tr.ist td:first-child { box-shadow: inset 4px 0 0 var(--ibar); }
.itbl tbody tr.ist.row-sel td { background: #e8f1ff; }
.itbl tbody tr.ist.row-sel td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
.ist-todo { --ibg: #f4f6fa; --ibg-h: #e9eef7; --ibar: #aab7c9; }
.ist-pending { --ibg: #fff7de; --ibg-h: #ffefc4; --ibar: #d9930f; }
.ist-producing { --ibg: #f3ecff; --ibg-h: #e9ddff; --ibar: #7c4dee; }
.ist-offline { --ibg: #e9f2ff; --ibg-h: #dae8ff; --ibar: #3d7bea; }
.ist-stock { --ibg: #e4f9f3; --ibg-h: #d3f4ea; --ibar: #0d9a86; }
.ist-shipped { --ibg: #ffeede; --ibg-h: #ffe1c6; --ibar: #de5f10; }
.ist-delivered { --ibg: #e3f6ec; --ibg-h: #d2f0e0; --ibar: #0b8a5b; }
.ist-cancelled { --ibg: #f1f3f6; --ibg-h: #e8ebf0; --ibar: #a8b2c2; }
.itbl .it-name { display: inline; }
.ist-cancelled .it-name { color: var(--muted); text-decoration: line-through; }
.ist-cancelled td { color: var(--muted); }
.ist-delivered .it-name { color: #0a6b47; }
/* 名称下的跟踪备注只留一行，备注列最多两行 —— 否则 43 行会被文字撑成一屏 3 行 */
.itbl .it-note {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 11.5px; margin-top: 2px;
}
.itbl td.it-remark { position: relative; padding-right: 40px; }
.itbl .it-rm {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.5;
}
.itbl .it-rmbtn { position: absolute; right: 6px; top: 7px; font-size: 11.5px; }

/* 加载失败 / 空态 */
.exp-empty {
  margin-top: 12px; padding: 22px; text-align: center; color: var(--muted); font-size: 13px;
  background: #fff; border: 1px dashed var(--line); border-radius: var(--r);
}

/* 交付完成横幅 */
.dlv-note {
  display: flex; align-items: center; gap: 11px; margin: 10px 0 4px;
  padding: 11px 14px; border-radius: 10px; font-size: 13px; line-height: 1.6;
  background: #eafaf1; color: #0a6b47; border: 1px solid #b9e7cf;
}
.dlv-note .ico {
  width: 18px; height: 18px; border-radius: 50%; background: #0b8a5b; color: #fff;
  display: grid; place-items: center; font-size: 11px; flex: 0 0 18px;
}
.dlv-note b { font-weight: 600; }
.dlv-note .sm2 { color: #3f8a6b; font-size: 12px; margin-left: 4px; }

@media (max-width: 1300px) {
  .phead, .prow {
    grid-template-columns: 20px minmax(180px, 2fr) minmax(78px, .8fr) minmax(112px, 1.1fr)
      minmax(90px, .95fr) minmax(132px, 1.2fr) 72px;
  }
  .phead .pcell:nth-child(6), .prow .pcell:nth-child(6),
  .phead .pcell:nth-child(7), .prow .pcell:nth-child(7) { display: none; }
  .exp-inner { padding-left: 34px; }
}
@media (max-width: 1080px) {
  .xp-cols { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .phead, .prow { grid-template-columns: 20px minmax(160px, 2fr) minmax(108px, 1.1fr) minmax(126px, 1.2fr) 70px; }
  .phead .pcell:nth-child(3), .prow .pcell:nth-child(3),
  .phead .pcell:nth-child(5), .prow .pcell:nth-child(5) { display: none; }
  .stats { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .exp-inner { padding-left: 14px; padding-right: 12px; }
  .xp-kpis { gap: 16px; }
  .xp-kpis .kpi b { font-size: 18px; }
  .xp-kv { grid-template-columns: 1fr; }
}

/* ---------------- 操作日志 ---------------- */
.log-filters { align-items: center; }
.log-filters select, .log-filters input[type=date] { height: 34px; }
.log-actor { display: inline-flex; align-items: center; gap: 6px; }
.log-ava {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px;
  background: var(--brand-w); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: -.2px;
}
.log-row { cursor: pointer; }
.log-row:hover td { background: #f7faff; }
.log-plink { color: var(--brand); text-decoration: none; }
.log-plink:hover { text-decoration: underline; }
.logpager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; font-size: 12.5px; color: var(--muted);
}
.logpager .pages { display: flex; gap: 6px; }
.proj-chip { margin: -4px 0 12px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; font-size: 12.5px; color: var(--brand);
  background: var(--brand-w); border: 1px solid #dbe7ff; border-radius: 999px;
}
.filter-chip b { font-weight: 600; }
.chip-x { border: none; background: transparent; color: var(--brand); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }
.chip-x:hover { color: var(--red); }

/* 日志详情弹窗 */
.dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.dlg-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dlg-grid i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.dlg-grid b { font-weight: 500; font-size: 13px; }
.dlg-sum {
  margin: 12px 0 4px; padding: 11px 13px; font-size: 13.5px; line-height: 1.7;
  background: var(--brand-w); border-left: 3px solid var(--brand); border-radius: 8px;
}
.dlg-label { margin: 12px 0 6px; font-size: 12px; color: var(--muted); }
.dlg-json {
  margin: 0; padding: 11px 13px; max-height: 260px; overflow: auto;
  background: #f7f9fc; border: 1px solid var(--line-2); border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-all;
}
.log-mini { font-size: 12.5px; }
.log-mini .muted { font-size: 11.5px; }
.exp-sec .link { font-size: 12.5px; }

/* ---------------- 数据导入 ---------------- */
.imp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.imp-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 17px; box-shadow: var(--sh);
}
.imp-card.off { background: #fafbfc; opacity: .68; }
.imp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.imp-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.imp-check input { accent-color: var(--brand); width: 15px; height: 15px; }
.imp-check b { font-size: 14px; font-weight: 600; }
.imp-num {
  font-size: 12px; color: var(--brand); background: var(--brand-w);
  border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums;
}
.imp-desc { margin-top: 9px; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); }
.imp-meta { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.imp-warn {
  margin-bottom: 14px; padding: 11px 14px; font-size: 12.5px;
  background: #fffaeb; border: 1px solid #fedf89; border-radius: 10px; color: #b54708;
}
.imp-opt { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13.5px; }
.imp-opt label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.imp-hint { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--muted); }
@media (max-width: 900px) { .imp-grid { grid-template-columns: 1fr; } }

/* ---------------- 发货计划 ----------------
 * 一张表走完：按天分组，日期做成整行表头，滚动时吸顶。
 * 逾期组左侧红边、今天蓝边，扫一眼就知道哪些天欠着。
 */
.sk-tbl { table-layout: fixed; }
.sk-tbl td { padding: 9px 12px; vertical-align: top; }
.sk-row { cursor: pointer; }
.sk-name {
  font-size: 13px; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sk-code { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.sk-note {
  font-size: 12px; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.sk-tbl thead th { position: sticky; top: 0; z-index: 3; }
.day-row td {
  position: sticky; top: 34px; z-index: 2;
  background: #f7f9fc; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  padding: 7px 12px !important; box-shadow: inset 3px 0 0 var(--line);
}
.day-row.today td { background: var(--brand-w); box-shadow: inset 3px 0 0 var(--brand); }
.day-row.past td { background: #fef6f5; box-shadow: inset 3px 0 0 var(--red); }
.day-row.nodate td { background: #fffaeb; box-shadow: inset 3px 0 0 #d98a1a; }
.d-date { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.d-week { font-size: 12px; color: var(--muted); margin-left: 6px; }
.d-sum { float: right; font-size: 11.5px; color: var(--muted); line-height: 20px; font-variant-numeric: tabular-nums; }
.d-tag {
  display: inline-block; font-size: 11px; line-height: 1; padding: 3px 7px;
  border-radius: 999px; margin-left: 8px; font-weight: 500;
}
.d-tag.blue { background: var(--brand); color: #fff; }
.d-tag.red { background: var(--red-w); color: var(--red); }
.ck-inline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.ck-inline input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

/* ---------------- 打印 ---------------- */
@media print {
  .topbar, .page-head .acts, .toolbar, .modal-foot, .chips, .ver { display: none !important; }
  body { background: #fff; }
  .card, .stats { box-shadow: none; }
  .view { padding: 0; max-width: none; }
  .tbl-wrap { max-height: none; overflow: visible; }
  .day-row td { position: static; }
  .tbl tbody tr { break-inside: avoid; }
}
