:root {
  --brand: #0f766e;
  --brand-dark: #0b5c56;
  --brand-soft: #ccfbf1;
  --accent: #f59e0b;
  --bg: #f1f5f9;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #dc2626;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 { margin: 0; }

/* ---------- 登录 ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(1000px 500px at 20% 0%, #134e4a 0%, #0f172a 55%, #020617 100%);
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}
.login-card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card .logo span { font-size: 28px; }
.login-card h1 { font-size: 22px; }
.login-card p.sub { color: var(--muted); margin: 6px 0 22px; font-size: 13px; }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--muted); line-height: 1.8; background: #f8fafc; border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; }
.public-page { min-height: 100vh; background: #f1f5f9; }
.public-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 22px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.public-brand { display: flex; align-items: center; gap: 10px; }
.public-logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg,#0f766e,#14b8a6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.public-brand b { display: block; font-size: 15px; }
.public-brand small { color: var(--muted); font-size: 11px; }
.public-top .spacer { flex: 1; }
.public-hero { max-width: 1240px; margin: 0 auto; padding: 32px 22px 4px; }
.public-hero h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: 1px; }
.public-hero p { color: var(--muted); font-size: 13px; margin: 0; }
.public-toolbar { max-width: 1240px; margin: 18px auto 0; padding: 0 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.public-toolbar .input { width: 280px; max-width: 100%; }
.public-grid { max-width: 1240px; margin: 16px auto 0; padding: 0 22px; display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; }
.public-loading { grid-column: 1/-1; padding: 48px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.public-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.public-card:hover { transform: translateY(-2px); border-color: #99f6e4; box-shadow: 0 12px 26px -18px rgba(15,23,42,.35); }
.public-thumb { aspect-ratio: 1/1; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.public-thumb img { width: 100%; height: 100%; object-fit: contain; }
.public-ph { font-size: 40px; opacity: .25; }
.public-card-body { padding: 12px 14px 14px; }
.public-model { font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 14.5px; }
.public-name { color: #475569; font-size: 12.5px; margin-top: 4px; min-height: 17px; }
.public-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.public-chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #f0fdfa; border: 1px solid #ccfbf1; color: #0f766e; }
.public-chip-muted { background: #f8fafc; border-color: var(--line); color: var(--muted); }
.public-more { max-width: 1240px; margin: 18px auto 0; padding: 0 22px; text-align: center; }
.public-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0 34px; }
.public-detail-top { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.public-detail-img { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.public-detail-img img { width: 100%; height: 100%; object-fit: contain; }
.public-detail-ph { font-size: 56px; opacity: .25; }
.public-detail-info { flex: 1; min-width: 220px; }
.public-detail-model { font-family: ui-monospace, Consolas, monospace; font-weight: 800; font-size: 20px; }
.public-detail-name { color: #334155; font-size: 14px; margin-top: 4px; }
.public-detail-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.public-variant-title { margin: 18px 0 8px; font-weight: 700; font-size: 13px; color: #334155; }
.public-variant-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: 10px; }
.public-variant { border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; background: #fff; }
.public-variant img { width: 100%; aspect-ratio: 1/1; object-fit: contain; border-radius: 6px; background: #f8fafc; }
.public-variant-ph { width: 100%; aspect-ratio: 1/1; border-radius: 6px; background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 28px; opacity: .25; }
.public-variant span { display: block; margin-top: 6px; font-size: 12px; color: #334155; }
@media (max-width: 640px) {
  .public-hero { padding-top: 22px; }
  .public-hero h1 { font-size: 22px; }
  .public-toolbar .input { width: 100%; }
  .public-grid { grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 10px; padding: 0 14px; }
  .public-top { padding: 9px 14px; }
  .public-brand small { display: none; }
  .public-detail-img { width: 100%; height: 200px; }
}
.public-main { max-width: 1240px; margin: 0 auto; padding: 0 22px 10px; }
.public-grid { max-width: none; margin: 16px 0 0; padding: 0; }
.public-toolbar { max-width: none; margin: 12px 0 0; padding: 0; }
.public-toolbar .input { width: 300px; max-width: 100%; }
.public-lang { border: 1px solid var(--line); background: #fff; color: #0f766e; border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.public-lang:hover { border-color: #99f6e4; background: #f0fdfa; }
.public-carousel { position: relative; width: 100%; height: 46vh; min-height: 220px; overflow: hidden; background: #0f172a; transition: height .35s ease; }
.public-slides { position: absolute; inset: 0; }
.public-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.public-slide.active { opacity: 1; pointer-events: auto; }
.public-slide > a, .public-slide-link { display: block; width: 100%; height: 100%; position: relative; }
.public-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.public-slide-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 6vw 38px; background: linear-gradient(transparent, rgba(2,6,23,.68)); color: #fff; }
.public-slide-cap span { font-size: clamp(20px, 3vw, 38px); font-weight: 800; letter-spacing: 1px; }
.public-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(15,23,42,.35); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; z-index: 2; }
.public-nav.prev { left: 16px; }
.public-nav.next { right: 16px; }
.public-nav:hover { background: rgba(15,23,42,.62); }
.public-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.public-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; }
.public-dots button.active { background: #fff; width: 22px; border-radius: 999px; }
.public-products-head { display: flex; align-items: flex-end; gap: 12px; margin: 28px 0 12px; }
.public-products-head h2 { margin: 0; font-size: 22px; letter-spacing: 1px; }
.public-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.public-cat-chip { border: 1px solid var(--line); background: #fff; color: #334155; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.public-cat-chip span { font-size: 11px; color: var(--muted); }
.public-cat-chip:hover { border-color: #99f6e4; }
.public-cat-chip.active { border-color: #0f766e; background: #f0fdfa; color: #0f766e; }
.public-cat { font-size: 11px; color: #0f766e; background: #f0fdfa; border-radius: 999px; padding: 2px 8px; display: inline-block; margin-top: 6px; }
.public-kv-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 8px 12px; }
.public-kv { display: flex; gap: 8px; padding: 7px 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.public-kv span { color: var(--muted); white-space: nowrap; }
.public-kv b { color: #0f172a; font-weight: 600; word-break: break-all; }
@media (max-width: 640px) {
  .public-carousel { height: 46vh; min-height: 220px; }
  .public-main { padding: 0 14px 10px; }
  .public-grid { padding: 0; }
  .public-products-head h2 { font-size: 20px; }
  .public-slide-cap { padding: 40px 5vw 26px; }
}

/* ---------- 布局 ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: #0f172a;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; color: #fff; }
.sidebar .brand .mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #14b8a6, #0d9488); display: grid; place-items: center; font-size: 18px; }
.sidebar .brand b { display: block; font-size: 15px; letter-spacing: .5px; }
.sidebar .brand small { color: #94a3b8; font-size: 11px; }
.nav { padding: 6px 10px 24px; }
.nav .group-title { font-size: 11px; letter-spacing: 1px; color: #64748b; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px; color: #cbd5e1; font-size: 13.5px; margin-bottom: 2px; }
.nav a:hover { background: #1e293b; color: #fff; }
.nav a.active { background: var(--brand); color: #fff; }
.nav a .ico { width: 18px; text-align: center; opacity: .9; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .crumb { font-weight: 600; font-size: 15px; }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }
.topbar .who b { color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; }
.view { padding: 20px; max-width: 1500px; width: 100%; margin: 0 auto; }

/* ---------- 通用组件 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 15px; }
.card-h .spacer { flex: 1; }
.card-b { padding: 16px 18px; }
.card-b.flush { padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--text); cursor: pointer; font-size: 13.5px; white-space: nowrap;
  transition: .15s;
}
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-finish { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-finish:hover { background: #b91c1c; border-color: #b91c1c; }
.btn-confirm { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.btn-confirm:hover { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 5px 9px; font-size: 12.5px; border-radius: 6px; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--brand); padding: 5px 8px; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.input, select.input, textarea.input {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
  outline: none; min-width: 0;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
.input-sm { padding: 6px 9px; font-size: 13px; }
label.check { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; cursor: pointer; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.table th { background: #f8fafc; color: #475569; font-weight: 600; font-size: 12.5px; }
.table tbody tr:hover { background: #f8fafc; }
.table td.wrap { white-space: normal; min-width: 160px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { display: flex; gap: 4px; flex-wrap: wrap; }
.wage-row { cursor: pointer; }
.wage-row:hover td { background: #f0fdfa; }
.wage-row.selected td { background: #ecfdf5; }
.wage-summary-line { color: #0f766e; font-size: 12px; font-weight: 600; }
.wage-row .wage-name-btn { color: #0f172a; text-decoration: none; }
.wage-row .wage-name-btn:hover { color: #0f766e; }
.sd-task-table th, .sd-task-table td { white-space: nowrap; }
.sd-task-table td.wrap { white-space: normal; word-break: break-word; min-width: 140px; }
.sd-emp-row td { background: #f1f5f9; padding: 8px 6px; }
.sd-emp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-emp-head span { color: #475569; font-size: 12px; }
.sd-emp-head .btn { margin-left: auto; }
.sd-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.sd-filter .input { width: auto; }
.sd-filter #sd-month { min-width: 148px; }
.sd-filter #sd-day { min-width: 128px; }
.sd-filter .spacer { flex: 1; }
@media (max-width: 640px) {
  .sd-filter .spacer { display: none; }
  .sd-filter #sd-print-scope { width: 100%; }
}
.empty { padding: 44px 16px; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 16px; color: var(--muted); font-size: 13px; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.danger { background: #fee2e2; color: #b91c1c; }
.badge.info { background: #dbeafe; color: #1d4ed8; }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge.purple { background: #ede9fe; color: #6d28d9; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .k { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat.accent { background: linear-gradient(135deg, #0f766e, #0d9488); border: 0; color: #fff; }
.stat.accent .k { color: #ccfbf1; }

.progress { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; min-width: 90px; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card + .card, .grid-3 > .card + .card { margin-top: 0; }
.grid-2 > .card, .grid-3 > .card { min-width: 0; }
.so-qc-fin { align-items: stretch; }
.so-qc-fin > .card { display: flex; flex-direction: column; }
.so-qc-fin > .card > .card-b { flex: 1 1 auto; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal {
  background: #fff; border-radius: 14px; width: min(760px, 100%); max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5);
}
.modal.wide { width: min(1080px, 100%); }
.modal.xwide { width: min(1600px, 100%); }
.as-rows { display: grid; gap: 10px; }
.as-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.as-row-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-weight: 600; color: #334155; font-size: 12.5px; }
.as-fields { display: grid; grid-template-columns: 1.15fr .6fr .95fr 1.3fr auto; gap: 8px; align-items: end; }
.as-fields .field { min-width: 0; margin: 0; }
.as-fields .field label { font-size: 11.5px; margin-bottom: 3px; white-space: nowrap; }
.as-fields .input { width: 100%; min-width: 0; padding-left: 7px; padding-right: 7px; }
.as-fields .combo-row .input { min-width: 0; }
.as-fields .combo-row .btn { flex: 0 0 26px; padding: 0 4px; }
.as-fields .as-del .btn { width: 100%; padding: 0 6px; }
.as-materials { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 9px; }
.as-mat-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.as-mat-head > div { flex: 1; min-width: 0; }
.as-mat-head .muted { display: block; font-size: 11.5px; margin-top: 1px; }
.as-mat-list { display: grid; gap: 6px; margin-top: 7px; }
.as-mat-row { display: grid; grid-template-columns: .72fr 1fr 1.3fr 1fr .42fr .5fr auto; gap: 7px; align-items: end; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.as-mat-row .field { min-width: 0; margin: 0; }
.as-mat-row .field label { font-size: 11px; margin-bottom: 2px; }
.as-mat-row .input { width: 100%; min-width: 0; }
.as-mat-row select.input { height: 31px; padding-top: 0; padding-bottom: 0; }
.as-mat-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.as-mat-input-wrap .input { flex: 1; min-width: 0; padding-right: 84px; }
.as-mat-meta { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); max-width: 62%; padding-left: 6px; background: #fff; font-size: 10.5px; line-height: 16px; color: #0f766e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.as-mat-meta:empty { display: none; }
.as-mat-row .input:disabled, .as-mat-row .btn:disabled { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; opacity: 1; }
.as-mat-row .as-mat-del .btn { width: 100%; }
.assign-context { display: flex; align-items: center; gap: 24px; flex-wrap: nowrap; overflow-x: auto; padding: 10px 14px; margin-bottom: 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.assign-context-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; white-space: nowrap; }
.assign-context-item span { color: var(--muted); font-size: 12px; }
.assign-context-item b { font-weight: 600; color: var(--text); max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.as-combo { min-width: 0; }
.as-combo .combo-list { left: 0; right: 0; min-width: 0; width: auto; z-index: 30; }
.as-var-picker { min-width: 0; }
.as-var-chips { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 2px; }
.as-var-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 0 4px; border-radius: 999px; background: #ecfdf5; color: #0f766e; border: 1px solid #a7f3d0; font-size: 11px; line-height: 16px; word-break: break-all; }
.as-var-chip button { border: 0; background: transparent; color: inherit; padding: 0; cursor: pointer; font-size: 12px; line-height: 1; }
.as-var-picker .combo { min-width: 0; }
@media (max-width: 900px) {
  .as-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-fields .as-del { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .as-mat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .as-mat-row .as-mat-del { grid-column: 1 / -1; }
}
.modal.slim { width: min(460px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 16px; }
.modal-h .spacer { flex: 1; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.x { border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
/* 销售订单表单：客户/付款方式/下单日期/交货日期一行；联系人/电话一行 */
.so-form-row-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.so-form-row-5 { display: grid; grid-template-columns: 1.1fr 1.5fr 1.2fr 1fr 1fr; gap: 14px 16px; }
.so-form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.so-form-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.so-form-row-mark { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px 16px; }
.so-addr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.so-addr-actions { margin-top: 8px; }
.so-mark-drop { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; background: #fff; transition: border-color .15s, background .15s; }
.so-mark-drop.dragover { border-color: var(--brand); background: #f0fdfa; }
.so-mark-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.so-mark-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.so-mark-item { position: relative; width: 92px; height: 92px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f8fafc; }
.so-mark-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.so-mark-item.file { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; text-align: center; }
.so-mark-file-ext { font-size: 14px; font-weight: 700; color: #0f766e; }
.so-mark-file-name { font-size: 11px; color: #475569; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.so-mark-file-link { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; text-decoration: none; }
.so-mark-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(15,23,42,.72); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; padding: 0; }
.so-mark-del:hover { background: #b91c1c; }
.so-color-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.so-color-title .spacer { flex: 1 1 auto; }
.so-color-cards { display: flex; flex-wrap: wrap; gap: 10px; }
.so-color-card { width: 250px; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.so-color-card-h { display: flex; align-items: center; gap: 6px; }
.so-color-card-h select { flex: 1 1 auto; min-width: 0; }
.so-color-card-h .row-x { flex: 0 0 auto; }
.so-color-card > .input { margin-top: 6px; }
.so-color-card-qty { display: flex; gap: 6px; margin-top: 6px; }
.so-color-card-qty label { flex: 1 1 0; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: #64748b; }
.so-color-card-qty input { width: 100%; }
@media (max-width: 1100px) { .so-form-row-4, .so-form-row-5, .so-form-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .so-form-row-mark { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .so-form-row-4, .so-form-row-5, .so-form-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .so-form-row-mark, .so-addr { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12.5px; color: #475569; margin-bottom: 5px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.field .input { width: 100%; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.field .hint.hint-warn { color: #b45309; }
.combo { position: relative; }
.combo-row { display: flex; gap: 8px; align-items: center; }
.combo-row .input { flex: 1; min-width: 0; }
.combo-list {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 34px -12px rgba(15, 23, 42, .35);
  max-height: 280px; overflow-y: auto; padding: 4px;
}
.combo-list.show { display: block; }
.combo-item { padding: 8px 10px; border-radius: 7px; cursor: pointer; line-height: 1.45; }
.combo-item:hover, .combo-item.active { background: #f0fdfa; }
.combo-item .ci-main { font-size: 13.5px; }
.ci-order-main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ci-order-cust { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-order-date { flex: none; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.combo-item .ci-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.combo-item.combo-add { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 10px; color: var(--brand); }
.combo-empty { padding: 12px 10px; font-size: 12.5px; color: var(--muted); }
.chip-brand { background: #ccfbf1; color: #0f766e; }
.chip-warn { background: #fef3c7; color: #b45309; }
.chip-danger { background: #fee2e2; color: #b91c1c; }
.chip-power { background: #e0f2fe; color: #0369a1; font-weight: 600; }
.addr-default { margin-left: 8px; padding: 2px 8px; font-size: 11.5px; vertical-align: middle; }
.error-box { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; white-space: pre-wrap; }
.notice { background: #f0fdfa; border: 1px solid #99f6e4; color: #0f766e; border-radius: 8px; padding: 10px 12px; font-size: 13px; }

/* ---------- 扫码 ---------- */
.scan-box { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.scan-input { display: flex; gap: 8px; }
.scan-input .input { flex: 1; font-size: 17px; padding: 12px 14px; letter-spacing: 1px; }
video { width: 100%; border-radius: 10px; background: #0f172a; aspect-ratio: 4/3; object-fit: cover; }
.task-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.task-card + .task-card { margin-top: 10px; }
.task-card.done { border-color: #bbf7d0; background: #f0fdf4; }
.task-card .t-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-card .t-head b { font-size: 15px; }
.qty-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.qty-row .field input { text-align: center; font-size: 16px; }
.big-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 提示 ---------- */
#toasts { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; width: min(92vw, 620px); pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px; line-height: 1.5; text-align: center; box-shadow: var(--shadow); max-width: 100%; pointer-events: auto; animation: down .2s ease-out; }
.toast.ok { background: #166534; }
.toast.err { background: #b91c1c; }
@keyframes down { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes up { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

.loading { display: grid; place-items: center; min-height: 180px; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid #e2e8f0; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font-size: 13.5px; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 9px; border-radius: 999px; background: #f1f5f9; font-size: 12px; color: #475569; }
.chip-source { font-weight: 600; }

.list-lines { display: flex; flex-direction: column; }
.line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line:last-child { border-bottom: 0; }
.line .grow { flex: 1; min-width: 0; }
.line .t1 { font-size: 13.5px; }
.line .t2 { font-size: 12px; color: var(--muted); margin-top: 2px; }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.perm-group { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.perm-group h4 { font-size: 13px; margin-bottom: 8px; }
.perm-group label { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; color: #475569; padding: 3px 0; cursor: pointer; }

.login-row { display: flex; gap: 8px; }
.login-row .input { flex: 1; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.hidden { display: none !important; }

/* ---------- 销售订单：装箱明细卡片 ---------- */
.so-items { display: grid; gap: 12px; }
.so-item { border: 1px solid var(--line); border-radius: 12px; background: #fbfdfe; padding: 12px 14px; }
.so-item-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.so-item-title { font-size: 13.5px; font-weight: 700; color: #0f766e; }
.so-item-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.so-item-grid > .full { grid-column: 1 / -1; }
.so-item-qty-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px 10px; }
.so-item-pack-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px 12px; align-items: start; }
.so-pk-drop { padding: 8px; }
@media (max-width: 1300px) { .so-item-qty-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .so-item-qty-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .so-item-pack-row { grid-template-columns: 1fr; } }
.so-field { display: block; min-width: 0; }
.so-field.full { grid-column: 1 / -1; }
.so-field > span { display: block; font-size: 11.5px; color: #475569; margin-bottom: 4px; }
.so-field .input { width: 100%; }
.so-field .input[readonly] { background: #f1f5f9; color: #0f766e; font-weight: 600; }
.so-prod-line { display: flex; gap: 12px; align-items: flex-end; }
.so-prod-line .so-source-field { flex: 0 0 116px; }
.so-prod-line .so-cat-field { flex: 0 0 190px; }
.so-prod-line .so-power-field { flex: 0 0 190px; }
.so-prod-line .so-prod-field { flex: 1 1 auto; min-width: 0; }
@media (max-width: 880px) {
  .so-prod-line { flex-wrap: wrap; align-items: flex-end; }
  .so-prod-line .so-source-field { flex: 1 1 34%; }
  .so-prod-line .so-cat-field { flex: 1 1 60%; }
  .so-prod-line .so-power-field { flex: 1 1 100%; }
  .so-prod-line .so-prod-field { flex: 1 1 100%; }
}
.so-item-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.so-pack-info { font-size: 12.5px; color: #0f766e; background: #ccfbf1; border-radius: 8px; padding: 6px 10px; line-height: 1.5; }
.so-pack-info.warn { color: #b45309; background: #fef3c7; }
.so-pack-info:empty { display: none; }

/* ---------- 销售订单详情：装箱信息 ---------- */
.so-detail-list { display: grid; gap: 12px; }
.so-detail-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.so-di-h { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.so-di-h b { font-size: 14px; }
.so-di-amount { font-size: 16px; font-weight: 700; color: #0f766e; white-space: nowrap; }
.so-di-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; margin-top: 10px; }
.so-di-grid > div { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 6px 9px; min-width: 0; }
.so-di-grid span { display: block; font-size: 11px; color: var(--muted); }
.so-di-grid b { font-size: 13.5px; word-break: break-all; }
.so-di-notes { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #475569; }
.so-di-foot { margin-top: 10px; display: flex; justify-content: flex-end; }
.so-detail-info { display: flex; flex-direction: column; gap: 10px; }
.so-info-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 14px; }
.so-info-item { min-width: 0; }
.so-info-item span { display: block; font-size: 11.5px; color: #64748b; margin-bottom: 3px; }
.so-info-item b { display: block; font-size: 13.5px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-info-item.wrap b { white-space: normal; word-break: break-all; }
.so-info-creator { text-align: right; font-size: 12px; color: #64748b; }
.so-di-model { text-align: center; font-size: 20px; margin-bottom: 10px; }
.so-di-model .mono { font-size: 20px; }
.so-di-model-label { font-size: 20px; color: #475569; margin-right: 10px; font-weight: 700; }
.so-di-item-total { margin-top: 12px; text-align: right; font-size: 15px; color: #b91c1c; }
.so-di-item-total b, .so-order-total b { color: #b91c1c; }
.so-amount-upper { margin-left: 10px; font-weight: 600; color: #b91c1c; }
.so-order-total { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); text-align: right; font-size: 17px; color: #b91c1c; }
.so-pack-files { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.so-pack-boxes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.so-pack-box { flex: 1 1 320px; min-width: 260px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; padding: 10px 14px 12px; }
.so-pack-box-title { font-size: 15px; font-weight: 700; color: #0f766e; padding-bottom: 7px; margin-bottom: 9px; border-bottom: 1px dashed var(--line); }
.so-pack-box-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 16px; line-height: 1.65; color: #0f172a; }
.so-pack-box-body .so-pack-files { gap: 8px; }
.so-variant-box { flex-basis: 100%; margin-top: 12px; }
.so-variant-body { gap: 10px 12px; }
.so-variant-body .color-note { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 15px; }
.so-variant-body .mini-thumb { width: 40px; height: 40px; }
.so-pack-file { width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.so-pack-file img { width: 100%; height: 100%; object-fit: cover; }
.so-pack-file-ext { font-size: 14px; font-weight: 700; color: #0f766e; }
.so-di-row { display: grid; gap: 8px 10px; margin-top: 10px; }
.so-di-row-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.so-di-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px; }
.so-di-row > div { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 8px; padding: 6px 9px; min-width: 0; }
.so-di-row span { display: block; font-size: 11px; color: var(--muted); }
.so-di-row b { font-size: 13.5px; word-break: break-all; }
.so-di-notes.notes-lg { font-size: 16px; align-items: center; line-height: 1.6; }
.so-di-notes.notes-lg span { font-size: 16px; }
.so-pack-files { margin-left: 6px; vertical-align: middle; }
.so-pack-file { vertical-align: middle; }
.color-notes-lg .color-note { font-size: 15px; }
.color-notes-lg .mini-thumb { width: 40px; height: 40px; }
.so-attach-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.so-attach-sections { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }.so-attach-section { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.so-attach-section-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; color: #334155; margin-bottom: 9px; }
.so-attach-section-h small { font-size: 12px; font-weight: 400; color: var(--muted); }
.so-attach-section .so-attach-grid { gap: 8px; }
.so-attach-section .so-attach-card { width: 92px; }
.so-attach-section .so-attach-thumb { width: 84px; height: 84px; }
.so-attach-sub-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0 8px; padding-top: 10px; border-top: 1px dashed #cbd5e1; font-size: 12px; font-weight: 700; color: #0f766e; }
.so-attach-sub-h small { font-size: 12px; font-weight: 400; color: var(--muted); }
.so-bulk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.so-bulk-grid a { display: block; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f8fafc; }
.so-bulk-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-bulk-drop { border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 26px 18px; text-align: center; background: #f8fafc; cursor: pointer; }
.so-bulk-drop.over { border-color: #94a3b8; background: #f1f5f9; }
.so-bulk-drop.busy { opacity: .6; pointer-events: none; }
.so-bulk-drop-h { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 4px; }
.so-bulk-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.so-bulk-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.so-bulk-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f8fafc; }
.so-bulk-item > a { display: block; aspect-ratio: 1 / 1; }
.so-bulk-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.so-bulk-pick { position: absolute; top: 6px; left: 6px; padding: 2px 4px; border-radius: 4px; background: rgba(255,255,255,.9); display: flex; }
.so-bulk-item .btn { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; font-size: 12px; }
@media (max-width: 1100px) { .so-attach-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.so-attach-card { width: 108px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 5px; align-items: center; }
.so-attach-thumb { width: 100px; height: 100px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.so-attach-img { width: 100%; height: 100%; object-fit: cover; }
.so-attach-ext { font-size: 20px; font-weight: 700; color: #0f766e; }
.so-attach-tag { font-size: 12px; color: #475569; }
.so-attach-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.so-attach-batch { max-width: 100px; font-size: 10.5px; line-height: 1.3; color: #64748b; text-align: center; word-break: break-all; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-item { display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 112px; }
.photo-item > a { display: block; }
.photo-strip img { width: 100px; height: 100px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.photo-batch { max-width: 108px; font-size: 10.5px; line-height: 1.3; color: #64748b; text-align: center; word-break: break-all; }
.so-attach-tools { display: inline-flex; align-items: center; gap: 6px; }
.so-attach-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: #dc2626; color: #fff; font-size: 14px; line-height: 18px; padding: 0; cursor: pointer; z-index: 2; }
.so-attach-del:hover { background: #b91c1c; }
.timeline.tl-horizontal { display: flex; gap: 0; padding: 8px 0 4px; overflow-x: auto; }
.timeline.tl-horizontal::before { display: none; }
.timeline.tl-horizontal .tl-item { flex: 1 1 0; min-width: 120px; padding: 0 10px; text-align: center; position: relative; }
.timeline.tl-horizontal .tl-item::before { content: ''; position: absolute; top: 6px; left: 0; right: 50%; height: 2px; background: #e2e8f0; }
.timeline.tl-horizontal .tl-item:first-child::before { display: none; }
.timeline.tl-horizontal .tl-item.done::before { background: #0f766e; }
.timeline.tl-horizontal .tl-dot { position: static; display: inline-block; margin-bottom: 8px; }
.timeline.tl-horizontal .tl-body { text-align: center; }
.timeline.tl-horizontal .tl-sub { font-size: 11.5px; }
@media (max-width: 1200px) { .so-di-row-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .so-info-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .so-di-row-4, .so-di-row-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 送货信息 / 导航二维码 ---------- */
.delivery-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.delivery-qr { min-width: 0; }
.nav-qr { text-align: center; border: 1px dashed var(--line); border-radius: 12px; padding: 12px; background: #f8fafc; }
.nav-qr-img { width: 190px; height: 190px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.nav-qr-cap { font-size: 12.5px; color: #334155; margin-top: 7px; font-weight: 600; }
.nav-qr-url { font-size: 10.5px; color: var(--muted); word-break: break-all; margin-top: 5px; line-height: 1.5; }
.qr-off { width: 190px; height: 190px; margin: 0 auto; display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; font-size: 13px; }

/* ---------- 打印单据设置 ---------- */
.logo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logo-row .input { flex: 1; min-width: 160px; }
.logo-preview { width: 46px; height: 46px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; flex: none; }
.ps-preview { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #0f172a; padding-bottom: 10px; flex-wrap: wrap; }
.ps-preview-brand b { display: block; font-size: 17px; }
.ps-preview-brand small { color: var(--muted); font-size: 11px; }
.ps-preview-meta { margin-left: auto; text-align: right; font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.landing-posters { display: flex; flex-direction: column; gap: 12px; }
.landing-poster { display: flex; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; align-items: flex-start; }
.landing-poster-img { width: 240px; height: 135px; flex: 0 0 240px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f1f5f9; display: flex; align-items: center; justify-content: center; }
.landing-poster-img img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.landing-poster-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.landing-poster-fields .form-grid { gap: 8px; }
.landing-poster-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
@media (max-width: 760px) {
  .landing-poster { flex-direction: column; }
  .landing-poster-img { width: 100%; flex: none; height: 170px; }
}
.ps-preview-foot { text-align: center; border-top: 1px dashed var(--line); padding-top: 8px; font-size: 12px; color: var(--muted); }
/* 员工名册：身份证照片上传与多选岗位 */
.employee-table td { vertical-align: middle; }
.employee-table tbody tr[data-eprow] { cursor: pointer; }
.ep-hist-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ep-hist-table-wrap { overflow-x: visible; }
.ep-hist-table { table-layout: fixed; width: 100%; font-size: 12.5px; }
.ep-hist-table th, .ep-hist-table td { padding: 8px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-hist-table .num { text-align: right; }
.emp-id-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.emp-id-card { position: relative; width: 120px; height: 78px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f8fafc; cursor: grab; }
.emp-id-card img { width: 100%; height: 100%; object-fit: cover; }
.emp-id-del { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border: none; border-radius: 50%; background: rgba(15, 23, 42, .72); color: #fff; cursor: pointer; line-height: 22px; padding: 0; }
.emp-id-trash { margin-top: 8px; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.emp-id-trash.over { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.emp-inline-field { padding-top: 2px; }
.emp-inline { display: flex; gap: 14px; align-items: flex-end; }
.emp-inline-main { flex: 1; min-width: 0; }
.emp-inline-main > label, .emp-inline-side > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.emp-inline-side { width: 150px; flex: none; }
.emp-permit-switch { width: 100%; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; font-size: 13px; min-height: 46px; }
.emp-permit-switch .switch-track { width: 50px; height: 28px; }
.emp-permit-switch .switch-track::after { width: 22px; height: 22px; top: 3px; left: 3px; }
.emp-permit-switch input:checked + .switch-track::after { transform: translateX(22px); }
.emp-permit-switch .switch-label { font-size: 13px; font-weight: 600; color: #475569; }
.emp-permit-switch input:checked ~ .switch-label { color: #0f766e; }
.emp-addr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.emp-pos-combo { width: 100%; max-width: 100%; flex: 1 1 auto; }
.combo.cat-multi-combo.emp-pos-combo { width: 100%; max-width: 100%; }
.emp-single-combo { width: 100%; }
.emp-single-combo .cat-select-box { cursor: pointer; }
.emp-single-combo .cat-input { cursor: pointer; }
.emp-pos-combo .cat-select-box, .emp-single-combo .cat-select-box { width: 100%; }
.emp-id-drop { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 22px 16px; text-align: center; cursor: pointer; background: #f8fafc; transition: all .15s ease; }
.emp-id-drop:hover, .emp-id-drop.over { border-color: #0f766e; background: #f0fdfa; }
.emp-id-drop-title { font-size: 14px; font-weight: 700; color: var(--text); }
.emp-id-drop-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.emp-pos-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.emp-pos-chip { display: inline-block; padding: 1px 6px; border-radius: 999px; background: #f0fdfa; color: #0f766e; font-size: 11.5px; white-space: nowrap; }
.emp-process-cell { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.emp-process-cell > .emp-pos-chips { flex: 1 1 auto; max-width: none; }
.emp-process-cell > .muted { flex: 1 1 auto; }
.emp-process-edit { flex: 0 0 auto; border-color: #99f6e4; color: #0f766e; background: #f0fdfa; }
.emp-process-edit:hover { background: #ccfbf1; }
.emp-process-add { width: 150px; flex: 0 0 auto; }
.emp-pos-chip .chip-x { font-weight: 700; }
.emp-position-combo .combo-row .btn { align-self: stretch; padding: 0 12px; }
.emp-position-combo .combo-list { max-height: 220px; }
.pd-grid { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 12px; }
.pd-grid > .field { grid-column: span 4; }
.pd-grid > .pd-f-wh { grid-column: span 4; }
.pd-grid > .pd-f-cat, .pd-grid > .pd-f-usage { grid-column: span 3; }
.pd-grid > .pd-f-unit { grid-column: span 2; }
.pd-grid > .pd-f-mat, .pd-grid > .pd-f-var { grid-column: span 4; }
.pd-mat-block { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; padding: 12px; }
.pd-mat-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pd-mat-head > div { flex: 1; min-width: 0; }
.pd-mat-head b { font-size: 13.5px; }
.pd-mat-head .muted { display: block; font-size: 12px; margin-top: 2px; }
.pd-mat-rows { display: grid; gap: 6px; margin-top: 10px; }
.pd-mat-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.pd-mat-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.pd-mat-main b { font-size: 13px; }
.pd-mat-main .muted { font-size: 11.5px; }
#pd-mat-hint { margin-top: 8px; font-size: 12px; }
.pd-done-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-done-tools .input { width: 150px; }
.pd-task-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pd-task-tools .spacer { flex: 1 1 auto; }
.pd-task-all { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.pw-variant-finish-bar { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); }
.pw-handover-chips { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: 10px; }
.pw-unsaved-save-bar { display: flex; justify-content: flex-end; padding: 8px 16px; border-top: 1px solid var(--line); background: #fff; }
.pw-unsaved-save-bar .btn { min-width: 88px; }
.pw-print-bar { display: flex; justify-content: flex-end; padding: 10px 16px; border-top: 1px solid var(--line); }
.pw-proc-name { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; line-height: 1.35; }
.pw-proc-seq { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 19px; padding: 0 6px; border-radius: 10px; background: #e2e8f0; color: #475569; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pw-unsaved-tag { font-size: 11px; color: #d97706; }
.pw-assignees { display: inline-block; max-width: 180px; white-space: normal; word-break: break-word; font-size: 12.5px; color: #334155; }
.pw-proc-table [data-pw-del-process] { margin-left: 0; }
.pw-proc-table th:last-child, .pw-proc-table td:last-child { text-align: center; }
.pw-proc-table td { vertical-align: middle; }
.pw-proc-actions { text-align: center; }
.pw-proc-actions .actions { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pw-proc-actions .btn { display: inline-flex; align-items: center; justify-content: center; }
.pw-proc-actions .muted { display: inline-block; }
.pw-proc-link { cursor: pointer; color: #0f766e; }
.pw-proc-link:hover { text-decoration: underline; }
.pw-proc-task-table td:last-child, .pw-proc-task-table th:last-child { text-align: center; }
.pw-proc-task-table .pw-task-actions { justify-content: center; }
.pw-task-table-wrap { overflow-x: visible; }
.pw-task-table { table-layout: fixed; width: 100%; font-size: 12px; }
.pw-task-table th, .pw-task-table td { padding: 8px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-task-table th { font-size: 11.5px; }
.pw-task-table .num { text-align: right; }
.pw-task-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.pw-task-table .pw-task-cust { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-all; line-height: 1.35; }
.pw-task-table .pw-prev-cell { display: block; line-height: 1.4; white-space: normal; overflow: visible; text-overflow: clip; }
.pw-task-table .pw-prev-head { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pw-task-table .pw-prev-proc { font-weight: 600; }
.pw-task-table .pw-prev-emp { display: block; margin-top: 1px; font-size: 11px; color: var(--muted); white-space: normal; word-break: break-all; }
.pw-task-table .pw-prev-td { white-space: normal; overflow: visible; text-overflow: clip; }
.pw-task-table .pw-task-proc { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }
.pw-task-table .pw-task-cat, .pw-task-table .pw-task-mat { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-all; line-height: 1.35; }
.pw-task-table .pw-task-mat .pw-mat-group + .pw-mat-group { margin-top: 3px; padding-top: 3px; border-top: 1px dashed #e2e8f0; }
.pw-task-table .pw-task-mat .pw-mat-name { font-weight: 600; color: #0f172a; }
.pw-task-table .pw-task-mat .pw-mat-vars { color: #475569; }
.pw-status-cell { text-align: center; vertical-align: middle; }
.table th.pw-status-cell, .table td.pw-status-cell { text-align: center; }
.pw-status-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.pw-status-box .badge { align-self: center; }
.pw-status-box .pw-cap-note { align-items: center; text-align: center; margin: 0; }
.pw-progress-cell { text-align: center; vertical-align: middle; }
.table th.pw-progress-cell, .table td.pw-progress-cell { text-align: center; }
.pw-progress-cell .progress { width: 100px; max-width: 100%; margin: 0 auto 2px; }
.pw-progress-cell span { display: block; text-align: center; }
.pw-status-cell .pw-cap-note { align-items: center; text-align: center; margin-left: auto; margin-right: auto; }
.pw-cap-note { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 3px; padding: 3px 7px; border-radius: 6px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 11px; line-height: 1.45; white-space: nowrap; }
.pw-cap-note b { color: #b45309; font-weight: 700; }
.pw-prev-proc { font-weight: 700; color: #0f172a; }
.pw-prev-emp { color: #475569; font-size: 11.5px; }
.pw-task-table td { vertical-align: middle; }
.pw-task-table .btn-sm { padding: 4px 7px; }
.pd-date-row { display: flex; gap: 6px; }
.pd-date-row select { flex: 1 1 0; min-width: 0; }
.pd-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.pd-done-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pd-done-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pd-done-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(15, 118, 110, .12); }
.pd-done-name { font-weight: 700; font-size: 15px; }
.pd-done-meta { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.pd-done-link { color: var(--brand); font-size: 12.5px; margin-top: 8px; }
.pd-task-brief { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 4px; }
.pd-task-brief-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11.5px; color: #475569; }
.pd-task-brief-row .l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-task-brief-row .q { flex: 0 0 auto; font-weight: 700; color: #0f766e; }
.pd-task-brief-more { font-size: 11px; color: var(--muted); }
@media (max-width: 1300px) {
  .pd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pd-grid > .field, .pd-grid > .pd-f-wh, .pd-grid > .pd-f-cat, .pd-grid > .pd-f-unit, .pd-grid > .pd-f-mat, .pd-grid > .pd-f-var, .pd-grid > .pd-f-usage { grid-column: span 1; }
}
@media (max-width: 800px) {
  .pd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-grid > .field, .pd-grid > .pd-f-wh, .pd-grid > .pd-f-cat, .pd-grid > .pd-f-unit, .pd-grid > .pd-f-mat, .pd-grid > .pd-f-var, .pd-grid > .pd-f-usage { grid-column: span 1; }
}
.emp-status-select { min-width: 78px; font-weight: 600; }
.emp-status-select.st-1 { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.emp-status-select.st-2 { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.emp-status-select.st-0 { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.employee-table tr.emp-row-left td { background: #fef2f2 !important; }
.employee-table tr.emp-row-left:hover td { background: #fee2e2 !important; }
.employee-table tr.emp-row-leave td { background: #fffbeb !important; }
.employee-table tr.emp-row-leave:hover td { background: #fef3c7 !important; }
.emp-form-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; }
.emp-form-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.emp-form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.emp-form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.emp-form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.proc-form-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1200px) {
  .proc-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.proc-combo { min-width: 0; }
.proc-combo .combo-row .btn { align-self: stretch; padding: 0 12px; }
.proc-combo .combo-list { max-height: 220px; }
.pw-ap-form .input:focus, .pw-ap-form select.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
  outline: none;
}
.pw-ap-select { position: relative; }
.pw-ap-select .input { width: 100%; padding-right: 34px; }
.pw-ap-caret {
  position: absolute; right: 1px; top: 1px; bottom: 1px; width: 32px;
  border: 0; background: transparent; color: #64748b; cursor: pointer;
  font-size: 12px; display: grid; place-items: center; border-radius: 0 7px 7px 0;
}
.pw-ap-caret:hover { background: #eff6ff; color: #2563eb; }
.pw-ap-name-combo.open .input,
.pw-ap-name-combo .input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}
.rp-prod-combo .combo-list { min-width: 320px; }
.rp-chip { border: 1px dashed #cbd5e1; background: #f8fafc; color: #64748b; cursor: pointer; font-family: inherit; }
.rp-chip:hover { border-color: #94a3b8; }
.rp-chip.active { border: 1px solid #99f6e4; background: #ccfbf1; color: #0f766e; }
.rp-chip .chip-x { font-weight: 700; }
.rp-steps-table td { vertical-align: top; }
.rp-proc-combo .combo-list { min-width: 360px; max-height: 260px; z-index: 230; }
.emp-id-upload-field { margin-top: 14px; }
.emp-form-rest { margin-top: 12px; }
@media (max-width: 900px) {
  .emp-form-top { grid-template-columns: minmax(0, 1fr); }
  .emp-form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 响应式 ---------- */
.card-h { flex-wrap: wrap; }
@media (max-width: 860px) {
  .so-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .so-di-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-grid { grid-template-columns: 1fr; }
  .delivery-qr { order: 2; }
}
@media (max-width: 420px) {
  .so-field.full { grid-column: 1 / -1; }
  .so-item { padding: 10px; }
  .so-detail-item { padding: 10px; }
  .nav-qr-img { width: 170px; height: 170px; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; width: 240px; transform: translateX(-100%); transition: .2s; }
  .sidebar.open { transform: none; }
  .menu-toggle { display: inline-flex !important; }
  .view { padding: 14px; }
  .grid-2, .grid-3, .scan-box, .form-grid { grid-template-columns: 1fr; }
  .qty-row { grid-template-columns: 1fr 1fr; }
  .combo-list { max-height: 42vh; }
  .combo-item { padding: 11px 10px; }
}
.menu-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }

@media print {
  .sidebar, .topbar, .toolbar, .no-print { display: none !important; }
  body { background: #fff; }
  .view { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #999; }
}

/* ============================================================
   手机端（/erp/mobile）
   ============================================================ */
.mobile-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.m-header {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .5);
}
.m-header .m-title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.m-header .m-sub { font-size: 11px; color: #99f6e4; }
.m-header .spacer { flex: 1; }
.m-header .m-user { font-size: 12px; color: #ccfbf1; text-align: right; line-height: 1.35; }
.m-header .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; padding: 5px 9px; font-size: 12px; }
.m-body { flex: 1; padding: 12px; padding-bottom: 84px; max-width: 720px; width: 100%; margin: 0 auto; }
.m-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.m-footer button {
  border: 0; background: transparent; padding: 7px 2px; cursor: pointer;
  color: var(--muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.m-footer button .ico { font-size: 19px; line-height: 1; }
.m-footer button.active { color: var(--brand); font-weight: 600; }
.m-footer button.active .ico { transform: translateY(-1px); }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; }
.m-card + .m-card { margin-top: 12px; }
.m-card h3 { font-size: 14.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.m-card h3 .spacer { flex: 1; }
.m-hint { font-size: 12px; color: var(--muted); line-height: 1.7; }
.m-big-input { width: 100%; font-size: 18px; padding: 14px; border: 2px solid var(--line); border-radius: 10px; letter-spacing: 1px; }
.m-big-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(15,118,110,.12); }
.m-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.m-actions .btn { flex: 1; min-width: 110px; padding: 11px 12px; font-size: 14px; }
.m-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.m-stat .k { font-size: 11.5px; color: var(--muted); }
.m-stat .v { font-size: 21px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.m-stat.accent { background: linear-gradient(135deg, #0f766e, #0d9488); border: 0; color: #fff; }
.m-stat.accent .k { color: #ccfbf1; }
.m-task { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; }
.m-task + .m-task { margin-top: 10px; }
.m-task .m-task-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-task .m-task-head .m-head-cust { margin-left: auto; max-width: 48%; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-task .m-task-head b { font-size: 14.5px; }
.m-task .m-lines { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12.5px; color: #475569; }
.m-task .m-lines span b { color: var(--text); }
.m-task .m-task-actions { display: flex; gap: 8px; margin-top: 10px; }
.m-task .m-task-actions .btn { flex: 1; padding: 10px; font-size: 13.5px; }
.m-qty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.m-qty-grid .field input { text-align: center; font-size: 17px; padding: 10px; }
.m-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #e2e8f0; padding: 4px; border-radius: 10px; margin-bottom: 12px; }
.m-tabs button { border: 0; background: transparent; padding: 9px 6px; border-radius: 8px; font-size: 13px; color: #475569; cursor: pointer; }
.m-tabs button.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.m-empty { text-align: center; color: var(--muted); padding: 34px 12px; font-size: 13px; }
.m-login-wrap { min-height: 100vh; padding: 30px 18px; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(900px 460px at 30% 0%, #134e4a 0%, #0f172a 60%, #020617 100%); }
.m-login-card { width: min(420px, 100%); margin: 0 auto; background: #fff; border-radius: 16px; padding: 26px 22px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.6); }
.m-login-card .logo { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.m-login-card .logo span { font-size: 28px; }
.m-login-card h1 { font-size: 20px; }
.m-login-card p.sub { color: var(--muted); font-size: 12.5px; margin: 6px 0 18px; }
.m-login-card .field { margin-bottom: 12px; }
.m-login-card .input { width: 100%; padding: 11px 12px; font-size: 16px; }
.m-login-links { margin-top: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.m-video-box { margin-top: 10px; }
.m-toast-wrap { position: fixed; left: 12px; right: 12px; top: 64px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.m-toast { background: #0f172a; color: #fff; border-radius: 10px; padding: 11px 14px; font-size: 13.5px; box-shadow: var(--shadow); opacity: .97; max-width: min(92vw, 620px); line-height: 1.5; text-align: center; }
.m-toast.ok { background: #166534; }
.m-toast.err { background: #b91c1c; }


/* ============================================================
   产品中心（列表 / 详情九标签 / 颜色变体 / 包装方案 / 图片）
   ============================================================ */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.prod-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.prod-thumb-link { display: block; }
.prod-thumb { width: 100%; height: 168px; object-fit: cover; background: #f1f5f9; display: block; }
.prod-thumb.ph { display: grid; place-items: center; font-size: 42px; color: #cbd5e1; }
.prod-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.prod-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.prod-title a { color: inherit; }
.prod-title a:hover { color: var(--brand); }
.prod-sub { font-size: 12px; color: var(--muted); line-height: 1.5; word-break: break-all; }
.prod-price { margin-top: 2px; font-size: 16px; font-weight: 700; color: var(--brand); }
.prod-price .muted { font-size: 12px; font-weight: 400; }
.prod-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 0 14px 14px; }

.pd-head { display: flex; gap: 16px; align-items: flex-start; }
.pd-thumb-link { flex: none; }
.pd-thumb { width: 132px; height: 132px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); background: #f8fafc; display: block; }
.pd-thumb.ph { display: grid; place-items: center; font-size: 44px; color: #cbd5e1; }
.pd-info { flex: 1; min-width: 0; }
.pd-title { font-size: 20px; font-weight: 700; line-height: 1.35; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: #475569; align-items: center; }
.pd-actions { margin-left: auto; justify-content: flex-end; }
.pd-tabs { margin-bottom: 0; border-bottom: 0; }
.pd-tabs button { white-space: nowrap; }
.tab-n { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: 11px; line-height: 18px; text-align: center; }
.pd-tabs button.active .tab-n { background: #ccfbf1; color: #0f766e; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }

.variant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.variant-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.variant-img { width: 100%; height: 140px; object-fit: cover; background: #f1f5f9; display: block; }
.variant-img.ph { display: grid; place-items: center; font-size: 34px; color: #cbd5e1; }
.variant-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.variant-color { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.scheme-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.scheme-top { display: flex; gap: 10px; align-items: flex-start; }
.scheme-img { width: 74px; height: 74px; border-radius: 9px; object-fit: cover; background: #f1f5f9; flex: none; display: block; }
.scheme-img.ph { display: grid; place-items: center; color: #cbd5e1; font-size: 28px; }
.scheme-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.scheme-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; font-size: 12px; color: #334155; }
.scheme-kv span { color: var(--muted); margin-right: 4px; }
.scheme-req { font-size: 12px; color: #475569; background: #f8fafc; border-radius: 8px; padding: 6px 9px; line-height: 1.55; }
.scheme-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

.comp-table td { white-space: normal; }
.comp-table .input { width: 100%; }
.comp-total { font-size: 12.5px; color: var(--brand); font-weight: 600; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 12px; }
.img-cell { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.img-cell img { width: 100%; height: 108px; object-fit: cover; display: block; cursor: zoom-in; }
.img-cell .cap { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 6px 8px; }
.drop-zone { border: 2px dashed #cbd5e1; border-radius: 12px; padding: 18px 14px; text-align: center; color: var(--muted); background: #f8fafc; transition: .15s; }
.drop-zone .dz-tip { font-size: 13px; margin-bottom: 10px; }
.drop-zone.over { border-color: var(--brand); background: #f0fdfa; color: var(--brand); }

.placeholder-box { text-align: center; padding: 34px 16px; color: #475569; line-height: 1.8; }
.placeholder-box .ph-ico { font-size: 40px; margin-bottom: 6px; }

@media (max-width: 1080px) {
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .pd-head { flex-direction: column; }
  .pd-thumb { width: 100%; height: 210px; }
  .pd-actions { margin-left: 0; justify-content: flex-start; }
  .pd-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .scheme-grid { grid-template-columns: 1fr; }
  .variant-grid { grid-template-columns: 1fr 1fr; }
  .prod-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .prod-grid, .variant-grid { grid-template-columns: 1fr; }
  .scheme-kv { grid-template-columns: 1fr; }
}

/* ---------- 销售订单：包装方案 / 颜色组成 / 包装材料 ---------- */
.so-scheme-box { margin-top: 10px; border: 1px dashed #99f6e4; border-radius: 10px; padding: 10px 12px; background: #f7fffd; }
.so-scheme-head { font-size: 12.5px; color: #0f766e; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.so-scheme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.so-scheme-title { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.so-scheme-summary .so-pack-info { margin-top: 6px; }
.so-scheme-view { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 860px) {
  .so-scheme-grid { grid-template-columns: 1fr; }
  .so-scheme-box { padding: 8px; }
}
/* ---------- 手机端包装材料行：下拉与数量可点 ---------- */
@media (max-width: 520px) {
  .so-scheme-box .mat-comp thead { display: none; }
  .so-scheme-box .mat-comp,
  .so-scheme-box .mat-comp tbody,
  .so-scheme-box .mat-comp tr,
  .so-scheme-box .mat-comp td { display: block; width: 100%; }
  .so-scheme-box .mat-comp tr { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #fff; }
  .so-scheme-box .mat-comp td { border: 0; padding: 4px 0; white-space: normal; }
  .so-scheme-box .mat-comp td:nth-child(2)::before { content: "每套用量："; font-size: 11.5px; color: var(--muted); margin-right: 6px; }
  .so-scheme-box .mat-comp td:nth-child(3)::before { content: "损耗率%："; font-size: 11.5px; color: var(--muted); margin-right: 6px; }
  .so-scheme-box .mat-comp select.input,
  .so-scheme-box .mat-comp input.input { width: 100% !important; }
  .so-scheme-box .mat-comp td:last-child:empty { display: none; }
  .modal .comp-table { min-width: 560px; }
}
/* ---------- 手机端顶栏：避免标题与用户信息挤压 ---------- */
@media (max-width: 520px) {
  .topbar { gap: 8px; padding: 10px 12px; }
  .topbar .who { display: none; }
  .topbar .crumb { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45vw; }
  .view { padding: 12px; }
}
/* ---------- 产品图片统一 1:1 展示（长方形图片等比缩小，不裁切） ---------- */
.prod-thumb,
.prod-thumb.ph,
.pd-thumb,
.pd-thumb.ph,
.variant-img,
.variant-img.ph,
.scheme-img,
.scheme-img.ph,
.img-cell img {
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  background: #f8fafc;
}
.prod-thumb { width: 100%; }
.pd-thumb { width: 132px; }
.variant-img { width: 100%; }
.scheme-img { width: 74px; height: 74px; }
.img-cell img { width: 100%; }
.pick-box { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; }
.pick-box input { width: 15px; height: 15px; }
.pick-col { width: 34px; }
.img-cell .cap .pick-box { margin-right: auto; }
@media (max-width: 860px) {
  .pd-thumb { width: 100%; height: auto; }
}
/* ---------- 产品中心：分类筛选与产品卡片 ---------- */
.prod-filter .input { min-width: 0; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; -webkit-overflow-scrolling: touch; }
.cat-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; white-space: nowrap; cursor: pointer; color: #475569; }
.cat-chip b { color: #0f766e; margin-left: 4px; font-variant-numeric: tabular-nums; }
.cat-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-chip.active b { color: #ccfbf1; }
.prod-photo { position: relative; aspect-ratio: 1 / 1; background: #f8fafc; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.prod-photo-link { width: 100%; height: 100%; display: grid; place-items: center; }
.prod-photo-img { width: 100%; height: 100%; object-fit: contain; display: block; background: #f8fafc; }
.prod-photo-img.ph { display: grid; place-items: center; font-size: 48px; color: #cbd5e1; }
.prod-select { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; font-size: 12px; color: #475569; display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.prod-state { position: absolute; top: 10px; right: 10px; z-index: 2; }
.prod-model { font-size: 22px; font-weight: 800; line-height: 1.2; }
.prod-model a { color: inherit; }
.prod-model a:hover { color: var(--brand); }
.prod-name { font-size: 15px; font-weight: 700; line-height: 1.35; margin-top: 1px; }
.prod-card .prod-body { gap: 7px; }
.prod-card .prod-price { margin-top: 0; }
.prod-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 12px; border-top: 1px solid var(--line); margin-top: auto; }
@media (max-width: 860px) {
  .prod-filter .input { flex: 1 1 150px; width: auto !important; }
  .prod-filter .btn { flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .prod-filter .input { flex: 1 1 100%; width: 100% !important; }
  .cat-chips { padding-bottom: 10px; }
  .prod-model { font-size: 20px; }
}
/* 销售下单：产品型号搜索下拉 */
.so-prod-combo .combo-list { z-index: 90; }
.so-prod-combo .combo-item .ci-main { font-size: 13px; }
@media (max-width: 520px) {
  .so-prod-combo .combo-list { max-height: 46vh; }
}
/* ---------- 销售下单：颜色、图片预览、按颜色数量 ---------- */
.so-prod-preview { grid-column: 1 / -1; }
.so-prod-preview:empty { display: none; }
.preview-card { display: flex; gap: 10px; align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.preview-main { width: 64px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex: none; }
.preview-main.ph { display: grid; place-items: center; font-size: 26px; color: #cbd5e1; }
.preview-info { font-size: 12.5px; line-height: 1.55; min-width: 0; }
.preview-colors { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.preview-colors .mini-thumb { width: 28px; height: 28px; }
.mini-thumb { width: 38px; height: 38px; border-radius: 6px; object-fit: contain; background: #f8fafc; border: 1px solid var(--line); flex: none; display: block; }
.mini-thumb.ph { display: grid; place-items: center; color: #cbd5e1; font-size: 18px; }
.so-color-box { margin-top: 10px; border: 1px dashed #bae6fd; border-radius: 10px; padding: 10px 12px; background: #f8fdff; }
.color-pick { display: flex; align-items: center; gap: 8px; min-width: 220px; }
.color-pick .input { flex: 1; min-width: 120px; }
.color-comp td { white-space: normal; }
.color-comp .input { width: 100%; }
@media (max-width: 520px) {
  .color-pick { flex-wrap: wrap; }
  .color-pick .mini-thumb { width: 46px; height: 46px; }
  .color-comp thead { display: none; }
  .color-comp, .color-comp tbody, .color-comp tr, .color-comp td { display: block; width: 100%; }
  .color-comp tr { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #fff; }
  .color-comp td { border: 0; padding: 4px 0; }
  .color-comp td:nth-child(2)::before { content: "数量："; font-size: 11.5px; color: var(--muted); margin-right: 6px; }
  .color-comp td:nth-child(3)::before { content: "单位："; font-size: 11.5px; color: var(--muted); margin-right: 6px; }
}
/* ---------- 销售详情：图片、送货计划、进度时间轴 ---------- */
.so-di-thumb { width: 58px; height: 58px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex: none; }
.so-di-thumb.ph { display: grid; place-items: center; font-size: 24px; color: #cbd5e1; }
.so-di-h { align-items: flex-start; }
.so-di-h .grow { min-width: 0; }
.warn-text { margin-top: 4px; font-size: 12px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 3px 8px; display: inline-block; }
.color-notes { flex-wrap: wrap; }
.color-note { display: inline-flex; align-items: center; gap: 6px; }
.color-note .mini-thumb { width: 30px; height: 30px; }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #fff; }
.plan-card:last-child { margin-bottom: 0; }
.plan-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.plan-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 24px; margin: 4px 0 12px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.plan-info-row { display: flex; gap: 10px; min-width: 0; }
.plan-info-row.full { grid-column: 1 / -1; }
.plan-info-label { flex: 0 0 62px; color: var(--muted); }
.plan-info-value { flex: 1 1 auto; color: #0f172a; word-break: break-word; }
.merch-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 20px; }
.merch-detail-field { min-width: 0; }
.merch-detail-field.span2 { grid-column: span 2; }
.merch-detail-field .k { margin-bottom: 2px; font-size: 12px; color: var(--muted); }
.merch-detail-field .v { font-size: 14px; color: #0f172a; word-break: break-word; }
@media (max-width: 880px) { .merch-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.merch-detail-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.merch-detail-sections > .card { margin: 0; }
.merch-detail-flow { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.merch-detail-flow-title { font-size: 13px; font-weight: 700; color: #334155; margin-bottom: 8px; }
.pack-toolbar { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pack-toolbar .pack-wh { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; }
.pack-toolbar .pack-wh select { min-width: 220px; }
.pack-footer { display: flex; justify-content: flex-end; margin-top: 12px; }
.pack-remark { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: #475569; }
.pack-remark .input { flex: 1; }
.pack-table { table-layout: fixed; width: 100%; min-width: 0; }
.pack-table .input { width: 100%; min-width: 0; box-sizing: border-box; padding-left: 6px; padding-right: 6px; }
.pack-table .pack-stock { font-size: 12px; line-height: 1.5; white-space: nowrap; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: #475569; margin-bottom: 8px; }
.plan-prod { display: flex; align-items: center; gap: 8px; min-width: 200px; }
.plan-prod .mini-thumb { width: 42px; height: 42px; }
.plan-table-grouped td { vertical-align: top; }
.plan-thumb-cell { width: 92px; }
.plan-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f8fafc; display: inline-flex; align-items: center; justify-content: center; color: #94a3b8; }
.plan-variant-list { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-variant-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; font-size: 13px; white-space: nowrap; }
.plan-variant-chip b { color: #0f766e; }
.plan-table-grouped th.plan-col-plan { color: #0f766e; }
.plan-table-grouped th.plan-col-rest { color: #b45309; }
.plan-table-grouped td.plan-col-plan { background: #f0fdfa; }
.plan-table-grouped td.plan-col-rest { background: #fffbeb; }
.plan-carton-main { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: 15px; }
.plan-carton-rest { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #fef3c7; color: #b45309; font-size: 15px; }
.plan-carton-rec { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 15px; }
.plan-table-grouped th.plan-col-rec { color: #334155; }
.plan-table-grouped td.plan-col-rec { background: #f8fafc; }
.plan-qty-cell { width: 150px; }
.plan-qty-cell .muted { text-align: right; }
.plan-qty-cell .input { display: block; margin: 4px 0 0 auto; }
.plan-receipts, .plan-logs { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: #475569; }
.plan-logs span { display: block; padding: 2px 0; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: #e2e8f0; }
.tl-item { position: relative; padding: 0 0 14px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff; box-shadow: 0 0 0 2px #e2e8f0; }
.tl-item.done .tl-dot { background: #0f766e; box-shadow: 0 0 0 2px #99f6e4; }
.tl-item.error .tl-dot { background: #dc2626; box-shadow: 0 0 0 2px #fecaca; }
.tl-item.pending .tl-title { color: #94a3b8; }
.tl-title { font-weight: 600; font-size: 13.5px; color: #0f172a; }
.tl-sub { font-size: 12.5px; color: #64748b; margin-top: 2px; }
.img-zoom-wrap { text-align: center; background: #f8fafc; border-radius: 10px; padding: 12px; }
.img-zoom-wrap img { max-width: 100%; max-height: 68vh; object-fit: contain; }
.modal.lg { max-width: 920px; width: 94vw; }
img.img-fail { opacity: .75; }.risk-text { color: #b91c1c; font-weight: 600; }
/* ---------- 手机端：产品图片 / 颜色行 ---------- */
.m-task-prod { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.m-thumb { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex: none; display: block; }
.m-thumb.ph { display: grid; place-items: center; color: #cbd5e1; font-size: 22px; }
.m-color-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.m-color-row:last-child { border-bottom: 0; }
.m-color-row .grow { flex: 1; min-width: 0; font-size: 13px; }
.m-color-row .mini-thumb { width: 42px; height: 42px; }
/* ---------- 销售订单总览：统计卡 / 筛选 / 订单卡片 / 流程 ---------- */
.so-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.so-stat { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; transition: all .15s; }
.so-stat:hover { border-color: #5eead4; box-shadow: 0 4px 14px rgba(15,118,110,.08); }
.so-stat.active { border-color: #0f766e; background: #f0fdfa; box-shadow: 0 0 0 2px rgba(15,118,110,.12); }
.so-stat-ico { font-size: 16px; }
.so-stat-num { font-size: 22px; font-weight: 700; color: #0f172a; line-height: 1.15; }
.so-stat-label { font-size: 12px; color: #64748b; }
.so-filter-grid { display: grid; grid-template-columns: minmax(330px, 2.4fr) minmax(220px, 1.8fr) minmax(130px, 1fr) minmax(140px, 1fr) auto auto 1fr auto; gap: 8px; align-items: center; margin-bottom: 14px; }
.so-date-filter { display: flex; align-items: center; gap: 6px; min-width: 0; }
.so-date-filter .input { min-width: 0; }
.so-date-filter .so-date-field { flex: 0 0 96px; }
.so-date-filter .so-date-month { flex: 1 1 120px; }
.so-date-filter .so-date-day { flex: 0 0 84px; }
.so-filter-grid .input { width: 100%; min-width: 0; }
.mo-quick-total { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mo-quick-filter { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 12px; border: 1px solid #bfdbfe; }
.mo-quick-filter button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.so-list { display: grid; gap: 14px; }
.so-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.04); cursor: pointer; }
.so-card:hover { border-color: #cbd5e1; box-shadow: 0 6px 20px rgba(15,23,42,.07); }
.so-card.so-card-bulk-alert { border-color: #fca5a5; box-shadow: 0 0 0 1px #fecaca inset, 0 2px 8px rgba(185,28,28,.08); }
.so-card.so-card-bulk-alert .so-oc-head { background: #fef2f2; }
.so-card.so-card-bulk-alert:hover { border-color: #f87171; box-shadow: 0 6px 20px rgba(185,28,28,.16); }
.so-oc-head { display: grid; grid-template-columns: minmax(220px, 1.2fr) 1.1fr auto auto minmax(260px, 320px); gap: 12px; align-items: center; padding: 11px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.so-oc-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.so-oc-title a { color: #0f172a; }
.so-oc-cust { font-size: 13px; min-width: 0; text-align: center; }
.so-oc-staff { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: normal; word-break: break-word; text-align: center; }
.so-oc-cust b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-oc-date { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #475569; }
.so-oc-amount { font-size: 18px; font-weight: 700; color: #0f766e; white-space: nowrap; }
.so-oc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.so-card-products { padding: 6px 14px 2px; }
.so-card-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 6px; }
.so-card-sec-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.so-card-pack { border-top: 1px dashed var(--line); padding: 10px 14px 12px; }
.so-card-pack-list { display: flex; flex-wrap: wrap; gap: 6px; }
.so-pack-chip { display: inline-block; background: #f1f5f9; border: 1px solid var(--line); border-radius: 10px; padding: 2px 8px; font-size: 12px; color: #334155; }
.so-card-pack-note { margin-top: 6px; font-size: 12px; }
.so-lp { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #e2e8f0; }
.so-lp:last-child { border-bottom: 0; }
.so-lp-img { width: 56px; height: 56px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; }
.so-lp-img.ph { display: grid; place-items: center; font-size: 22px; color: #cbd5e1; }
.so-lp-main { min-width: 0; }
.so-lp-title { font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.so-lp-title b { font-size: 14px; color: #0f172a; }
.so-lp-name { color: #334155; }
.so-color-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.so-color-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border: 1px solid #e2e8f0; border-radius: 999px; background: #f8fafc; font-size: 12px; color: #334155; }
.so-color-pill img { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; background: #fff; border: 1px solid #e2e8f0; }
.so-color-pill b { color: #0f172a; }
.so-color-done { color: #0f766e; font-size: 11px; }
.so-lp-qty { text-align: right; font-size: 12px; color: #475569; white-space: nowrap; }
.so-lp-qty b { font-size: 17px; color: #0f172a; }
.so-lp-carton { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 5px; font-size: 12px; color: #64748b; }
.so-lp-carton b { color: #0f172a; }
.so-prod-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0 9px; font-size: 12px; color: #64748b; }
.so-card-progress { padding: 9px 14px 10px; border-top: 1px solid var(--line); background: #fcfdfe; }
.dop-route-box { padding: 9px 14px 10px; border-top: 1px solid var(--line); background: #fcfdfe; }
.dop-route-box .merch-detail-flow-title { margin-bottom: 6px; }
.dop-deliver-metrics { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 7px 14px; background: #f0fdfa; border-top: 1px solid #99f6e4; border-bottom: 1px solid #99f6e4; font-size: 12.5px; color: #0f766e; }
.dop-deliver-metrics b { font-size: 14px; color: #0f766e; }
.qc-order-media { margin: 0 14px 12px; border: 1px solid #99f6e4; background: #f0fdfa; border-radius: 10px; padding: 8px 10px; }
.qc-media-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #0f766e; }
.qc-media-batches { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.qc-media-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.qc-media-photo { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: inherit; }
.qc-media-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; }
.qc-media-file { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid #cbd5e1; background: #fff; color: #64748b; font-size: 11px; }
.qc-media-batch { font-size: 10px; line-height: 1.25; color: #475569; text-align: center; word-break: break-all; }
.qc-collapse-wrap { margin-top: 12px; }
.qc-collapse-toggle { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border: 1px dashed #94a3b8; border-radius: 9px; background: #f8fafc; color: #334155; font-size: 13px; cursor: pointer; }
.qc-collapse-toggle:hover { background: #f1f5f9; }
.qc-collapse-toggle span { color: #0f766e; font-weight: 700; }
.qc-collapse-body { margin-top: 10px; display: grid; gap: 12px; }
.so-prod-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #475569; margin-bottom: 8px; }
.so-prod-line b { color: #0f172a; font-size: 13px; }
.so-prod-bar { flex: 1; min-width: 100px; height: 7px; }
.so-flow-scroll { overflow-x: auto; padding-bottom: 2px; }
.so-flow-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.so-dispatch-block { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; margin-top: 10px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 8px; background: #f8fafc; }
.so-dispatch-done { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 600; }
.so-dispatch-models { display: flex; flex-direction: column; gap: 10px; flex: 1 1 100%; font-size: 12px; color: #475569; }
.so-dispatch-model { border-top: 1px dashed #e2e8f0; padding-top: 8px; }
.so-dispatch-model:first-child { border-top: 0; padding-top: 0; }
.so-dispatch-model-head { font-weight: 600; color: var(--text); font-size: 12.5px; margin-bottom: 4px; }
.so-dispatch-proc { margin-top: 5px; }
.so-dispatch-proc-top { display: flex; align-items: center; gap: 10px; font-size: 11.5px; }
.so-dispatch-proc .name { min-width: 70px; font-weight: 600; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-dispatch-proc .nums { color: #475569; white-space: nowrap; }
.so-dispatch-proc .nums b { color: var(--text); }
.so-dispatch-proc .pct { margin-left: auto; color: #0f766e; font-weight: 600; font-size: 11px; white-space: nowrap; }
.so-dispatch-bar { height: 6px; margin-top: 4px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.so-dispatch-bar i { display: block; height: 100%; background: #0f766e; border-radius: 999px; }
.so-progress-list { display: flex; flex-direction: column; gap: 10px; flex: 1 1 100%; }
.so-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.so-progress-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.so-progress-title b { font-size: 12.5px; color: var(--text); }
.so-progress-badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 11px; font-weight: 600; }
.so-progress-badge-info { background: #e0f2fe; color: #0369a1; }
.so-progress-badge-prod { background: #fef3c7; color: #b45309; }
.so-progress-badge-pack { background: #ede9fe; color: #6d28d9; }
.so-progress-awaiting { color: #94a3b8; font-size: 12px; }
.so-progress-meta { color: #475569; font-size: 11.5px; white-space: nowrap; }
.so-progress-bar { height: 8px; margin-top: 5px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.so-progress-bar i { display: block; height: 100%; background: #0f766e; border-radius: 999px; }
.so-progress-stock { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #cbd5e1; }
.so-progress-bar-stock i { background: #0d9488; }
.so-flow { display: flex; align-items: flex-start; min-width: 900px; }
.so-flow-node { position: relative; flex: 1; min-width: 86px; text-align: center; padding: 0 4px; }
.so-flow-node::before { content: ''; position: absolute; top: 12px; left: 0; right: 50%; height: 2px; background: #e2e8f0; }
.so-flow-node:first-child::before { display: none; }
.so-flow-node::after { content: ''; position: absolute; top: 12px; left: 50%; right: 0; height: 2px; background: #e2e8f0; }
.so-flow-node:last-child::after { display: none; }
.so-flow-node.done::before, .so-flow-node.done::after, .so-flow-node.active::before { background: #99f6e4; }
.so-flow-dot { position: relative; z-index: 1; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #cbd5e1; color: #94a3b8; font-size: 11px; font-weight: 700; }
.so-flow-node.done .so-flow-dot { background: #0f766e; border-color: #0f766e; color: #fff; }
.so-flow-node.active .so-flow-dot { background: #f59e0b; border-color: #f59e0b; color: #fff; box-shadow: 0 0 0 4px #fef3c7; }
.so-flow-node.error .so-flow-dot { background: #dc2626; border-color: #dc2626; color: #fff; box-shadow: 0 0 0 4px #fee2e2; }
.so-flow-node.skip .so-flow-dot { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; }
.so-flow-label { display: block; margin-top: 4px; font-size: 11.5px; color: #64748b; white-space: nowrap; }
.so-flow-label em { display: block; font-style: normal; font-size: 10px; color: #94a3b8; }
.so-flow-node.done .so-flow-label { color: #0f766e; font-weight: 600; }
.so-flow-node.active .so-flow-label { color: #b45309; font-weight: 700; }
.so-flow-node.error .so-flow-label { color: #b91c1c; font-weight: 700; }
.so-flow-time { display: block; font-size: 10px; color: #94a3b8; margin-top: 1px; white-space: nowrap; }
.so-flow-node.clickable { cursor: pointer; }
.so-flow-node.clickable:hover .so-flow-label { text-decoration: underline; }
.so-card-delivery { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 14px; border-top: 1px solid var(--line); background: #f8fafc; }
.so-del-info { flex: 1 1 100%; font-size: 12.5px; color: #475569; }
.so-del-info b { color: #0f172a; }
.so-del-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 18px; }
.so-del-item { display: flex; gap: 8px; min-width: 0; }
.so-del-item.full { grid-column: 1 / -1; }
.so-del-k { color: var(--muted); flex: 0 0 auto; }
.so-del-v { color: #0f172a; word-break: break-word; }
.so-last-plan { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.so-last-plan-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 12.5px; color: #475569; }
.so-last-plan-h > span:first-child { font-weight: 700; color: #0f172a; }
.so-last-plan-grid { display: grid; gap: 4px; max-width: 460px; }
.so-last-plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; font-size: 12.5px; color: #475569; }
.so-last-plan-row.head { padding-bottom: 3px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.so-last-plan-row b { color: #0f172a; }
.so-last-plan-row span:last-child { text-align: right; color: #0f172a; }
.so-delay { color: #b91c1c; font-weight: 700; background: #fef2f2; border: 1px solid #fecaca; border-radius: 999px; padding: 1px 8px; }
.so-del-progress { font-size: 12.5px; color: #475569; white-space: nowrap; }
.so-del-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex: 1 1 100%; flex-wrap: wrap; }
.so-del-progress b { color: #0f172a; }
.quick-plan-sum { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 4px 0 10px; font-size: 13px; }
.quick-plan-sum b { color: #0f172a; font-size: 15px; }
.quick-plan-sum.qp-metrics { justify-content: flex-start; gap: 22px; margin: 0 0 10px; padding: 9px 14px; background: #f1f5f9; border: 1px solid #dbe3ec; border-left: 4px solid #0f766e; border-radius: 8px; }
.quick-plan-sum.qp-metrics b { color: #0f766e; font-size: 16px; }
.chip-supplier { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.quick-plan { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.quick-plan-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-plan-meta { font-size: 12.5px; color: #475569; margin: 6px 0; }
@media (max-width: 1280px) {
  .so-stats { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .so-filter-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .so-date-filter { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .so-stats { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .so-filter-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
  .so-oc-head { grid-template-columns: 1fr auto; }
  .so-oc-cust, .so-oc-date { grid-column: 1 / -1; }
  .so-oc-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .so-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .so-filter-grid { grid-template-columns: 1fr; }
  .so-lp { grid-template-columns: 46px 1fr; }
  .so-lp-qty { grid-column: 2; text-align: left; }
  .so-lp-img { width: 46px; height: 46px; }
  .so-flow { min-width: 820px; }
}.so-noneed { gap: 8px; }
.so-noneed-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; font-size: 11.5px; font-weight: 600; }.m-order-prods { margin-top: 8px; }
.m-order-prod { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.m-order-prod:last-child { border-bottom: 0; }
.m-order-prod .grow { flex: 1; min-width: 0; font-size: 13px; }
.m-flow-line { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0 2px; }
.m-flow-dot { flex: none; font-size: 10.5px; color: #94a3b8; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 7px; }
.m-flow-dot.done { color: #0f766e; background: #f0fdfa; border-color: #99f6e4; }
.m-flow-dot.active { color: #b45309; background: #fffbeb; border-color: #fde68a; font-weight: 700; }
.m-flow-dot.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; font-weight: 700; }
.m-flow-dot.skip { opacity: .55; }.free-mat-table td { vertical-align: middle; }
.so-pack-mats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.so-pack-mat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; font-size: 12px; }
.so-pack-mat .mini-thumb { width: 30px; height: 30px; }.mat-param { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; color: #475569; }
.mat-param span { min-width: 120px; }
.mat-param .input { width: 86px; }
.free-mat-table td { vertical-align: top; }
.mat-preview { margin-top: 10px; border: 1px dashed #bae6fd; background: #f8fdff; border-radius: 10px; padding: 8px 12px; }
.mat-preview-row { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 5px 0; border-bottom: 1px dashed #e2e8f0; font-size: 12.5px; color: #475569; }
.mat-preview-row:last-child { border-bottom: 0; }
.mat-preview-row b { color: #0f172a; }.seg { display: inline-flex; gap: 4px; margin-left: 8px; }
.mat-cards { display: grid; gap: 10px; }
.mat-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px; }
.mat-card-h { display: flex; align-items: flex-start; gap: 10px; }
.mat-card-img { width: 58px; height: 58px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; }
.mat-card-img.ph { display: grid; place-items: center; font-size: 22px; color: #cbd5e1; }
.mat-card-name { font-size: 15px; font-weight: 700; color: #0f172a; }
.mat-card-body { margin-top: 10px; display: grid; gap: 8px; }
.mat-field { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #334155; flex-wrap: wrap; }
.mat-field span { min-width: 210px; }
.mat-field .input { max-width: 140px; }
.mat-result { font-size: 13.5px; line-height: 1.7; color: #0f172a; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 8px; padding: 8px 10px; }
.mat-warn { color: #b45309; margin-top: 4px; }
.mat-adv { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 4px; font-size: 12px; }
.mat-adv summary { cursor: pointer; color: #64748b; }
.mat-adv .mat-field { margin-top: 6px; }
.mat-preview-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.mat-preview-row { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; color: #475569; }
.mat-empty { padding: 10px 0; }/* ---------- 六大业务中心 / 统一订单中心 ---------- */
.global-search { display: flex; align-items: center; gap: 6px; margin-right: 12px; }
.global-search .input { width: 220px; }
.center-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.center-metric { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; color: inherit; text-decoration: none; }
.center-metric:hover { border-color: #5eead4; box-shadow: 0 4px 14px rgba(15,118,110,.08); }
.center-metric-label { font-size: 12.5px; color: #64748b; }
.center-metric-value { font-size: 26px; font-weight: 700; color: #0f172a; margin-top: 4px; }
.center-metric-value small { font-size: 12px; color: #64748b; margin-left: 4px; font-weight: 400; }
.center-metric-value.ok { color: #0f766e; }
.center-metric-value.warn { color: #b45309; }
.center-metric-value.danger { color: #b91c1c; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .global-search .input { width: 140px; } }.so-color-inline { grid-column: 1 / -1; border: 1px dashed #bae6fd; border-radius: 10px; padding: 10px 12px; background: #f8fdff; }
.so-color-inline:empty { display: none; }.so-batch-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.so-pick { width: 16px; height: 16px; vertical-align: middle; margin-right: 4px; }.variant-uploader { display: flex; gap: 16px; align-items: center; border: 1.5px dashed #cbd5e1; border-radius: 14px; padding: 16px; background: linear-gradient(180deg,#f8fafc,#f1f5f9); cursor: pointer; transition: border-color .18s, background .18s; }
.variant-uploader:hover { border-color: #14b8a6; background: #f0fdfa; }
.variant-uploader.dragging { border-color: #0f766e; background: #ccfbf1; box-shadow: inset 0 0 0 2px rgba(15,118,110,.12); }
.variant-thumb-box { width: 120px; height: 120px; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.variant-thumb-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.variant-thumb-box .vu-ph { font-size: 38px; opacity: .55; }
.variant-upload-info { min-width: 0; }
.variant-upload-info .vu-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.variant-upload-info .vu-sub { margin-top: 4px; font-size: 12.5px; color: #64748b; }
.variant-upload-info .vu-file { margin-top: 8px; font-size: 12px; color: #0f766e; word-break: break-all; }
@media (max-width: 560px) { .variant-uploader { flex-direction: column; align-items: flex-start; } .variant-thumb-box { width: 100%; height: 180px; } }.pf-variant-row { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #fff; }
.pf-variant-row.dragging { border-color: #0f766e; background: #f0fdfa; }
.pf-variant-row .pf-v-thumb { width: 64px; height: 64px; }
.pf-variant-row .grow { flex: 1; min-width: 0; }
@media (max-width: 560px) { .pf-variant-row { flex-wrap: wrap; } .pf-variant-row .grow { flex-basis: calc(100% - 76px); } }
.pf-variants-strip { display: flex; gap: 12px; align-items: stretch; overflow-x: auto; padding: 4px 2px 12px; }
.pf-variants-strip .pf-variant-row { flex: 0 0 215px; flex-direction: column; align-items: stretch; margin-bottom: 0; }
.pf-variants-strip .pf-variant-row .pf-v-thumb { width: 100%; height: 100px; }
.pf-variants-strip .pf-variant-row .grow { width: 100%; }
.pf-variants-strip .pf-variant-row .btn-row { gap: 6px; }
.pf-variants-strip .pf-variant-row .btn-row .muted { font-size: 11.5px; }
@media (max-width: 560px) { .pf-variants-strip .pf-variant-row { flex-basis: 195px; } }
.variant-uploader .variant-thumb-box { aspect-ratio: 1 / 1; height: auto; }
.pf-thumb-wrap { position: relative; width: 100%; cursor: pointer; }
.pf-thumb-wrap .pf-thumb-tip { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 2px; text-align: center; font-size: 11px; color: #475569; background: rgba(248, 250, 252, .94); border-top: 1px solid #e2e8f0; border-radius: 0 0 11px 11px; pointer-events: none; }
.pf-variants-strip .pf-variant-row .pf-thumb-wrap { width: 100%; }
.pf-variants-strip .pf-variant-row .pf-v-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.pf-variants-strip .pf-variant-row.dragging .pf-thumb-wrap { outline: 2px solid #0f766e; outline-offset: 2px; border-radius: 12px; }
.variant-thumb-box { position: relative; }
.variant-thumb-box img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
#pf-main-thumb { width: 160px; height: 160px; }
.pf-thumb-wrap .pf-thumb-tip { position: static; left: auto; right: auto; bottom: auto; margin-top: 6px; padding: 4px 2px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
@media (max-width: 560px) { #pf-main-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; } }
.pf-thumb-wrap .pf-thumb-tip { display: block; }
.switch-wrap { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 12px; }
.switch-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .18s; flex: none; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: transform .18s; }
.switch-wrap input:checked + .switch-track { background: #0f766e; }
.switch-wrap input:checked + .switch-track::after { transform: translateX(16px); }
.switch-wrap .switch-label { color: #64748b; line-height: 1; }
.switch-wrap input:checked ~ .switch-label { color: #0f766e; }
.switch-wrap.switch-lg { gap: 8px; font-size: 14px; }
.switch-wrap.switch-lg .switch-track { width: 58px; height: 32px; }
.switch-wrap.switch-lg .switch-track::after { width: 26px; height: 26px; top: 3px; left: 3px; }
.switch-wrap.switch-lg input:checked + .switch-track::after { transform: translateX(26px); }
.switch-wrap.switch-lg .switch-label { font-size: 14px; font-weight: 600; }
.rs-top-row { display: grid; grid-template-columns: 160px minmax(260px, 1fr) 150px; gap: 12px; align-items: start; }
.rs-top-row .field { margin: 0; }
.rs-top-row .chips { margin: 0; }
.rs-steps-table td, .rp-steps-table td { vertical-align: top; }
.rs-steps-table .combo-row, .rp-steps-table .combo-row { align-items: center; }
@media (max-width: 900px) { .rs-top-row { grid-template-columns: 1fr; } }
.prod-switch-wrap { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(255,255,255,.95); padding: 4px 8px; border-radius: 999px; box-shadow: 0 2px 10px rgba(15,23,42,.12); }
.pf-variants-strip .pf-variant-row { position: relative; }
.pf-variant-row .pf-variant-del { position: absolute; top: 8px; right: 8px; z-index: 4; padding: 3px 9px; font-size: 11.5px; line-height: 1.4; }
.chip-x { border: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1; padding: 0 0 0 2px; cursor: pointer; vertical-align: middle; }
.inv-cat-wrap { display: inline-flex; align-items: center; gap: 2px; }
.cat-chip-x { border: 0; background: #fee2e2; color: #b91c1c; width: 20px; height: 20px; border-radius: 50%; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; flex: none; }
.cat-chip-x:hover { background: #fecaca; }
.inv-cat-picker .input { height: 46px; font-size: 14.5px; }
.inv-cat-picker .btn { height: 46px; min-width: 46px; font-size: 16px; }
.inv-cat-wrap { position: relative; display: inline-flex; align-items: center; }
.inv-cat-wrap .cat-chip { padding-right: 24px; }
.inv-cat-wrap .cat-chip-x,
.cat-chip-x {
  position: absolute; top: 3px; right: 4px; z-index: 2;
  width: 16px; height: 16px; border-radius: 50%;
  border: 0; background: transparent; color: #94a3b8;
  font-size: 12px; line-height: 16px; text-align: center;
  padding: 0; cursor: pointer;
}
.inv-cat-wrap .cat-chip-x:hover,
.cat-chip-x:hover { background: #fee2e2; color: #b91c1c; }
.inv-cat-wrap .cat-chip.active + .cat-chip-x { color: #ccfbf1; }
.inv-cat-wrap .cat-chip.active + .cat-chip-x:hover { background: rgba(255,255,255,.22); color: #fff; }
.mf-color-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mf-color-row .input { flex: 1; min-width: 0; }
.mf-color-strip { display: flex; gap: 12px; align-items: stretch; overflow-x: auto; padding: 4px 2px 12px; }
.mf-color-card { flex: 0 0 190px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; }
.mf-color-card.dragging { border-color: #0f766e; background: #f0fdfa; }
.mf-color-card .input { width: 100%; }
.mf-color-thumb { width: 100%; aspect-ratio: 1 / 1; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.mf-color-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mat-color-detail td { background: #f8fafc; padding-top: 6px; padding-bottom: 10px; }
.mat-color-strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0; }
.mat-color-card { display: flex; align-items: center; gap: 10px; min-width: 215px; padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.mat-color-thumb { width: 52px; height: 52px; border: 1px solid #e2e8f0; border-radius: 8px; display: grid; place-items: center; overflow: hidden; flex: none; background: #fff; }
.mat-color-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mat-color-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.mat-color-stock { font-size: 11.5px; color: #64748b; margin-top: 3px; white-space: nowrap; }

/* 变体拖动排序 */
.drag-handle { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 32px; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; color: #94a3b8; font-size: 15px; line-height: 1; letter-spacing: -3px; cursor: grab; user-select: none; touch-action: none; }
.drag-handle:hover { color: #0f766e; border-color: #99f6e4; background: #f0fdfa; }
.drag-handle:active { cursor: grabbing; }
.pf-variant-row { position: relative; }
.pf-variant-row .drag-handle { position: absolute; top: 8px; left: 8px; z-index: 5; width: 24px; height: 28px; background: rgba(255,255,255,.94); }
.mf-color-card .drag-handle { position: absolute; top: 8px; left: 8px; z-index: 5; width: 22px; height: 26px; background: rgba(255,255,255,.94); }
.mf-color-strip.drag-sorting, .pf-variants-strip.drag-sorting { cursor: grabbing; }
/* 变体卡片：外框右上角删除 ×；图片上单独删除图片 */
.card-x { position: absolute; top: 6px; right: 6px; z-index: 9; width: 24px; height: 24px; padding: 0; border: 1px solid #fecaca; border-radius: 50%; background: rgba(255,255,255,.96); color: #b91c1c; font-size: 16px; font-weight: 600; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.card-x:hover { background: #fee2e2; border-color: #fca5a5; }
.img-remove-btn { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 6; padding: 3px 8px; border: 1px solid #fecaca; border-radius: 6px; background: rgba(255,255,255,.95); color: #b91c1c; font-size: 11.5px; line-height: 1.4; white-space: nowrap; cursor: pointer; }
.img-remove-btn:hover { background: #fee2e2; }
.row-x { width: 24px; height: 24px; padding: 0; border: 1px solid #fecaca; border-radius: 50%; background: #fff; color: #b91c1c; font-size: 16px; line-height: 1; cursor: pointer; }
.row-x:hover { background: #fee2e2; border-color: #fca5a5; }
.mf-color-card, .mf-color-thumb, .variant-card { position: relative; }
.mf-color-thumb .img-remove-btn { bottom: 5px; font-size: 11px; padding: 2px 6px; }
/* 库存分类拖动排序 */
.inv-cat-wrap[draggable="true"] { cursor: grab; }
.inv-cat-wrap[draggable="true"]:active { cursor: grabbing; }
.inv-cat-wrap .cat-chip { cursor: pointer; }
/* 库存分类：成品库存固定第一，其余可拖动 */
.inv-cat-sortable { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.inv-cat-fixed { cursor: default; }
/* 库存物料自定义属性 */
.mf-attr-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.mf-attr-row .input { flex: 1; min-width: 0; }
.mf-color-card select.input { width: 100%; }
/* 自定义属性：默认收起，添加后上下排列 */
.mf-attr-row { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 34px 10px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.mf-attr-row .input { width: 100%; }
.mf-attr-row .row-x { position: absolute; top: 8px; right: 8px; }
/* 自定义属性：删除按钮放在属性值右侧 */
.mf-attr-row .row-x { position: absolute; top: auto; bottom: 10px; right: 8px; }
/* 自定义属性：横向一行一个，节省高度 */
.mf-attr-row { position: static; display: flex; flex-direction: row; gap: 8px; align-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; margin-bottom: 8px; }
.mf-attr-row .input { width: auto; flex: 1; min-width: 0; }
.mf-attr-row .row-x { position: static; top: auto; right: auto; bottom: auto; flex: none; }
/* 自定义属性行标签 */
.mf-attr-row .mf-attr-label { flex: none; font-size: 12.5px; color: #475569; white-space: nowrap; }
/* 自定义属性：横向卡片，卡片内上下排列 */
.mf-attr-card { flex: 0 0 220px; display: flex; flex-direction: column; gap: 8px; position: relative; padding: 10px 32px 10px 10px; }
.mf-attr-item { display: flex; flex-direction: column; gap: 4px; }
.mf-attr-item label { font-size: 12px; color: #64748b; }
.mf-attr-item .input { width: 100%; }
/* 库存变体下拉使用浮层展开，打开时不改变卡片/输入框大小 */
.mf-color-strip [data-mf-var-list],
.mf-color-strip [data-mf-var-pv-list] {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  margin-top: 0; max-height: 180px; z-index: 230;
}
.mf-color-strip [data-mf-var-pv-list] .combo-item .ci-main { white-space: normal; word-break: break-word; }
[data-mf-var-pv-chips] { display: flex; flex-direction: column; gap: 4px; }
[data-mf-var-pv-chips] .chip {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  white-space: normal; word-break: break-word; padding: 5px 8px;
}
[data-mf-var-pv-chips] .chip-x { margin-left: auto; }
[data-mf-var-pv-chips] .chip-label { flex: 1; min-width: 0; white-space: normal; word-break: break-word; }
/* 统一下拉控件：产品中心等模块与库存分类保持一致 */
.erp-picker .input { height: 46px; font-size: 14.5px; }
.erp-picker .combo-row .btn { height: 46px; min-width: 46px; font-size: 16px; }
select.input.erp-picker {
  height: 46px; font-size: 14.5px; border-radius: 10px; padding: 8px 38px 8px 12px;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 20px) 20px, calc(100% - 14px) 20px;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
/* 主导航激活状态统一加深，避免不同页面深浅不一 */
.nav a { position: relative; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.nav a.active,
.nav a.active:hover {
  background: linear-gradient(90deg, #0f766e 0%, #0b5c56 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #5eead4;
}
.nav .group-title.group-active { color: #5eead4; }
/* 主导航：悬停与激活统一为同一套青色高亮 */
.nav a:hover { background: rgba(20, 184, 166, .20); color: #fff; }
.nav a.active:hover { background: linear-gradient(90deg, #0f766e 0%, #0b5c56 100%); color: #fff; }
/* 库存物料子体折叠 */
.mat-name-line { display: flex; align-items: flex-start; gap: 6px; }
.mat-name-cell { white-space: normal; min-width: 180px; max-width: 280px; }
.mat-variant-names { white-space: normal; word-break: break-word; line-height: 1.55; margin-top: 3px; max-width: 260px; }
.variant-chip { display: inline-block; padding: 1px 8px; margin: 1px 4px 1px 0; border-radius: 10px; background: #eef2ff; color: #3730a3; font-size: 12px; line-height: 18px; white-space: nowrap; }
.mat-toggle { flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: #f1f5f9; color: #0f766e; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; }
.mat-toggle:hover { background: #ccfbf1; }
.mat-toggle-ph { flex: none; width: 20px; }
.mat-detail-attrs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* 库存物料折叠按钮加强显示 */
.mat-toggle { width: 26px; height: 26px; border: 1px solid #99f6e4; border-radius: 8px; background: #f0fdfa; color: #0f766e; font-size: 15px; font-weight: 700; line-height: 24px; text-align: center; box-shadow: 0 1px 2px rgba(15,118,110,.12); }
.mat-toggle:hover { background: #ccfbf1; border-color: #5eead4; color: #0b5c56; }
.mat-toggle-ph { width: 26px; }
input[type="date"], input[type="datetime-local"] { cursor: pointer; }
/* 出入库明细：物料名称下拉，大字体名称 + 小字体型号 */
.mat-pick-combo { min-width: 240px; }
.mat-pick-combo .combo-list { position: static; left: auto; right: auto; top: auto; min-width: 320px; max-height: 220px; margin-top: 4px; }
.mat-pick-combo .combo-item .ci-main { font-size: 14px; }
.mat-pick-combo .combo-item .ci-sub { font-size: 11.5px; }
/* 出入库明细：物料/变体下拉的可用库存更醒目 */
.doc-mat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doc-mat-name { font-weight: 700; font-size: 14px; min-width: 0; word-break: break-word; }
.doc-mat-avails { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.doc-mat-avail { flex: none; display: inline-flex; align-items: baseline; gap: 2px; padding: 2px 9px; border-radius: 999px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #0f766e; font-size: 12px; white-space: nowrap; }
.doc-mat-avail b { font-size: 14px; }
.doc-mat-avail.low { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.doc-mat-avail.zero { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.doc-mat-avail.sup { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.doc-mat-avail.sup.low { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.doc-mat-avail.sup.zero { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.doc-mat-models { margin-top: 4px; }
.doc-var-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doc-var-name { font-weight: 600; }
.doc-var-avails { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.doc-var-avail { flex: none; padding: 1px 8px; border-radius: 999px; background: #ecfdf5; color: #0f766e; font-size: 12px; white-space: nowrap; }
.doc-var-avail b { font-size: 13px; }
.doc-var-avail.zero { background: #fef2f2; color: #b91c1c; }
.doc-var-avail.pending { background: #f8fafc; color: #94a3b8; }
.doc-var-avail.sup { background: #eff6ff; color: #1d4ed8; }
.doc-var-avail.sup.zero { background: #fef2f2; color: #b91c1c; }
/* 出入库单物料名称下的适用型号小字 */
.mat-model { font-size: 11px; margin-top: 2px; }
/* 出入库单多个物料名称之间的分割线 */
.mat-name-item + .mat-name-item { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #cbd5e1; }
/* 出入库单：不同物料之间的分割线同步延伸到明细变体列 */
.mat-detail-group + .mat-detail-group { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #cbd5e1; }
/* 出入库单：按物料分组，每个物料一行，物料名称与明细变体垂直居中对齐 */
.inbound-doc-table td { vertical-align: middle; }
.inbound-doc-table .mat-name-item,
.inbound-doc-table .mat-detail-group { display: flex; flex-direction: column; justify-content: center; }
.inbound-doc-table .mat-detail-line { line-height: 1.7; }
.inbound-doc-table .mat-variant { color: #64748b; margin-right: 2px; }
.doc-time-line { font-size: 12.5px; line-height: 1.65; white-space: nowrap; }
.doc-time-line .muted { font-size: 12px; }
.doc-link { color: var(--brand); cursor: pointer; }
.doc-link:hover { text-decoration: underline; }
/* 不同物料分组之间的分割线，横跨库存分类、物料名称、明细列 */
.inbound-doc-table tr.inbound-group-cont td { border-top: 1px dashed #cbd5e1; }
/* 出入库单合并行：取消整行悬浮高亮，避免悬浮第一行时合并单元格把整张单据都点亮 */
.inbound-doc-table tbody tr:hover { background: transparent; }
.inbound-doc-table tbody tr:hover > td { background: transparent; }
.inbound-doc-table tbody tr:hover > td.wrap { background: #f8fafc; }
/* 库存分类多选筛选：可下拉多选，也可直接输入 */
.cat-multi-combo { width: 320px; max-width: 100%; flex: 0 0 auto; }
.cat-multi-combo .combo-list { min-width: 100%; max-height: 240px; }
.cat-select-box { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 37px; padding: 3px 4px 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: text; }
.cat-select-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,118,110,.12); }
.cat-input { flex: 1 1 90px; min-width: 70px; border: 0; outline: none; padding: 3px 2px; font-size: 13.5px; background: transparent; color: var(--text); font-family: inherit; }
.cat-caret { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; padding: 3px 6px; align-self: center; }
.cat-picked { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cat-pick-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 3px 1px 8px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: 12px; line-height: 1.7; }
.cat-pick-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 13px; line-height: 1; padding: 2px 4px; }
.cat-pick-chip button:hover { color: #b91c1c; }
.date-range { display: inline-flex; align-items: center; gap: 6px; }
/* 出入库流水：合并行悬浮只高亮当前明细行，不把整组点亮 */
.movement-table td { vertical-align: middle; }
.movement-table tr.movement-group-start:not(:first-child) td { border-top: 1px dashed #cbd5e1; }
.movement-table tbody tr:hover { background: transparent; }
.movement-table tbody tr:hover > td { background: transparent; }
.movement-table tbody tr:hover > td.mv-cell { background: #f8fafc; }
/* 适用型号超过 3 个自动换行显示 */
.model-line { display: block; }
.model-line + .model-line { margin-top: 1px; }
/* 库存物料详情 */
.md-head { display: flex; gap: 14px; align-items: flex-start; }
.md-thumb { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 28px; flex: 0 0 auto; }
.md-thumb img { width: 100%; height: 100%; object-fit: cover; }
.md-main { flex: 1; min-width: 0; }
.md-name { font-size: 18px; font-weight: 700; }
.md-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.md-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.md-metric { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.md-metric-label { font-size: 12px; color: var(--muted); }
.md-metric-value { font-size: 17px; font-weight: 700; margin-top: 2px; }
.md-metric-value.ok { color: #0f766e; }
.md-metric-value.warn { color: #b45309; }
.md-block { margin-top: 16px; }
.md-block-title { font-weight: 600; margin-bottom: 8px; }
.md-attr-title { font-size: 12px; color: var(--muted); margin-top: 10px; }
.md-attrs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.md-attr { display: inline-flex; align-items: baseline; gap: 3px; max-width: 100%; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; font-size: 13px; }
.md-attr b { color: #334155; font-weight: 700; word-break: break-word; }
.md-attr .md-attr-sep { color: #94a3b8; font-weight: 700; }
.md-attr .md-attr-value { color: #0f172a; word-break: break-word; }
.mat-attr-chip b { color: #334155; font-weight: 700; }
.mat-attr-chip { color: #0f172a; }
.md-doc-group { margin-top: 12px; }
.md-doc-group + .md-doc-group { border-top: 1px dashed var(--line); padding-top: 12px; }
.md-doc-title { font-weight: 600; margin-bottom: 8px; }
.md-empty { padding: 8px 0; }
.md-doc-remark { font-size: 11px; font-weight: 400; }
.mat-name-link { cursor: pointer; }
.mat-name-link:hover { color: var(--brand); text-decoration: underline; }
.mat-supplier { font-size: 11px; margin-top: 2px; }
/* 库存整行点击详情 */
.table tbody tr[data-mopen] { cursor: pointer; }
/* 变体库存卡片 */
.md-variant-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.md-variant-card { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 190px; background: #fff; }
.md-variant-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto; }
.md-variant-thumb img { width: 100%; height: 100%; object-fit: cover; }
.md-variant-name { font-weight: 600; font-size: 13px; }
.md-variant-stock { color: var(--muted); font-size: 12px; margin-top: 2px; }
.md-variant-stock b { color: var(--text); }
.md-vstock-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.md-vstock-chips .chip b { margin-left: 2px; }
/* 物料详情历史单据：供应商小标签 */
.md-detail-line { line-height: 1.8; }
.md-detail-line + .md-detail-line { margin-top: 2px; }
.md-sup { display: inline-block; padding: 0 6px; margin-right: 6px; border-radius: 999px; background: #eef2ff; color: #4338ca; font-size: 11px; line-height: 1.7; }
.md-detail-group + .md-detail-group { margin-top: 6px; }
.md-detail-variant { color: #475569; margin-right: 2px; font-size: 12.5px; }
.md-metric-value.danger { color: #b91c1c; }
/* 库存展开变体：最多 4 个一行，超过自动换行 */
.mat-color-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; overflow: visible; }
.mat-color-card { min-width: 0; }
.mat-color-stock { white-space: normal; }
/* 新增/编辑库存物料的变体：最多 5 个一行，超过自动换行 */
.mf-color-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; overflow: visible; }
.mf-color-card { flex: none; width: auto; min-width: 0; }
@media (max-width: 1200px) {
  .mat-color-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mf-color-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 出入库/盘库明细：供应商、变体使用与物料名称一致的组合框 */
.sup-pick-combo { min-width: 160px; }
.sup-pick-combo .combo-list { position: static; left: auto; right: auto; top: auto; min-width: 190px; max-height: 200px; margin-top: 4px; }
.var-pick-combo { min-width: 140px; }
.var-pick-combo .combo-list { position: static; left: auto; right: auto; top: auto; min-width: 160px; max-height: 200px; margin-top: 4px; }
/* 明细下拉统一为悬浮浮层，不撑开表格行 */
.items-table-wrap { overflow: visible !important; }
.cat-pick-combo { min-width: 150px; }
.cat-pick-combo .combo-list,
.sup-pick-combo .combo-list,
.mat-pick-combo .combo-list,
.var-pick-combo .combo-list {
  position: absolute; left: 0; right: auto; top: calc(100% + 4px);
  margin-top: 0; min-width: 100%; max-height: 220px; z-index: 230;
}
.mat-pick-combo .combo-list { min-width: 320px; }
.sup-pick-combo .combo-list { min-width: 190px; }
.var-pick-combo .combo-list { min-width: 170px; }
/* 出入库/盘库明细：固定列宽，删除按钮始终可见，无需横向滚动 */
.doc-items-table { table-layout: fixed; width: 100%; }
.order-doc-table { table-layout: fixed; width: 100%; }
.order-doc-table .input { width: 100%; min-width: 0; box-sizing: border-box; }
.order-doc-table th, .order-doc-table td { vertical-align: middle; }
.order-stock-table { table-layout: fixed; width: 100%; }
.order-stock-table td { word-break: break-all; }
.doc-items-table th, .doc-items-table td { padding: 8px 6px; }
.doc-items-table th:nth-child(1) { width: 16%; }
.doc-items-table th:nth-child(2) { width: 19%; }
.doc-items-table th:nth-child(3) { width: 24%; }
.doc-items-table th:nth-child(4) { width: 13%; }
.doc-items-table th:nth-child(5) { width: 15%; }
.doc-items-table th:nth-child(6) { width: 48px; }
.doc-items-table .cat-pick-combo,
.doc-items-table .sup-pick-combo,
.doc-items-table .mat-pick-combo,
.doc-items-table .var-pick-combo { min-width: 0; }
.doc-items-table .combo-row { gap: 4px; }
.doc-items-table .combo-row .input { width: auto; flex: 1 1 0; min-width: 0; }
.doc-items-table .combo-row .btn { flex: 0 0 26px; width: 26px; min-width: 26px; padding: 0; height: 30px; font-size: 12px; }
.doc-items-table input[type="number"] { width: 100% !important; min-width: 0; }
.doc-items-table td:last-child .btn { width: 100%; padding: 0 2px; }
/* 采购明细：7 列固定布局，删除按钮始终可见 */
.purchase-items-table { table-layout: fixed; width: 100%; }
.purchase-items-table th, .purchase-items-table td { padding: 8px 6px; }
.purchase-items-table th:nth-child(1) { width: 14%; }
.purchase-items-table th:nth-child(2) { width: 16%; }
.purchase-items-table th:nth-child(3) { width: 24%; }
.purchase-items-table th:nth-child(4) { width: 12%; }
.purchase-items-table th:nth-child(5) { width: 10%; }
.purchase-items-table th:nth-child(6) { width: 11%; }
.purchase-items-table th:nth-child(7) { width: 44px; }
.purchase-items-table .cat-pick-combo,
.purchase-items-table .sup-pick-combo,
.purchase-items-table .mat-pick-combo,
.purchase-items-table .var-pick-combo { min-width: 0; }
.purchase-items-table .combo-row { gap: 4px; }
.purchase-items-table .combo-row .input { width: auto; flex: 1 1 0; min-width: 0; }
.purchase-items-table .combo-row .btn { flex: 0 0 24px; width: 24px; min-width: 24px; padding: 0; height: 30px; font-size: 12px; }
.purchase-items-table input[type="number"] { width: 100% !important; min-width: 0; }
.purchase-items-table td:last-child .btn { width: 100%; padding: 0 2px; }
/* 采购订单列表：合并单元格悬停时不整单铺色，只高亮当前明细行 */
.purchase-list-table tbody tr:hover { background: transparent; }
.purchase-list-table tbody tr:hover > td:not([rowspan]) { background: #f8fafc; }
.purchase-list-table { table-layout: fixed; width: 100%; }
.purchase-list-table th, .purchase-list-table td { padding: 7px 5px; white-space: normal; word-break: break-word; font-size: 12px; }
.purchase-list-table th.num, .purchase-list-table td.num { white-space: nowrap; }
.purchase-list-table .actions { flex-wrap: wrap; gap: 4px; }
.purchase-list-table .actions .btn { padding: 0 5px; font-size: 11px; height: 24px; }
.purchase-time-line { line-height: 1.65; font-size: 12px; white-space: nowrap; }
.purchase-order-amount { margin-top: 4px; font-size: 11px; }
.mat-category { font-size: 11px; margin-bottom: 2px; }
.supplier-row { cursor: pointer; }
.supplier-row:hover > td { background: #f8fafc; }
.purchase-variant-lines { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.purchase-variant-line { line-height: 1.6; font-size: 12px; }
.purchase-variant-line .pv-name { color: #64748b; margin-right: 4px; }
.purchase-variant-line b { color: #0f172a; }
.purchase-batch-time { line-height: 1.7; font-size: 12px; white-space: nowrap; }
.purchase-batch-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-top: 8px; background: #fff; }
.purchase-batch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.batch-actions { margin-left: auto; display: flex; gap: 6px; }
.purchase-detail-table tbody tr:hover { background: transparent; }
.purchase-detail-table tbody tr:hover > td:not([rowspan]) { background: #f8fafc; }
.purchase-detail-table tbody tr:hover > td[rowspan] { background: transparent; }
/* BOM 新增：颜色变体横向标签 */
.bom-vtabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.bom-vtab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; color: var(--text); }
.bom-vtab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.bom-panel { margin-top: 4px; }
/* BOM 物料清单卡片展示 */
.bom-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.bom-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.bom-card-cover { position: relative; height: 170px; background: #f8fafc; display: flex; align-items: center; justify-content: center; }
.bom-card-cover img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.bom-img-ph { font-size: 38px; opacity: .5; }
.bom-card-switch { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.94); padding: 3px 10px; border-radius: 999px; box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.bom-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.bom-card-model { font-size: 16px; font-weight: 700; }
.bom-card-sub { color: var(--muted); font-size: 12.5px; }
.bom-card-actions { display: flex; gap: 8px; }
.bom-card-items { border-top: 1px dashed var(--line); padding-top: 8px; max-height: 220px; overflow: auto; }
.bom-mini { font-size: 12.5px; }
.bom-mini th, .bom-mini td { padding: 6px 8px; }
.bom-empty { padding: 8px 0; }
.bom-card-head-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bom-color-badge { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; font-weight: 600; }
.bom-card-pick { position: absolute; top: 10px; left: 10px; background: rgba(255,255,255,.94); padding: 4px 7px; border-radius: 8px; box-shadow: 0 1px 4px rgba(15,23,42,.12); z-index: 2; }
/* 安全库存预警行高亮 */
.table tbody tr.stock-alert td { background: #fef2f2 !important; }
.table tbody tr.stock-alert td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.table tbody tr.stock-alert:hover td { background: #fee2e2 !important; }
/* 库存预警标签：低库存 / 变体负数，显示在物料名称右侧 */
.stock-flag { flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-right: 0; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 1; white-space: nowrap; vertical-align: 1px; color: #fff; letter-spacing: .3px; }
.mat-name-line .stock-flag { margin-left: 6px; align-self: center; }
.stock-flag-low { background: #dc2626; }
.stock-flag-neg { background: #7f1d1d; }
.mat-var-flag { margin-left: 6px; margin-right: 0; height: 18px; padding: 0 6px; }
.mat-color-card.is-negative { border-color: #fca5a5; background: #fff5f5; box-shadow: inset 0 0 0 1px #fee2e2; }
.md-safety { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bom-card.bom-disabled { opacity: .62; background: #f8fafc; }
/* 客户BOM与工序 */
.cb-customer-line { font-size: 13px; color: var(--text); font-weight: 600; }
.cb-selects { display: flex; flex-direction: column; gap: 8px; }
.cb-selects .field { width: 100%; min-width: 0; margin: 0; }
.cb-selects .field label { font-size: 12px; margin-bottom: 3px; }
.cb-selects select { width: 100%; }
.cb-no-scroll { max-height: none !important; overflow: visible !important; }
.cb-route-list { display: flex; flex-direction: column; gap: 6px; }
.cb-route-item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.cb-route-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cb-route-name { font-weight: 600; font-size: 13px; }
.cb-route-type { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); }
.cb-route-rate { margin-left: auto; font-weight: 700; color: var(--brand-dark); font-size: 13px; }
.cb-route-sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
/* 订单详情内嵌生产工单工序与派工任务 */
.mo-prod-block { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
.mo-prod-block:last-child { margin-bottom: 0; }
.mo-prod-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mo-prod-sub { margin: 12px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mo-prod-table th, .mo-prod-table td { padding: 6px 8px; font-size: 12.5px; }

/* ---------- 移动端全局适配：表格转卡片、表单全宽、禁止横向滚动 ---------- */
@media (max-width: 860px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .view { padding: 12px; }
  .topbar { height: auto; min-height: 52px; padding: 8px 12px; flex-wrap: wrap; gap: 8px; }
  .topbar .crumb { min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .who { display: none; }
  .topbar .avatar { flex: none; }
  .card-h { flex-wrap: wrap; row-gap: 8px; padding: 12px 14px; }
  .card-b { padding: 12px 14px; }
  .toolbar, .btn-row, .actions, .modal-f { flex-wrap: wrap; }
  .input, select.input, textarea.input { width: 100% !important; max-width: 100%; box-sizing: border-box; }
  .field { min-width: 0; }
  .table-wrap { overflow-x: visible; }
  table.table { width: 100% !important; max-width: 100%; table-layout: auto; }
  .table th, .table td { white-space: normal; word-break: break-word; padding: 8px 7px; }
  .pager { flex-wrap: wrap; justify-content: flex-start; padding: 10px 12px; }
  .modal-mask { padding: 8px; }
  .modal, .modal.wide, .modal.xwide, .modal.lg, .modal.slim { width: 100% !important; max-width: 100%; max-height: 94vh; }
  .modal-h { padding: 12px 14px; }
  .modal-b { padding: 12px 14px; }
  .modal-f { padding: 10px 12px; }
  .modal-f .btn { flex: 1 1 auto; }
  .img-zoom-wrap img { max-width: 100%; height: auto; }
  .assign-context { flex-wrap: wrap; overflow-x: visible; gap: 8px 16px; }
  .assign-context-item { white-space: normal; }
  .assign-context-item b { max-width: 100%; }
  .combo-list { min-width: 0 !important; max-width: calc(100vw - 40px); }
  .so-flow-scroll { overflow-x: visible; }
  .so-flow { min-width: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .so-flow-node { min-width: 0; padding: 4px 2px; }
  .so-flow-node::before, .so-flow-node::after { display: none; }
  .so-oc-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) !important; gap: 7px 10px; align-items: start; padding: 10px 12px; }
  .so-oc-title { grid-column: 1; min-width: 0; align-items: flex-start; font-size: 12px; gap: 4px; }
  .so-oc-title b { font-size: 12px; }
  .so-oc-title .badge { font-size: 10.5px; padding: 1px 6px; }
  .so-oc-title .chip:not(.chip-source) { display: none; }
  .so-oc-title .chip-source { display: inline-flex; font-size: 10.5px; padding: 1px 6px; }
  .so-oc-title a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .so-oc-cust { grid-column: 2; text-align: left; min-width: 0; }
  .so-oc-cust .so-oc-staff { display: none; }
  .so-oc-date { grid-column: 1; flex-direction: row; flex-wrap: wrap; gap: 2px 8px; }
  .so-oc-amount { grid-column: 2; justify-self: start; font-size: 16px; }
  .so-oc-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .so-card-delivery { align-items: flex-start; }
  .pack-table, .modal .comp-table { min-width: 0 !important; }
  .pack-table { table-layout: auto; }
  .pack-toolbar { flex-wrap: wrap; }
  .pack-toolbar .pack-wh select { min-width: 0; width: 100%; }
  .sd-emp-head .btn { margin-left: 0; }
  .table-mobile { display: block; width: 100% !important; min-width: 0 !important; border-collapse: separate; border-spacing: 0; }
  .table-mobile thead { display: none; }
  .table-mobile tbody, .table-mobile tfoot { display: block; width: 100%; }
  .table-mobile tbody tr { display: block; margin: 0 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
  .table-mobile tbody tr:hover { background: #fff; }
  .table-mobile tbody td { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; width: auto !important; max-width: none; padding: 8px 10px; border: 0; border-bottom: 1px dashed var(--line); white-space: normal; text-align: right; word-break: break-word; }
  .table-mobile tbody td:last-child { border-bottom: 0; }
  .table-mobile tbody td::before { content: attr(data-label); flex: 0 0 38%; text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; }
  .table-mobile tbody td[data-label=""]::before { display: none; }
  .table-mobile tbody td[colspan], .table-mobile tbody tr.table-mobile-full td { justify-content: flex-start; text-align: left; background: #f8fafc; }
  .table-mobile tbody td[colspan]::before, .table-mobile tbody tr.table-mobile-full td::before { display: none; }
  .table-mobile td[colspan] > div, .table-mobile td[colspan] > .sd-emp-head { width: 100%; }
  .table-mobile .input, .table-mobile select, .table-mobile textarea { width: 100% !important; min-width: 0; }
  .table-mobile .combo { width: 100%; }
  .table-mobile .combo-list { position: static; left: auto; right: auto; top: auto; width: 100%; min-width: 0; max-height: 240px; }
  .table-mobile td .actions { justify-content: flex-end; flex-wrap: wrap; }
  .table-mobile td .btn { white-space: normal; }
  .table-mobile tfoot tr { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; margin-bottom: 8px; }
  .table-mobile tfoot td { display: inline-flex; gap: 6px; border: 0; padding: 2px 6px; white-space: normal; }
  .table-mobile tfoot td::before { content: attr(data-label) ':'; color: var(--muted); }
  .table-mobile tfoot td[data-label=""]::before { display: none; }
}
@media (max-width: 520px) {
  .btn { padding: 7px 11px; font-size: 13px; }
  .card-h h3 { font-size: 14.5px; }
  .topbar { padding: 7px 10px; }
  .topbar .crumb { font-size: 14px; }
  .view { padding: 10px; }
  .table-mobile tbody td::before { flex-basis: 42%; }
}

/* 移动端：分类筛选、产品详情标签页自动换行，避免横向滑动 */
@media (max-width: 860px) {
  .cat-chips { flex-wrap: wrap; overflow-x: visible; padding-bottom: 6px; }
  .cat-chips > * { flex: 0 0 auto; }
  .pd-tabs { flex-wrap: wrap; overflow-x: visible; }
  .pd-tabs button { white-space: normal; flex: 1 1 auto; padding: 8px 10px; }
}

@media (max-width: 860px) {
  .inv-cat-sortable { display: flex; flex-wrap: wrap; flex: 1 1 100%; width: 100%; gap: 8px; }
  .inv-cat-wrap { max-width: 100%; }
  .inv-cat-wrap .cat-chip { white-space: normal; }
}

/* 导出工资台账：员工多选面板 */
.we-emp-box { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.we-emp-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.we-emp-tools .input { width: 190px; }
.we-emp-list { max-height: 260px; overflow-y: auto; padding: 6px 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 10px; }
.we-emp-item { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; min-width: 0; }
.we-emp-item:hover { background: #f0fdfa; }
.we-emp-item input { margin: 0; flex: none; }
.we-emp-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.we-emp-no { color: var(--muted); font-size: 11.5px; flex: none; }
.we-emp-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: var(--muted); font-size: 12.5px; }
@media (max-width: 860px) {
  .we-emp-tools .input { width: 100%; }
  .we-emp-list { grid-template-columns: 1fr; max-height: 220px; }
}

/* 功能百宝袋：图片转 PDF / PDF 转图片 */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; grid-auto-rows: minmax(410px, auto); }
.tool-grid .card + .card { margin-top: 0; }
.tool-grid > .card { display: flex; flex-direction: column; min-width: 0; }
.tool-grid > .card > .card-b { flex: 1 1 auto; }
.tool-opt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
@media (max-width: 700px) { .tool-opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .tool-grid { grid-template-columns: 1fr; grid-auto-rows: auto; } }
.tool-scan-card { margin-bottom: 16px; }
.tool-scan-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.tool-scan-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tool-scan-side .tool-drop { padding: 20px 14px; }
.tool-scan-side .btn-row { margin-top: 0; }
.tool-scan-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.tool-scan-toolbar .field { flex: 1 1 150px; margin: 0; }
.tool-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #475569; padding-bottom: 10px; white-space: nowrap; }
.tool-scan-tip { font-size: 12px; line-height: 1.7; }
.tool-scan-main { min-width: 0; }
.tool-scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tool-scan-empty { grid-column: 1 / -1; min-height: 240px; border: 1px dashed var(--line); border-radius: 12px; background: #f8fafc; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; padding: 20px; }
.tool-scan-empty b { color: #475569; font-size: 13.5px; }
.tool-scan-empty span { font-size: 12px; }
.tool-scan-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.tool-scan-thumb { height: 210px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tool-scan-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tool-scan-loading { font-size: 12px; color: var(--muted); padding: 10px; text-align: center; line-height: 1.6; word-break: break-all; }
.tool-scan-no { position: absolute; top: 7px; left: 7px; z-index: 1; background: rgba(15,23,42,.76); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 11px; }
.tool-scan-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 6px; border-top: 1px solid #eef2f7; }
.tool-scan-tools .name { flex: 1 1 100%; min-width: 0; font-size: 11px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-scan-tools button { flex: none; border: 1px solid #dbe3ee; background: #fff; color: #475569; border-radius: 6px; width: 24px; height: 24px; line-height: 1; cursor: pointer; font-size: 12px; padding: 0; }
.tool-scan-tools button:hover { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }
.tool-scan-tools button.danger { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
@media (max-width: 1000px) { .tool-scan-body { grid-template-columns: 1fr; } }
.tool-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 26px 16px; text-align: center; cursor: pointer; background: #f8fafc; transition: border-color .15s, background .15s; }
.tool-drop:hover, .tool-drop.drag { border-color: #0f766e; background: #f0fdfa; }
.tool-drop-icon { font-size: 32px; margin-bottom: 6px; }
.tool-drop .muted { margin-top: 6px; font-size: 12px; }
.tool-img-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.tool-img-item { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.tool-img-item img { width: 100%; height: 100px; object-fit: contain; background: #f8fafc; display: block; }
.tool-img-meta { display: flex; align-items: center; gap: 4px; padding: 5px 7px; font-size: 11px; color: #475569; }
.tool-img-meta span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-img-del { border: 0; background: #fee2e2; color: #b91c1c; width: 20px; height: 20px; border-radius: 50%; line-height: 1; cursor: pointer; padding: 0; flex: none; }
.tool-img-del:hover { background: #fecaca; }
.tool-file-picked { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; font-size: 13px; word-break: break-all; }
.tool-picked-list { display: grid; gap: 6px; margin-top: 8px; }
.tool-picked-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; min-width: 0; }
.tool-picked-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-picked-row small { flex: none; color: var(--muted); }
.tool-status { font-size: 12px; color: var(--muted); margin-left: 8px; }
.tool-status.ok { color: #0f766e; }
.tool-status.err { color: #b91c1c; }
/* 质检录入：拖拽/拍照上传 */
.qc-upload-title { margin-top: 10px; font-size: 13px; font-weight: 700; color: #334155; }
.qc-form-row { display: grid; gap: 10px 12px; }
.qc-form-row-1 { grid-template-columns: 1.1fr 1.1fr 1fr .9fr 1fr; }
.qc-form-row-2 { grid-template-columns: 1fr 1fr; margin-top: 12px; }
.qc-form-row-3 { grid-template-columns: 1fr 1fr 1fr; margin-top: 12px; }
.qc-batch-wrap { margin-top: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; }
.qc-batch-wrap label { font-weight: 700; color: #0f766e; }
.qc-batch-wrap select { max-width: 360px; }
.hof-summary { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; }
.hof-summary b { font-size: 14px; color: #0f172a; }
.hof-stock-summary { display: flex; gap: 16px; flex-wrap: wrap; padding: 7px 10px; margin-bottom: 6px; border-radius: 8px; background: #f0fdfa; border: 1px solid #99f6e4; font-size: 12.5px; }
.hof-stock-summary b { font-size: 14px; color: #0f766e; }
.hof-batch-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12px; }
.hof-batch-chip { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #0f766e; font-size: 11.5px; line-height: 1.6; }
.hof-table td, .hof-table th { vertical-align: middle; }
.hof-total { text-align: right; font-size: 14px; margin-top: 8px; }
.hof-total b { color: #b45309; font-size: 18px; }
@media (max-width: 800px) {
  .qc-form-row-1, .qc-form-row-2, .qc-form-row-3 { grid-template-columns: 1fr; }
}
.qc-drop { margin-top: 6px; border: 1.5px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; padding: 10px 12px; text-align: center; cursor: pointer; font-size: 13px; color: #475569; }
.qc-drop:hover, .qc-drop.drag { border-color: #0f766e; background: #f0fdfa; }
.qc-drop-icon { font-size: 20px; line-height: 1; margin-bottom: 3px; }
.qc-drop .muted { font-size: 12px; margin-top: 4px; }
.qc-file-list { margin-top: 8px; }
.qc-file-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; font-size: 12.5px; background: #fff; }
.qc-file-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-file-row small { color: var(--muted); flex: none; }
.qc-file-row button { border: 0; background: #fee2e2; color: #b91c1c; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }
.qc-file-row .qc-thumb-img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; border: 1px solid var(--line); }
.qc-file-row .qc-thumb-file { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 6px; flex: none; font-size: 20px; color: #64748b; }
.qc-existing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 6px; max-height: 180px; overflow-y: auto; align-content: start; }
.qc-existing-grid a { display: block; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f8fafc; }
.qc-existing-item { min-width: 0; }
.qc-existing-batch { margin-top: 3px; font-size: 11px; color: #64748b; text-align: center; word-break: break-all; line-height: 1.3; }
.qc-existing-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qc-existing-grid .qc-existing-file { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #64748b; font-size: 12px; }

/* 移动端侧边栏遮罩与滑动手势 */
.sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 45; }
body.nav-open { overflow: hidden; }
@media (max-width: 860px) {
  .sidebar.open + .sidebar-mask { display: block; }
  html, body { max-width: 100%; overflow-x: hidden; }
  .view, .main { min-width: 0; max-width: 100%; }
}
html { -webkit-text-size-adjust: 100%; }


/* 客户地址簿 / 客户历史 */
.customer-row { cursor: pointer; }
.customer-row:hover { background: #f0fdfa; }
.cust-address-list { display: grid; gap: 6px; margin-top: 6px; }
.cust-address-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.cust-address-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.cust-address-main b { word-break: break-all; }
.cust-address-main .muted { font-size: 11.5px; }
.ch-head { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ch-head h3 { margin: 0 0 4px; font-size: 20px; }
.ch-contact { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 12.5px; color: #475569; }
.ch-addresses { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ch-addresses .chip { max-width: 100%; white-space: normal; word-break: break-all; }
.ch-section { margin-top: 16px; }
.ch-section-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ch-section-h b { font-size: 14px; }
.ch-section-h .muted { font-size: 12px; }
.cust-addr-add-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.cust-addr-add-row .hint { flex: 1; min-width: 0; }
.cust-addr-add-row .btn { flex: none; }
.link-btn { border: 0; background: transparent; color: #0f766e; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.ch-bulk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.ch-bulk-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f8fafc; color: #334155; text-decoration: none; font-size: 11.5px; min-width: 0; }
.ch-bulk-card:hover { border-color: #0f766e; }
.ch-bulk-card img { width: 100%; height: 112px; object-fit: cover; display: block; background: #fff; }
.ch-bulk-card span { padding: 5px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-bulk-card small { padding: 0 7px 6px; color: #64748b; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-bulk-file { justify-content: center; align-items: center; min-height: 150px; padding: 10px; text-align: center; }
.ch-bulk-icon { font-size: 30px; padding: 0 !important; }
.order-embed-frame { width: 100%; height: 82vh; min-height: 560px; border: 0; background: #f8fafc; display: block; border-radius: 8px; }

/* 送货与出库 / 出货管理：订单内交货计划 */
.dop-plan-wrap { flex-direction: column; align-items: stretch; gap: 8px; }
.dop-plan-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dop-plan-head > span { font-size: 13px; color: #0f172a; }
.dop-plan-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.dop-plan-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.dop-plan-doc { display: flex; align-items: center; }
.dop-outbound-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; line-height: 1.6; border: 1px solid; }
.dop-outbound-chip.pending { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.dop-outbound-chip.ok { color: #0f766e; background: #ecfdf5; border-color: #a7f3d0; }
.dop-plan-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dop-plan-items { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.dop-plan-item { font-size: 12.5px; color: #334155; }
.dop-plan-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .dop-plan-actions .btn { flex: 1 1 30%; }
}


/* ������ϱ�����ͺ�/����/��λͬ�У���Ӧ�̶�ռ���� */
.form-grid.mf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .form-grid.mf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .form-grid.mf-grid { grid-template-columns: 1fr; } }


/* 物料需求：变体横向标签 */
.req-var-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.req-var-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid #dbe3ec; background: #f8fafc; border-radius: 999px; font-size: 11.5px; color: #475569; white-space: nowrap; }
.req-var-chip b { color: #0f172a; }
.req-var-chip .req-var-short { color: #b91c1c; font-weight: 600; }
/* 物料需求：变体分行显示 */
.req-var-lines { display: flex; flex-direction: column; gap: 4px; }
.req-var-line { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.req-var-line b { color: #0f172a; }
.req-var-line .req-var-short { color: #b91c1c; font-weight: 600; }
/* 物料需求：物料汇总行与变体分行 */
.req-group-row td { background: #f8fafc; font-weight: 600; }
.req-variant-row td { background: #fff; }
.req-variant-row + .req-variant-row td { border-top: 1px dashed #cbd5e1; }
.req-var-sub { padding-left: 14px; color: #0f172a; }
/* 物料需求：同一物料变体分行显示 */
.req-variant-first td { border-top: 1px solid #e2e8f0; }
.req-variant-cont td { border-top: 1px dashed #cbd5e1; }
/* 物料需求：分类/名称/涉及订单跨行居中，分割线只在变体数值列 */
.table td.req-span-cell, .table th.req-span-cell { text-align: center; vertical-align: middle; }
.req-var-cont td { border-top: 1px dashed #cbd5e1; }
/* 物料需求：勾选与整行悬停 */
.req-pick-cell { width: 38px; text-align: center; vertical-align: middle; }
.req-variant-row { transition: background .12s ease; }
.req-variant-row.req-hover td:not(.req-span-cell) { background: #f0fdfa; }
/* 物料需求采购草稿 */
.draft-item-line { line-height: 1.8; font-size: 12px; }
.draft-item-line b { color: #0f172a; }

/* 供应商库存分类多选 */
.sup-cat-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.sup-cat-opt {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: #334155; font-size: 12.5px; cursor: pointer; user-select: none;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.sup-cat-opt:hover { border-color: #5eead4; background: #f0fdfa; }
.sup-cat-opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.sup-cat-opt input { width: 14px; height: 14px; accent-color: var(--brand); }
.sup-cat-opt .sup-cat-main {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 10px; line-height: 1;
}
.sup-cat-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sup-cat-chips .chip { margin: 0; }

/* 供应商采购记录：按采购单分组的宽版卡片，取消横向滚动 */
.sup-hist-list { display: flex; flex-direction: column; gap: 14px; }
.sup-hist-card {
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  overflow: hidden; cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease;
}
.sup-hist-card:hover { border-color: #99f6e4; box-shadow: 0 10px 24px -18px rgba(15, 23, 42, .35); }
.sup-hist-head {
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  padding: 12px 14px; background: #f8fafc; border-bottom: 1px solid var(--line);
}
.sup-hist-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-hist-title > b { font-size: 14px; }
.sup-hist-meta { display: flex; align-items: center; gap: 5px 18px; flex-wrap: wrap; font-size: 12.5px; }
.sup-hist-meta span { display: inline-flex; align-items: baseline; gap: 5px; }
.sup-hist-meta em { font-style: normal; color: var(--muted); }
.sup-hist-meta b { color: #0f172a; }
.sup-hist-head .btn { margin-left: auto; }
.sup-hist-amount b { color: #b45309; font-size: 14px; }
.sup-hist-items { overflow-x: visible; }
.sup-hist-table { table-layout: fixed; width: 100%; }
.sup-hist-table th, .sup-hist-table td {
  padding: 8px 10px; white-space: normal; word-break: break-word; vertical-align: top;
}
.sup-hist-table th { font-size: 12px; }
.sup-hist-table th:nth-child(1) { width: 13%; }
.sup-hist-table th:nth-child(2) { width: 35%; }
.sup-hist-table th:nth-child(3) { width: 12%; }
.sup-hist-table th:nth-child(4) { width: 15%; }
.sup-hist-table th:nth-child(5) { width: 10%; }
.sup-hist-table th:nth-child(6) { width: 15%; }
.sup-hist-table .num { white-space: nowrap; }
.sup-hist-table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 860px) {
  .sup-hist-head { align-items: flex-start; }
  .sup-hist-head .btn { margin-left: 0; width: 100%; }
  .sup-hist-meta { gap: 4px 12px; }
}

/* 财务工作台：应收应付一排，工资明细单独一行 */
.finance-card .card-h { gap: 8px; flex-wrap: wrap; row-gap: 8px; }
.finance-card .card-h h3 { font-size: 15px; }
.finance-card[data-fin-card="receivables"] .card-h h3,
.finance-card[data-fin-card="payables"] .card-h h3,
.finance-card[data-fin-card="self-products"] .card-h h3 { font-size: 17px; }
.finance-card .card-h .input { width: 126px !important; }
.finance-card .table-wrap { overflow-x: hidden; }
.finance-card-table { table-layout: fixed; width: 100%; }
.finance-card-table th:nth-child(1) { width: 40%; }
.finance-card-table th:nth-child(2) { width: 18%; }
.finance-card-table th:nth-child(3) { width: 20%; }
.finance-card-table th:nth-child(4) { width: 22%; }
.finance-card-table th, .finance-card-table td { padding: 7px 6px; font-size: 12px; white-space: normal; word-break: break-word; }
.finance-card-table th { font-size: 11.5px; }
.finance-card-table td.mono { word-break: keep-all; }
.finance-card-table .num { white-space: nowrap; }
.finance-card[data-fin-card="wages"] .finance-card-table th:nth-child(1) { width: 30%; }
.finance-card[data-fin-card="wages"] .finance-card-table th:nth-child(2) { width: 28%; }
.finance-card[data-fin-card="wages"] .finance-card-table th:nth-child(3) { width: 22%; }
.finance-card[data-fin-card="wages"] .finance-card-table th:nth-child(4) { width: 20%; }
.finance-card[data-fin-card="self-products"] .finance-card-table th:nth-child(1) { width: 40%; }
.finance-card[data-fin-card="self-products"] .finance-card-table th:nth-child(2) { width: 36%; }
.finance-card[data-fin-card="self-products"] .finance-card-table th:nth-child(3) { width: 24%; }
.self-products-table .self-material-cell { font-size: 13.5px; }
.self-products-table .req-var-sub { padding-left: 4px; }
.finance-card[data-fin-card="receivables"] .finance-card-table th:nth-child(1) { width: 28%; }
.finance-card[data-fin-card="receivables"] .finance-card-table th:nth-child(2) { width: 13%; }
.finance-card[data-fin-card="receivables"] .finance-card-table th:nth-child(3) { width: 16%; }
.finance-card[data-fin-card="receivables"] .finance-card-table th:nth-child(4) { width: 17%; }
.finance-card[data-fin-card="receivables"] .finance-card-table th:nth-child(5) { width: 26%; }
.finance-card[data-fin-card="payables"] .finance-card-table th:nth-child(1) { width: 28%; }
.finance-card[data-fin-card="payables"] .finance-card-table th:nth-child(2) { width: 14%; }
.finance-card[data-fin-card="payables"] .finance-card-table th:nth-child(3) { width: 16%; }
.finance-card[data-fin-card="payables"] .finance-card-table th:nth-child(4) { width: 16%; }
.finance-card[data-fin-card="payables"] .finance-card-table th:nth-child(5) { width: 26%; }
.finance-order-row { cursor: pointer; }
.finance-order-row:hover td { background: #f0fdfa; }
.finance-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  margin-top: 10px; padding: 12px 14px; border-top: 1px solid var(--line);
  background: #f8fafc; border-radius: 0 0 8px 8px; color: #475569; font-size: 13px;
}
.finance-summary b { color: #0f172a; }
.fin-actions-cell { text-align: center !important; vertical-align: middle !important; white-space: normal; }
.fin-actions-cell .btn + .btn { margin-left: 4px; margin-top: 3px; }
.fin-action-group { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.fin-action-slot { display: inline-block; width: 64px; height: 1px; }
.finance-receive-btn, .finance-pay-btn { padding: 5px 9px; white-space: nowrap; min-width: 64px; }
.fin-prod-img { width: 56px; text-align: center; }
.fin-prod-thumb {
  width: 44px; height: 44px; object-fit: contain; display: inline-block;
  border: 1px solid var(--line); border-radius: 6px; background: #f8fafc;
}
.fin-receipt-preview {
  max-width: 100%; max-height: 260px; display: block;
  border: 1px solid var(--line); border-radius: 8px; background: #f8fafc;
}
.fin-dropzone {
  border: 1.5px dashed #94a3b8; border-radius: 10px; padding: 18px 16px;
  background: #f8fafc; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.fin-dropzone:hover, .fin-dropzone.dragover { border-color: var(--brand); background: #f0fdfa; }
.fin-dropzone-main b { display: block; color: var(--text); margin-bottom: 4px; }
.fin-dropzone-main .muted { font-size: 12px; }
.finance-commission-box {
  border: 1px solid #99f6e4; background: #f0fdfa; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 14px;
}
.finance-commission-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.finance-commission-head .muted { font-size: 12px; }
.finance-commission-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finance-commission-row label { font-size: 12.5px; color: #475569; }


/* 统一所有模块表格行鼠标悬停为绿色高亮 */
#app table tbody tr:hover > td,
#app table tbody tr:hover,
#modal-root table tbody tr:hover > td,
#modal-root table tbody tr:hover { background-color: #f0fdfa !important; }


/* ================= 全厂经营看板：科技大屏 ================= */
.dash-tech {
  --dash-cyan: #22d3ee;
  --dash-teal: #2dd4bf;
  --dash-line: rgba(56, 189, 248, .18);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - 96px);
  padding: 22px;
  border-radius: 18px;
  color: #d9f7ff;
  background:
    radial-gradient(circle at 8% 0%, rgba(14, 116, 144, .38), transparent 34%),
    radial-gradient(circle at 100% 8%, rgba(45, 212, 191, .16), transparent 30%),
    linear-gradient(155deg, #04121f 0%, #061a2b 52%, #030d19 100%);
  border: 1px solid rgba(34, 211, 238, .16);
  box-shadow: 0 22px 60px rgba(2, 12, 27, .28);
}
.dash-tech::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 211, 238, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .045) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 94%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 94%);
}
.dash-tech::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -120px;
  height: 120px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(34, 211, 238, .09), transparent);
  animation: dash-scan 9s linear infinite;
}
@keyframes dash-scan {
  0% { transform: translateY(0); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(120vh); opacity: 0; }
}
@keyframes dash-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.8); }
}
.dash-loading, .dash-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f9eb3;
  font-size: 13px;
  letter-spacing: .06em;
}
.dash-empty {
  min-height: 110px;
  border: 1px dashed rgba(34, 211, 238, .16);
  border-radius: 10px;
  background: rgba(4, 20, 35, .35);
}
.dash-error {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.dash-error-title { font-size: 18px; font-weight: 700; color: #fecaca; }
.dash-error-msg { font-size: 12.5px; color: #fca5a5; margin-bottom: 8px; }
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(34, 211, 238, .14);
}
.dash-title { min-width: 0; }
.dash-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-size: 10.5px;
  letter-spacing: .18em;
  font-family: ui-monospace, Consolas, monospace;
}
.dash-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dash-teal);
  box-shadow: 0 0 12px var(--dash-teal);
  animation: dash-pulse 1.6s ease-in-out infinite;
}
.dash-title h1 {
  margin: 5px 0 3px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: .06em;
  color: #f0fdff;
  text-shadow: 0 0 28px rgba(34, 211, 238, .32);
}
.dash-sub { color: #7dd3fc; font-size: 12px; }
.dash-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.dash-clock {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 27px;
  line-height: 1;
  letter-spacing: .08em;
  color: #67e8f9;
  text-shadow: 0 0 18px rgba(34, 211, 238, .42);
  font-variant-numeric: tabular-nums;
}
.dash-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(34, 211, 238, .3);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(8, 47, 73, .55);
  color: #a5f3fc;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.dash-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dash-btn:hover, .dash-btn.active {
  background: rgba(34, 211, 238, .14);
  border-color: #22d3ee;
  box-shadow: 0 0 18px rgba(34, 211, 238, .2);
}
.dash-btn.primary {
  background: linear-gradient(135deg, rgba(13, 148, 136, .82), rgba(8, 145, 178, .78));
  border-color: rgba(94, 234, 212, .45);
  color: #fff;
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.dash-kpi {
  --tone: #22d3ee;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 142px;
  padding: 13px 14px 12px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, .17);
  background: linear-gradient(150deg, rgba(12, 52, 74, .84), rgba(4, 21, 36, .92));
  box-shadow: inset 0 0 34px rgba(34, 211, 238, .025);
  transition: transform .16s, border-color .16s, box-shadow .16s;
  cursor: pointer;
}
.dash-kpi::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tone), transparent);
  opacity: .85;
}
.dash-kpi::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 96px;
  right: -44px;
  bottom: -54px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--tone) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.dash-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, .42);
  box-shadow: 0 8px 28px rgba(2, 12, 27, .36), inset 0 0 34px rgba(34, 211, 238, .04);
}
.dash-kpi.tone-green { --tone: #2dd4bf; }
.dash-kpi.tone-violet { --tone: #a78bfa; }
.dash-kpi.tone-blue { --tone: #60a5fa; }
.dash-kpi.tone-teal { --tone: #34d399; }
.dash-kpi.tone-amber { --tone: #fbbf24; }
.dash-kpi.is-alert {
  border-color: rgba(251, 191, 36, .5);
  box-shadow: 0 0 24px rgba(251, 191, 36, .12), inset 0 0 34px rgba(251, 191, 36, .04);
}
.dash-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash-kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--tone);
  background: rgba(8, 47, 73, .62);
  border: 1px solid rgba(34, 211, 238, .2);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(34, 211, 238, .08);
}
.dash-kpi-code {
  color: #4f8194;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 9px;
  letter-spacing: .12em;
  white-space: nowrap;
}
.dash-kpi-label { margin-top: 11px; color: #8bd3e6; font-size: 12px; }
.dash-kpi-value {
  margin-top: 3px;
  color: #f0fdff;
  font-size: clamp(18px, 1.5vw, 28px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(34, 211, 238, .24);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.dash-kpi-value.is-long { font-size: clamp(16px, 1.18vw, 22px); }
.dash-kpi.is-alert .dash-kpi-value { color: #fde68a; text-shadow: 0 0 18px rgba(251, 191, 36, .3); }
.dash-kpi.is-alert .dash-kpi-icon { color: #fbbf24; border-color: rgba(251, 191, 36, .4); }
.dash-kpi-foot { margin-top: auto; padding-top: 8px; color: #4f8194; font-size: 10.5px; }
.dash-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.dash-orders { grid-column: 1 / -1; }
.dash-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, .16);
  background: linear-gradient(160deg, rgba(8, 36, 54, .82), rgba(3, 15, 28, .92));
  box-shadow: inset 0 0 60px rgba(34, 211, 238, .02);
}
.dash-panel-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(34, 211, 238, .12);
  background: linear-gradient(90deg, rgba(8, 47, 73, .42), rgba(8, 47, 73, .1));
}
.dash-panel-title { display: flex; align-items: center; min-width: 0; }
.dash-panel-h h3 { margin: 0; color: #e0faff; font-size: 15px; letter-spacing: .04em; }
.dash-sec {
  margin-right: 8px;
  color: #22d3ee;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  opacity: .8;
}
.dash-panel-tag {
  border: 1px solid rgba(34, 211, 238, .18);
  border-radius: 999px;
  padding: 3px 8px;
  color: #5f9eb3;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 8.5px;
  letter-spacing: .1em;
  white-space: nowrap;
}
.dash-panel-b { padding: 14px 16px; }
.dash-orders-body { padding: 0; }
.dash-table-wrap { max-height: 430px; overflow-x: auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(34, 211, 238, .13);
  background: #082437;
  color: #5f9eb3;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-align: left;
  white-space: nowrap;
}
.dash-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(34, 211, 238, .07);
  color: #c7edf8;
  font-size: 12px;
  vertical-align: middle;
}
.dash-table tbody tr { cursor: pointer; transition: background .14s; }
#app .dash-tech .dash-table tbody tr:hover > td,
#app .dash-tech .dash-table tbody tr:hover { background: rgba(34, 211, 238, .075) !important; }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table .num { text-align: right; }
.dash-mono { color: #67e8f9; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.dash-model { color: #f0fdff; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.dash-subline { margin-top: 2px; color: #4f8194; font-size: 9.5px; font-family: ui-monospace, Consolas, monospace; }
.dash-progress-cell { min-width: 150px; }
.dash-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2, 12, 27, .95);
  border: 1px solid rgba(34, 211, 238, .08);
}
.dash-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0ea5e9, #2dd4bf);
  box-shadow: 0 0 12px rgba(34, 211, 238, .55);
  transition: width .5s ease;
}
.dash-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  color: #67e8f9;
  font-size: 9.5px;
  font-family: ui-monospace, Consolas, monospace;
}
.dash-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .2);
  background: rgba(8, 145, 178, .14);
  color: #a5f3fc;
  font-size: 10px;
  white-space: nowrap;
}
.dash-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
}
.dash-wip-list, .dash-top-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-height: 330px;
  overflow-y: scroll;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.dash-low-list {
  display: flex;
  flex-direction: column;
  max-height: 330px;
  overflow-y: scroll;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-gutter: stable;
}
.dash-low-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(34, 211, 238, .07);
  cursor: pointer;
}
.dash-low-row:last-child { border-bottom: 0; }
.dash-low-row:hover { background: rgba(251, 191, 36, .055); }
.dash-low-main { flex: 1 1 auto; min-width: 0; }
.dash-low-main b {
  display: block;
  color: #67e8f9;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
}
.dash-low-main span {
  display: block;
  max-width: 100%;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #bae6fd;
  font-size: 11.5px;
}
.dash-low-main small {
  display: block;
  max-width: 100%;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4f8194;
  font-size: 9.5px;
}
.dash-low-qty { flex: none; text-align: right; }
.dash-low-qty b {
  display: block;
  color: #fbbf24;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.dash-low-qty b.negative { color: #fca5a5; }
.dash-low-qty small { color: #4f8194; font-size: 8.5px; }
.dash-wip-row { padding-bottom: 11px; border-bottom: 1px solid rgba(34, 211, 238, .07); }
.dash-wip-row:last-child { padding-bottom: 0; border-bottom: 0; }
.dash-wip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.dash-wip-head b { color: #e0faff; font-size: 12.5px; }
.dash-wip-head span { color: #5f9eb3; font-size: 10.5px; white-space: nowrap; }
.dash-wip-head strong { color: #67e8f9; font-family: ui-monospace, Consolas, monospace; }
.dash-wip-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: #4f8194; font-size: 9.5px; }
.dash-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(34, 211, 238, .07);
}
.dash-rank:last-child { padding-bottom: 0; border-bottom: 0; }
.dash-rank-no {
  width: 22px;
  flex: none;
  color: #22d3ee;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
}
.dash-rank:nth-child(1) .dash-rank-no { color: #fbbf24; }
.dash-rank:nth-child(2) .dash-rank-no { color: #cbd5e1; }
.dash-rank:nth-child(3) .dash-rank-no { color: #fb923c; }
.dash-rank-main { flex: 1 1 auto; min-width: 0; }
.dash-rank-title { display: flex; align-items: baseline; gap: 7px; margin-bottom: 5px; min-width: 0; }
.dash-rank-title b { color: #f0fdff; font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: nowrap; }
.dash-rank-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #5f9eb3; font-size: 10px; }
.dash-rank-meta { margin-top: 4px; color: #4f8194; font-size: 9.5px; }
.dash-rank-amt { flex: none; text-align: right; }
.dash-rank-amt b { display: block; color: #5eead4; font-size: 12px; font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(45, 212, 191, .2); }
.dash-rank-amt small { color: #4f8194; font-size: 8.5px; }
.dash-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(34, 211, 238, .08);
  color: #4f8194;
  font-size: 10px;
  letter-spacing: .03em;
}
.dash-tech {
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, .34) rgba(2, 12, 27, .6);
}
.dash-tech ::-webkit-scrollbar, .dash-tech::-webkit-scrollbar { width: 8px; height: 8px; }
.dash-tech ::-webkit-scrollbar-track, .dash-tech::-webkit-scrollbar-track { background: rgba(2, 12, 27, .62); }
.dash-tech ::-webkit-scrollbar-thumb, .dash-tech::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, .28);
  border-radius: 99px;
  border: 2px solid rgba(2, 12, 27, .62);
}
.dash-tech ::-webkit-scrollbar-thumb:hover, .dash-tech::-webkit-scrollbar-thumb:hover { background: rgba(34, 211, 238, .5); }
body.dash-fs-active { overflow: hidden !important; }
.dash-tech:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: 24px 30px;
  border-radius: 0;
  border: 0;
  background-color: #04121f;
}
.dash-tech:fullscreen .dash-kpi-value { font-size: clamp(26px, 1.9vw, 36px); }
.dash-tech:fullscreen .dash-kpi-value.is-long { font-size: clamp(20px, 1.5vw, 28px); }
.dash-tech:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  padding: 24px 30px;
  border-radius: 0;
  border: 0;
  background-color: #04121f;
}
@media (max-width: 1400px) {
  .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-orders, .dash-low { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .dash-main { grid-template-columns: 1fr; }
  .dash-orders, .dash-low { grid-column: auto; }
}
@media (max-width: 700px) {
  .dash-tech { min-height: auto; padding: 14px; border-radius: 12px; }
  .dash-title h1 { font-size: 22px; }
  .dash-clock { font-size: 20px; }
  .dash-head-right { align-items: flex-start; }
  .dash-tools { justify-content: flex-start; }
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-kpi { min-height: 128px; }
  .dash-panel-tag { display: none; }
  .dash-table th, .dash-table td { padding: 8px 9px; }
  .dash-table th:nth-child(2), .dash-table td:nth-child(2) { display: none; }
  .dash-table th:nth-child(5), .dash-table td:nth-child(5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-tech::after, .dash-live-dot { animation: none; }
}
