:root {
  --brand: #4f46e5;
  --brand-600: #4338ca;
  --brand-50: #eef2ff;
  --line-green: #06c755;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #e5e9f0;
  --line-soft: #eef2f7;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ok: #16a34a;
  --ok-bg: #ecfdf5;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 50px -20px rgba(15, 23, 42, 0.28);
  --sidebar: #101828;
  --sidebar-2: #1c2536;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }

/* ---------------- 通用组件 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--panel); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all .16s ease; white-space: nowrap; font-family: var(--font);
}
.btn:hover { background: #f1f5f9; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px var(--brand); }
.btn-primary:hover { background: var(--brand-600); }
.btn-green { background: var(--line-green); color: #fff; }
.btn-green:hover { background: #05b04b; }
.btn-outline { border-color: var(--line); background: var(--panel); }
.btn-outline:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-soft); color: var(--ink); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-block { width: 100%; }

.input, .select, .textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 13.5px; font-family: var(--font); color: var(--ink);
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14);
}
.textarea { resize: vertical; min-height: 76px; }
label.field, .field { display: block; margin-bottom: 12px; }
label.field > span, .field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--line-soft); color: var(--ink-2); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.brand { background: var(--brand-50); color: var(--brand-600); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); gap: 12px; flex-wrap: wrap; }
.card-head h3 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------------- 登录页 ---------------- */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
}
.login-hero {
  background: linear-gradient(150deg, #1e1b4b 0%, #312e81 45%, #4f46e5 100%);
  color: #fff; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-hero::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(6,199,85,.28), transparent 65%); border-radius: 50%;
}
.login-hero .logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--line-green); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px; box-shadow: 0 8px 20px -8px var(--line-green);
}
.login-hero h1 { font-size: 34px; line-height: 1.25; margin-bottom: 14px; }
.login-hero p { color: rgba(255,255,255,.78); max-width: 420px; }
.login-hero .feats { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; position: relative; z-index: 1; }
.login-hero .feat { display: flex; gap: 10px; align-items: center; color: rgba(255,255,255,.9); font-size: 13.5px; }
.login-hero .feat i { width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 11px; font-style: normal; }
.login-form-side { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 24px; margin-bottom: 6px; }
.login-card .hint { color: var(--muted); margin-bottom: 26px; font-size: 13.5px; }
.demo-tip { margin-top: 18px; padding: 12px 14px; background: var(--brand-50); border: 1px dashed #c7d2fe; border-radius: 10px; font-size: 12.5px; color: var(--brand-600); }

/* ---------------- 布局 ---------------- */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar); color: #cbd5e1; padding: 18px 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; padding: 6px 20px 22px; color: #fff; font-weight: 800; font-size: 15.5px; }
.sidebar .brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted-2); letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 3px; padding: 0 12px; }
.nav .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 16px 10px 6px; font-weight: 700; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 10px; color: #cbd5e1;
  font-size: 13.5px; font-weight: 600; text-decoration: none; transition: all .15s;
}
.nav a:hover { background: var(--sidebar-2); color: #fff; text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -10px var(--brand); }
.nav a .ic { width: 18px; text-align: center; font-size: 15px; }
.sidebar .foot { margin-top: auto; padding: 16px 20px 4px; border-top: 1px solid #1f2937; }
.sidebar .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--line-green)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 17px; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.content { padding: 24px 26px 60px; max-width: 1500px; width: 100%; }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
@media (max-width: 1250px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stat-grid { grid-template-columns: 1fr; } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; margin-bottom: 12px; }
.stat .lbl { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat .val { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.stat .delta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.i-brand { background: var(--brand-50); color: var(--brand); }
.i-green { background: var(--ok-bg); color: var(--ok); }
.i-amber { background: var(--warn-bg); color: var(--warn); }
.i-blue { background: var(--info-bg); color: var(--info); }
.i-pink { background: #fdf2f8; color: #db2777; }

.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid-2, .grid-2b, .grid-3 { grid-template-columns: 1fr; } }

/* ---------------- 图表 ---------------- */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 210px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-col .bar-wrap { width: 100%; flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.bar-col .bar { width: 70%; max-width: 34px; background: linear-gradient(180deg, var(--brand), #818cf8); border-radius: 6px 6px 3px 3px; transition: height .5s cubic-bezier(.2,.8,.2,1); min-height: 3px; }
.bar-col:hover .bar { filter: brightness(1.08); }
.bar-col .bl { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; transform: rotate(-0deg); }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend .li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend .sw { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.legend .val { margin-left: auto; font-weight: 700; }
.lc-0 { background: #4f46e5; } .lc-1 { background: #06c755; } .lc-2 { background: #f59e0b; }
.lc-3 { background: #ef4444; } .lc-4 { background: #0ea5e9; } .lc-5 { background: #8b5cf6; }
.lc-6 { background: #ec4899; } .lc-7 { background: #14b8a6; }

.progress { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; padding: 11px 12px; background: #f8fafc; color: var(--muted); font-weight: 700;
  font-size: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0;
}
table.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tbl tbody tr:hover { background: #fafbff; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl th.th-sort { cursor: pointer; user-select: none; }
table.tbl th.th-sort:hover { color: var(--brand); }
table.tbl th.th-sort .sort-ar { font-size: 10px; margin-left: 3px; opacity: .45; }
table.tbl th.th-sort.active { color: var(--brand); }
table.tbl th.th-sort.active .sort-ar { opacity: 1; }

/* ---------------- 销量统计 ---------------- */
.sales-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; margin-top: 12px; }
.sm-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: linear-gradient(180deg, #fcfdff, #f8fafc); }
.sm-lbl { font-size: 12px; color: var(--muted); font-weight: 600; }
.sm-val { font-size: 20px; font-weight: 800; margin-top: 3px; letter-spacing: -.3px; color: var(--ink); }
.sm-val.ok { color: var(--ok); }
.sm-val.danger { color: var(--danger); }
.sm-val .unit { font-size: 12px; font-weight: 600; color: var(--muted); }
.sm-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.sales-chart { margin-top: 14px; }
.sales-bars { display: flex; align-items: flex-end; gap: 5px; height: 92px; padding-top: 4px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.sb { flex: 1 0 16px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 16px; }
.sb-bar { width: 100%; max-width: 28px; background: linear-gradient(180deg, #8b7cf6, #5b4ee0); border-radius: 4px 4px 0 0; min-height: 2px; transition: filter .15s; }
.sb:hover .sb-bar { filter: brightness(1.1); }
.sb-day { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; transform: scale(.92); }
.tbl-actions { display: flex; gap: 4px; }

/* 订单表：操作列固定在右侧，表格横向滚动时编辑/复制/删除始终可见可点 */
#o-table th:last-child, #o-table td:last-child { position: sticky; right: 0; background: var(--panel, #fff); }
#o-table thead th:last-child { z-index: 3; box-shadow: -12px 0 12px -10px rgba(15, 23, 42, .18); }
#o-table tbody td:last-child { z-index: 2; box-shadow: -12px 0 12px -10px rgba(15, 23, 42, .12); }
#o-table tbody tr:hover td:last-child { background: #fafbff; }
.link-cust { cursor: pointer; color: var(--brand); font-weight: 600; border-bottom: 1px dashed transparent; }
.link-cust:hover { border-bottom-color: var(--brand); }
.thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--line-soft); border: 1px solid var(--line); }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .em { font-size: 34px; margin-bottom: 8px; }

/* ---------------- 分页 ---------------- */
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pager .pg { min-width: 32px; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.pager .pg:hover { border-color: #cbd5e1; }
.pager .pg.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager .pg:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- 抽屉 / 弹窗 ---------------- */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); z-index: 60; display: none; }
.overlay.show { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(620px, 94vw); background: var(--bg);
  z-index: 61; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.drawer.show { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 16px; }
.drawer-body { padding: 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; background: #fff; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 20px 0 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line-soft); }

.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%, -46%) scale(.97); background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: min(460px, 92vw); opacity: 0; pointer-events: none; transition: all .2s ease; }
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal .m-body { padding: 24px; }
.modal .m-foot { padding: 14px 24px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- 状态时间线 ---------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--line); }
.tl-item.done::before { border-color: var(--brand); background: var(--brand); }
.tl-item.current::before { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-50); }
.tl-item .st { font-weight: 700; font-size: 13.5px; }
.tl-item .tm { font-size: 12px; color: var(--muted); }
.tl-item .nt { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 12px 16px; font-size: 13.5px; min-width: 240px; animation: slideIn .25s ease; }
.toast.ok { border-left-color: var(--ok); } .toast.err { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- 前台查询页 ---------------- */
.pub-hero { background: linear-gradient(160deg, #111827 0%, #1e293b 55%, #312e81 100%); color: #fff; padding: 54px 22px 120px; position: relative; overflow: hidden; }
.pub-hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 320px at 78% -10%, rgba(6,199,85,.28), transparent 60%); }
.pub-nav { max-width: 940px; margin: 0 auto 34px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.pub-nav .brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 16px; }
.pub-nav .brand small { display: block; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.6); }
.pub-hero .inner { max-width: 940px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.pub-hero h1 { font-size: 32px; margin-bottom: 12px; }
.pub-hero .lead { color: rgba(255,255,255,.78); font-size: 15px; max-width: 620px; margin: 0 auto 30px; }
.search-card { max-width: 680px; margin: 0 auto; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 18px; padding: 18px; backdrop-filter: blur(10px); }
.search-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.search-row .input { background: rgba(255,255,255,.94); border-color: transparent; height: 46px; }
.pub-body { max-width: 940px; margin: -80px auto 60px; padding: 0 22px; position: relative; z-index: 2; }
.result-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px; margin-bottom: 18px; border: 1px solid var(--line); }
.result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.result-head .no { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.kv { background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 11px 13px; }
.kv .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv .v { font-size: 14px; font-weight: 600; margin-top: 2px; word-break: break-word; }
.prod-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-chip { display: flex; align-items: center; gap: 9px; background: var(--brand-50); border: 1px solid #e0e7ff; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; color: var(--brand-600); font-weight: 600; }
.prod-chip.has-img { padding: 6px 12px 6px 6px; }
.prod-chip-img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; background: #fff; border: 1px solid #e0e7ff; flex: none; }

/* ================= 产品缩略图 ================= */
.thumb-strip { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.thumb-item { position: relative; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--line-soft); flex: none; cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.thumb-item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(15,23,42,.4); z-index: 2; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-item .ph { width: 100%; height: 100%; display: grid; place-items: center; color: #b6c2d3; font-size: 17px; }
.thumb-item .tag { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,.72); color: #fff; font-size: 9px; line-height: 1.5; text-align: center; padding: 1px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-more { width: 44px; height: 44px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font-size: 12px; font-weight: 700; flex: none; border: 1px dashed #c7d2fe; }
.spec-line { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.spec-line + .spec-line { margin-top: 2px; }

/* ============ 产品明细「图 + 备注」一一对应卡片 ============ */
.prod-mini-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.prod-mini { width: 74px; flex: none; }
.prod-mini-img { width: 74px; height: 56px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: var(--line-soft); display: grid; place-items: center; cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.prod-mini-img:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(15,23,42,.4); }
.prod-mini-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.prod-mini-img .ph { color: #b6c2d3; font-size: 18px; }
.prod-mini-cap { font-size: 11px; line-height: 1.45; color: var(--ink-2); margin-top: 4px; word-break: break-all; white-space: pre-line; }
.prod-mini-cap b { color: var(--brand-600); margin-right: 2px; }
.prod-mini-cap.muted { color: var(--muted-2); }
/* 缩略图卡片下方的状态标签行（有无货 / 进价） */
.cap-pills { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; white-space: normal; }
.cap-pills .instock-pill { padding: 1px 7px; font-size: 10.5px; }
.instock-pill.cost { background: var(--brand-50); color: var(--brand-600); }
.prod-mini .thumb-more { width: 74px; height: 56px; cursor: default; }
.prod-mini-hidden { display: none !important; }
.prod-mini-strip.expanded .prod-mini-hidden { display: block !important; }
.prod-mini-toggle { flex: none; align-self: center; height: 56px; padding: 0 10px; border-radius: 9px; border: 1px dashed #c7d2fe; background: var(--brand-50); color: var(--brand-600); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; font-family: inherit; }
.prod-mini-toggle:hover { background: #e0e7ff; border-color: var(--brand); }

/* 图片灯箱 */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(15,23,42,.82); display: none; place-items: center; padding: 30px; }
.lightbox.show { display: grid; animation: fade .18s ease; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 12px; box-shadow: var(--shadow-lg); background: #fff; }
.lightbox .cap { color: #e2e8f0; text-align: center; margin-top: 12px; font-size: 13px; }

/* ================= 客户自动补全 ================= */
.ac-wrap { position: relative; }
.ac-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-lg); max-height: 290px; overflow-y: auto; padding: 5px; }
.ac-list:empty { display: none; }
.ac-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.ac-item:hover, .ac-item.active { background: var(--brand-50); }
.ac-item .nm { font-weight: 700; font-size: 13px; }
.ac-item .em { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-item .cnt { margin-left: auto; flex: none; }
.ac-empty { padding: 12px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ================= 产品行（含图片上传） ================= */
.prod-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fbfcfe; }
.prod-card .pd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.prod-card .pd-idx { width: 24px; height: 24px; border-radius: 7px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-size: 11.5px; font-weight: 800; flex: none; }
.prod-card .pd-grid { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: start; }
.pd-preview { width: 84px; height: 84px; border-radius: 11px; border: 1px dashed var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; position: relative; }
.pd-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pd-preview .ph { color: #b6c2d3; font-size: 22px; text-align: center; line-height: 1.3; }
.pd-preview .ph small { display: block; font-size: 10px; color: var(--muted-2); }
.pd-fields { display: grid; gap: 8px; }
.pd-img-row { display: flex; gap: 8px; }
.pd-img-row .input { flex: 1; }
/* 每组数量 / 采购单价 / 小计 */
.pd-nums { display: grid; grid-template-columns: 120px 150px 1fr; gap: 8px; align-items: end; }
.pd-num { display: grid; gap: 4px; min-width: 0; }
.pd-num > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pd-num-sum { padding-bottom: 8px; justify-items: start; }
.pd-num-sum b { font-size: 14px; color: var(--brand-600); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .pd-nums { grid-template-columns: 1fr 1fr; } }
/* 产品明细底部合计条 */
.prod-total { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin: 12px 0 12px; padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 10px; background: linear-gradient(180deg, #f8fbff, #fff); }
.prod-total .pt-item { display: flex; align-items: baseline; gap: 7px; font-size: 12.5px; color: var(--muted); }
.prod-total .pt-item b { font-size: 14.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.prod-total .pt-cost { margin-left: auto; }
.prod-total .pt-cost b { color: var(--brand-600); font-size: 16px; }

/* ================= 独立表单页 ================= */
.form-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.form-topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.form-topbar h2 { font-size: 17px; }
.form-topbar .crumb { color: var(--muted); font-size: 12.5px; }
.form-body { max-width: 1320px; width: 100%; margin: 0 auto; padding: 22px 24px 90px; display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .form-body { grid-template-columns: 1fr; } }
.form-main { min-width: 0; display: grid; gap: 16px; }
.form-aside { position: sticky; top: 86px; display: grid; gap: 16px; }
.card-pad-tight { padding: 16px 18px; }
.req::after { content: " *"; color: var(--danger); }
.hint-line { font-size: 12px; color: var(--muted); margin-top: 5px; }
.cust-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.cust-summary .kv { background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 10px; }
.cust-summary .kv .k { font-size: 11px; color: var(--muted); font-weight: 600; }
.cust-summary .kv .v { font-size: 12.5px; font-weight: 600; word-break: break-word; }
.cust-order { border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 10px; background: #fff; }
.cust-order .hd { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.form-foot-bar { position: sticky; bottom: 0; margin-top: 18px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; }
.prod-hint { background: var(--info-bg); border: 1px solid #dbeafe; color: #1e40af; border-radius: 10px; padding: 10px 13px; font-size: 12.5px; margin-bottom: 12px; }
@media (max-width: 760px) {
  .login-wrap { grid-template-columns: 1fr; } .login-hero { display: none; }
  .app { grid-template-columns: 1fr; } .sidebar { position: fixed; z-index: 50; width: 244px; transform: translateX(-100%); transition: transform .25s; } .sidebar.open { transform: none; }
  .search-row { grid-template-columns: 1fr; }
  .pub-hero h1 { font-size: 24px; }
  .menu-btn { display: inline-flex !important; }
}
.menu-btn { display: none; }
.skeleton { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ================= 产品库存确认模块 ================= */
.flow-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow-step { display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); }
.flow-step .n { width: 18px; height: 18px; border-radius: 50%; background: var(--line-soft); color: var(--muted); display: grid; place-items: center; font-size: 10.5px; font-weight: 800; flex: none; }
.flow-step.done { border-color: #bbf7d0; background: var(--ok-bg); color: var(--ok); }
.flow-step.done .n { background: var(--ok); color: #fff; }
.flow-step.current { border-color: var(--brand); background: var(--brand-50); color: var(--brand-600); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.flow-step.current .n { background: var(--brand); color: #fff; }
.flow-arrow { color: var(--muted-2); font-size: 13px; }

.status-picker { display: grid; gap: 8px; }
.status-opt { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: #fff; transition: all .15s; text-align: left; font-family: var(--font); font-size: 13.5px; font-weight: 600; color: var(--ink-2); width: 100%; }
.status-opt:hover { border-color: var(--brand); background: var(--brand-50); }
.status-opt.active { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.status-opt .idx { width: 22px; height: 22px; border-radius: 50%; background: var(--line-soft); color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.status-opt.active .idx { background: var(--brand); color: #fff; }
.status-opt .txt { min-width: 0; }
.status-opt .desc { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 1px; }

.stock-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fbfcfe; }
.stock-item .si-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stock-item .si-idx { width: 24px; height: 24px; border-radius: 7px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-size: 11.5px; font-weight: 800; flex: none; }
.stock-item .si-grid { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.stock-item .si-preview { width: 96px; height: 96px; border-radius: 11px; border: 1px dashed var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.stock-item .si-preview img { width: 100%; height: 100%; object-fit: cover; }
.stock-item .si-preview .ph { color: #b6c2d3; font-size: 22px; text-align: center; line-height: 1.3; }
.stock-item .si-preview .ph small { display: block; font-size: 10px; color: var(--muted-2); }
.stock-item .si-fields { display: grid; gap: 8px; min-width: 0; }
.si-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
@media (max-width: 860px) { .stock-item .si-grid { grid-template-columns: 1fr; } .si-row { grid-template-columns: 1fr; } }

.instock-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.instock-pill.ok { background: var(--ok-bg); color: var(--ok); }
.instock-pill.warn { background: var(--warn-bg); color: var(--warn); }
.instock-pill.danger { background: var(--danger-bg); color: var(--danger); }

/* 从库存确认单导入产品弹窗 */
.imp-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.imp-modal { background: var(--panel); border-radius: 14px; width: min(720px, 100%); max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0, 0, 0, .22); }
.imp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.imp-body { overflow: auto; padding: 16px 20px; display: grid; gap: 18px; }
.imp-check-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
.imp-items { display: grid; gap: 7px; }
.imp-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font-family: var(--font); transition: border-color .15s, background .15s; }
.imp-item:hover { border-color: var(--brand); background: var(--brand-50); }
.imp-item img, .imp-item .imp-ph { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.imp-item .imp-ph { display: grid; place-items: center; background: var(--line-soft); font-size: 18px; }
.imp-item .imp-desc { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.imp-item .imp-warn { color: var(--danger); font-weight: 700; margin-left: 6px; }
/* 库存确认单导入：多选 / 全选（2026-11-06） */
.imp-item .imp-ck { width: 18px; height: 18px; border: 2px solid var(--line); border-radius: 5px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: transparent; background: #fff; transition: border-color .15s, background .15s, color .15s; }
.imp-item:hover .imp-ck { border-color: var(--brand); }
.imp-item.on { border-color: var(--brand); background: var(--brand-50); }
.imp-item.on .imp-ck { background: var(--brand); border-color: var(--brand); color: #fff; }
.imp-sel-btn { border: 1px dashed var(--line); background: transparent; color: var(--ink-3, #6b7686); font-size: 12px; border-radius: 7px; padding: 2px 9px; cursor: pointer; font-family: var(--font); transition: all .15s; }
.imp-sel-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-50); }
.imp-foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }

/* 国际物流费用核对（2026-11-06） */
.fee-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px 12px; align-items: end; margin-bottom: 16px; }
.fee-form .ff-l { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.fee-form .ff-l input { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-family: var(--font); font-size: 13px; background: #fff; color: var(--ink); }
.fee-form .ff-l input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.fee-form .ff-actions { display: flex; align-items: center; gap: 8px; padding-bottom: 1px; }
.fee-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.fee-textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; resize: vertical; background: #fff; color: var(--ink); box-sizing: border-box; }
.fee-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.fee-sum { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fs-pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--line-soft); color: var(--ink-2, #48505c); font-weight: 600; }
.fs-pill.ok { background: #e7f8ee; color: #127a3d; }
.fs-pill.over, .fs-pill.bad { background: #fdeaea; color: #b42318; }
.fs-pill.under { background: #fff4e5; color: #b45309; }
.fee-row-bad td { background: #fff8f8; }
.fee-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; display: inline-block; white-space: nowrap; }
.fee-tag.ok { background: #e7f8ee; color: #127a3d; }
.fee-tag.over { background: #fdeaea; color: #b42318; }
.fee-tag.under { background: #fff4e5; color: #b45309; }
.fee-tag.bad { background: #f2f4f7; color: #667085; }
.fee-err { background: #fff7ed; border: 1px solid #fed7aa; color: #b45309; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin-bottom: 10px; line-height: 1.7; }
.btn-ghost.danger { color: var(--danger); }
.btn-ghost.danger:hover { background: #fdeaea; }

.stock-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 720px) { .stock-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stock-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stock-stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stock-stat .v { font-size: 22px; font-weight: 800; margin-top: 3px; letter-spacing: -0.01em; }
.stock-stat .s { font-size: 11.5px; color: var(--muted-2); }

.price-cmp { display: flex; gap: 16px; flex-wrap: wrap; }
.price-cmp .p { font-size: 12px; color: var(--muted); }
.price-cmp .p b { display: block; font-size: 14px; color: var(--ink); }

/* ================= 产品质检（QC）模块 ================= */
.qc-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.qc-badge.ok { background: var(--ok-bg); color: var(--ok); }
.qc-badge.warn { background: var(--warn-bg); color: var(--warn); }
.qc-badge.danger { background: var(--danger-bg); color: var(--danger); }
.qc-badge.info { background: var(--info-bg); color: var(--info); }

.qc-section { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.qc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.qc-title { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.qc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 720px) { .qc-row { grid-template-columns: 1fr; } }

.qc-real { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: start; }
.qc-real-preview { width: 72px; height: 72px; border-radius: 10px; border: 1px dashed var(--line); background: #fff; display: grid; place-items: center; overflow: hidden; }
.qc-real-preview img { width: 100%; height: 100%; object-fit: cover; }
.qc-real-preview .ph { color: #b6c2d3; font-size: 18px; text-align: center; }
.qc-real-preview .ph small { display: block; font-size: 9px; color: var(--muted-2); }

.qc-exception { background: var(--danger-bg); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.qc-exception .ex-title { font-size: 12px; font-weight: 700; color: var(--danger); margin-bottom: 6px; }
.qc-exception .ex-body { font-size: 12.5px; color: var(--ink-2); }
.qc-exception .ex-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

.qc-solution { background: var(--brand-50); border: 1px solid #c7d2fe; border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.qc-solution .sl-title { font-size: 12px; font-weight: 700; color: var(--brand-600); margin-bottom: 6px; }
.qc-solution .sl-body { font-size: 12.5px; color: var(--ink-2); }
.qc-solution .sl-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

.qc-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.qc-toggle input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line); position: relative; transition: .2s; cursor: pointer; }
.qc-toggle input::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.qc-toggle input:checked { background: var(--line-green); }
.qc-toggle input:checked::after { left: 18px; }
.qc-toggle span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

/* 订单列表中的QC汇总徽标 */
.qc-summary { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }

/* ================= 产品明细三区：客服填入 / 采购填入 / 仓库填入 ================= */
.pd-zone { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px 12px; margin-top: 10px; }
.pd-zone-cs { background: #f8fbff; border-color: #c9dcf5; }
.pd-zone-po { background: #fffaf1; border-color: #f0dcb4; }
.pd-zone-wh { background: #f7fbf7; border-color: #cfe3d2; }
.pd-zone-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.pd-zone-head .pd-copy-po { margin-left: auto; }
.pd-zone-tag { font-size: 12px; font-weight: 800; padding: 3px 11px; border-radius: 999px; letter-spacing: .3px; }
.pd-zone-tag.cs { color: #2563eb; background: #e5efff; }
.pd-zone-tag.po { color: #b45309; background: #fcefd2; }
.pd-zone-tag.wh { color: #15803d; background: #d9f4e0; }
.pd-purchase { display: grid; gap: 8px; }
@media (max-width: 760px) {
  .pd-zone-po .pd-nums { grid-template-columns: 1fr 1fr !important; }
}
/* 国内物流状态行 */
.dom-status { padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.dom-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dom-row .btn { flex-shrink: 0; }
.dom-pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.dom-pill.ok { background: var(--ok-bg, #dcfce7); color: var(--ok, #15803d); }
.dom-pill.brand { background: var(--brand-50, #eef2ff); color: var(--brand-600, #4f46e5); }
.dom-pill.info { background: var(--info-bg, #e0f2fe); color: var(--info, #0369a1); }
.dom-pill.warn { background: #fef3c7; color: #b45309; }
.dom-pill.danger { background: var(--danger-bg, #fee2e2); color: var(--danger, #b91c1c); }
.dom-pill.muted { background: var(--line-soft, #eef1f5); color: var(--muted, #64748b); }
.dom-text { font-size: 12.5px; color: var(--ink-2); flex: 1; min-width: 120px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 防止窄窗口下产品卡内容溢出、滑到右侧客户档案栏下面（2026-10-27） */
.form-body { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
.form-main { min-width: 0; max-width: 100%; overflow-x: clip; }
.form-main .card, .form-main .card-pad { min-width: 0; max-width: 100%; }
.form-main .card-pad { overflow-wrap: break-word; }
.form-main .pd-nums, .form-main .pd-purchase, .form-main .pd-zone, .form-main .pd-zone-head { min-width: 0; max-width: 100%; }
.form-aside { min-width: 0; max-width: 100%; }
@media (max-width: 1080px) { .form-body { grid-template-columns: 1fr; } }

/* ================= 实物图展示页（公开） ================= */
.showcase-page { background: var(--bg); min-height: 100vh; }
.showcase-hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); padding: 40px 24px 24px; text-align: center; }
.showcase-hero h1 { font-size: 26px; margin-bottom: 6px; }
.showcase-hero p { color: var(--muted); font-size: 14px; margin: 0; }
.showcase-grid { max-width: 1200px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.showcase-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s; }
.showcase-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.showcase-card .sc-img { width: 100%; background: #fff; overflow: hidden; position: relative; }
.showcase-card .sc-img img { width: 100%; height: auto; display: block; object-fit: initial; }
.showcase-card .sc-img .ph { color: #b6c2d3; font-size: 28px; }
.showcase-card .sc-body { padding: 14px; }
.showcase-card .sc-order { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 4px; }
.showcase-card .sc-spec { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.showcase-card .sc-rating { display: flex; gap: 2px; color: #f59e0b; font-size: 14px; }
.showcase-card .sc-feedback { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; line-height: 1.45; }
.showcase-card .sc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--muted-2); }
.showcase-empty { text-align: center; padding: 80px 24px; color: var(--muted); }
.showcase-empty .em { font-size: 48px; margin-bottom: 12px; }
.showcase-filter { max-width: 1200px; margin: 0 auto; padding: 16px 24px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.showcase-filter .input { max-width: 260px; }
.price-cmp .p.gain b { color: var(--danger); }

/* ================= 供应商数据库 ================= */
.sup-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  background: var(--line-soft); color: var(--ink-2); white-space: nowrap;
}
.sup-tag.brand { background: var(--brand-50); color: var(--brand-600); }
.sup-demo {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; background: #fef3c7; color: #b45309; vertical-align: middle;
}
.sup-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.sup-stars .off { color: #d7dde7; }
.col-tight { max-width: 200px; }

/* 表单：支付方式多选 */
.chk-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chk {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
  font-weight: 600; transition: all .15s; user-select: none;
}
.chk:hover { border-color: #cbd5e1; }
.chk input { margin: 0; accent-color: var(--brand); cursor: pointer; }
.chk:has(input:checked) { background: var(--brand-50); border-color: var(--brand); color: var(--brand-600); }

/* 表单：产品展示图编辑 */
.sup-img-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line);
  border-radius: 11px; background: #fcfdff; margin-bottom: 8px;
}
.sup-img-thumb {
  width: 74px; height: 60px; flex: none; border-radius: 9px; overflow: hidden; border: 1px solid var(--line);
  background: var(--line-soft); display: grid; place-items: center; cursor: zoom-in;
}
.sup-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sup-img-thumb .ph { color: #b6c2d3; font-size: 20px; }
.sup-img-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sup-img-fields .input { font-size: 12.5px; padding: 7px 10px; }

/* 详情抽屉 */
.sup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.sup-alias { font-size: 19px; font-weight: 800; color: var(--ink); }
.sup-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin-top: 14px; }
@media (max-width: 640px) { .sup-kv-grid { grid-template-columns: 1fr; } }
.sup-kv { border-bottom: 1px dashed var(--line-soft); padding-bottom: 8px; min-width: 0; }
.sup-kv .k { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.sup-kv .v { font-size: 13px; color: var(--ink-2); word-break: break-word; }
.sup-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.sup-gal-item { margin: 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.sup-gal-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; cursor: zoom-in; }
.sup-gal-item .ph { width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; color: #b6c2d3; font-size: 26px; background: var(--line-soft); }
.sup-gal-item figcaption { padding: 7px 9px; font-size: 11.5px; color: var(--ink-2); line-height: 1.4; border-top: 1px solid var(--line-soft); }

/* ============================================================
   VIP 客户分层（后台）
   ============================================================ */
.vip-tier { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.vip-tier.t-diamond { color: #fff; background: linear-gradient(135deg, #7c3aed, #a21caf); box-shadow: 0 2px 8px -2px rgba(124, 58, 237, .5); }
.vip-tier.t-platinum { color: #fff; background: linear-gradient(135deg, #0f766e, #0369a1); }
.vip-tier.t-gold { color: #7c2d12; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.vip-tier.t-silver { color: #334155; background: linear-gradient(135deg, #e2e8f0, #94a3b8); }
.vip-tier.t-regular { color: var(--ink-2); background: var(--line-soft); border: 1px solid var(--line); }
.vip-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--line-soft); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.vip-tag.ok { color: #15803d; background: #ecfdf5; border-color: #a7f3d0; }
.vip-tag.warn { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.vip-tag.danger { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.vip-tag.brand { color: var(--brand); background: var(--brand-50, #ecfdf5); border-color: #bbf7d0; }
.vip-tag.amber { color: #92400e; background: #fffbeb; border-color: #fcd34d; }
.vip-chip.chip-on { background: var(--brand); color: #fff; }
tr td .small.danger { color: var(--danger); font-weight: 600; }
tr td .small.warn { color: #b45309; font-weight: 600; }

/* ============================================================
   LINE 日语客服话术库（后台）
   ============================================================ */
.tpl-hint { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 12px; padding: 12px 16px; font-size: 12.5px; line-height: 1.75; margin-bottom: 14px; }
.tpl-var-chip { display: inline-block; padding: 0 6px; border-radius: 5px; background: #dbeafe; color: #1d4ed8; font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; }
.tpl-layout { display: grid; grid-template-columns: 236px 1fr; gap: 16px; align-items: start; }
@media (max-width: 980px) { .tpl-layout { grid-template-columns: 1fr; } }
.tpl-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); position: sticky; top: 14px; max-height: calc(100vh - 96px); overflow: auto; }
.tpl-side-head { font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 8px 8px; letter-spacing: .04em; }
.tpl-cat { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 9px; padding: 8px 9px; cursor: pointer; transition: .12s; margin-bottom: 2px; }
.tpl-cat:hover { background: var(--line-soft); }
.tpl-cat.on { background: var(--brand-50, #ecfdf5); box-shadow: inset 3px 0 0 var(--brand); }
.tpl-cat-name { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.tpl-cat-name b { float: right; font-weight: 700; color: var(--brand); font-size: 12px; }
.tpl-cat-ja { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.tpl-cat-desc { display: none; font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.tpl-cat.on .tpl-cat-desc { display: block; }
.tpl-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tpl-group { margin-bottom: 18px; }
.tpl-group-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; padding: 0 2px 8px; border-bottom: 1px dashed var(--line); margin-bottom: 10px; }
.tpl-group-name { font-size: 14.5px; font-weight: 800; color: var(--ink); }
.tpl-group-ja { font-size: 11.5px; color: var(--muted); }
.tpl-group-desc { font-size: 11.5px; color: var(--muted); }
.tpl-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.tpl-card:hover { border-color: #c7d2fe; }
.tpl-head { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.tpl-title { font-size: 14px; font-weight: 800; color: var(--ink); }
.tpl-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-promo { font-size: 11px; font-weight: 700; color: #92400e; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 999px; padding: 2px 8px; }
.tpl-used { font-size: 11px; color: var(--muted); background: var(--line-soft); border-radius: 999px; padding: 2px 8px; }
.tpl-scene { font-size: 12px; color: var(--ink-2); background: var(--line-soft); border-radius: 8px; padding: 6px 9px; margin: 8px 0 0; line-height: 1.6; }
.tpl-ja { margin: 9px 0 0; padding: 12px 14px; background: #0f172a; color: #e2e8f0; border-radius: 10px; font-size: 13px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; }
.tpl-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tpl-zh { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.tpl-zh summary { cursor: pointer; font-size: 12px; color: var(--brand); font-weight: 700; }
.tpl-zh-body { font-size: 12.5px; color: var(--ink-2); line-height: 1.75; margin-top: 6px; }
.tpl-preview { background: var(--line-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; }

/* ============================================================
   发货邮件通知（后台）
   ============================================================ */
.modal.wide { width: min(880px, 94vw); }
.modal.wide .m-body { max-height: 74vh; overflow: auto; }
.mail-cols { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .mail-cols { grid-template-columns: 1fr; } }
.mail-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.mail-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.mail-form .input { width: 100%; }
@media (max-width: 720px) { .mail-form { grid-template-columns: 1fr; } }

/* ============================================================
   物流追踪（黑猫 / 佐川）
   ============================================================ */
.bell-badge { position: absolute; top: 1px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; text-align: center; box-shadow: 0 0 0 2px #fff; }
#bell.has-unread { animation: bellPulse 2.4s ease-in-out infinite; }
@keyframes bellPulse { 0%, 100% { transform: rotate(0) } 85% { transform: rotate(0) } 88% { transform: rotate(-12deg) } 92% { transform: rotate(10deg) } 96% { transform: rotate(-6deg) } }
.vip-tag.info { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.vip-tag.muted { color: var(--muted); background: var(--line-soft); border-color: var(--line); }
.tk-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 1180px) { .tk-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .tk-stats { grid-template-columns: repeat(2, 1fr); } }
.tk-stat { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.tk-stat .tk-lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tk-stat .tk-val { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.3; font-variant-numeric: tabular-nums; }
.tk-stat .tk-sub { font-size: 10.5px; color: var(--muted); }
.tk-stat.ok { background: #f0fdf4; border-color: #bbf7d0; } .tk-stat.ok .tk-val { color: #15803d; }
.tk-stat.brand { background: #eef2ff; border-color: #c7d2fe; } .tk-stat.brand .tk-val { color: #4338ca; }
.tk-stat.danger { background: #fef2f2; border-color: #fecaca; } .tk-stat.danger .tk-val { color: #dc2626; }
.tk-stat.warn { background: #fffbeb; border-color: #fde68a; } .tk-stat.warn .tk-val { color: #b45309; }
.tk-settings { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.tk-settings label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tk-progress-bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin-bottom: 6px; }
.tk-progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-600)); transition: width .4s ease; }
.tk-notices { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; }
.tk-notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.tk-notice.unread { background: #f0f9ff; border-color: #bae6fd; }
.tk-notice .tk-n-icon { font-size: 17px; line-height: 1.3; }
.tk-notice .tk-n-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.tk-notice .tk-n-body { font-size: 12px; color: var(--ink-2); line-height: 1.6; margin-top: 2px; }

/* ================= 每日特价（后台） ================= */
.deal-topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.deal-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.deal-nav .input { width: 152px; }
.deal-state { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--line-soft); color: var(--muted); }
.deal-state.on { background: var(--ok-bg); color: var(--ok); }
.deal-state.empty { background: var(--warn-bg); color: var(--warn); }
.deal-linkline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.deal-linkline code { background: #f1f5f9; border: 1px solid var(--line-soft); border-radius: 6px; padding: 3px 8px; font-size: 11.5px; color: var(--ink-2); max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.deal-slot { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.deal-slot.has { border-color: #bbf7d0; box-shadow: 0 10px 24px -20px rgba(6, 199, 85, .9); }
.ds-head { display: flex; align-items: center; gap: 8px; }
.ds-head b { width: 26px; height: 22px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.ds-head .ds-hint { font-size: 11px; color: var(--muted-2); }
.ds-head .ds-clear { margin-left: auto; font-size: 11.5px; color: var(--muted-2); cursor: pointer; border: none; background: none; padding: 2px 4px; }
.ds-head .ds-clear:hover { color: var(--danger); }
.ds-img { position: relative; aspect-ratio: 1/1; border: 1.5px dashed var(--line); border-radius: 10px; background: #f8fafc; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
.ds-img:hover { border-color: var(--brand); background: #f5f7ff; }
.ds-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-img .ph { text-align: center; color: var(--muted-2); font-size: 11.5px; line-height: 1.7; }
.ds-img .ph b { display: block; font-size: 20px; margin-bottom: 4px; font-weight: 400; }
.ds-img .up { position: absolute; inset: auto 0 0 0; background: rgba(15, 23, 42, .62); color: #fff; font-size: 10.5px; text-align: center; padding: 3px; }
.ds-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ds-prices .field { margin: 0; }
.ds-prices .field > span { font-size: 11px; margin-bottom: 3px; }
.ds-prices .input { padding: 7px 9px; font-size: 13px; }
.ds-price-now .input { border-color: #fecaca; color: var(--danger); font-weight: 700; }
.ds-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ds-meta b { color: var(--danger); font-size: 12px; }
.ds-meta .sv { color: var(--ok); }
.deal-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.deal-foot .tip { font-size: 12px; color: var(--muted); line-height: 1.7; max-width: 560px; }
.deal-dates { display: flex; gap: 8px; flex-wrap: wrap; }
.deal-dates button { font-size: 12px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.deal-dates button:hover { border-color: var(--brand); color: var(--brand); }
.deal-dates button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.deal-dates button small { opacity: .7; margin-left: 4px; }
.deal-empty-tip { font-size: 12px; color: var(--muted); }
@media (max-width: 1180px) { .deal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .deal-grid { grid-template-columns: 1fr; } }

/* 客户实拍页：多图缩略图切换 */
.showcase-card .sc-img .sc-count { position: absolute; right: 8px; bottom: 8px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.showcase-card .sc-thumbs { display: flex; gap: 6px; padding: 8px 10px 0; flex-wrap: wrap; }
.showcase-card .sc-thumb { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #f8fafc; }
.showcase-card .sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.showcase-card .sc-thumb.active { border-color: var(--brand, #16a34a); }
.showcase-card .sc-thumb.more { display: grid; place-items: center; font-size: 11px; color: var(--muted); cursor: default; }

/* 订单表瘦身：压缩单元格内边距，让信息一屏尽量全显示（2026-10-22） */
#o-table th, #o-table td { padding: 9px 8px; }
#o-table th { font-size: 11.5px; }

/* ============================================================
   订单状态更新弹窗提醒
   ============================================================ */
.sp-backdrop {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity .2s ease;
}
.sp-backdrop.show { opacity: 1; }
.sp-card {
  width: min(520px, 100%);
  max-height: min(78vh, 640px);
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 30px 70px -24px rgba(15, 23, 42, .45);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(10px) scale(.98);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1);
}
.sp-backdrop.show .sp-card { transform: none; }
.sp-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  border-bottom: 1px solid var(--line-soft);
}
.sp-bell {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  font-size: 19px; border-radius: 12px;
  background: #fff; box-shadow: 0 4px 12px -6px rgba(220, 38, 38, .5);
  animation: sp-ring 1.8s ease-in-out 2;
}
@keyframes sp-ring {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
}
.sp-hd { flex: 1; min-width: 0; }
.sp-hd h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.sp-hd p { margin: 2px 0 0; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.sp-x {
  border: 0; background: transparent; cursor: pointer;
  font-size: 15px; color: var(--muted); padding: 6px; border-radius: 8px;
}
.sp-x:hover { background: rgba(15, 23, 42, .06); color: var(--ink); }
.sp-body { padding: 8px 10px; overflow: auto; }
.sp-row {
  padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line-soft);
  margin: 6px 0;
  background: #fff;
}
.sp-row:hover { border-color: var(--brand-50); background: #fbfcff; }
.sp-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.sp-main b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink); }
.sp-from { color: var(--muted); }
.sp-arrow { font-style: normal; color: var(--muted-2); }
.sp-to { color: var(--brand); font-weight: 700; }
.sp-tag {
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok);
}
.sp-tag.stock { background: #fcefd2; color: #b45309; }
.sp-meta { margin-top: 3px; font-size: 11.5px; color: var(--muted-2); }
.sp-more { padding: 8px 12px; font-size: 12px; color: var(--muted); text-align: center; }
.sp-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 16px 16px; border-top: 1px solid var(--line-soft);
}
@media (max-width: 520px) {
  .sp-card { max-height: 86vh; }
  .sp-main { font-size: 12.5px; }
}

/* ---------------- 发货信息录入 / 发货历史记录 ---------------- */
.shp-wrap { padding: 8px 10px; background: var(--line-soft); border-radius: 8px; }
.shp-item { margin-top: 8px; padding: 8px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.shp-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.shp-pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; border: 1px solid transparent; }
.shp-pill.ok { color: var(--ok); background: var(--ok-bg); border-color: #bbf7d0; }
.shp-pill.warn { color: var(--warn); background: var(--warn-bg); border-color: #fde68a; }
.shp-pill.danger { color: var(--danger); background: var(--danger-bg); border-color: #fecaca; }
.shp-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; margin-top: 6px; }
.shp-prod { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.shp-prod img, .shp-prod .shp-ph { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--line-soft); font-size: 15px; }
.shp-prod .shp-spec { font-size: 12px; line-height: 1.5; color: var(--ink-2); word-break: break-all; min-width: 0; }
.shp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.shp-f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.shp-f > span { font-weight: 600; }
.shp-f .input, .shp-f .select, .shp-f .textarea { width: 100%; }
.shp-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 7px; max-height: 46vh; overflow: auto; }
.shp-pick { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.shp-pick:hover { border-color: var(--brand); }
.shp-pick.on { border-color: var(--brand); background: var(--brand-50); }
.shp-pick img, .shp-pick .shp-ph { width: 42px; height: 42px; border-radius: 7px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--line-soft); font-size: 16px; }
.shp-pick .shp-spec { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); word-break: break-all; }
.shp-acts { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.shp-del { padding: 2px 7px; }
