/* =========================================================
   供应商管理系统 · 增量样式（在 style.css 设计系统之上）
   ========================================================= */

/* ---------- 品牌覆盖 ---------- */
.brand-mark {
  background: linear-gradient(135deg, #12796a, #0b5d51);
  box-shadow: 0 4px 12px rgba(15, 118, 110, .28);
  font-size: 11px; font-weight: 600; color: #fff; letter-spacing: .5px;
}
.brand-name { font-size: 19px; }
.topnav { margin-left: 36px; }
.topnav a { font-size: 15px; }

/* ---------- 页面头 ---------- */
.page-head {
  padding: 18px 20px 4px; display: flex; align-items: flex-start; gap: 16px; flex: 0 0 auto;
}
.page-head h2 { margin: 0; font-size: 20px; font-weight: 600; color: #1c2233; letter-spacing: .2px; }
.page-head p { margin: 6px 0 0; font-size: 13px; color: #8b94a8; line-height: 1.5; }

/* ---------- 工作台 ---------- */
.dash { flex: 1; min-height: 0; overflow-y: auto; padding-top: 4px; }
.kpis {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px;
  padding: 12px 20px 0;
}
.kpi {
  background: #fff; border-radius: 10px; padding: 16px 16px 14px; cursor: pointer;
  border: 1px solid #eef1f5; box-shadow: 0 1px 2px rgba(23, 43, 77, .04);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -12px rgba(23, 43, 77, .3); border-color: #dbe4f5; }
.kpi-label { font-size: 12.5px; color: #8b94a8; }
.kpi-value { font-size: 28px; font-weight: 600; color: #1c2233; line-height: 1.35; margin-top: 2px; letter-spacing: -.5px; }
.kpi-sub { font-size: 12px; color: #a3abbd; margin-top: 2px; }
.kpi-red .kpi-value { color: #e04545; }
.kpi-orange .kpi-value { color: #d98413; }
.kpi-green .kpi-value { color: #0f9d63; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; padding: 14px 20px 0; }
.dash-grid:last-child { padding-bottom: 24px; }

.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 18px 8px; }
.card-head h3 { font-size: 15px; }
.card-hint { font-size: 12px; color: #a3abbd; }
.mini-link { margin-left: auto; font-size: 12.5px; color: var(--primary); padding: 2px 4px; }

.alert-row, .todo-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px dashed #f0f2f7; cursor: pointer;
}
.alert-row:last-child, .todo-row:last-child { border-bottom: none; }
.alert-row:hover .alert-title, .todo-row:hover .todo-title { color: var(--primary); }
.alert-main, .todo-main { flex: 1; min-width: 0; }
.alert-title, .todo-title {
  font-size: 13.5px; color: #2c3345; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.alert-sub, .todo-sub { font-size: 12px; color: #a3abbd; margin-top: 3px; }
.todo-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.todo-dot.red { background: #e04545; }
.todo-dot.orange { background: #e8a33d; }
.todo-dot.blue { background: #3b7ef0; }

.mini-btn {
  height: 26px; padding: 0 10px; border-radius: 5px; border: 1px solid #dbe2ee;
  background: #fff; color: #4a5468; font-size: 12.5px; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.mini-btn:hover { border-color: var(--primary); color: var(--primary); background: #f7faff; }

.dist { padding: 2px 0 10px; }
.dist-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dist-key { width: 58px; flex: 0 0 58px; font-size: 12.5px; color: #5a6274; white-space: nowrap; }
.dist-bar { flex: 1; height: 8px; background: #f1f4f9; border-radius: 5px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; border-radius: 5px; transition: width .4s; }
.dist-bar i.green { background: #2fb37a; }
.dist-bar i.blue { background: #3b7ef0; }
.dist-bar i.orange { background: #e8a33d; }
.dist-val { width: 42px; text-align: right; font-size: 12.5px; color: #5a6274; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #f4f6fa; cursor: pointer; }
.rank-row:hover .rank-name { color: var(--primary); }
.rank-no { width: 18px; height: 18px; border-radius: 5px; background: #f1f4f9; color: #8b94a8; font-size: 11.5px; display: grid; place-items: center; }
.rank-no.top { background: #fff3dd; color: #b8791a; }
.rank-name { flex: 1; font-size: 13px; color: #2c3345; transition: color .15s; }
.rank-score { font-size: 13px; font-weight: 600; color: #1c2233; }

.cost-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.cost-name { width: 118px; font-size: 13px; color: #2c3345; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-bar { flex: 1; height: 6px; background: #f1f4f9; border-radius: 4px; overflow: hidden; }
.cost-bar i { display: block; height: 100%; border-radius: 4px; }
.cost-bar i.red { background: #ec7373; }
.cost-bar i.green { background: #55c08d; }
.cost-val { width: 54px; text-align: right; font-size: 12.5px; color: #8b94a8; }
.cost-val.bad { color: #e04545; font-weight: 600; }
.cost-val.good { color: #0f9d63; font-weight: 600; }

/* ---------- 评级页 ---------- */
.ratings-page { overflow-y: auto; }
.rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; padding: 14px 20px 24px; }
.rate-card {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px; padding: 18px;
  cursor: pointer; transition: all .16s;
}
.rate-card:hover { border-color: #dbe4f5; box-shadow: 0 10px 24px -16px rgba(23, 43, 77, .35); }
.rate-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.rate-name { font-size: 15px; font-weight: 600; color: #1c2233; }
.rate-sub { font-size: 12px; color: #a3abbd; margin-top: 4px; }
.rate-badge {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; flex: 0 0 30px;
}
.rate-badge.a { background: #e9f9f1; color: #0f9d63; }
.rate-badge.b { background: #edf3ff; color: #2f6bff; }
.rate-badge.c { background: #fff6e8; color: #d98413; }
.rate-score { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 12px; }
.rate-score b { font-size: 26px; color: #1c2233; font-weight: 600; letter-spacing: -.5px; }
.rate-score span { font-size: 12px; color: #a3abbd; }
.rate-dims { display: flex; flex-direction: column; gap: 8px; }
.dim { display: flex; align-items: center; gap: 8px; }
.dim-n { width: 58px; font-size: 12px; color: #6b7488; flex: 0 0 58px; white-space: nowrap; }
.dim-n i { font-style: normal; color: #b8c0ce; font-size: 11px; margin-left: 3px; }
.dim-bar { flex: 1; height: 6px; background: #f1f4f9; border-radius: 4px; overflow: hidden; }
.dim-bar b { display: block; height: 100%; background: linear-gradient(90deg, #5b9dff, #2f6bff); border-radius: 4px; }
.dim-v { width: 26px; text-align: right; font-size: 12px; color: #5a6274; }
.dim.wide .dim-n { width: 64px; flex: 0 0 64px; }
.dim-list { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 4px; }

/* 工具栏里「需先勾选」的提示 */
.tb-hint { font-size: 12.5px; color: #98a1b3; }

/* ---------- 弹窗 ---------- */.modal-root { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal-root:empty { display: none; }
.modal-back {
  position: absolute; inset: 0; background: rgba(20, 28, 42, .44);
  animation: fadeIn .16s ease-out;
}
.modal {
  position: relative; width: min(1040px, 92vw); max-height: 88vh;
  background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  display: flex; flex-direction: column; overflow: hidden;
  /* 只动 transform / opacity，交给合成层；contain 把重排范围关在弹窗内 */
  animation: mIn .22s cubic-bezier(.16, 1, .3, 1);
  transform: translateZ(0);
  will-change: transform, opacity;
  contain: layout paint;
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes mIn { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.985); } }
.m-inner { display: flex; flex-direction: column; min-height: 0; max-height: 88vh; }
.m-head {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px 14px;
  border-bottom: 1px solid #f0f2f7; flex: 0 0 auto;
}
.m-title-wrap { flex: 1; min-width: 0; }
.m-head h3 { margin: 0; font-size: 18px; font-weight: 600; color: #1c2233; }
.m-head p { margin: 6px 0 0; font-size: 12.5px; color: #8b94a8; }
.m-body { flex: 1; overflow-y: auto; padding: 6px 22px 18px; }
.m-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 14px 22px; border-top: 1px solid #f0f2f7; background: #fcfdff;
  flex-wrap: wrap;
}
.m-foot .foot-note { margin-right: auto; font-size: 12.5px; color: #8b94a8; line-height: 1.6; }
.m-foot .reply-input { flex: 1 1 100%; min-height: 56px; max-height: 90px; }

/* ---------- 详情内容 ---------- */
.badge-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0 4px; }
.badge-note { font-size: 12.5px; color: #8b94a8; margin-left: 4px; }

.sec-title { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; }
.sec-title h4 { margin: 0; font-size: 14px; font-weight: 600; color: #1c2233; position: relative; padding-left: 10px; }
.sec-title h4::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 13px; border-radius: 2px; background: var(--primary);
}
.sec-title span { font-size: 12px; color: #a3abbd; }

.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 22px; }
.kv label { display: block; font-size: 12px; color: #98a1b3; margin-bottom: 3px; }
.kv div { font-size: 13.5px; color: #2c3345; line-height: 1.5; word-break: break-all; }

table.sub { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sub th {
  background: #f7f9fc; color: #5a6274; font-weight: 500; font-size: 12.5px;
  text-align: left; padding: 9px 10px; border-bottom: 1px solid #edf1f7; white-space: nowrap;
}
table.sub td { padding: 9px 10px; border-bottom: 1px solid #f4f6fa; color: #414a5c; }
table.sub tr:last-child td { border-bottom: none; }
table.sub .sub-empty { text-align: center; color: #a3abbd; padding: 18px 0; }

.quote-block { background: #f7f9fc; border: 1px solid #eef1f7; border-radius: 8px; padding: 12px 14px; margin: 8px 0; }
.quote-block label { display: block; font-size: 12px; color: #98a1b3; margin-bottom: 6px; }
.quote-block p { margin: 0; font-size: 13.5px; color: #2c3345; line-height: 1.7; }
.lowest {
  display: inline-block; margin-left: 6px; font-size: 11px; color: #0f9d63;
  background: #e9f9f1; border-radius: 4px; padding: 1px 5px; vertical-align: 1px;
}

.reply-input {
  width: 100%; min-height: 68px; max-height: 120px; padding: 10px 12px; resize: vertical;
  border: 1px solid #dbe2ee; border-radius: 8px; font-size: 13.5px; line-height: 1.6;
  outline: none; color: #2c3345; background: #fff;
}
.reply-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); }

/* ---------- 步骤条 ---------- */
.stepper { display: flex; align-items: center; padding: 16px 4px 4px; }
.step { display: flex; align-items: center; gap: 7px; }
.step .dot {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #f1f4f9; color: #a3abbd; font-size: 11.5px; flex: 0 0 22px;
}
.step .lbl { font-size: 12.5px; color: #a3abbd; white-space: nowrap; }
.step.done .dot { background: #e9f9f1; color: #0f9d63; }
.step.done .lbl { color: #5a6274; }
.step.now .dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }
.step.now .lbl { color: #1c2233; font-weight: 600; }
.step-line { flex: 1; height: 2px; background: #eef1f7; margin: 0 10px; border-radius: 2px; min-width: 24px; }
.step-line.done { background: #bfe8d4; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 6px; }
.tl-item { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1px; background: #eef1f7;
}
.tl-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #c7d3e8;
  flex: 0 0 9px; margin-top: 4px; position: relative; z-index: 1;
}
.tl-item:first-child .tl-dot { border-color: var(--primary); }
.tl-act { font-size: 13px; color: #2c3345; line-height: 1.5; }
.tl-meta { font-size: 12px; color: #a3abbd; margin-top: 3px; }

/* ---------- 其他 ---------- */
.tag.amber { background: #fff9e8; color: #b8850f; border-color: #fbedc4; }
.pagination { border-top: 1px solid #f0f2f7; }

/* 筛选区：收窄输入框，保证 4 个条件的页面（客诉）也能一行放下 */
.filters .frow { flex-wrap: wrap; }
.finput, .fselect { width: 122px; }
.fitem > label { font-size: 13px; }
.factions { display: flex; gap: 8px; flex: 0 0 auto; }

/* 「最近到期」单元格：证照名 + 剩余天数标签 */
.u-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.u-name {
  font-size: 11.5px; color: #98a1b3; max-width: 54px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 列表长文本列允许换行，避免把表格撑出横向滚动 */
table.grid td.wrap { white-space: normal; line-height: 1.55; word-break: break-word; }
table.grid th { white-space: nowrap; }

/* toast 移到右下角，避免遮挡页签与页面标题 */
.toasts {
  top: auto; left: auto; right: 24px; bottom: 24px; transform: none;
  align-items: flex-end;
}

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   2026-11-16 需求批次：工厂分类 / 设备 / 证照原件 / AI 识别 / 订单看板
   ========================================================= */

/* ---------- 页头标记与分页 tab ---------- */
.page-badge {
  display: inline-block; vertical-align: 3px; margin-left: 8px;
  font-size: 11px; font-weight: 500; letter-spacing: .5px;
  color: #b8791a; background: #fff6e4; border: 1px solid #f6e2b8;
  border-radius: 4px; padding: 1px 6px;
}
.ptabs { display: flex; gap: 6px; padding: 4px 20px 0; flex: 0 0 auto; flex-wrap: wrap; }
.ptab {
  height: 32px; padding: 0 16px; border-radius: 8px 8px 0 0; cursor: pointer;
  font-size: 13.5px; color: #5a6274; display: flex; align-items: center;
  border: 1px solid transparent; border-bottom: none; background: #f1f4fa;
  transition: background .15s, color .15s;
}
.ptab:hover { color: var(--primary); background: #eaf0ff; }
.ptab.on {
  background: var(--primary); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px -6px rgba(47, 107, 255, .7);
}

/* 二级 tab：同一分类下按工厂分页。和一级拉开距离，用小圆角标签块，
   换行时也不会出现半截页签 */
.ptabs.sub { padding: 12px 20px 10px; gap: 6px; row-gap: 6px; align-items: center; }
.ptabs.sub .ptab {
  height: 26px; padding: 0 11px; border-radius: 6px;
  font-size: 12px; background: #f4f6fb; color: #6b7488;
}
.ptabs.sub .ptab:hover { color: var(--primary); background: #e9effb; }
.ptabs.sub .ptab.on {
  background: #dce7ff; color: var(--primary); font-weight: 600; box-shadow: none;
}
/* 工厂 tab 上的设备台数 */
.ptab-n {
  font-style: normal; margin-left: 5px; padding: 0 4px;
  font-size: 10px; line-height: 14px; border-radius: 4px;
  background: #e7ebf5; color: #7b8497; font-variant-numeric: tabular-nums;
}
.ptab.on .ptab-n { background: #fff; color: var(--primary); }
.ptabs-note { margin-left: 2px; font-size: 11.5px; color: #98a1b3; }

/* 二级 tab 选中的工厂：一条简明信息带，下面才是这家工厂的设备清单 */
.fstrip {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 0 20px 12px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfcff;
}
.fs-id { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fs-id b { font-size: 13.5px; color: #232a3a; }
.fs-id em {
  font-style: normal; font-size: 12px; color: #8d97ab;
  font-variant-numeric: tabular-nums;
}
.fs-id .fs-sup { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-kv { display: flex; gap: 24px; margin-left: auto; }
.fs-kv > div { display: flex; flex-direction: column; gap: 1px; text-align: right; }
.fs-kv span { font-size: 11px; color: #98a1b3; }
.fs-kv b { font-size: 13px; color: #2c3345; font-variant-numeric: tabular-nums; }

/* ---------- 工作台补充 ---------- */
.cut-label {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: #2c3345;
  margin: 6px 0 2px; padding-top: 8px; border-top: 1px dashed #eef1f7;
}
.card-body > .cut-label:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.cut-label span { font-weight: 400; color: #a3abbd; font-size: 11.5px; }
.sum-line { display: flex; gap: 10px; margin-bottom: 12px; }
.sum-line > div {
  flex: 1; background: #f8fafd; border: 1px solid #eef2f8; border-radius: 8px;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
}
.sum-line b { font-size: 19px; color: #1c2233; letter-spacing: -.4px; }
.sum-line span { font-size: 11.5px; color: #a3abbd; }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 订单看板 ---------- */
.orders-page, .products-page { overflow-y: auto; }
.src-tip {
  display: flex; align-items: center; gap: 8px; margin: 10px 20px 0;
  padding: 9px 12px; border-radius: 8px; font-size: 12.5px; line-height: 1.5;
  background: #fff8ec; border: 1px solid #f7e3bd; color: #8a6316;
}
.src-tip svg { flex: 0 0 15px; }
.src-tip b { font-weight: 600; }
.prod-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #f0f2f7; }
.prod-row:last-child { border-bottom: none; }
.prod-main { flex: 1; min-width: 0; }
.prod-name { font-size: 13.5px; color: #2c3345; display: flex; align-items: baseline; gap: 6px; }
.prod-name em { font-style: normal; font-size: 11.5px; color: #a3abbd; }
.prod-sub { font-size: 11.5px; color: #a3abbd; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-bar { width: 120px; height: 6px; background: #f1f4f9; border-radius: 4px; overflow: hidden; flex: 0 0 120px; }
.prod-bar i { display: block; height: 100%; border-radius: 4px; }
.prod-bar i.green { background: #2fb37a; }
.prod-bar i.blue { background: #3b7ef0; }
.prod-bar i.orange { background: #e8a33d; }
.prod-num { width: 82px; text-align: right; display: flex; flex-direction: column; gap: 2px; flex: 0 0 82px; }
.prod-num b { font-size: 13px; color: #1c2233; }
.prod-num span { font-size: 11.5px; color: #a3abbd; }
.cost-rate { font-size: 11.5px; color: #a3abbd; width: 60px; text-align: right; flex: 0 0 60px; }
.cost-rate.bad { color: #e04545; font-weight: 600; }
.card-body-tight { padding: 4px 18px 8px; }
.card.full { grid-column: 1 / -1; }
.card .table-wrap.flat { padding: 0 18px 14px; max-height: none; overflow-x: auto; }
.card .table-wrap.flat table.grid th { background: #fafbfd; }

/* ---------- 二期占位 ---------- */
.stub-wrap {
  padding: 16px 20px 24px; display: grid; gap: 14px; align-items: start;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.stub-wrap.single { grid-template-columns: minmax(0, 860px); }
.stub-card {
  background: #fff; border: 1px solid #eef1f5; border-radius: 12px;
  padding: 24px 26px; box-shadow: 0 1px 2px rgba(23, 43, 77, .04);
}
.stub-icon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: #eef4ff; color: var(--primary); margin-bottom: 14px;
}
.stub-card h3 { margin: 0 0 8px; font-size: 16px; color: #1c2233; }
.stub-card > p { margin: 0 0 16px; font-size: 13px; color: #6b7488; line-height: 1.7; }
.stub-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.stub-list li { font-size: 13px; color: #4a5468; line-height: 1.6; }
.stub-list b { display: inline-block; min-width: 62px; color: #2c3345; }
.stub-note {
  margin-top: 18px; padding: 10px 12px; background: #f7f9fc; border-radius: 8px;
  font-size: 12.5px; color: #6b7488; line-height: 1.6;
}

/* ---------- 黑名单横幅 / 档案小字 ---------- */
.ban-banner {
  margin: 14px 0 4px; padding: 12px 14px; border-radius: 8px;
  background: #fdf0f0; border: 1px solid #f7d4d4;
}
.ban-banner .ban-t { font-size: 13.5px; font-weight: 600; color: #c0392b; }
.ban-banner p { margin: 6px 0 4px; font-size: 13px; color: #7a4a45; line-height: 1.65; }
.ban-banner span { font-size: 11.5px; color: #b08a86; }
.sub-t { display: block; font-style: normal; font-size: 11px; color: #a3abbd; margin-top: 3px; }

/* ---------- AI 录入 ---------- */
.modal-narrow { width: min(760px, 92vw); }
.modal-ai { width: min(880px, 94vw); }

.aisteps { display: flex; align-items: center; gap: 8px; padding: 0 22px 14px; flex: 0 0 auto; }
.aistep {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #a3abbd;
  padding: 4px 10px; border-radius: 20px; background: #f6f8fb;
}
.aistep > span {
  width: 17px; height: 17px; border-radius: 50%; background: #e4e9f2; color: #fff;
  display: grid; place-items: center; font-size: 10.5px;
}
.aistep.now { background: #eef4ff; color: var(--primary); font-weight: 600; }
.aistep.now > span { background: var(--primary); }
.aistep.done { background: #eaf9f2; color: #0f9d63; }
.aistep.done > span { background: #0f9d63; }
.aistep-line { flex: 1; height: 2px; background: #eef1f7; border-radius: 2px; min-width: 16px; }
.aistep-line.done { background: #bfe8d4; }

.pick-hint {
  border: 1.5px dashed #d5dfef; border-radius: 10px; padding: 16px;
  text-align: center; font-size: 13px; color: #8b94a8; background: #fafcff; margin-bottom: 14px;
}
.pick-grid { display: flex; flex-direction: column; gap: 10px; }
.pick-card {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  border: 1px solid #e9eef7; border-radius: 10px; cursor: pointer; background: #fff;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.pick-card:hover { border-color: var(--primary); box-shadow: 0 8px 20px -14px rgba(47, 107, 255, .5); }
.pick-thumb {
  width: 150px; height: 103px; border-radius: 6px; overflow: hidden; flex: 0 0 150px;
  background: #f7f2e6; border: 1px solid #e6e0d2;
}
.pick-thumb img, .review-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick-info b { font-size: 13.5px; color: #1c2233; font-weight: 500; }
.pick-info span { font-size: 11.5px; color: #a3abbd; }
.pick-info em { font-style: normal; font-size: 12px; color: #6b7488; }
.pick-note { margin-top: 14px; font-size: 12px; color: #a3abbd; line-height: 1.65; }

.run-wrap { padding: 10px 0; }
.run-file {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: #4a5468;
  background: #f6f8fb; border-radius: 6px; padding: 7px 11px; margin-bottom: 16px;
}
.run-bar { height: 6px; background: #eef1f7; border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.run-bar i {
  display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, #5b9dff, #12796a);
  animation: runFill 2.15s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes runFill { to { width: 100%; } }
.run-log { display: flex; flex-direction: column; gap: 7px; max-height: 190px; overflow-y: auto; }
.run-line { font-size: 12.5px; color: #6b7488; padding-left: 16px; position: relative; animation: fadeUp .3s ease; }
.run-line::before {
  content: ""; position: absolute; left: 3px; top: 7px; width: 5px; height: 5px;
  border-radius: 50%; background: #c7d3e8;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } }

.review-top { display: flex; gap: 16px; margin-bottom: 14px; }
.review-thumb {
  width: 200px; height: 138px; border-radius: 8px; overflow: hidden; flex: 0 0 200px;
  border: 1px solid #e6e0d2; background: #f7f2e6;
}
.review-side { flex: 1; display: grid; grid-template-columns: 72px 1fr; gap: 8px 10px; align-content: start; }
.review-side label { font-size: 12.5px; color: #6b7488; align-self: center; }
.review-side .fselect, .review-side .finput { width: 100%; }
.review-table td { padding: 6px 10px; }
.fin-td {
  width: 100%; height: 30px; padding: 0 9px; border-radius: 5px; font-size: 13px;
  border: 1px solid #dbe2ee; color: #2c3345; outline: none; background: #fff;
}
.fin-td:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 107, 255, .1); }
.conf { display: flex; align-items: center; gap: 6px; }
.conf i { display: block; height: 5px; border-radius: 3px; background: #2fb37a; width: 44px; flex: 0 0 44px;
  position: relative; }
.conf i::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: inherit; border-radius: 3px; background: inherit;
}
.conf b { font-size: 11.5px; color: #8b94a8; font-weight: 500; }
.conf.low i { background: #e8a33d; }
.conf.low b { color: #b8791a; }
.review-tip { margin-top: 12px; font-size: 12.5px; color: #8b94a8; }

.done-wrap { text-align: center; padding: 14px 0 6px; }
.done-ic {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px;
  background: #e9f9f1; color: #0f9d63; display: grid; place-items: center;
}
.done-wrap h3 { margin: 0 0 6px; font-size: 16px; color: #1c2233; }
.done-wrap > p { margin: 0; font-size: 13px; color: #6b7488; }
.done-kv { display: flex; justify-content: center; gap: 10px; margin: 18px 0 10px; }
.done-kv > div {
  background: #f8fafd; border: 1px solid #eef2f8; border-radius: 8px; padding: 10px 18px;
  display: flex; flex-direction: column; gap: 3px;
}
.done-kv label { font-size: 11.5px; color: #a3abbd; }
.done-kv b { font-size: 13.5px; color: #1c2233; }
.done-note { font-size: 12px; color: #a3abbd !important; }

/* ---------- 原件预览 ---------- */
.scan-body { padding: 12px 22px 18px; }
.scan-img {
  width: 100%; border-radius: 8px; display: block;
  box-shadow: 0 10px 30px -18px rgba(23, 43, 77, .5); border: 1px solid #eadfca;
}
.scan-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* 一家工厂的全部原件 */
.modal-scan { width: min(1000px, 94vw); }
.scan-gallery { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; padding: 14px 22px 18px; }
.sg-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 62vh; padding-right: 4px; }
.sg-item {
  border: 1px solid #edf0f6; border-radius: 8px; padding: 9px 11px; cursor: pointer;
  transition: border-color .14s, background .14s;
}
.sg-item:hover { border-color: #cfe0ff; background: #f8fbff; }
.sg-item.on { border-color: var(--primary); background: #f2f7ff; }
.sg-item b { display: block; font-size: 13px; color: #232a3a; margin-bottom: 4px; }
.sg-item span { font-size: 11.5px; color: #8b94a8; }
.sg-pane { min-width: 0; }
.sg-pane img {
  width: 100%; border-radius: 8px; display: block; border: 1px solid #eadfca;
  box-shadow: 0 10px 30px -18px rgba(23, 43, 77, .5);
}
.order-detail { padding: 14px 20px 24px; }
.dash-grid.one { grid-template-columns: 1fr; }
.order-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.fset { gap: 8px 14px; }

/* ===== 产销平台嵌入页（订单 → 产销平台） ===== */
.psc-bar { display: flex; align-items: center; gap: 8px; padding: 0 20px 12px; flex: 0 0 auto; }
.psc-bar .btn { margin-left: auto; }
.psc-tab {
  height: 32px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text-2);
  font-size: 13px; cursor: pointer; transition: all .15s;
}
.psc-tab:hover { border-color: #b9c8e8; color: var(--primary); background: #fbfcff; }
.psc-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.psc-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: #f4f6fa; border-radius: 10px; }

/* =========================================================
   登录页（SCM 登录 + 会话）· 分栏布局 v2
   左品牌区（淡入上移错峰） + 右登录卡片（右侧滑入）
   ========================================================= */
.login-mask {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #0a1a1f 0%, #0c2b2a 48%, #0a1f1c 100%);
  animation: loginBgIn .6s ease both;
}
@keyframes loginBgIn { from { opacity: 0; } to { opacity: 1; } }

/* 背景：两个大模糊光斑（静态装饰） */
.login-bg { position: absolute; inset: 0; overflow: hidden; }
.login-bg .orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45;
}
.login-bg .o1 {
  width: 640px; height: 640px; left: -220px; top: -200px;
  background: radial-gradient(circle at 35% 35%, #16a394, transparent 68%);
}
.login-bg .o2 {
  width: 560px; height: 560px; right: -200px; bottom: -220px;
  background: radial-gradient(circle at 60% 60%, #1f5fb0, transparent 68%);
}
.login-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.85), transparent 72%);
          mask-image: radial-gradient(ellipse at center, rgba(0,0,0,.85), transparent 72%);
}

.login-wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 90px;
  padding: 40px; max-width: 1060px; width: 100%;
}

/* 左侧品牌区：淡入上移（y: 20px，easeOut，错峰 0.1→0.5s） */
.brand { flex: 1; color: #f2f7f6; max-width: 480px; }
.brand .fade-item {
  opacity: 0;
  animation: fadeUp .6s cubic-bezier(0, 0, 0.58, 1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.d1 { animation-delay: .1s; }
.d2 { animation-delay: .15s; }
.d3 { animation-delay: .2s; }
.d4 { animation-delay: .3s; }
.d5 { animation-delay: .5s; }

.brand-logo {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 22px;
  background: linear-gradient(135deg, #16a394, #0c6b5d);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 1px;
  box-shadow: 0 12px 30px -8px rgba(22, 163, 148, .55), inset 0 1px 0 rgba(255,255,255,.25);
  animation: logoIn .7s cubic-bezier(.22, .9, .3, 1.4) .25s both;
}
@keyframes logoIn {
  from { opacity: 0; transform: scale(.5) rotate(-8deg); }
  to   { opacity: 1; transform: scale(1) rotate(0); }
}
.brand h1 { font-size: 34px; font-weight: 600; letter-spacing: 2px; line-height: 1.3; }
.brand .sub {
  margin-top: 10px; font-size: 14px; color: #2cc2b0;
  letter-spacing: 2px; font-weight: 500;
}
.feat-list { list-style: none; margin-top: 30px; display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.feat-list li {
  display: flex; align-items: center; gap: 12px;
}
.feat-list .fi {
  width: 52px; height: 26px; border-radius: 8px; flex: none;
  background: rgba(44, 194, 176, .12); border: 1px solid rgba(44, 194, 176, .25);
  display: flex; align-items: center; justify-content: center;
  color: #2cc2b0; font-size: 12px; letter-spacing: 2px;
}
.feat-list .ftxt {
  font-size: 13px; line-height: 1.75;
  color: rgba(232, 244, 242, .78);
}
.brand .foot {
  margin-top: 44px; font-size: 12px;
  color: rgba(226, 240, 238, .35); letter-spacing: .5px;
}

/* 右侧登录卡片：从右滑入（x: 40→0，0.5s，delay 0.2s） */
.login-card {
  position: relative; width: 380px; flex: none;
  padding: 40px 36px 28px; border-radius: 18px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255,255,255,.08);
  animation: slideLeft .5s cubic-bezier(0, 0, 0.58, 1) .2s both;
  transition: opacity .45s, transform .45s;
}
@keyframes slideLeft {
  from { opacity: 0; transform: translate3d(40px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.login-card.shake { animation: slideLeft .5s cubic-bezier(0,0,.58,1) .2s both, loginShake .4s ease; }
@keyframes loginShake {
  0%, 100% { transform: translate3d(0,0,0); }
  20% { transform: translate3d(-9px,0,0); }
  40% { transform: translate3d(8px,0,0); }
  60% { transform: translate3d(-5px,0,0); }
  80% { transform: translate3d(3px,0,0); }
}
.login-card.ok { opacity: 0; transform: translate3d(0, -14px, 0) scale(.97); }

.login-card h2 { font-size: 20px; font-weight: 600; color: #f2f7f6; letter-spacing: 1px; }
.login-sub2 { margin: 8px 0 24px; font-size: 12.5px; color: rgba(226, 240, 238, .5); letter-spacing: .5px; }
.login-expired {
  margin: -8px 0 18px; padding: 9px 12px; border-radius: 8px;
  background: rgba(224, 69, 69, .14); border: 1px solid rgba(224, 69, 69, .35);
  color: #ff9c9c; font-size: 12.5px; text-align: center;
}

.lfield { display: block; margin-bottom: 16px; }
.lfield span {
  display: block; font-size: 12px; color: rgba(226, 240, 238, .65);
  margin-bottom: 6px; letter-spacing: .5px;
}
.lfield input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  color: #f2f7f6; font-size: 14.5px; outline: none;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.lfield input::placeholder { color: rgba(226, 240, 238, .3); }
.lfield input:focus {
  border-color: #2cc2b0; background: rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 3px rgba(44, 194, 176, .18);
}
.login-err {
  min-height: 18px; font-size: 12.5px; color: #ff9c9c; margin: -4px 0 8px;
  opacity: 0; transition: opacity .2s;
}
.login-err.show { opacity: 1; }

.login-btn {
  position: relative; width: 100%; height: 46px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #16a394, #0e7263);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 2px;
  cursor: pointer; overflow: hidden;
  box-shadow: 0 14px 30px -10px rgba(22, 163, 148, .55);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.login-btn::after {                    /* 悬停扫光 */
  content: ''; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.28), transparent);
  transform: skewX(-18deg); transition: left .45s ease;
}
.login-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 18px 36px -10px rgba(22,163,148,.65); }
.login-btn:hover:not(:disabled)::after { left: 125%; }
.login-btn:active:not(:disabled) { transform: translateY(0); filter: brightness(.95); }
.login-btn:disabled { opacity: .75; cursor: default; }
.login-btn.done { background: linear-gradient(135deg, #22b98a, #0f9d63); }
.login-spin {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.card-foot {
  margin-top: 20px; text-align: center; font-size: 11px;
  color: rgba(226, 240, 238, .38); letter-spacing: .5px;
}

/* 窄屏降级：分栏改纵向堆叠 */
@media (max-width: 900px) {
  .login-wrap { flex-direction: column; gap: 36px; padding: 30px 20px; }
  .brand { max-width: 100%; }
  .brand .foot { display: none; }
  .brand h1 { font-size: 24px; }
  .login-card { width: 100%; max-width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand .fade-item, .login-card, .brand-logo, .login-spin { animation: none !important; opacity: 1; }
  .login-card.shake { animation: none !important; }
  .login-mask { animation: none !important; }
}

/* =========================================================
   用户管理（管理员）
   ========================================================= */
.users-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.ucard {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(23,43,77,.04); padding: 16px 18px;
}
.ucard h3 { margin: 0 0 12px; font-size: 15px; color: #1c2233; }
.utbar { display: flex; align-items: center; margin-bottom: 8px; }
.utbar h3 { margin: 0; }
.utbar .mini-btn { margin-left: auto; }
.mini-btn.uprimary {
  background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600;
}
.mini-btn.uprimary:hover { filter: brightness(1.06); }
.mini-btn.udanger { color: #e04545; border-color: #f2c6c6; }
.mini-btn.udanger:hover { background: #fdf2f2; border-color: #e04545; }
.mini-btn:disabled { opacity: .45; cursor: default; }

.urow { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.ufield { display: block; }
.ufield > span {
  display: block; font-size: 12px; color: #8b94a8; margin-bottom: 5px;
}
.ufield input, .ufield select {
  height: 34px; padding: 0 10px; border-radius: 7px; font-size: 13.5px;
  border: 1px solid #dbe2ee; outline: none; background: #fff; color: #2c3345;
  min-width: 170px; transition: border-color .15s, box-shadow .15s;
}
.ufield input:focus, .ufield select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(18, 121, 106, .1);
}
.uchips { display: flex; gap: 8px; flex-wrap: wrap; }
.uchip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid #dbe2ee; font-size: 12.5px; color: #5a6274;
  cursor: pointer; user-select: none; transition: all .15s;
}
.uchip input { display: none; }
.uchip:hover { border-color: #b9c8e8; }
.uchip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.uops { display: flex; gap: 8px; margin-top: 6px; }

.umtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.umtable th {
  text-align: left; font-size: 12px; font-weight: 600; color: #8b94a8;
  padding: 8px 10px; border-bottom: 1px solid #eef1f5; white-space: nowrap;
}
.umtable td { padding: 10px; border-bottom: 1px solid #f4f6fa; color: #2c3345; vertical-align: middle; }
.umtable tr:hover td { background: #fafcff; }
.umtable .u-un { font-weight: 600; }
.umtable .u-grp { color: #5a6274; font-size: 12.5px; }
.umtable .u-ct { color: #a3abbd; font-size: 12px; white-space: nowrap; }
.umtable .u-ops { white-space: nowrap; }
.umtable .u-ops .mini-btn { margin-right: 6px; }
.u-edit-row td { background: #f7fafd; }
.u-edit-row .urow { margin-bottom: 8px; }
.u-empty { text-align: center; color: #a3abbd; padding: 26px 0 !important; }
