* { box-sizing: border-box; }
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6eb;
  --text: #1f2329;
  --muted: #6b7280;
  --blue: #185fa5;
  --blue-soft: #e6f1fb;
  --green: #0f6e56;
  --green-soft: #e1f5ee;
  --amber: #854f0b;
  --amber-soft: #faeeda;
  --red: #a32d2d;
  --red-soft: #fcebeb;
}
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 13px; line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 0 20px; height: 52px; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 600; font-size: 15px; color: var(--text); }
.brand span { font-size: 11px; color: var(--muted); margin-left: 4px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { padding: 6px 10px; border-radius: 6px; color: #4b5563; font-size: 13px; }
.nav a:hover { background: #f1f3f6; text-decoration: none; }
.nav a.on { background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.nav-dot {
  display: inline-block; margin-left: 5px; min-width: 16px; padding: 0 5px;
  background: var(--red); color: #fff; border-radius: 20px;
  font-size: 11px; line-height: 16px; text-align: center; font-weight: 600;
}
.who { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }

/* 页内标签栏：内容多的页面（价格表、客户等）按项目分标签，一次只看一屏 */
.subtabs {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; margin-bottom: 16px;
}
.subtabs a { padding: 7px 12px; border-radius: 7px; color: #4b5563; font-size: 13px; white-space: nowrap; }
.subtabs a:hover { background: #f1f3f6; text-decoration: none; }
.subtabs a.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.subtabs a em {
  font-style: normal; margin-left: 6px; padding: 0 6px; border-radius: 20px;
  background: #f1f3f6; color: var(--muted); font-size: 11px; line-height: 16px; display: inline-block;
}
.subtabs a.on em { background: #fff; color: var(--blue); }
.subtabs a em.red { background: var(--red-soft); color: var(--red); font-weight: 600; }
.subtabs .sp { margin-left: auto; }

/* 顶部提示条：一条要紧的事 + 一个去处 */
.tipbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fffdf8; border: 1px solid #f0dcc0; border-radius: 9px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 13px;
}
.tipbar .sp { margin-left: auto; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 20px; }
.foot { text-align: center; color: #9aa1ab; font-size: 12px; padding: 24px 0 40px; }
.flash { padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.flash.ok { background: var(--green-soft); color: var(--green); border: 1px solid #b7e3d3; }
.flash.err { background: var(--red-soft); color: var(--red); border: 1px solid #f0c2c2; }

/* 提示浮层：固定在视口正中，滚到哪一页、页面的哪一段都能看到 */
.toasts {
  position: fixed; z-index: 300; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; gap: 10px;
  width: max-content; max-width: min(92vw, 620px);
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px; border-radius: 11px; border: 1px solid;
  font-size: 13.5px; line-height: 1.55;
  box-shadow: 0 14px 40px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
  animation: toastIn .18s ease-out;
}
.toast.ok { background: #ecf8f2; color: var(--green); border-color: #b7e3d3; }
.toast.err { background: #fdefef; color: var(--red); border-color: #f0c2c2; }
.toast .toast-ico {
  flex: none; width: 18px; height: 18px; border-radius: 50%; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.toast.ok .toast-ico { background: var(--green); }
.toast.err .toast-ico { background: var(--red); }
.toast .toast-msg { flex: 1; word-break: break-word; }
.toast .toast-x {
  flex: none; border: 0; background: transparent; color: inherit; opacity: .5;
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; font-family: inherit;
}
.toast .toast-x:hover { opacity: 1; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 14px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.card h2 .sub { font-weight: 400; color: var(--muted); font-size: 12px; }
.card.todo { border-color: #f0dcc0; background: #fffdf8; }
.grid { display: grid; gap: 12px; }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.c4, .grid.c3, .grid.c2 { grid-template-columns: 1fr 1fr; } }

.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat .k { color: var(--muted); font-size: 12px; }
.stat .v { font-size: 22px; font-weight: 600; letter-spacing: -.3px; margin-top: 2px; }
.stat .u { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.stat.hl { background: var(--blue-soft); border-color: #cfe3f7; }
.stat.hl .v { color: var(--blue); }
.stat.warn { background: var(--amber-soft); border-color: #f0dcc0; }
.stat.warn .v { color: var(--amber); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: #fafbfc; white-space: nowrap; }
tbody tr:hover { background: #fbfcfd; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.empty { color: var(--muted); padding: 24px; text-align: center; }

.badge { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 11px; border: 1px solid transparent; white-space: nowrap; }
.badge.b { background: var(--blue-soft); color: var(--blue); }
.badge.g { background: var(--green-soft); color: var(--green); }
.badge.a { background: var(--amber-soft); color: var(--amber); }
.badge.r { background: var(--red-soft); color: var(--red); }
.badge.gray { background: #f1f3f6; color: #4b5563; }

/* 件类型标记：实心底色 + 白字，明细里一眼能看到 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.tag.ret { background: #c2410c; color: #fff; }
.tag.itc { background: #6d28d9; color: #fff; }
.tag.adr { background: #374151; color: #fff; }
.tag.sur { background: #fff; color: #0e7490; border: 1px solid #a5dbe6; font-weight: 500; }
.tag.lock { background: var(--green-soft); color: var(--green); }
.tag.unlock { background: #f1f3f6; color: #4b5563; font-weight: 400; }
/* 客户改重（异议） */
.tag.dw { background: #fff3e6; color: #b45309; border: 1px solid #f5c89a; font-weight: 600; margin-left: 5px; }
.tag.dw.ok { background: var(--green-soft); color: var(--green); border-color: #bfe0cb; }
.tag.dw.no { background: var(--red-soft); color: var(--red); border-color: #f0c2c2; }
.wedit { margin-left: 6px; font-size: 11px; color: #9aa3af; text-decoration: underline dotted; cursor: pointer; }
.wedit:hover { color: var(--blue); }
/* 丢损 / 疑似丢损 */
.tag.ls { background: var(--red-soft); color: #b42318; border: 1px solid #f3c0bc; font-weight: 600; }
.tag.ls.confirmed { background: #fff3e6; color: #b45309; border-color: #f5c89a; }
.tag.ls.paid { background: var(--green-soft); color: var(--green); border-color: #bfe0cb; }
.tag.ls.rejected { background: #f1f3f6; color: #4b5563; border-color: #d7dbe2; }
.lossed { margin-left: 6px; font-size: 11px; color: #b42318; text-decoration: underline dotted; cursor: pointer; }
.lossed:hover { color: #a32d2d; }
tr.lrow > td { background: #fffafa; }
.wt { font-weight: 600; }
.ro { height: 32px; line-height: 32px; color: #4b5563; font-variant-numeric: tabular-nums; }
tr.wrow > td { background: #fbfcfe; }
.kinds { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.kinds .none { color: #b7bcc5; }

/* 金额展示 */
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.red { color: #c0392b; font-weight: 600; }
.amt.dash { color: #c3c8d0; }
.amt .minus { color: #6b7280; }
.amt .dash { color: #c3c8d0; }
th.amt-red-h { color: #c0392b; }

/* 详情弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: none; align-items: center; justify-content: center; z-index: 400; padding: 20px; }
.modal-mask.on { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; box-shadow: 0 18px 48px rgba(15, 23, 42, .3); }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-hd h3 { margin: 0; font-size: 15px; }
.modal-hd .x { background: none; border: 0; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.modal-hd .x:hover { background: #f1f3f6; color: var(--text); }
.modal-bd { padding: 16px 18px; }
.modal-ft { padding: 0 18px 16px; text-align: right; }
.kvt { width: 100%; border-collapse: collapse; font-size: 13px; }
.kvt th { width: 96px; color: var(--muted); font-weight: 400; padding: 7px 8px 7px 0; vertical-align: top; white-space: nowrap; background: none; border: 0; }
.kvt td { padding: 7px 0; border: 0; border-bottom: 1px dashed #eef0f3; background: none; }
.kvt tr:last-child td { border-bottom: 0; }
.kvt td.big { font-size: 17px; font-weight: 600; color: #c0392b; }
.kvt tr.sec td { padding: 10px 0 4px; font-size: 11px; font-weight: 600; color: #6b7280; letter-spacing: .5px; border-bottom: 1px solid #eef0f3; background: none; }
.note-box { margin-top: 12px; padding: 10px 12px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; color: #374151; word-break: break-all; }

form.inline { display: inline; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); }
input[type=text], input[type=password], input[type=date], input[type=number], select, textarea {
  border: 1px solid #d5d9e0; border-radius: 7px; padding: 7px 9px; font-size: 13px; font-family: inherit;
  background: #fff; color: var(--text); min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #cfe3f7; border-color: var(--blue); }
.btn {
  display: inline-block; border: 1px solid #d5d9e0; background: #fff; color: var(--text);
  padding: 7px 13px; border-radius: 7px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.btn:hover { background: #f6f7f9; text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #134e88; }
.btn.danger { color: var(--red); border-color: #eccaca; }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: flex-end; padding: 12px 0 0; color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip-tag { display: inline-block; background: var(--blue-soft); color: var(--blue); border: 1px solid #d3e4f7; border-radius: 20px; padding: 3px 10px; font-size: 12px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.right { text-align: right; }
.mt { margin-top: 12px; }
.sec-title { font-size: 13px; font-weight: 600; margin: 18px 0 8px; color: #374151; }
.kv { display: flex; gap: 6px; font-size: 12px; color: var(--muted); }
.login-wrap { min-height: 78vh; display: flex; align-items: center; justify-content: center; }
.login { width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px; }
.login h1 { font-size: 17px; margin: 0 0 4px; }
.login p { color: var(--muted); margin: 0 0 18px; font-size: 12px; }
.login .field { margin-bottom: 12px; }
.login input { width: 100%; }
.login .btn { width: 100%; justify-content: center; text-align: center; }
.zone { border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin-bottom: 10px; background: #fcfdfe; }
.zone-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tier-row, .base-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.tier-row input { width: 88px; }
.chip { display: inline-block; background: #f1f3f6; border-radius: 20px; padding: 4px 11px; font-size: 12px; color: #4b5563; cursor: pointer; }
.chip:hover { background: #e7eaef; text-decoration: none; }
.chip.on { background: var(--blue); color: #fff; }
.chip.on:hover { background: #134e88; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn[disabled]:hover { background: #fff; }
.btn.disabled { opacity: .4; pointer-events: none; }
/* 弹窗内两列表单：每个格子 label 在上、控件在下，互不挤压 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; align-items: start; }
.form-grid .field { gap: 6px; }
.form-grid .span2 { grid-column: 1 / -1; }
.btn.danger:not([disabled]):hover { background: #fdf2f2; }
details summary { cursor: pointer; color: var(--blue); font-size: 12px; }

/* ---------- 前台丢损工单（卡片式） ---------- */
.lc-list { display: flex; flex-direction: column; gap: 10px; }
.lc { background: #fff; border: 1px solid var(--line); border-left: 3px solid #cbd2da; border-radius: 10px; }
.lc.suspect { border-left-color: #d97706; }
.lc.confirmed { border-left-color: #b45309; }
.lc.paid { border-left-color: var(--green); }
.lc.rejected { border-left-color: #9aa1ab; }
.lc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid #eef0f3; background: #fbfcfd; border-radius: 8px 8px 0 0; }
.lc-no { font-weight: 600; color: #374151; }
.lc-wb { color: var(--muted); }
.lc-sp { flex: 1; }
.lc-amt { font-weight: 600; color: var(--green); }
.lc-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px 26px; padding: 12px 14px 6px; align-items: start; }
.lc-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0; }
.lc-facts dt { font-size: 11px; color: var(--muted); }
.lc-facts dd { margin: 0; font-size: 12.5px; font-weight: 500; word-break: break-all; }
.lc-notes { padding: 2px 14px 12px; display: grid; gap: 3px; font-size: 12px; }
.lc-notes .lb { display: inline-block; min-width: 54px; color: var(--muted); font-size: 11px; }

.steps { display: flex; }
.step { flex: 1; position: relative; padding-top: 20px; text-align: center; }
.step + .step::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: #e3e6eb; }
.step.done::before { background: #bfe0cb; }
.step .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #cbd2da; z-index: 1; }
.step.done .dot { background: var(--green); border-color: var(--green); }
.step.now .dot { background: #fff; border-color: #d97706; box-shadow: 0 0 0 3px #fdf0dd; }
.step.bad .dot { background: var(--red); border-color: var(--red); }
.step .st-t { font-size: 12px; font-weight: 600; color: #4b5563; }
.step.done .st-t { color: var(--green); }
.step.now .st-t { color: #b45309; }
.step.bad .st-t { color: var(--red); }
.step .st-m { font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 1px; }
@media (max-width: 900px) {
  .lc-body { grid-template-columns: 1fr; }
  .lc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 凭证图片：缩略图 / 灯箱 / 工单证据区 ---------- */
.shots { display: flex; flex-wrap: wrap; gap: 6px; }
.shot-wrap { position: relative; }
.shot { display: block; width: 62px; height: 62px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #f6f7f9; }
.shot:hover { border-color: var(--blue); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-x {
  position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; padding: 0;
  border-radius: 50%; border: 1px solid #e3c6c6; background: #fff; color: var(--red);
  font-size: 12px; line-height: 15px; text-align: center; cursor: pointer; font-family: inherit;
}
.shot-x:hover { background: var(--red); color: #fff; }
/* 灯箱要在模态框（z-index 400）之上，否则在弹窗里点图会被遮在下面 */
.lb-box { position: fixed; inset: 0; background: rgba(15, 18, 22, .86); display: none; align-items: center; justify-content: center; z-index: 520; padding: 24px; cursor: zoom-out; }
.lb-box img { max-width: 96vw; max-height: 92vh; border-radius: 4px; box-shadow: 0 10px 50px rgba(0, 0, 0, .5); }
.lc-ev { padding: 0 14px 12px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 18px; }
.lc-ev .lb, .ev-block .lb { font-size: 11px; color: var(--muted); margin-right: 6px; }
.ev-block { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ev-up { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ev-up input[type="file"] { font-size: 12px; max-width: 230px; }
.ev-box { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 10px 12px; margin-bottom: 10px; background: #fff; border: 1px solid #f0e3e3; border-radius: 8px; }
input[type="file"] { font-size: 12px; }

/* ---------- 模态框（复用全站 .modal-mask/.modal 体系，丢损工单专用扩展） ---------- */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal.wide { max-width: 800px; }
.modal-hd.row { justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.modal-hd.row .x { margin-left: auto; }
.modal-hd.row .hint { white-space: normal; }
.modal-bd.pad { padding: 14px 18px 16px; }
.modal-ft.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 18px 16px; text-align: left; }
.modal-ft.bar .hint { margin-right: auto; }
.modal-ft.bar { border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .modal-mask { padding: 0; }
  .modal.wide { max-width: none; max-height: 100vh; border-radius: 0; min-height: 100vh; }
}

/* 详情里的键值网格 / 双列表单 */
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 18px; margin: 0 0 14px; }
.kv dt { font-size: 11px; color: var(--muted); }
.kv dd { margin: 0; font-size: 12.5px; font-weight: 500; word-break: break-all; }
.mform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.mform .field { min-width: 0; }
.mform .wide { grid-column: 1 / -1; }
.act-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 700px) {
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mform { grid-template-columns: 1fr; }
}

/* ---------- 工单卡片（紧凑行，点开进模态框） ---------- */
.lc-main { display: block; width: 100%; padding: 10px 14px 9px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.lc-main:hover { background: #fafbfd; }
.lc-row1, .lc-row2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lc-row2 { margin-top: 3px; font-size: 12px; color: var(--muted); gap: 4px 14px; }
.lc-row2 b { font-weight: 500; color: #4b5563; }
.lc-go { color: var(--blue); font-size: 12px; }
.lc-main:hover .lc-go { text-decoration: underline; }

/* ---------- 粘贴 / 拖拽上传 ---------- */
.pu { display: flex; flex-direction: column; gap: 8px; position: relative; }
.pu-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pu-zone {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px; cursor: pointer;
  border: 1.5px dashed #cfd6de; border-radius: 9px; background: #fbfcfd; transition: .14s;
}
.pu-zone:hover, .pu-zone.hot { border-color: var(--blue); background: #f3f8ff; }
.pu-zone.hot { border-style: solid; }
.pu-zone.need { border-color: var(--red); background: #fdf5f5; animation: pshake .3s; }
@keyframes pshake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pu.on .pu-zone { border-color: #9ec2e8; background: #f6faff; }
.pu-ico {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  font-size: 16px; line-height: 26px; text-align: center; font-weight: 600;
}
.pu-tip { font-size: 12.5px; line-height: 1.5; color: #4b5563; }
.pu-tip b { color: var(--blue); font-weight: 600; }
.pu-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.pu-tip kbd {
  display: inline-block; padding: 0 4px; border: 1px solid #d7dbe2; border-bottom-width: 2px;
  border-radius: 4px; background: #fff; font-size: 11px; font-family: inherit; color: #4b5563;
}
.pu-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }
.pu-count { flex: none; font-size: 11.5px; color: var(--blue); background: var(--blue-soft); border-radius: 20px; padding: 1px 9px; }
.pu-btn {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px;
  border: 1px solid #b9d4ef; background: #fff; color: var(--blue); border-radius: 20px;
  font-size: 12px; font-family: inherit; cursor: pointer; white-space: nowrap; transition: .12s;
}
.pu-btn:hover { background: var(--blue-soft); border-color: var(--blue); }
.pu-btn:active { transform: translateY(1px); }
.pu-btn[disabled] { opacity: .5; cursor: default; }
/* 右键菜单 */
.pu-menu {
  position: fixed; z-index: 560; min-width: 186px; padding: 5px; background: #fff;
  border: 1px solid #dfe3e9; border-radius: 9px; box-shadow: 0 12px 34px rgba(15, 23, 42, .2); display: none;
}
.pu-menu.on { display: block; }
.pu-menu button {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 7px 9px; border: 0; background: none;
  font: inherit; font-size: 12.5px; color: #374151; text-align: left; border-radius: 6px; cursor: pointer;
}
.pu-menu button:hover { background: #f2f6fb; color: var(--blue); }
.pu-menu .mi-k { margin-left: auto; font-size: 11px; color: #9aa1ab; }
.pu-menu .sep { height: 1px; background: #eef0f3; margin: 4px 6px; }
.pu-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pu-list:empty { display: none; }
.pu-item { position: relative; width: 76px; }
.pu-item img { width: 76px; height: 76px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); display: block; cursor: zoom-in; background: #f6f7f9; }
.pu-item .pu-nm { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pu-x {
  position: absolute; top: -6px; right: -6px; width: 19px; height: 19px; padding: 0; border-radius: 50%;
  border: 1px solid #e3c6c6; background: #fff; color: var(--red); font-size: 12px; line-height: 16px;
  text-align: center; cursor: pointer; font-family: inherit;
}
.pu-x:hover { background: var(--red); color: #fff; }
.pu-flash {
  display: none; font-size: 12px; color: var(--green); background: var(--green-soft);
  border-radius: 6px; padding: 3px 9px; align-self: flex-start;
}
.pu-flash.show { display: block; }

/* ---------- 价格试算：左地址 / 右参数 两栏 ---------- */
.qa-form { display: flex; flex-direction: column; gap: 12px; }
.qa-cust { width: 220px; }
.qa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 18px; align-items: stretch; }
.qa-addr { min-width: 0; }
.qa-addr textarea {
  flex: 1 1 auto; width: 100%; min-height: 118px; max-height: 300px; resize: vertical;
  font-size: 13px; line-height: 1.7; padding: 9px 11px; word-break: break-all;
}
.qa-side { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.qa-btns { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 4px; }
.qa-kbd { margin-left: auto; white-space: nowrap; }
.qa-kbd kbd {
  display: inline-block; padding: 0 4px; border: 1px solid #d7dbe2; border-bottom-width: 2px;
  border-radius: 4px; background: #fff; font-size: 11px; font-family: inherit; color: #4b5563;
}
@media (max-width: 820px) {
  .qa-grid { grid-template-columns: 1fr; gap: 12px; }
  .qa-addr textarea { min-height: 76px; }
  .qa-btns { margin-top: 2px; }
  .qa-cust { width: 100%; }
}

/* ---------- 通用小标签 / 勾选 ---------- */
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.warn { background: #fff3e6; color: #b45309; border: 1px solid #f5c89a; }
.tag.gray { background: #f1f3f6; color: #4b5563; font-weight: 400; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; cursor: pointer; user-select: none; }

/* ---------- 月度对账单（纸张样式） ---------- */
.stmt {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 26px 30px 22px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.stmt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.stmt-top h1 { margin: 0; font-size: 21px; letter-spacing: 1px; }
.stmt-sub { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.stmt-sub b { color: #374151; font-weight: 600; }
.stmt-stamp {
  flex: none; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: #f1f3f6; color: #4b5563; white-space: nowrap;
}
.stmt-stamp.due { background: var(--red-soft); color: var(--red); }
.stmt-stamp.credit, .stmt-stamp.done { background: var(--green-soft); color: var(--green); }

.stmt-meta {
  display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center;
  margin: 16px 0 0; padding: 10px 12px; background: #fafbfc;
  border: 1px solid #eef0f3; border-radius: 8px; font-size: 12.5px;
}
.stmt-meta .k { color: var(--muted); margin-right: 6px; font-size: 11.5px; }

.stmt-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.stmt-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 500; padding: 7px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.stmt-table th.n { text-align: right; }
.stmt-table td { padding: 9px 10px; border-bottom: 1px solid #f2f4f7; vertical-align: baseline; }
.stmt-table td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stmt-table td.dim, .stmt-table td.n.dim { color: var(--muted); }
.stmt-table tr.sum td { font-weight: 600; background: #f8fbfe; border-top: 1px solid #dfe8f2; border-bottom: 1px solid #dfe8f2; }
.stmt-table tr.big td { font-size: 15px; font-weight: 700; padding: 11px 10px; border-top: 2px solid #d7dbe2; border-bottom: 0; }
.stmt-table td .hint { font-size: 11.5px; }

.stmt-notes { margin-top: 14px; display: grid; gap: 4px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.stmt-notes b { color: #4b5563; }
.stmt-notes .warn-line { color: #b45309; }

.stmt-sign { display: flex; flex-wrap: wrap; gap: 14px 34px; margin-top: 24px; padding-top: 18px; border-top: 1px dashed #d7dbe2; font-size: 12.5px; color: #4b5563; }
.stmt-sign .party { margin-left: auto; }
.stmt-sign .line { display: inline-block; width: 150px; border-bottom: 1px solid #9aa1ab; height: 16px; vertical-align: -4px; }
.stmt-sign .line.short { width: 96px; }

@media (max-width: 720px) {
  .stmt { padding: 16px 14px 14px; }
  .stmt-top { flex-direction: column; }
  .stmt-stamp { align-self: flex-start; }
  .stmt-sign .party { margin-left: 0; }
}

/* 打印：只留对账单本身 */
@media print {
  .topbar, .toolbar, .toasts, .btn, form.row, .empty, .stmt-bar { display: none !important; }
  body { background: #fff; }
  .wrap { max-width: none; padding: 0; }
  .stmt { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .card.mt { border: 0; padding: 0; margin-top: 14px; }
  .card.mt h2 { display: none; }
  a { color: inherit; text-decoration: none; }
  table { font-size: 12px; }
}

/* ---------- 复制价格表：客户多选网格 ---------- */
.field .pick { font-size: 13px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.clone-binds {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px;
  max-height: 216px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: #fbfcfd;
}
.field .clone-binds label {
  font-size: 13px; color: var(--text); display: flex; align-items: baseline; gap: 6px;
  cursor: pointer; padding: 2px 0; white-space: nowrap; overflow: hidden;
}
.clone-binds label span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.clone-binds .hint { font-size: 11.5px; white-space: nowrap; }
@media (max-width: 640px) {
  .clone-binds { grid-template-columns: 1fr; max-height: 240px; }
}

/* ---------- 价格表：批量设置弹窗 ---------- */
.batch-zones {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 16px;
  max-height: 174px; overflow: auto; padding: 9px 12px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd;
}
.batch-zones label {
  display: flex; align-items: baseline; gap: 6px; font-size: 12.5px;
  cursor: pointer; white-space: nowrap; overflow: hidden;
}
.batch-zones label b { font-weight: 600; flex: none; max-width: 108px; overflow: hidden; text-overflow: ellipsis; }
.batch-zones label .hint { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.batch-sec { border-top: 1px dashed var(--line); padding-top: 13px; margin-top: 14px; }
.batch-hd { font-size: 12.5px; font-weight: 600; margin-bottom: 9px; }
.batch-tiers { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.batch-tiers-hd, .batch-tiers-row {
  display: grid; grid-template-columns: 1fr 96px 132px; gap: 8px; align-items: center;
  padding: 6px 11px; font-size: 12.5px;
}
.batch-tiers-hd { background: #f5f7fa; color: var(--muted); font-size: 11.5px; }
.batch-tiers-hd + .batch-tiers-row, .batch-tiers-row + .batch-tiers-row { border-top: 1px solid var(--line); }
.batch-tiers-row input { width: 112px; }
.btn.pulse { animation: btnPulse 1.1s ease-out 2; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, 0); }
  45% { box-shadow: 0 0 0 6px rgba(29, 78, 216, .28); }
}
@media (max-width: 640px) {
  .batch-zones { grid-template-columns: 1fr; max-height: 200px; }
  .batch-tiers-hd, .batch-tiers-row { grid-template-columns: 1fr 72px 116px; }
}
