:root {
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --gray: #6b7280;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  overscroll-behavior-y: contain;
  overflow-x: hidden;
}
.hidden { display: none !important; }
.view { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; overflow-x: hidden; }

/* ---------- 通用按钮 ---------- */
.btn {
  border: none; border-radius: 10px; padding: 10px 16px; font-size: 14px;
  cursor: pointer; font-family: inherit; background: #eef2f7; color: var(--text);
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.danger { background: #fee2e2; color: var(--red); }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.xs { padding: 5px 10px; font-size: 11px; border-radius: 8px; }
.btn[disabled] { opacity: .5; }
.btn { white-space: nowrap; }

/* ---------- 输入 ---------- */
.field { margin-bottom: 12px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--text); outline: none;
  min-width: 0; max-width: 100%;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.textarea { min-height: 72px; resize: vertical; }
/* 移动端日期/时间选择器：去掉系统自带外观导致的固有宽度，避免右侧溢出 */
input[type="datetime-local"], input[type="date"], input[type="time"] {
  -webkit-appearance: none; appearance: none;
  min-width: 0; max-width: 100%; font-size: 15px;
}
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
/* 紧凑的交付时间行 */
.dl-row { display: flex; align-items: center; gap: 10px; }
.dl-row .lbl { margin: 0; flex: 0 0 auto; white-space: nowrap; }
.dl-row .input { flex: 1 1 auto; min-width: 0; }
.dl-hint { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ---------- 登录页 ---------- */
#view-login, #view-reset { background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: #fff; width: 100%; border-radius: 20px; padding: 32px 26px; box-shadow: 0 20px 50px rgba(0,0,0,.3); text-align: center; }
.login-card h1 { font-size: 20px; margin: 14px 0 4px; }
.login-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 13px; }
.logo {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; background: var(--primary);
  color: #fff; font-size: 30px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(37,99,235,.35);
}
.demo-tip { margin-top: 20px; font-size: 12px; color: var(--muted); text-align: left; }
.demo-accounts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.save-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin: 0 0 10px; justify-content: flex-start; }
.save-check input { width: 15px; height: 15px; accent-color: var(--primary); }
.saved-acc {
  flex: 1; min-width: 108px; display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #f8fafc; border-radius: 10px; padding: 6px 8px;
  cursor: pointer;
}
.saved-acc:active { background: #eef2ff; }
.sa-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.sa-info b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sa-info span { font-size: 10px; color: var(--muted); }
.sa-del { color: #c0c7d1; font-size: 16px; padding: 0 3px; flex-shrink: 0; }
.sa-del:active { color: var(--red); }
.demo {
  flex: 1; border: 1px solid var(--line); background: #f8fafc; border-radius: 10px; padding: 8px 4px;
  font-size: 12px; color: var(--muted); cursor: pointer; font-family: inherit;
}
.demo:active { background: #eef2f7; }

/* ---------- 顶栏 & 底栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  height: 52px; background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; box-shadow: var(--shadow); z-index: 20;
}
.top-title { font-size: 17px; font-weight: 600; }
.ptr {
  position: fixed; top: 54px; left: 50%;
  transform: translateX(-50%) translateY(-16px) scale(.5);
  z-index: 30; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 7px;
  opacity: 0; transition: opacity .22s ease, transform .32s cubic-bezier(.25, 1, .35, 1);
}
.ptr.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.ptr.dragging { transition: none; }
.ptr-ring {
  width: 34px; height: 34px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .14);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.ptr-arc {
  width: 20px; height: 20px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary) var(--ang, 0deg), transparent 0deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  transform: rotate(-90deg);
}
.ptr.spinning .ptr-ring { animation: ptrspin .75s linear infinite; }
.ptr.done .ptr-ring { animation: ptrpop .3s ease; }
@keyframes ptrspin { to { transform: rotate(360deg); } }
@keyframes ptrpop {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.ptr-txt { font-size: 12px; color: #8a94a6; text-shadow: 0 1px 2px rgba(255,255,255,.8); transition: color .2s ease; }
.ptr.over .ptr-txt { color: var(--primary); }
.lm {
  position: fixed; bottom: 76px; left: 50%;
  transform: translateX(-50%) translateY(16px) scale(.5);
  z-index: 30; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 7px;
  opacity: 0; transition: opacity .22s ease, transform .32s cubic-bezier(.25, 1, .35, 1);
}
.lm.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.lm.dragging { transition: none; }
.lm.spinning .ptr-ring { animation: ptrspin .75s linear infinite; }
.lm.done .ptr-ring { animation: ptrpop .3s ease; }
.lm-txt { font-size: 12px; color: #8a94a6; text-shadow: 0 1px 2px rgba(255,255,255,.8); transition: color .2s ease; }
.lm.over .lm-txt { color: var(--primary); }
.page { transition: transform .38s cubic-bezier(.25, 1, .35, 1); }
.page.dragging { transition: none; }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  height: 58px; background: #fff; display: flex; box-shadow: 0 -1px 6px rgba(15,23,42,.08); z-index: 20;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #9aa3af; cursor: pointer; font-size: 11px; }
.tab .ico { width: 22px; height: 22px; }
.tab.active { color: var(--primary); font-weight: 600; }
.page { padding: 64px 12px 76px; min-height: 100vh; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.card.pad { padding: 14px; }
.section-title { font-size: 15px; font-weight: 600; margin: 18px 0 10px; display: flex; align-items: center; justify-content: space-between; }

/* ---------- 订单卡片 ---------- */
.oc { padding: 12px; }
.oc-top { display: flex; gap: 10px; }
.oc-thumb { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; background: #eef2f7; flex-shrink: 0; }
.oc-info { flex: 1; min-width: 0; }
.oc-no { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.oc-cust { font-size: 15px; font-weight: 600; margin: 3px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-items { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.oc-price { font-weight: 700; color: var(--text); }
.oc-deadline { display: flex; align-items: center; gap: 4px; }
.oc-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }

/* ---------- 徽标 ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.badge.pending { background: #dbeafe; color: var(--primary-2); }
.badge.doing { background: #fef3c7; color: var(--amber); }
.badge.completed { background: #dcfce7; color: var(--green); }
.badge.cancelled { background: #f3f4f6; color: var(--gray); }
.badge.overdue { background: #fee2e2; color: var(--red); }
.dl-today {
  display: inline-block; background: var(--green); color: #fff;
  border-radius: 8px; padding: 2px 9px; font-size: 11px; font-weight: 600;
}
.dl-overdue {
  display: inline-block; background: #fee2e2; color: var(--red);
  border-radius: 8px; padding: 2px 9px; font-size: 11px; font-weight: 600;
}
.assignee-link {
  color: var(--primary); text-decoration: none; border-bottom: 1px dashed var(--primary);
  cursor: pointer; padding: 0 2px;
}
.assignee-link:active { opacity: .7; }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; }
.chip { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 6px 14px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.chip-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; }
.chip.active .chip-cnt { background: rgba(255,255,255,.28); color: #fff; }
.filter-panel { background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.filter-panel .row { display: flex; gap: 8px; }
.filter-panel .row > * { flex: 1; }
.search-row { display: flex; gap: 8px; }
.search-row > * { min-width: 0; }
.cust-combo { position: relative; }
.cust-combo .input { width: 100%; }
.cust-menu { display: none; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.12); max-height: 240px; overflow-y: auto; }
.cust-menu.open { display: block; }
.cust-item { padding: 10px 12px; font-size: 14px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.cust-item:last-child { border-bottom: 0; }
.cust-item:hover { background: #f5f8ff; }
.cust-item.on { color: var(--primary); font-weight: 600; }
.cust-item.empty { color: var(--muted); cursor: default; }
.cust-item.empty:hover { background: #fff; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; color: #9aa3af; padding: 60px 0; }
.empty .big { font-size: 42px; opacity: .4; }

/* ---------- 发布页 ---------- */
.item-row { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #fafbfc; }
.item-row .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.item-row .full { grid-column: 1 / -1; }
.upload-zone { border: 1.5px dashed #c7d2fe; border-radius: 10px; padding: 14px; text-align: center; color: var(--primary); cursor: pointer; background: #f5f7ff; }
.upload-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.upload-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

/* ---------- 详情抽屉 ---------- */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.drawer-body {
  position: absolute; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 520px;
  background: var(--bg); border-radius: 18px 18px 0 0; max-height: 90vh; overflow-y: auto;
  animation: up .22s ease; padding-bottom: 24px;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.dd-head { background: #fff; padding: 16px 16px 10px; border-radius: 18px 18px 0 0; position: sticky; top: 0; z-index: 2; }
.dd-close {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border: none; border-radius: 50%;
  background: #f1f5f9; color: #64748b; font-size: 15px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.dd-close:active { background: #e2e8f0; }
.dd-grab { width: 40px; height: 4px; background: #d8dee7; border-radius: 4px; margin: 0 auto 10px; }
.dd-body { padding: 12px; }
.imgs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.imgs img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.kv { background: #fff; border-radius: 12px; padding: 4px 12px; margin-bottom: 10px; }
.kv .r { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.kv .r:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; max-width: 65%; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; font-size: 13px; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #f1f5f9; }
.table th { background: #f8fafc; color: var(--muted); font-weight: 500; font-size: 12px; }
/* 时间线 */
.tl { padding: 4px 0 0; }
.tl-item { display: flex; gap: 10px; position: relative; padding-bottom: 16px; }
.tl-item:before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: #e2e8f0; }
.tl-item:last-child:before { display: none; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin-top: 3px; flex-shrink: 0; position: relative; z-index: 1; }
.tl-item .tl-dot.cancel { background: var(--gray); }
.tl-item .tl-dot.done { background: var(--green); }
.tl-body { flex: 1; background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.tl-body .t { color: var(--muted); font-size: 11px; margin-top: 2px; }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-body { position: relative; background: #fff; border-radius: 16px; width: 88%; max-width: 400px; padding: 20px; animation: up .2s ease; }
.modal-body h3 { margin: 0 0 12px; font-size: 16px; }
.modal-body .mbtns { display: flex; gap: 10px; margin-top: 14px; }
.modal-body .mbtns .btn { flex: 1; }

/* ---------- 统计 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.stat .num { font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat .lab { font-size: 12px; color: var(--muted); }
.stat.red .num { color: var(--red); }
.stat.blue .num { color: var(--primary); }
.stat.green .num { color: var(--green); }
.stat.amber .num { color: var(--amber); }
.stat.gray .num { color: var(--gray); }
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.list-row:last-child { border-bottom: none; }
.list-row .l { font-weight: 500; }
.list-row .r { color: var(--muted); text-align: right; }
.bar-wrap { background: #f1f5f9; height: 6px; border-radius: 4px; margin-top: 4px; overflow: hidden; }
.bar { height: 100%; background: var(--primary); border-radius: 4px; }

/* ---------- 我的 ---------- */
.profile { display: flex; align-items: center; gap: 12px; padding: 16px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; cursor: pointer; }
.menu-item .l { font-weight: 500; }
.menu-item .arrow { color: #c0c7d1; }
.user-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.user-row .uname { color: var(--muted); font-size: 11px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; background: #eef2f7; color: var(--muted); }
.tag.pub { background: #dbeafe; color: var(--primary-2); }
.tag.wh { background: #dcfce7; color: var(--green); }
.tag.lg { background: #ffe4e6; color: #e11d48; }
.tag.mgr { background: #ede9fe; color: #7c3aed; }
.tag.ad { background: #fef3c7; color: var(--amber); }
.tag.cust { background: #f1f5f9; color: #64748b; }

/* 送货 / 吊样 切换 */
.mode-seg {
  display: flex; background: #e5eaf2; border-radius: 10px; padding: 3px;
  margin-bottom: 12px;
}
.mode-seg .seg-item {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 8px; font-size: 14px;
  color: var(--muted); cursor: pointer; background: transparent;
}
.mode-seg .seg-item.on { background: #fff; color: var(--primary); font-weight: 700; box-shadow: var(--shadow); }
/* 发布页底部固定提交栏 */
.pub-submit-bar {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 496px; z-index: 18;
  background: rgba(238, 241, 246, .94); backdrop-filter: blur(6px);
  padding: 6px 0 8px; box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
.page.has-pubbar { padding-bottom: 120px; }
.pub-submit-bar .btn { box-shadow: var(--shadow); }
.link-btn { border: none; background: none; color: var(--primary); font-size: 14px; cursor: pointer; padding: 4px 6px; font-family: inherit; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(17,24,39,.92);
  color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity .25s; max-width: 84%;
}
#toast.show { opacity: 1; }

::-webkit-scrollbar { width: 0; height: 0; }

/* ================= 响应式：pad / 桌面加宽 ================= */
/* 人员/客户行：窄屏时操作按钮换到下一行，避免文字竖排 */
.staff-row, .cu-row { display: flex; gap: 10px; align-items: center; }
.staff-info, .cu-info { flex: 1 1 0; min-width: 0; }
.si-main { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.si-main b, .si-main .tag { flex: 0 0 auto; }
.si-cu { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.si-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.staff-actions, .cu-actions { flex: 0 0 auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cu-info b, .cu-info .tag { white-space: nowrap; }
@media (max-width: 480px) {
  .staff-row, .cu-row { flex-wrap: wrap; align-items: flex-start; }
  .staff-actions { flex-basis: 100%; justify-content: flex-start; padding-left: 48px; }
  .cu-actions { flex-basis: 100%; justify-content: flex-start; }
}
@media (min-width: 768px) {
  .view, .topbar, .tabbar, .drawer-body, .cmtpop-bar { max-width: 760px; }
  .sq-feed { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1100px) {
  .view, .topbar, .tabbar, .drawer-body, .cmtpop-bar { max-width: 980px; }
  .sq-feed { grid-template-columns: repeat(4, 1fr); }
}

/* ================= 朋友圈风格订单卡片 ================= */
.avatar {
  width: 44px; height: 44px; border-radius: 10px; color: #fff; font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar.sm { width: 40px; height: 40px; font-size: 16px; border-radius: 8px; }
.avatar.xs { width: 30px; height: 30px; font-size: 12px; border-radius: 7px; }
.post { padding: 14px 14px 2px; }
.post.dim { background: #f3f5f9; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.post.dim .p-name { color: #6b7280; }
.post.dim .img-grid img { opacity: .72; }
.post.dim .p-content, .post.dim .p-time { color: #7b8494; }
.p-head { display: flex; gap: 10px; align-items: center; }
.p-user { flex: 1; min-width: 0; }
.p-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.p-time { font-size: 11px; color: #8a94a6; margin-top: 3px; }
.p-status { align-self: flex-start; display: flex; gap: 4px; }
.p-content { margin: 10px 0 0 50px; font-size: 14px; line-height: 1.7; }
.p-row .k { color: #98a1ae; font-size: 12px; margin-right: 8px; }
.p-items { flex: 1; min-width: 0; font-size: 12px; color: #374151; line-height: 1.8; }
.cust-chip { display: inline-block; background: #eef2ff; color: var(--primary-2); border-radius: 5px; padding: 2px 7px; font-size: 11px; margin: 2px 4px 2px 0; }
.p-remark {
  background: #f6f8fb; border-radius: 8px; padding: 8px 10px; margin-top: 8px;
  font-size: 13px; color: #4b5563;
}
/* 图片墙 */
.img-grid { margin: 10px 0 0 50px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 8px; overflow: hidden; }
.img-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #eef2f7; }
.img-grid.s1 { grid-template-columns: 1fr; max-width: 100%; }
.img-grid.s1 img { aspect-ratio: 4/3; max-height: 220px; }
.img-grid.s2 { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
/* 操作条 */
.p-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin: 12px 0 4px 50px; border-top: 1px solid #f1f5f9; padding-top: 10px;
  flex-wrap: wrap; gap: 6px 8px;
}
.p-act { color: #8a94a6; font-size: 13px; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 4px; }
.p-btns { display: flex; gap: 6px 8px; flex-wrap: wrap; }
/* 评论 */
.cmt-box { margin: 0 0 10px 50px; background: #f6f8fb; border-radius: 10px; padding: 8px 10px; }
.cmt { font-size: 13px; line-height: 1.75; word-break: break-all; cursor: pointer; border-radius: 4px; }
.cmt b { color: #576b95; font-weight: 600; }
.cmt:hover { background: rgba(87, 107, 149, .08); }
.cmt-del { color: #c0c7d1; margin-left: 6px; cursor: pointer; font-size: 15px; padding: 0 2px; }
.cmt-del:active { color: var(--red); }
.cmt-tag { font-size: 11px; color: #2563eb; background: rgba(37, 99, 235, .1); border-radius: 4px; padding: 1px 5px; margin: 0 3px; }
.cmt-input { display: flex; gap: 8px; margin-top: 8px; }
.cmt-in { flex: 1; border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; font-family: inherit; }
.cmt-in:focus { border-color: var(--primary); }
.cmt-empty { font-size: 12px; color: #b3bac4; }

/* ================= 小红书瀑布流（任务广场） ================= */
.sq-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-items: start; }
.sq-lm { grid-column: 1 / -1; text-align: center; color: var(--muted, #94a3b8); font-size: 12px; padding: 14px 0 22px; }
.w-card {
  break-inside: avoid; margin-bottom: 0; background: #fff; border-radius: 12px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.w-card.dim { opacity: .78; filter: saturate(.8); }
.w-imgwrap { position: relative; overflow: hidden; background: #eef2f7; }
.w-img { display: block; width: 100%; height: 200px; object-fit: cover; background: #eef2f7; }
.w-img.crop { height: 200px; object-fit: cover; }
.w-imgwrap .w-noimg { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; text-align: center; padding: 16px; background: #f1f5f9; line-height: 1.4; word-break: break-all; }
.w-noimg {
  min-height: 150px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; text-align: center; padding: 16px;
  background: #f1f5f9; line-height: 1.4; word-break: break-all;
}
.p-noimg { padding: 0 14px; }
.p-noimg .w-noimg { border-radius: 10px; }
.w-tag { position: absolute; top: 6px; left: 6px; }
.w-owner {
  position: absolute; bottom: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(15, 23, 42, .55); border-radius: 16px; padding: 2px 8px 2px 2px;
  color: #fff; font-size: 11px; max-width: calc(100% - 12px);
}
.w-owner-ava { width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.w-owner-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-body { padding: 8px 10px 4px; }
.w-cust { font-size: 13px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.w-meta { font-size: 11px; color: #8a94a6; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-meta.multi { white-space: normal; font-size: 12px; color: #4b5563; line-height: 1.6; }
.w-card .cmt-box { margin: 0 10px 10px; padding: 4px 9px; }
.w-card .cmt-toggle { font-size: 12px; color: #8a94a6; cursor: pointer; padding: 3px 0; display: inline-block; }
.w-card .cmt-toggle:active { color: var(--primary); }
.w-card .cmt-expand { padding: 4px 0 2px; }
.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.w-grid img { width: 100%; height: 66px; object-fit: cover; display: block; background: #eef2f7; }
.w-foot { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 8px; flex-wrap: wrap; row-gap: 6px; }
.w-user { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #6b7280; min-width: 0; flex: 1 1 auto; }
.w-ava { width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.w-cmt { color: #98a1ae; }
.cmt-open { cursor: pointer; }
.cmt-open:active { color: var(--primary); }
.more-wrap { position: relative; display: inline-flex; align-items: center; }
.more-bar {
  display: inline-flex; align-items: center; gap: 12px; overflow: hidden; max-width: 0; opacity: 0;
  padding: 5px 0; border-radius: 18px; position: absolute; bottom: 100%; left: 0;
  white-space: nowrap; z-index: 20;
  transition: max-width .3s cubic-bezier(.4, 0, .2, 1), opacity .2s cubic-bezier(.4, 0, .2, 1),
             padding .3s cubic-bezier(.4, 0, .2, 1);
}
.more-wrap.open .more-bar { max-width: 180px; opacity: 1; padding: 6px 12px; background: #eef1f6; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.more-bar .mb { display: inline-flex; cursor: pointer; color: #5b6472; padding: 2px; transition: transform .12s ease, color .2s ease; }
.more-bar .mb:active { transform: scale(.85); }
.more-bar .mb.fav { color: #f59e0b; }
.more-btn { position: relative; cursor: pointer; display: inline-flex; color: #98a1ae; padding: 2px; transition: transform .12s ease, color .2s ease; }
.more-btn:active { transform: scale(.85); }
.more-btn.fav { color: #f59e0b; }
.more-cnt { position: absolute; top: -5px; right: -9px; min-width: 15px; height: 15px; line-height: 15px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 9px; font-style: normal; text-align: center; padding: 0 3px; }
.share-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.share-opt { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13px; background: #fff; cursor: pointer; }
.share-opt input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 分享图片预览层 */
#imgpreview { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; }
.ip-mask { position: absolute; inset: 0; background: rgba(10, 14, 20, .88); }
.ip-body { position: relative; z-index: 1; width: 92%; max-width: 480px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ip-body img { max-width: 100%; max-height: 70vh; width: auto; height: auto; border-radius: 12px; display: block; }
.ip-actions { display: flex; gap: 10px; }
.ip-actions .btn { flex: 1; }

/* 评论输入弹层（朋友圈式） */
#cmtpop { position: fixed; inset: 0; z-index: 70; }
.cmtpop-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); }
.cmtpop-bar {
  position: absolute; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 520px;
  background: #fff; border-radius: 14px 14px 0 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
}
.cmtpop-bar .input { flex: 1; border: 1px solid #e5e7eb; border-radius: 18px; padding: 9px 14px; font-size: 14px; }
.cmtpop-bar .input:focus { border-color: var(--primary); }

/* ================= 信息中心（指南卡片） ================= */
.guide-card { overflow: hidden; }
.g-top { position: relative; }
.g-cover { width: 100%; max-height: 200px; object-fit: cover; display: block; background: #eef2f7; }
.g-cat-tag {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--primary); color: #fff;
}
.g-cat-tag.abs { position: absolute; top: 8px; left: 8px; background: rgba(17, 24, 39, .55); }
.g-cat-inline { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--primary); color: #fff; margin-bottom: 6px; }
.g-body { padding: 10px 14px 4px; }
.g-title { font-size: 15px; font-weight: 650; line-height: 1.4; }
.g-summary { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-remark-line { text-align: right; font-size: 11px; color: #9aa3af; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 10px; }
.g-user { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #6b7280; }
.g-time { color: #b0b7c3; margin-left: 2px; }
.g-acts { display: flex; align-items: center; gap: 13px; color: #98a1ae; font-size: 12px; }
.g-acts .g-like, .g-detail-acts .g-like { cursor: pointer; }
.g-acts .g-share, .g-detail-acts .g-share { cursor: pointer; color: #98a1ae; display: inline-flex; align-items: center; gap: 2px; }
.g-share:active { color: var(--primary); }
.g-like.on { color: #e0245e; }
.g-content { background: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.8; white-space: pre-wrap; color: #374151; margin-bottom: 10px; }
.g-remark { background: #f6f8fa; border-radius: 10px; padding: 9px 12px; font-size: 12px; color: #6b7280; margin-bottom: 10px; line-height: 1.7; word-break: break-all; }
.guide-card .cmt-box { margin: 0 12px 12px; }
.g-detail-acts { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 13px; color: #6b7280; }
.g-like.big { font-size: 15px; }

/* 人员选择列表 */
.up-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.up-item:active { background: #f1f5f9; }
.up-item.on { background: #eef2ff; }
.up-item + .up-item { border-top: 1px solid #f1f5f9; border-radius: 0; }

/* 图片查看器 */
#imgviewer { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; }
#imgviewer .iv-mask { position: absolute; inset: 0; background: rgba(0,0,0,.92); }
#imgviewer .iv-stage { position: relative; z-index: 1; max-width: 100%; max-height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#imgviewer .iv-stage img { max-width: 100%; max-height: 100%; transform-origin: center center; transition: transform .15s ease; will-change: transform; touch-action: none; }
#imgviewer .iv-count { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; font-size: 13px; background: rgba(0,0,0,.5); padding: 4px 12px; border-radius: 14px; }
#imgviewer .iv-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#imgviewer .iv-prev { left: 10px; }
#imgviewer .iv-next { right: 10px; }
#imgviewer .iv-close { position: absolute; top: 12px; right: 14px; z-index: 2; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }

/* 数据导入管理 */
.imp-count { font-size: 12px; color: var(--muted); margin: 8px 2px; }
.imp-item { margin-bottom: 10px; }

/* 统计明细批量删除 */
.cbx { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.cbx input { width: 16px; height: 16px; accent-color: var(--primary); }
.sd-cb-wrap { display: inline-flex; align-items: center; margin-right: 6px; vertical-align: middle; }
.sd-cb-wrap input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.card.post.sd-sel, .w-card.sd-sel { outline: 2px solid var(--primary); outline-offset: -2px; }
#sd-bdel:disabled { opacity: .5; cursor: not-allowed; }

/* 悬浮球：信息中心快速入口 */
.sc-fab {
  position: fixed; right: 18px; bottom: 90px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #4f6ef7, #7c3aed);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(79, 110, 247, .45);
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  animation: fab-pop .28s ease;
}
.sc-fab:active { transform: scale(.92); }
.sc-fab .fab-ico { font-size: 20px; line-height: 1; }
.sc-fab .fab-txt { font-size: 9px; line-height: 1; margin-top: 3px; letter-spacing: .5px; }
@keyframes fab-pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }

/* ================= 服装生产订单系统 ================= */

/* ---------- 首页汇总条（一行轻量） ---------- */
.sum-bar { display: flex; background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.sum-item { flex: 1; text-align: center; padding: 11px 4px; }
.sum-item + .sum-item { border-left: 1px solid #f1f5f9; }
.sum-item .n { font-size: 19px; font-weight: 700; }
.sum-item .n.pending { color: var(--primary-2); }
.sum-item .n.doing { color: var(--amber); }
.sum-item .n.done { color: var(--green); }
.sum-item .l { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---------- 新建订单 CTA（橙色置顶） ---------- */
.cta-new {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; padding: 12px 28px; margin-bottom: 0;
  background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff;
  border: none; border-radius: 999px; font-size: 15px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(245, 158, 11, .35);
}
.cta-new:active { transform: scale(.98); }
.cta-new .ico { font-size: 18px; }

/* ---------- 状态 tab（横向滑动） ---------- */
.status-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; -webkit-overflow-scrolling: touch; }
.status-tabs .chip { white-space: nowrap; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 6px 14px; font-size: 13px; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.status-tabs .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.status-tabs .chip.chip-overdue.active { background: var(--red); border-color: var(--red); }
.chip-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; line-height: 1; }
.status-tabs .chip.active .chip-cnt { background: rgba(255,255,255,.28); }

/* ---------- 筛选折叠入口 ---------- */
.filter-toggle {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 9px; color: var(--muted); font-size: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 10px; cursor: pointer; user-select: none;
}
.filter-toggle.on { color: var(--primary); border-color: #bfdbfe; background: #eff6ff; }

/* ---------- 订单卡片（带款式图） ---------- */
.oc { padding: 12px; position: relative; cursor: pointer; }
.oc-status { position: absolute; top: 12px; right: 12px; }
.thumb-wrap { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #eef2f7; }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-plus { position: absolute; right: 2px; bottom: 2px; background: rgba(15, 23, 42, .72); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 7px; }
.img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #eef2f7; }
.img-ph svg { width: 32px; height: 32px; opacity: .65; }
.oc-cust { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; padding-right: 46px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-items { font-size: 13px; font-weight: 500; color: #374151; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-meta2 { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.oc-meta2 .amt { color: var(--text); font-weight: 700; }
.oc-overdue { color: var(--red); font-weight: 600; }

/* ---------- 订单详情（款式图条） ---------- */
.det-imgs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.det-imgs .di { width: 72px; flex-shrink: 0; text-align: center; }
.det-imgs .di .t { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: #eef2f7; position: relative; }
.det-imgs .di .t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.det-imgs .di .lb { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 分步全屏订单表单 ---------- */
.step-lbl { font-size: 13px; font-weight: 700; color: var(--primary-2); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.step-lbl::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--primary); }
.of-tip { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* 明细卡（新版） */
.it-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fafbfc; }
.it-main { display: flex; gap: 10px; }
.it-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: #eef2f7; position: relative; }
.it-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.it-thumb .img-ph svg { width: 26px; height: 26px; }
.it-fields { flex: 1; min-width: 0; }
.it-fields .lbl { font-size: 11px; margin-bottom: 4px; }
.it-row { margin-bottom: 10px; }
.it-row2 { display: flex; gap: 10px; margin-bottom: 10px; }
.it-tags { margin-top: -2px; margin-bottom: 8px; }
.it-tags { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.it-tags .warn-tag { margin-left: 0; }

/* 尺码横排大输入 */
.size-row { display: flex; gap: 8px; margin-top: 2px; }
.size-cell { flex: 1; text-align: center; }
.size-cell label { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.size-cell input {
  width: 100%; text-align: center; padding: 9px 0; font-size: 18px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  outline: none; font-family: inherit; -webkit-appearance: none;
}
.size-cell input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
.size-cell input.fld-red { border-color: var(--red); background: #fef2f2; }

/* 明细卡底部：小计 + 删除 */
.it-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.it-sub { font-size: 12px; color: var(--muted); flex: 1; }
.it-sub b { color: var(--text); }
.it-sub .amt { color: var(--primary); font-weight: 700; }

/* 底部固定提交栏（订单表单） */
.pub-submit-bar { position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 496px; z-index: 18; background: rgba(238, 241, 246, .94); backdrop-filter: blur(6px); padding: 6px 0 8px; box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.page.has-pubbar { padding-bottom: 132px; }
.of-submit { display: flex; align-items: center; gap: 10px; }
.of-submit .of-totals { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.5; }
.of-submit .of-totals b { color: var(--text); font-size: 15px; margin-left: 2px; }
.of-submit .of-totals .amt { color: var(--primary); font-size: 15px; font-weight: 700; margin-left: 6px; }
.of-submit .btn { flex: 0 0 auto; }

/* 识别预览层 */
.rec-pv-item { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; background: #fff; }
.rec-pv-item .rp-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rec-pv-item .rp-sz { font-size: 11px; color: var(--muted); margin-top: 5px; }
.rec-pv-cust { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff; border-radius: 10px; padding: 9px 10px; margin-bottom: 8px; border: 1px solid var(--line); font-size: 13px; }

/* ---------- 统计：总览 + 条形图 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.stat .num { font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat .lab { font-size: 12px; color: var(--muted); }
.stat.red .num { color: var(--red); }
.stat.blue .num { color: var(--primary); }
.stat.green .num { color: var(--green); }
.stat.amber .num { color: var(--amber); }
.stat.gray .num { color: var(--gray); }
.bar-row { display: block; width: 100%; }
.bar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.bar-top .l { font-weight: 600; font-size: 13px; }
.bar-top .l .sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.bar-top .r { text-align: right; font-size: 12px; }
.bar-top .r .amt { color: var(--muted); margin-left: 6px; }
.bar-wrap { background: #f1f5f9; height: 7px; border-radius: 4px; overflow: hidden; }
.bar { height: 100%; background: var(--primary); border-radius: 4px; min-width: 0; transition: width .4s ease; }

/* ---------- 我的：快捷数据 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; }
.quick-item { text-align: center; }
.quick-item .n { font-size: 22px; font-weight: 700; color: var(--primary); }
.quick-item .l { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* 识别标黄/标红（复用） */
.fld-warn { border-color: var(--amber) !important; background: #fffbe6 !important; }
.fld-bad { border-color: var(--red) !important; background: #fef2f2 !important; }
.warn-tag { display: inline-flex; align-items: center; gap: 4px; background: #fffbe6; border: 1px solid #fde68a; color: var(--amber); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.warn-tag.new { background: #fffbe6; color: var(--amber); }
.warn-tag.bad { background: #fee2e2; border-color: #fca5a5; color: var(--red); }
.warn-tag.ok { background: #dcfce7; border-color: #bbf7d0; color: var(--green); }
.mut-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mut-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--muted); cursor: pointer; }
.mut-chip:active { background: #eef2ff; }

/* 识别原图 */
.rec-img { width: 100%; border-radius: 10px; margin-bottom: 10px; display: block; }
.rec-banner { background: #eff6ff; border: 1px solid #bfdbfe; color: var(--primary-2); border-radius: 10px; padding: 8px 10px; font-size: 12px; margin-bottom: 10px; }
.rec-banner.bad { background: #fef2f2; border-color: #fca5a5; color: var(--red); }

/* 拍照识别入口（Step2 顶部） */
.rec-entry { border: 1.5px dashed #f59e0b; background: #fffbeb; border-radius: 12px; padding: 12px; text-align: center; color: var(--amber); cursor: pointer; margin-bottom: 12px; }
.rec-entry:active { background: #fef3c7; }
.rec-entry .big { font-size: 22px; }
.rec-entry .t { font-size: 13px; font-weight: 600; margin-top: 2px; }
.rec-entry .s { font-size: 11px; color: var(--amber); opacity: .8; margin-top: 2px; }

/* 商品管理：款号 + 颜色 */
.sty-card .sty-head { display: flex; align-items: center; gap: 8px; }
.color-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.color-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; position: relative; }
.color-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #f1f5f9; }
.color-item .ci-info { padding: 6px 8px; }
.color-item .ci-info b { font-size: 13px; }
.color-item .ci-info .p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.color-item .ci-edit { position: absolute; top: 6px; right: 6px; }
.color-item .ci-edit .btn { padding: 3px 7px; font-size: 10px; border-radius: 6px; }

/* 客户列表行 */
.cu-item { display: flex; align-items: flex-start; gap: 10px; }
.cu-item .cu-main { flex: 1; min-width: 0; }
.cu-item .cu-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cu-item .cu-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.cu-item .cu-acts { flex-shrink: 0; display: flex; gap: 6px; }

/* 分组切换 */
.seg-group { display: flex; gap: 8px; margin-bottom: 12px; }
.seg-chip { flex: 1; text-align: center; padding: 8px 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 状态流转按钮 */
.st-btn { display: flex; gap: 8px; margin-top: 10px; }
.st-btn .btn { flex: 1; }
.st-btn .btn.ghost { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.st-btn .btn { flex: 1; }

/* ---------- 新建订单固定底部栏 ---------- */
.home-cta-bar {
  position: fixed; bottom: 64px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 496px; z-index: 18;
  padding: 4px 0 8px; display: flex; justify-content: center;
}
.page.has-cta { padding-bottom: 136px; }

/* ---------- 订单卡片 v4（明细条目化 + 主次分层） ---------- */
.oc-cust2 {
  font-size: 15px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  padding-right: 56px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oc-line2 { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.oc-line2 .oc-overdue { color: var(--red); font-weight: 600; }
.oi-list { margin-top: 6px; }
.oi-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.oi-row + .oi-row { border-top: 1px solid #f1f5f9; }
.oi-thumb { width: 76px; height: 76px; aspect-ratio: 1 / 1; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: #eef2f7; }
.oi-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oi-thumb .img-ph svg { width: 36px; height: 36px; }
/* 无图：纯色底 + 加大款号 */
.oi-thumb.noimg { display: flex; align-items: center; justify-content: center; padding: 4px; }
.oi-thumb.noimg .noimg-no { color: #fff; font-size: 14px; font-weight: 700; text-align: center; line-height: 1.2; word-break: break-all; letter-spacing: .3px; }
.oi-main { flex: 1; min-width: 0; }
.oi-title { font-size: 14px; color: var(--text); }
.oi-title b { font-weight: 600; }
.oi-sizes { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 5px; }
.sz-group { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.sz-tag { display: inline-flex; align-items: center; justify-content: center; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; min-width: 22px; line-height: 1.5; }
.sz-tag.m { background: #dbeafe; color: #1d4ed8; }
.sz-tag.l { background: #dcfce7; color: #15803d; }
.sz-tag.xl { background: #fef3c7; color: #b45309; }
.sz-tag.x2l { background: #fed7aa; color: #c2410c; }
.sz-tag.x3l { background: #fce7f3; color: #be185d; }
.oi-none { font-size: 11px; color: var(--muted); }
.oi-right { text-align: right; flex-shrink: 0; }
.oi-right .oi-qty { font-size: 11px; font-weight: 800; color: var(--text); line-height: 1.4; }
.oi-right .oi-qty span { margin-left: 2px; }
.oi-right .oi-amt { font-size: 11px; color: var(--muted); margin-top: 4px; }
.oc-foot2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 9px; border-top: 1px solid #f1f5f9; }
.oc-foot2 .oc-sum { font-size: 12px; color: var(--muted); }
.oc-foot2 .oc-sum b { font-size: 13px; color: var(--text); }
.oc-foot2 .oc-amt { font-size: 15px; font-weight: 700; color: var(--primary); white-space: nowrap; }

/* ---------- 新版本提示横幅 ---------- */
#ver-banner {
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #dbeafe; border-left: 4px solid var(--primary);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14); border-radius: 12px;
  padding: 8px 10px; font-size: 13px; max-width: 92%;
}
#ver-banner .vb-t { flex: 1; min-width: 0; }

/* ---------- 错误日志 ---------- */
.el-item { padding: 12px; }
.el-item .el-msg { font-size: 13px; font-weight: 500; margin-top: 4px; word-break: break-all; cursor: pointer; }
.el-item .el-msg.el-open { white-space: pre-wrap; }
.el-badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.el-badge.error { background: #fee2e2; color: var(--red); }
.el-badge.warn { background: #fef3c7; color: var(--amber); }
.el-badge.client_error { background: #e0e7ff; color: #4f46e5; }
.el-tb {
  margin-top: 8px; background: #0f172a; color: #cbd5e1; border-radius: 8px;
  padding: 8px 10px; font-size: 11px; line-height: 1.5; font-family: ui-monospace, Menlo, Consolas, monospace;
  max-height: 60px; overflow: hidden; white-space: pre-wrap; word-break: break-all; cursor: pointer;
}
.el-tb.el-open { max-height: 320px; overflow: auto; }

/* 错误日志：单条删除 + 元信息 */
.el-item .el-del {
  flex: 0 0 auto; font-size: 12px; color: var(--red); cursor: pointer;
  border: 1px solid #fca5a5; border-radius: 8px; padding: 2px 10px;
  background: #fff;
}
.el-item .el-del:active { background: #fee2e2; }
.el-item .el-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
