* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  font-size: 14px;
}
.header {
  background: #1a1a2e;
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.header h1 { font-size: 18px; font-weight: 600; white-space: nowrap; }
.header .meta { font-size: 13px; opacity: .75; margin-left: auto; white-space: nowrap; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 14px;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.active { background: #3498db; color: #fff; font-weight: 600; }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 24px;
}
.metric { background: #fff; border-radius: 8px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.metric .label { font-size: 13px; color: #888; margin-bottom: 8px; }
.metric .value { font-size: 28px; font-weight: 700; }
.metric.red .value { color: #e74c3c; }
.metric.green .value { color: #27ae60; }
.metric.orange .value { color: #f39c12; }
.metric.blue .value { color: #3498db; }

.toolbar {
  background: #fff;
  padding: 14px 24px;
  margin: 0 24px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar select, .toolbar input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  background: #fff;
  color: #1a1a1a;
}
.toolbar select:focus, .toolbar input:focus { border-color: #3498db; }
.toolbar input[type="text"] { width: 240px; }

.btn {
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: .2s;
}
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-default { background: #ecf0f1; color: #333; }
.btn-default:hover { background: #dfe6e9; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.table-wrap {
  margin: 16px 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  overflow: auto;
  max-height: calc(100vh - 280px);
}
/* 操作列固定在右侧：31 列横向滚动时编辑按钮始终可见 */
.table-wrap th:last-child,
.table-wrap td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 96px;
  background: #fff;
  box-shadow: -8px 0 10px -8px rgba(0, 0, 0, .18);
}
.table-wrap th:last-child { background: #f8f9fa; z-index: 3; }
.table-wrap tr:hover td:last-child { background: #f5f7fa; }
.table-wrap tr.red td:last-child { background: #fef2f2; }
.table-wrap tr.red:hover td:last-child { background: #fde8e8; }
table { width: 100%; border-collapse: collapse; min-width: 2400px; }
th {
  background: #f8f9fa;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}
td {
  padding: 10px;
  font-size: 13px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tr:hover { background: #f5f7fa; cursor: pointer; }
tr.red { background: #fef2f2; }
tr.red:hover { background: #fde8e8; }

.status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-pending { background: #fff3cd; color: #856404; }
.status-shipping { background: #cce5ff; color: #004085; }
.status-done { background: #d4edda; color: #155724; }
.status-red { background: #f8d7da; color: #721c24; }
.status-visit { background: #e2d5f5; color: #5b2c6f; }
.status-closed { background: #e9ecef; color: #6c757d; }
.phone { font-family: monospace; letter-spacing: .5px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: #e8f4fd; color: #2980b9; }
.tag-factory { background: #fde8e8; color: #c0392b; }
.tag-merchant { background: #e8f5e9; color: #2e7d32; }
.tag-customer { background: #fff3e0; color: #e65100; }

.pagination { display: flex; justify-content: center; gap: 6px; padding: 16px 24px 24px; flex-wrap: wrap; align-items: center; }
.page-btn { padding: 6px 14px; border: 1px solid #ddd; background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; }
.page-btn.active { background: #3498db; color: #fff; border-color: #3498db; }
.page-btn:hover:not(.active) { background: #f0f0f0; }

.drawer-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 100; display: none; }
.drawer-overlay.active { display: block; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 680px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  z-index: 101;
  transform: translateX(100%);
  transition: .3s;
  overflow-y: auto;
}
.drawer.active { transform: translateX(0); }
.drawer-header {
  background: #1a1a2e;
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 2;
}
.drawer-header h2 { font-size: 18px; }
.drawer-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.drawer-body { padding: 24px; }
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.detail-label { width: 120px; color: #888; font-size: 13px; flex-shrink: 0; }
.detail-value { flex: 1; font-size: 14px; font-weight: 500; word-break: break-all; }
.timeline { margin: 20px 0; padding-left: 24px; border-left: 3px solid #e0e0e0; }
.timeline-item { position: relative; margin-bottom: 18px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3498db;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #3498db;
}
.timeline-item.red::before { background: #e74c3c; box-shadow: 0 0 0 2px #e74c3c; }
.timeline-time { font-size: 12px; color: #999; margin-bottom: 4px; }
.timeline-text { font-size: 14px; }
.section-title { font-size: 16px; font-weight: 600; margin: 24px 0 12px; padding-bottom: 8px; border-bottom: 2px solid #3498db; }
.cost-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.cost-table th, .cost-table td { padding: 10px; border: 1px solid #e0e0e0; text-align: center; font-size: 13px; }
.cost-table th { background: #f8f9fa; }
.cost-total { font-weight: 700; background: #fff3cd; }
.empty { text-align: center; padding: 60px 20px; color: #999; }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* 出码页 */
.page { padding: 20px 24px; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); padding: 20px 24px; margin-bottom: 16px; }
.card h2 { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #1a1a2e; }
.form-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item label { font-size: 13px; color: #666; }
.form-item select, .form-item input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  min-width: 180px;
  background: #fff;
}
.form-item input[type="number"] { min-width: 110px; }
.form-item select:focus, .form-item input:focus { border-color: #3498db; }
.hint { font-size: 12px; color: #999; margin-top: 10px; line-height: 1.7; }
.qr-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.qr-table th, .qr-table td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 13px; }
.qr-table th { background: #f8f9fa; }
.qr-thumb { width: 64px; height: 64px; border: 1px solid #eee; border-radius: 4px; }
.batch-result { background: #eaf6ff; border: 1px solid #b8dcff; border-radius: 8px; padding: 14px 18px; margin-bottom: 16px; font-size: 14px; }
.batch-result b { color: #1565c0; }
.scroll-x { overflow: auto; }
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  transition: .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ===== 第 2 阶段扩展 ===== */
.header { flex-wrap: wrap; gap: 16px; }
.header h1 { font-size: 17px; }
.nav { flex-wrap: wrap; }
.nav a { padding: 6px 12px; font-size: 13px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; color: #1a1a2e; }
.page-head .sub { font-size: 13px; color: #888; margin-top: 4px; }

.metrics.six { grid-template-columns: repeat(6, 1fr); }
.metrics.six .metric .value { font-size: 24px; }
@media (max-width: 1400px) {
  .metrics.six { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .metrics, .metrics.six { grid-template-columns: repeat(2, 1fr); }
}

.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); padding: 18px 20px; margin: 0 24px 16px; }
.card h3 { font-size: 15px; margin-bottom: 14px; color: #1a1a2e; }
.card.tight { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 24px 16px; }
.grid-2 .card { margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 24px 16px; }
.grid-3 .card { margin: 0; }
@media (max-width: 1100px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 13px; text-align: left; white-space: nowrap; }
.data-table th { background: #f8f9fa; color: #555; font-weight: 600; position: sticky; top: 0; z-index: 1; }
.data-table tr.clickable:hover { background: #f5f7fa; cursor: pointer; }
.data-table td.num, .data-table th.num { text-align: right; font-family: monospace; }
.table-card { overflow: auto; max-height: calc(100vh - 320px); }
.table-card.auto { max-height: none; }

.big-number { font-size: 46px; font-weight: 700; color: #e74c3c; line-height: 1.1; }
.big-label { font-size: 13px; color: #888; margin-bottom: 6px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-name { width: 140px; font-size: 13px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 14px; background: #f0f2f5; border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #e74c3c, #f39c12); border-radius: 7px; }
.bar-fill.blue { background: linear-gradient(90deg, #3498db, #5dade2); }
.bar-count { width: 44px; text-align: right; font-size: 13px; color: #333; font-weight: 600; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 1px solid #eee; }
.tab { padding: 8px 18px; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; }
.tab.active { color: #3498db; border-bottom-color: #3498db; font-weight: 600; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 300; display: none; }
.modal-overlay.active { display: block; }
.modal { position: fixed; z-index: 301; top: 8vh; left: 50%; transform: translateX(-50%); width: 560px; max-width: 92vw; background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); display: none; }
.modal.active { display: block; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 16px; }
.modal-body { padding: 18px 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
.form-item.wide { width: 100%; }
.form-item.wide input, .form-item.wide select, .form-item.wide textarea { width: 100%; min-width: 0; }
.form-item textarea { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; font-family: inherit; outline: none; min-height: 80px; resize: vertical; }
.form-item input:focus, .form-item textarea:focus { border-color: #3498db; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-grid .full { grid-column: 1 / -1; }
.kv-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; }
.kv-row label { font-size: 13px; color: #666; }

.link { color: #3498db; text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }
.muted { color: #999; font-size: 12px; }
.section-gap { height: 16px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #666; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }

/* 商品库两栏 */
.split { display: grid; grid-template-columns: 340px 1fr; gap: 16px; padding: 0 24px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } }
.list-item { padding: 12px 14px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.list-item:hover { border-color: #3498db; background: #f7fbff; }
.list-item.active { border-color: #3498db; background: #eef7ff; }
.list-item .name { font-weight: 600; font-size: 14px; }
.list-item .code { font-size: 12px; color: #999; font-family: monospace; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 14px; color: #999; padding: 2px 6px; border-radius: 4px; }
.icon-btn:hover { background: #eee; color: #e74c3c; }

/* 对账单展开明细 */
.detail-tr { background: #fafbfc; }
.detail-box { padding: 10px 14px; font-size: 13px; color: #555; }

/* 登录占位 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f0f2f5; }
.login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 10px; padding: 32px; box-shadow: 0 6px 30px rgba(0, 0, 0, .1); }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.login-card .tip { text-align: center; font-size: 12px; color: #999; margin-bottom: 22px; }
.login-card .form-item { margin-bottom: 14px; }
.login-card .form-item input { width: 100%; }
.login-card .btn { width: 100%; }

/* 登录态与权限 */
.user-chip { margin-left: 16px; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; }
.user-chip .uname { color: #fff; font-weight: 600; }
.user-chip .urole { background: rgba(52, 152, 219, .25); color: #9ed4f7; border-radius: 10px; padding: 2px 8px; font-size: 12px; }
.logout-btn { background: none; border: 1px solid rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .8); border-radius: 5px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.logout-btn:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.login-error { color: #e74c3c; font-size: 13px; min-height: 20px; margin-bottom: 8px; text-align: center; }

/* 打码中心 */
.status-running { background: #cce5ff; color: #004085; }
.status-partial { background: #ffe0b2; color: #8a4b00; }
.card-head-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.progress { height: 8px; background: #eef1f4; border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #27ae60, #58d68d); border-radius: 4px; transition: width .3s; }
.event-box { max-height: 180px; overflow: auto; background: #fafbfc; border: 1px solid #eee; border-radius: 6px; padding: 10px 12px; }
.event-line { font-size: 12px; color: #555; padding: 3px 0; }
.err-cell { max-width: 220px; color: #c0392b; font-size: 12px; word-break: break-all; }


/* ---------- 快递查询页 ---------- */
.query-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.query-bar .form-item { margin: 0; }
.query-bar .grow { flex: 1 1 320px; }
.query-bar input, .query-bar select { width: 100%; }
.result-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 8px; background: #f7f9fc; border: 1px solid #eef1f5; margin-bottom: 16px; }
.result-head .big { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.result-head .meta-line { font-size: 12px; color: #888; margin-top: 3px; }
.result-head .spacer { flex: 1; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: #e6ebf2; }
.tl-item { position: relative; padding: 0 0 18px 0; }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #c8d2de; border: 2px solid #fff; box-shadow: 0 0 0 2px #e6ebf2; }
.tl-item.latest::before { background: #27ae60; box-shadow: 0 0 0 3px #d7f3e3; }
.tl-item.latest .tl-context { color: #1a1a2e; font-weight: 600; }
.tl-time { font-size: 12px; color: #999; font-variant-numeric: tabular-nums; }
.tl-context { font-size: 13px; color: #555; margin-top: 2px; line-height: 1.5; }
.state-hint { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 16px; color: #999; font-size: 13px; text-align: center; }
.state-hint .ico { font-size: 30px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; margin-right: 6px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 师傅查询页 ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .form-item { margin: 0; min-width: 150px; }
.filter-bar .grow { flex: 1 1 220px; }
.master-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.master-card { border: 1px solid #eef1f5; border-radius: 8px; padding: 14px 16px; background: #fff; transition: box-shadow .2s, transform .2s; cursor: pointer; }
.master-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.master-top { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #eaf2fb; color: #2c7be5; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: 0 0 38px; }
.master-name { font-size: 15px; font-weight: 600; color: #1a1a2e; }
.master-no { font-size: 12px; color: #999; font-variant-numeric: tabular-nums; }
.master-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: #666; }
.master-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #eef1f5; }
.master-stats .k { font-size: 11px; color: #999; }
.master-stats .v { font-size: 15px; font-weight: 600; color: #1a1a2e; font-variant-numeric: tabular-nums; }
.rating-star { color: #f5a623; font-weight: 600; }
.status-online { background: #e3f8ec; color: #1e8449; }
.status-busy { background: #fff4e0; color: #b9770e; }
.status-off { background: #f0f2f5; color: #777; }
.status-disabled { background: #fdeaea; color: #c0392b; }
@media (max-width: 700px) {
  .page { padding: 14px 12px; }
  .card { margin: 0 0 12px; padding: 14px 14px; }
  .master-grid { grid-template-columns: 1fr; }
  .result-head .big { font-size: 17px; }
}

/* 服务类型标签：沿用系统蓝，避免引入平台橙色系 */
.svc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.svc-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: #e8f4fd; color: #2980b9; margin-right: 4px; }

/* 接单记录卡：对齐奇兵订单详情的信息层级，配色沿用系统蓝/灰 */
.qb-orders { display: flex; flex-direction: column; gap: 12px; }
.qb-order { border: 1px solid #eef1f5; border-radius: 8px; background: #fff; padding: 12px 14px; }
.qb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed #eef1f5; }
.qb-head .qb-no { font-family: monospace; font-size: 13px; font-weight: 600; color: #1a1a2e; }
.qb-head .status { margin-left: auto; }
.qb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 10px 0 4px; }
.qb-col .k { font-size: 11px; color: #999; margin-bottom: 4px; }
.qb-col .v { font-size: 13px; color: #1a1a2e; font-weight: 500; line-height: 1.5; }
.qb-col .v.money { color: #c0392b; font-weight: 700; font-variant-numeric: tabular-nums; }
.qb-col .muted { font-size: 12px; color: #999; line-height: 1.6; word-break: break-all; }
.qb-note { font-size: 12px; color: #666; background: #fafbfc; border-radius: 5px; padding: 6px 10px; margin-top: 6px; line-height: 1.6; }
.qb-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.qb-link { margin-left: auto; color: #3498db; text-decoration: none; font-weight: 500; }
.qb-link:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .qb-grid { grid-template-columns: 1fr 1fr; }
  .qb-link { margin-left: 0; }
}

/* 工单编辑：列表操作列 + 详情内联编辑表单 */
.op-cell { white-space: nowrap; }
.op-cell .btn { padding: 4px 10px; }
.op-muted { color: #b0b7c3; font-size: 12px; }
.detail-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 4px;
  background: #f7fafc; border: 1px solid #eef1f5; border-radius: 8px;
}
.detail-tip { margin-left: auto; font-size: 12px; color: #999; }
.edit-form { padding-bottom: 8px; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.edit-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.edit-item.full { grid-column: 1 / -1; }
.edit-item label { font-size: 13px; color: #666; }
.edit-item input, .edit-item select, .edit-item textarea {
  padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 14px; font-family: inherit; outline: none; background: #fff;
  width: 100%; min-width: 0; box-sizing: border-box;
}
.edit-item textarea { resize: vertical; min-height: 44px; }
.edit-item input:focus, .edit-item select:focus, .edit-item textarea:focus {
  border-color: #3498db; box-shadow: 0 0 0 2px rgba(52, 152, 219, .12);
}
.edit-costs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.edit-cost-row { display: grid; grid-template-columns: 82px 1fr 120px; gap: 8px; align-items: center; }
.edit-cost-row label { font-size: 13px; color: #666; }
.edit-cost-row input, .edit-cost-row select {
  padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 14px; outline: none; width: 100%; box-sizing: border-box;
}
.edit-cost-row input:focus, .edit-cost-row select:focus { border-color: #3498db; }
.edit-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 24px; padding: 14px 0 4px; border-top: 1px solid #f0f0f0;
  position: sticky; bottom: 0; background: #fff;
}
@media (max-width: 1100px) {
  .edit-costs { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .drawer-body { padding: 16px; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-cost-row { grid-template-columns: 74px 1fr; }
  .edit-cost-row select { grid-column: 2; }
  .detail-toolbar { position: sticky; top: 62px; z-index: 1; }
  .detail-label { width: 92px; }
  .edit-form { padding-bottom: 68px; }
  .edit-actions .btn { flex: 1; }
}

/* 漏登校验页 */
.rule-note {
  font-size: 13px; color: #666; line-height: 1.7;
  background: #f7fafc; border-left: 3px solid #3498db;
  padding: 10px 12px; border-radius: 0 6px 6px 0;
}
.cfg-grid { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px; }
.cfg-grid .form-item { min-width: 170px; }
.alert-chip { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.alert-pending { background: #fff3e0; color: #e65100; }
.alert-created { background: #e8f5e9; color: #2e7d32; }
.alert-ignored { background: #e8f4fd; color: #2980b9; }
.alert-auto { background: #f0f0f0; color: #777; }
.cell-sub { font-size: 11px; color: #999; margin-top: 2px; }
.reason-list { display: flex; gap: 4px; flex-wrap: wrap; max-width: 240px; white-space: normal; }
.reason-chip { background: #fde8e8; color: #c0392b; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.push-ok { color: #27ae60; font-size: 12px; }
.push-fail { color: #e74c3c; font-size: 12px; }
.push-idle { color: #aaa; font-size: 12px; }
.audit-actions .btn { margin-right: 4px; }
.audit-table { min-width: 1120px; }
.audit-table th, .audit-table td { padding: 8px 10px; }
.audit-table th:last-child, .audit-table td:last-child {
  position: sticky; right: 0; z-index: 1; min-width: 152px;
  background: #fff; box-shadow: -8px 0 10px -8px rgba(0, 0, 0, .18);
}
.audit-table th:last-child { background: #f8f9fa; z-index: 2; }
.audit-table tr:hover td:last-child { background: #f5f7fa; }
.order-link { color: #3498db; text-decoration: none; }
.order-link:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .cfg-grid .form-item { min-width: 0; flex: 1 1 140px; }
  .reason-list { max-width: 160px; }
}

/* 重复复核页 */
.metrics-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dup-table { min-width: 1200px; }
.dup-table th, .dup-table td { padding: 8px 10px; vertical-align: top; }
.dup-table th:last-child, .dup-table td:last-child {
  position: sticky; right: 0; z-index: 1; min-width: 200px;
  background: #fff; box-shadow: -8px 0 10px -8px rgba(0, 0, 0, .18);
}
.dup-table th:last-child { background: #f8f9fa; z-index: 2; }
.dup-table tr:hover td:last-child { background: #f5f7fa; }
.cell-strong { color: #1a1a1a; font-weight: 500; }
.tag-dup { background: #e3f2fd; color: #1565c0; border-radius: 4px; padding: 1px 8px; font-size: 12px; }
.push-chip { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.push-chip.push-ok { background: #e8f5e9; }
.push-chip.push-fail { background: #fde8e8; }
.push-chip.push-idle { background: #f0f0f0; color: #999; }
.dup-actions { display: flex; flex-direction: column; gap: 4px; }
.dup-actions .btn { width: 100%; }
.op-cell .op-muted { color: #aaa; font-size: 12px; }
@media (max-width: 700px) {
  .metrics-4 { grid-template-columns: repeat(2, 1fr); }
}
