:root {
  --brand: #1b4e7a;
  --brand-700: #143a5c;
  --brand-100: #e8f0f7;
  --accent: #e0a33c;
  --ok: #1f9d63;
  --warn: #d98b21;
  --danger: #d05252;
  --info: #3b7ea1;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #e3e9f1;
  --border-strong: #cfd9e6;
  --text: #1e293b;
  --text-2: #55657a;
  --muted: #8a99ab;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(20, 45, 70, .05), 0 4px 14px rgba(20, 45, 70, .05);
  --shadow-lg: 0 12px 40px rgba(15, 35, 55, .16);
  --sidebar: 226px;
  --header: 58px;
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c9d4e2; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #aebccd; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar); flex: 0 0 var(--sidebar); background: #10314f; color: #cbd8e6;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 60;
  transition: transform .22s ease;
}
.sidebar .brand {
  height: var(--header); display: flex; align-items: center; gap: 10px; padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand .logo {
  width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg,#2f7cb8,#1b4e7a);
  display: grid; place-items: center; font-size: 16px; flex: 0 0 30px;
}
.sidebar .brand b { color: #fff; font-size: 14.5px; letter-spacing: .2px; }
.sidebar .brand small { display: block; color: #7b93ab; font-size: 10.5px; letter-spacing: .6px; }
.nav { padding: 10px 8px; overflow-y: auto; flex: 1; }
.nav .group { color: #64809b; font-size: 10.5px; letter-spacing: .8px; text-transform: uppercase; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px;
  color: #c2d2e2; font-size: 13.5px; margin-bottom: 2px; cursor: pointer;
}
.nav a .ic { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: linear-gradient(90deg, #2c6fa5, #245b87); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.nav a .badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 9px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 16px; margin: 0; font-weight: 600; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }

.searchbox { position: relative; }
.searchbox input {
  width: 260px; padding: 7px 12px 7px 32px; border: 1px solid var(--border-strong);
  border-radius: 20px; background: #f8fafc; outline: none;
}
.searchbox input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(27,78,122,.08); }
.searchbox .ic { position: absolute; left: 11px; top: 7px; color: var(--muted); font-size: 13px; }

.icon-btn {
  border: 1px solid var(--border); background: #fff; width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; cursor: pointer; color: var(--text-2);
}
.icon-btn:hover { background: var(--brand-100); border-color: #c6d8e8; color: var(--brand); }

.userchip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.userchip:hover { background: #f2f6fa; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: 0 0 30px;
}
.userchip .nm { font-size: 13px; font-weight: 600; line-height: 1.1; }
.userchip .rl { font-size: 11px; color: var(--muted); }

.content { padding: 18px; flex: 1; }

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-hd {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.card-hd h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.card-hd .spacer { flex: 1; }
.card-bd { padding: 14px 16px; }
.card-bd.flush { padding: 0; }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }

/* ---- 任务窗口标签栏（页面快速切换） ---- */
.tabbar { display: flex; align-items: center; gap: 6px; padding: 9px 22px 0; overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .wt-label { font-size: 10.5px; color: var(--muted); letter-spacing: 1px; white-space: nowrap; margin-right: 2px; }
.wtab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 10px; border: 1px solid var(--border);
  background: var(--card); border-radius: 8px 8px 0 0; border-bottom: none; font-size: 12.2px; color: var(--text-2);
  cursor: pointer; white-space: nowrap; user-select: none; transition: background .12s, color .12s; }
.wtab:hover { background: #f2f6fa; color: var(--text); }
.wtab.active { background: var(--brand-100); color: var(--brand); border-color: var(--brand-100); font-weight: 600; }
.wtab .wt-ic { font-size: 12px; line-height: 1; }
.wtab .wt-tt { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.wtab .wt-x { width: 15px; height: 15px; line-height: 14px; text-align: center; border-radius: 4px; font-size: 13px;
  color: inherit; opacity: .38; }
.wtab .wt-x:hover { opacity: 1; background: rgba(0,0,0,.08); }
@media (max-width: 768px) { .tabbar { padding: 8px 12px 0; } .wtab .wt-tt { max-width: 72px; } }
.page-head .tt { flex: 1; min-width: 200px; }
.page-head h2 { margin: 0 0 3px; font-size: 19px; font-weight: 650; letter-spacing: -.2px; }
.page-head p { margin: 0; color: var(--text-2); font-size: 12.8px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text); cursor: pointer;
  font-size: 13.2px; font-weight: 500; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
.btn:hover { border-color: #9db8d0; background: #f7fafc; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(27,78,122,.14); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(27,78,122,.16); }
.btn.primary { background: linear-gradient(180deg, #2568a0, var(--brand)); border-color: var(--brand-700); color: #fff; box-shadow: 0 2px 6px rgba(27,78,122,.28), inset 0 1px 0 rgba(255,255,255,.22); }
.btn.primary:hover { background: linear-gradient(180deg, #2a73b0, var(--brand-700)); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(27,78,122,.4), inset 0 1px 0 rgba(255,255,255,.22); }
.btn.primary:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(27,78,122,.3), inset 0 2px 5px rgba(0,0,0,.28); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #3d2a05; }
.btn.danger { color: var(--danger); border-color: #eccaca; background: #fff7f7; }
.btn.danger:hover { background: #fdeeee; border-color: #d99; transform: translateY(-1px); box-shadow: 0 2px 6px rgba(194,73,73,.18); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand); }
.btn.sm { padding: 4px 9px; font-size: 12.2px; border-radius: 6px; }
.btn.sm:hover { transform: translateY(-1px); box-shadow: 0 2px 5px rgba(27,78,122,.16); }
.btn.sm:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(27,78,122,.18); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; outline: none; color: var(--text); transition: .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,78,122,.08); }
.textarea { min-height: 68px; resize: vertical; }
label.field { display: block; }
.flabel { display:block; font-size:12.2px; color:var(--text-2); margin-bottom:4px; font-weight:500; }
label.field > span { display: block; font-size: 12.2px; color: var(--text-2); margin-bottom: 4px; font-weight: 500; }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 120px; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

/* KPI */
.kpi { padding: 14px 16px; position: relative; overflow: hidden; }
.kpi .lb { font-size: 12.2px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.kpi .vl { font-size: 23px; font-weight: 680; letter-spacing: -.5px; margin-top: 6px; color: var(--brand-700); }
.kpi .sub { font-size: 11.8px; color: var(--muted); margin-top: 3px; }
.kpi .vl.small { font-size: 19px; }
.kpi::after {
  content: ''; position: absolute; right: -20px; top: -20px; width: 70px; height: 70px;
  border-radius: 50%; background: var(--brand-100); opacity: .55;
}
.kpi.ok .vl { color: var(--ok); }
.kpi.warn .vl { color: var(--warn); }
.kpi.danger .vl { color: var(--danger); }
.kpi.ok::after { background: #e5f5ec; }
.kpi.warn::after { background: #fbf1e0; }
.kpi.danger::after { background: #fbeaea; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.1px; }
table.tbl th {
  text-align: left; padding: 9px 12px; background: #f7f9fc; color: var(--text-2);
  font-weight: 600; font-size: 12.2px; border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
/* 行悬停高亮：鼠标所在行整行点亮 + 左侧品牌色高亮条 */
table.tbl tbody tr { transition: background .12s ease; }
table.tbl tbody tr:hover { background: #e8f3fd; }
table.tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
table.tbl tbody tr.selected { background: #eef6fd; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
table.tbl .click { color: var(--brand); cursor: pointer; font-weight: 600; }
table.tbl .click:hover { text-decoration: underline; }
/* 延误看板：可点击的订单数单元格（点击查看对应订单明细） */
table.tbl td.clickable-count { color: var(--brand); cursor: pointer; font-weight: 600; }
table.tbl td.clickable-count:hover { text-decoration: underline; }
table.tbl td.clickable-count.cell-active { color: #fff; background: var(--brand); text-decoration: none; }
/* 顶部 KPI 卡可点击 */
.clickable-kpi { cursor: pointer; transition: box-shadow .12s; }
.clickable-kpi:hover { box-shadow: 0 0 0 2px var(--brand) inset; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* 状态胶囊 */
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px;
  font-size: 11.8px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.draft { background: #f0f2f5; color: #6b7a8d; }
.pill.wait { background: #eef4fb; color: #2d6ca3; }
.pill.move { background: #e8f4fa; color: #1f7d9e; }
.pill.done { background: #e7f6ee; color: #1f8a58; }
.pill.warn { background: #fdf2e2; color: #b8781a; }
.pill.bad { background: #fdeded; color: #c24949; }
.pill.gold { background: #fdf6e3; color: #a57c17; }

/* ---- 轨迹页统计条（停滞 + 整体时效） ---- */
.track-stats { }
.tstat {
  position: relative; flex: 1 1 240px; min-width: 220px; cursor: default;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(16, 42, 74, .04);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.tstat[data-stale] { cursor: pointer; }
.tstat[data-stale]:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(224, 108, 58, .18); border-color: #f0b48f; }
.tstat[data-stale].active { border-color: #e06c3a; background: linear-gradient(180deg, #fff7f2 0%, #fdeee4 100%); box-shadow: 0 0 0 2px rgba(224, 108, 58, .18); }
.tstat-num { font-size: 26px; font-weight: 700; line-height: 1.1; color: #1b4e7a; }
.tstat-num small { font-size: 13px; font-weight: 500; color: #6b7d92; margin-left: 2px; }
.tstat-lb { font-size: 13px; font-weight: 600; color: #33445a; margin-top: 2px; }
.tstat-lb .muted { font-weight: 400; color: #8a99ab; font-size: 12px; }
.tstat-sub { font-size: 11.5px; color: #8a99ab; margin-top: 4px; }
.tstat-tag { font-size: 11.5px; color: #e06c3a; margin-top: 4px; font-weight: 600; }
.tstat-threshold {
  flex: 0 0 auto; min-width: 150px; display: flex; flex-direction: column; justify-content: center;
  background: #fff; border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 16px; color: #6b7d92;
}

/* ---- 订单状态分类统计标签栏 ---- */
.status-tabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font-size: 12.6px; color: var(--text); cursor: pointer; line-height: 1;
  transition: background .15s, border-color .15s, color .15s, transform .12s, box-shadow .15s;
}
.stab:hover { border-color: #9db8d0; background: #f7fafd; transform: translateY(-2px); box-shadow: 0 3px 8px rgba(27,78,122,.16); }
.stab:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(27,78,122,.18); }
.stab .lb { font-weight: 500; }
.stab b { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.stab .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.stab .dot.draft { background: #a5b1bf; }
.stab .dot.wait { background: #2d6ca3; }
.stab .dot.move { background: #1f7d9e; }
.stab .dot.done { background: #1f8a58; }
.stab .dot.warn { background: #b8781a; }
.stab .dot.bad { background: #c24949; }
.stab .dot.gold { background: #a57c17; }
.stab.active { background: linear-gradient(180deg, #2a669c, var(--brand)); border-color: var(--brand-700); color: #fff; box-shadow: 0 3px 10px rgba(27,78,122,.35), inset 0 1px 0 rgba(255,255,255,.25); }
.stab.active:hover { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(27,78,122,.45), inset 0 1px 0 rgba(255,255,255,.25); }
.stab.active:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(27,78,122,.3), inset 0 2px 5px rgba(0,0,0,.25); }
.stab.active b, .stab.active .lb { color: #fff; }
.stab.active .dot { background: #fff !important; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
/* 停滞（超期无进展）角标 */
.stab .stale-badge {
  font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1;
  color: #c24949; background: #fdecec; border-radius: 20px; padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.stab.active .stale-badge { color: #fff; background: rgba(255,255,255,.22); }
.stab .dot.amber { background: #d08a1e; }
.stab-spacer { flex: 1; }
.stab-cfg { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #8a99ab; white-space: nowrap; margin-left: auto; flex: 0 0 auto; }
.stab-cfg .select { color: #55657a; }

.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; background: #eff3f8; color: var(--text-2); font-size: 11.5px; }
.tag.red { background: #fdecec; color: #c24949; }
.tag.amber { background: #fdf3e3; color: #b8781a; }
.tag.blue { background: #eaf3fb; color: #2d6ca3; }
.tag.green { background: #e9f7f0; color: #1f8a58; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.6px; color: var(--text-2); }
.pager .spacer { flex: 1; }
.pager button { min-width: 30px; height: 28px; border: 1px solid var(--border-strong); background: #fff; border-radius: 6px; cursor: pointer; }
.pager button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* 模态 */
.mask {
  position: fixed; inset: 0; background: rgba(16,32,48,.42); backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 620px;
  animation: pop .18s ease; margin: auto;
}
@keyframes pop { from { transform: translateY(8px) scale(.985); opacity: .6 } to { transform: none; opacity: 1 } }
.modal.lg { max-width: 940px; }
.modal.xl { max-width: 1180px; }
.modal-hd { display: flex; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.modal-hd h3 { margin: 0; font-size: 15px; font-weight: 620; }
.modal-hd .x { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 4px; }
.modal-hd .x:hover { color: var(--danger); }
.modal-bd { padding: 16px 18px; max-height: calc(100vh - 220px); overflow-y: auto; }
.modal-ft { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); background: #fbfcfe; border-radius: 0 0 12px 12px; }

/* 表单网格 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px 14px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }
/* 分区标题：橙色左竖条 + 加粗标题 + 右侧操作区（参考创建订单页设计） */
.form-sec {
  grid-column: 1/-1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13.6px; font-weight: 700; color: var(--text);
  border-left: 3.5px solid #e8862c; padding: 3px 0 3px 10px; margin-top: 10px;
}
.form-sec:first-child { margin-top: 0; }
.fs-a { display: flex; gap: 6px; align-items: center; margin-left: auto; font-weight: 400; flex-wrap: wrap; }
.fs-a .select { width: auto; min-width: 180px; padding: 4px 8px; font-size: 12.4px; }
@media (max-width: 1100px) { .form-grid.g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 680px) { .form-grid.g3 { grid-template-columns: 1fr; } }

/* 渠道计费分泡规则编辑器（分组卡片） */
.ch-editor { display: flex; flex-direction: column; gap: 16px; }
.rule-card { border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 16px 18px 18px; box-shadow: var(--shadow); }
.rule-card > .rc-hd { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; color: var(--text); margin-bottom: 14px; }
.rc-bar { width: 4px; height: 16px; border-radius: 3px; background: var(--accent); display: inline-block; }
.rc-sub { font-size: 12.6px; color: var(--text-2); font-weight: 700; margin: 16px 0 10px; padding-left: 10px; border-left: 3px solid #f3c486; }
.rc-tip { font-size: 12px; color: var(--muted); background: var(--bg); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 11px; margin: 2px 0 4px; line-height: 1.65; }
.rule-card .form-grid { gap: 10px 14px; margin-top: 4px; }
.f-hint { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 3px; }
label.field > span.f-hint { margin-bottom: 0; }

/* ---------- 渠道列表拖拽排序 ---------- */
.drag-handle { cursor: grab; color: #b3bfce; font-size: 15px; letter-spacing: -1px; user-select: none; display: inline-block; }
.drag-handle:hover { color: var(--primary, #d05252); }
tr.dragging { opacity: 0.45; }
tr.drag-over td { box-shadow: inset 0 2px 0 var(--primary, #d05252); }

/* ---------- 列设置弹窗 ---------- */
.col-item { display: flex; gap: 9px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #f0f4f8; cursor: grab; background: #fff; }
.col-item:hover { background: #f7fafd; }
.col-item .cl { font-size: 13px; color: #2b3d52; }
.col-item.dragging { opacity: 0.45; }
.col-item.drag-over { box-shadow: inset 0 2px 0 var(--primary, #1b4e7a); }
.col-item.locked { cursor: default; background: #fafbfd; }
.col-item.locked .cl { color: #a5b1c1; }
.f-unit { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(16,32,48,.34); z-index: 90; animation: fade .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 94vw); background: #fff; z-index: 95;
  box-shadow: -8px 0 40px rgba(15,35,55,.18); display: flex; flex-direction: column; animation: slide .22s ease;
}
@keyframes slide { from { transform: translateX(30px); opacity: .8 } to { transform: none; opacity: 1 } }
.drawer-hd { padding: 15px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.drawer-hd h3 { margin: 0; font-size: 15.5px; }
.drawer-bd { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer-ft { padding: 11px 18px; border-top: 1px solid var(--border); background: #fbfcfe; display: flex; gap: 8px; justify-content: flex-end; }

/* toast */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #13324e; color: #fff; padding: 10px 15px; border-radius: 8px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(10,25,40,.24); animation: pop .2s; max-width: 380px;
  display: flex; gap: 8px; align-items: flex-start;
}
.toast.ok { background: #14654a; }
.toast.err { background: #9c3535; }
.toast.warn { background: #8a5c12; }

/* 轨迹时间轴 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: #e2e9f2; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item .dot {
  position: absolute; left: -21px; top: 3px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2.5px solid #c3d0de;
}
.tl-item.done .dot { border-color: var(--ok); background: var(--ok); }
.tl-item.current .dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(224,163,60,.18); }
.tl-item.exception .dot { border-color: var(--danger); background: var(--danger); box-shadow: 0 0 0 4px rgba(208,82,82,.15); }
.tl-item .nm { font-weight: 620; font-size: 13.4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* 节点名占固定最小宽度：不同长度名称后的标签/说明纵向对齐 */
.tl-item .nm .tl-nm { display: inline-block; min-width: 5.5em; }
/* 晚开/延误徽章：置于节点说明之后，用行尾空白右对齐（margin-left:auto 撑开） */
.tl-item .nm .tl-delay { margin-left: auto; }
/* 编辑按钮组：徽章存在时紧随徽章（不再抢占空白），无徽章时仍靠右对齐 */
.tl-item .nm .tl-edit { margin-left: 0; }
.tl-item .nm:not(.has-delay) .tl-edit:first-of-type { margin-left: auto; }
.tl-item .nm.has-delay .tl-edit:first-of-type { margin-left: 4px; }
.tl-item .mt { font-size: 11.8px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.tl-item .ds { font-size: 12.6px; color: var(--text-2); margin-top: 4px; background: #f7f9fc; padding: 6px 9px; border-radius: 6px; }
/* 说明与节点名同行：浅底标签，全文展示（不截断） */
.tl-item .tl-desc {
  font-size: 12.2px; font-weight: 400; color: var(--text-2);
  background: #f7f9fc; border: 1px solid #eaeff6; border-radius: 5px;
  padding: 1px 8px; white-space: normal; word-break: break-all; overflow-wrap: anywhere;
}

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  border: none; background: none; padding: 9px 14px; font-size: 13.4px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500;
}
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 650; }

/* 简易柱状图 */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.bars .b i { display: block; width: 70%; max-width: 26px; background: linear-gradient(180deg, #3d80b8, #1b4e7a); border-radius: 3px 3px 0 0; min-height: 2px; transition: .3s; }
.bars .b span { font-size: 10.5px; color: var(--muted); }
.bars .b b { font-size: 10.5px; color: var(--text-2); font-weight: 600; }

.hbar { display: flex; flex-direction: column; gap: 9px; }
.hbar .row { display: flex; align-items: center; gap: 10px; font-size: 12.6px; }
.hbar .row .lb { width: 108px; flex: 0 0 108px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .row .tr { display: block; flex: 1; height: 8px; background: #eef2f7; border-radius: 5px; overflow: hidden; }
.hbar .row .fl { display: block; height: 100%; min-width: 2px; background: linear-gradient(90deg, #4a90c4, #1b4e7a); border-radius: 5px; }
.hbar .row .vv { width: 84px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 7px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); }

.chip-set { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 11px; border-radius: 20px; border: 1px solid var(--border-strong); background: #fff;
  font-size: 12.4px; cursor: pointer; color: var(--text-2);
}
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.alert { padding: 10px 13px; border-radius: 8px; font-size: 12.8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; line-height: 1.55; }
.alert.info { background: #eef5fb; color: #23587d; border: 1px solid #d6e6f3; }
.alert.warn { background: #fdf6e8; color: #8a5c12; border: 1px solid #f3e3c4; }
.alert.bad { background: #fdeeee; color: #9c3535; border: 1px solid #f2d3d3; }

.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border);
  border-radius: 9px; box-shadow: var(--shadow-lg); min-width: 190px; padding: 6px; z-index: 70;
}
.dropdown a { display: block; padding: 8px 11px; border-radius: 6px; color: var(--text); font-size: 13px; cursor: pointer; }
.dropdown a:hover { background: #f2f6fa; }
.dropdown .sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-left {
  background: linear-gradient(150deg, #0d2a44 0%, #1b4e7a 55%, #2a6f9e 100%);
  color: #fff; padding: 54px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute; right: -140px; bottom: -160px; width: 460px; height: 460px;
  border-radius: 50%; background: rgba(255,255,255,.05);
}
.login-left .lg { display: flex; align-items: center; gap: 12px; }
.login-left .lg .box { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 21px; }
.login-left h1 { font-size: 33px; line-height: 1.26; margin: 0 0 14px; letter-spacing: -.5px; font-weight: 650; }
.login-left p.sub { color: #b7cee2; font-size: 14px; max-width: 430px; line-height: 1.7; margin: 0; }
.login-left .feats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin-top: 30px; max-width: 470px; }
.login-left .feats div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 9px; padding: 10px 13px; font-size: 12.6px; color: #d8e6f2; }
.login-left .ft { color: #7fa0bb; font-size: 11.8px; }
.login-right { display: grid; place-items: center; padding: 40px 24px; background: #fff; }
.login-card { width: 100%; max-width: 372px; }
.login-card h2 { font-size: 22px; margin: 0 0 5px; }
.login-card .hint { color: var(--text-2); font-size: 13px; margin-bottom: 22px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn.primary { width: 100%; justify-content: center; padding: 9px; font-size: 14px; margin-top: 6px; }
.login-card .demo { margin-top: 20px; background: #f7f9fc; border: 1px dashed var(--border-strong); border-radius: 8px; padding: 10px 12px; font-size: 11.8px; color: var(--text-2); line-height: 1.75; }
.login-card .demo b { color: var(--brand); }

.mobile-only { display: none; }
.hidden { display: none !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .mobile-only { display: grid; }
  .searchbox input { width: 150px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .content { padding: 12px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 14.5px; }
  .topbar .crumb, .searchbox { display: none; }
  .drawer { width: 100vw; }
  .kpi .vl { font-size: 20px; }
  .modal-bd { max-height: calc(100vh - 180px); }
  .page-head h2 { font-size: 17px; }
  .pager .pages { display: none; }
  .hide-sm { display: none !important; }
}

/* 打印（账单） */
@media print {
  .sidebar, .topbar, .no-print, .drawer-ft { display: none !important; }
  .main { margin: 0; }
  .drawer { position: static; width: 100%; box-shadow: none; }
  .drawer-mask { display: none; }
  .content { padding: 0; }
}

/* ============ 发票模版导入（创建订单） ============ */
.tpl-import {
  border: 1px dashed #b9cadb; border-radius: 10px; background: #f7fbff;
  padding: 11px 13px; margin-bottom: 14px;
}
.tpl-import .ti-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tpl-import .ti-ico { font-size: 19px; line-height: 1; }
.tpl-import .ti-txt b { font-size: 13px; color: #1b4e7a; }
.tpl-import .ti-sub { font-size: 11.5px; color: #7b8a9c; margin-top: 2px; }
.tpl-import .ti-msg { margin-top: 9px; font-size: 12.4px; color: #2f6b45; background: #edf8f1;
  border: 1px solid #cfe9d9; border-radius: 7px; padding: 6px 10px; }
.tpl-import .ti-msg.err { color: #a33a3a; background: #fdf1f1; border-color: #f0d2d2; }
.tpl-import .ti-sheets { margin-top: 9px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tpl-import .ti-sheets .ti-lb { font-size: 12px; color: #7b8a9c; }
.tpl-import .ti-tab {
  border: 1px solid #cbd9e6; background: #fff; border-radius: 7px; padding: 4px 11px;
  font-size: 12.2px; color: #44586c; cursor: pointer;
}
.tpl-import .ti-tab.active { background: #1b4e7a; border-color: #1b4e7a; color: #fff; }
.tpl-import .ti-result { margin-top: 9px; }
.tpl-import .ti-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.2px; color: #44586c; margin-bottom: 7px; align-items: center; }
.tpl-import .ti-sum b { color: #1f2d3d; font-variant-numeric: tabular-nums; }
.tpl-import .ti-table { max-height: 190px; overflow: auto; border: 1px solid #e3e9f0; border-radius: 7px; background: #fff; }
.tpl-import table.tbl.mini { font-size: 11.8px; }
.tpl-import table.tbl.mini th { padding: 5px 8px; font-size: 11px; }
.tpl-import table.tbl.mini td { padding: 5px 8px; }
.tpl-import .ti-more { font-size: 11px; color: #8a99ab; padding: 5px 8px; border-top: 1px solid #eef2f7; background: #fbfdff; }
.tpl-import .ti-warn { font-size: 11.8px; color: #9a6a12; margin-top: 6px; }

/* 模版带入的字段高亮，便于人工核对 */
.field.imported > span:first-child::after {
  content: '模版'; display: inline-block; margin-left: 5px; padding: 0 5px;
  border-radius: 4px; background: #e8f3ec; color: #2f6b45; font-size: 10px; font-weight: 400;
}
.field.imported input, .field.imported select, .field.imported textarea {
  border-color: #9cc6ac; background: #fbfefc;
}
@media (max-width: 640px) {
  .tpl-import .ti-main .btn { flex: 1 1 auto; }
}

/* ============ 隐私打码（截图脱敏）：统一显示为 10 个星号 ============ */
html.privacy-on .priv-mask,
html.privacy-on .priv-masked {
  display: inline;
  font-family: var(--mono, ui-monospace, Menlo, Consolas, monospace);
  letter-spacing: 1px;
  color: #8a99ab;
  user-select: none;
  vertical-align: baseline;
}
html.privacy-on .priv-mask * { visibility: hidden; }

/* 轨迹抽屉：顶部横向订单概况 / KPI + 快速记录并排 */
.kv.kv-inline { grid-template-columns: auto 1fr auto 1.4fr auto 1fr !important; }
@media (max-width: 900px) {
  .kv.kv-inline { grid-template-columns: auto 1fr !important; }
  .track-kpi-row { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 620px) {
  .track-kpi-row { grid-template-columns: 1fr !important; }
}

/* ==================== 航线进度（方案A：港口视图） ==================== */
.rt-card { margin-bottom: 12px; }
.rt-body { padding: 16px 18px 12px; overflow-x: auto; }
.rt-row { display: flex; align-items: flex-start; min-width: 720px; }
.rt-port { flex: 0 0 auto; width: 132px; text-align: center; }
.rt-port .cn { font-size: 14.5px; font-weight: 700; letter-spacing: .3px; color: var(--text); }
.rt-port .en { font-size: 10.5px; color: var(--muted); letter-spacing: 1.4px; text-transform: uppercase; margin-top: 1px; }
.rt-port .rt-pill { display: inline-block; margin-top: 7px; padding: 1px 9px; border-radius: 11px; font-size: 11px; font-weight: 600; }
.rt-port .rt-badge { display: inline-block; padding: 1px 8px; border-radius: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; background: #f2f5f9; color: var(--text-2); margin-top: 4px; }
.rt-port .rt-dt { margin-top: 9px; font-size: 11.2px; color: var(--muted); line-height: 1.7; }
.rt-port .rt-dt b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-port.cur .cn { color: var(--brand); }
.rt-port.cur .en { color: var(--brand); }

.rt-leg { flex: 1 1 auto; min-width: 76px; position: relative; margin-top: 9px; height: 2px; }
.rt-leg .bar { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #dbe4ee; border-radius: 2px; }
.rt-leg.done .bar { background: var(--brand); }
.rt-leg .dot { position: absolute; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid #b9c8da; }
.rt-leg.done .dot { border-color: var(--brand); }
.rt-leg .dot.l { left: -3px; }
.rt-leg .dot.r { right: -3px; }
.rt-leg .ship { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 16px; }
.rt-leg .lb { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--brand); font-weight: 600; white-space: nowrap; }
.rt-leg .lb.g { color: var(--muted); font-weight: 400; }

/* ==================== 链路节点（方案B：状态视图） ==================== */
.ch-body { padding: 20px 16px 14px; overflow-x: auto; }
.ch-row { display: flex; align-items: flex-start; min-width: 700px; }
.ch-st { flex: 1 1 0; min-width: 74px; text-align: center; position: relative; }
.ch-st .ic { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; background: #eef1f5; color: #a8b5c6; position: relative; z-index: 2; }
.ch-st.done .ic { background: var(--brand); color: #fff; }
.ch-st.cur .ic { background: #fff; color: var(--brand); border: 2.5px solid var(--brand); box-shadow: 0 0 0 4px rgba(27,78,122,.13); }
.ch-st.exc .ic { background: var(--danger); color: #fff; }
.ch-st .nm { font-size: 12.2px; font-weight: 600; margin-top: 6px; color: #a8b5c6; }
.ch-st.done .nm, .ch-st.cur .nm, .ch-st.exc .nm { color: var(--text); }
.ch-st .tm { font-size: 10.5px; color: var(--muted); margin-top: 1px; min-height: 15px; font-variant-numeric: tabular-nums; }
.ch-st .now { display: inline-block; font-size: 10px; color: var(--brand); font-weight: 700; background: var(--brand-100); border-radius: 8px; padding: 0 7px; margin-top: 3px; }
.ch-st:not(:first-child)::before { content: ''; position: absolute; top: 13.5px; right: 50%; width: 100%; height: 2px; background: #e3e9f1; z-index: 1; }
.ch-st.done:not(:first-child)::before, .ch-st.cur:not(:first-child)::before, .ch-st.exc:not(:first-child)::before { background: var(--brand); }
.ch-st.exc:not(:first-child)::before { background: linear-gradient(90deg, var(--brand) 60%, #e8b4b4 60%); }

/* ==================== 渠道时效看板 ==================== */
.g5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
@media (max-width: 1400px) { .g5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }

.cb-ctrl .card-bd { padding: 10px 14px; }
.cb-ctrl-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cb-ctrl-lb { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .2px; }
.cb-seg { gap: 6px; }
.cb-seg .stab { padding: 4px 11px; font-size: 12.4px; border-radius: 20px; }
.cb-seg .stab .lb { font-weight: 600; }
.cb-note { font-size: 11.3px; color: var(--muted); }
.cb-kpi .card.kpi .vl small { font-size: 12.5px; font-weight: 500; color: #6b7d92; margin-left: 2px; }

/* 进度标分析表 */
.cb-table { width: 100%; }
.cb-trow {
  display: grid; align-items: center; gap: 12px; padding: 10px 16px;
  grid-template-columns: minmax(190px, 1.5fr) 170px 150px 120px 130px 56px 56px 88px;
  border-bottom: 1px solid #eef2f7; font-size: 12.6px;
  transition: background .14s ease, box-shadow .14s ease;
}
.cb-trow:last-child { border-bottom: none; }
.cb-trow.cb-thead {
  font-size: 11.8px; color: var(--muted); font-weight: 700; background: #f7fafd;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2;
}
.cb-trow:not(.cb-thead):hover { background: #f2f8fe; box-shadow: inset 3px 0 0 var(--brand); }
.cb-trow.is-empty { background: #fcfcfd; }
.cb-trow .c-vol, .cb-trow .c-avg, .cb-trow .c-rate { display: flex; flex-direction: column; gap: 4px; }
.cb-trow .c-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.cb-trow .c-range { color: var(--text-2); font-variant-numeric: tabular-nums; }
.cb-cname { font-weight: 600; color: var(--text); }
.cb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.cb-vol-num { font-size: 12.2px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cb-vol-num b { font-size: 14px; color: var(--brand); }
.cb-avg-num { font-size: 13.4px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.cb-avg-num.is-slow { color: #c9662f; }
.cb-muted { color: var(--muted); font-weight: 400; }
.cb-bar { height: 6px; background: #eef2f7; border-radius: 4px; overflow: hidden; }
.cb-bar.thin { height: 4px; }
.cb-bar > i { display: block; height: 100%; border-radius: 4px; transition: width .35s ease; }
.cb-bar > i.ok { background: linear-gradient(90deg, #56b98a, #1f9d63); }
.cb-bar > i.warn { background: linear-gradient(90deg, #f0a878, #d9662f); }
.cb-chip {
  display: inline-block; font-size: 10.6px; color: #2d6ca3; background: #eaf2fa;
  border-radius: 8px; padding: 0 6px; margin-left: 6px; vertical-align: middle;
}
.cb-chip.warn { color: #b8781a; background: #fdf3e2; }
.cb-up { color: #c24949; font-weight: 600; }
.cb-down { color: #1f8a58; font-weight: 600; }
.cb-dest { width: 200px; min-width: 148px; padding: 4px 12px; font-size: 12.4px; border-radius: 20px; }
.cb-dest:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,78,122,.12); }

/* 「单量占比」列显隐开关 */
.cb-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.4px; color: var(--text-2); user-select: none; }
.cb-switch input { appearance: none; -webkit-appearance: none; width: 30px; height: 16px; border-radius: 10px; background: #cdd6e0; position: relative; cursor: pointer; transition: background .18s ease; margin: 0; flex: none; }
.cb-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .18s ease; }
.cb-switch input:checked { background: var(--brand); }
.cb-switch input:checked::after { left: 16px; }
.cb-switch:hover span { color: var(--brand); }

/* 隐藏「出货单量 / 占比」列：网格去掉 170px 列 */
.cb-table.hide-vol .cb-trow { grid-template-columns: minmax(190px, 1.5fr) 150px 120px 130px 56px 56px 88px; }
.cb-table.hide-vol .c-vol { display: none; }

/* 海关查验率看板：拆解表（维度名 / 出货量 / 总 / 国内 / 国外 / 查验单 / 占查验单） */
.cb-table.ir-table .cb-trow { grid-template-columns: minmax(210px, 1.6fr) 66px 140px 140px 140px 74px 92px; }
.cb-table.ir-table .c-name { display: flex; align-items: center; min-width: 0; }
.cb-table.ir-table .cb-cname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 海关查验标识徽章（订单列表 / 轨迹列表 / 详情标题） */
.ir-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px 2px; border-radius: 9px;
  font-size: 10.6px; font-weight: 700; line-height: 1.5; vertical-align: middle; cursor: help;
  letter-spacing: .2px;
}
.ir-badge.dom { color: #b8781a; background: #fdf3e2; box-shadow: inset 0 0 0 1px #f2d9ac; }
.ir-badge.ovs { color: #c24949; background: #fdecec; box-shadow: inset 0 0 0 1px #f4c9c9; }
.ir-badge.both { color: #7b3fb8; background: #f4ebfd; box-shadow: inset 0 0 0 1px #ddc8f2; }

.ir-rank {
  display: inline-flex; width: 19px; height: 19px; border-radius: 50%; flex: none;
  align-items: center; justify-content: center; margin-right: 7px;
  background: #eef2f7; color: #7b8a9c; font-size: 10.5px; font-weight: 700;
}
.ir-rank.r1 { background: #1b4e7a; color: #fff; }
.ir-rank.r2 { background: #3d6f9e; color: #fff; }
.ir-rank.r3 { background: #6f96bb; color: #fff; }

/* 隐藏「出货单量」KPI 卡：5 列 → 4 列 */
.cb-kpi.hide-volcard { grid-template-columns: repeat(4, minmax(0,1fr)); }
.cb-kpi.hide-volcard > .card:nth-child(1) { display: none; }
@media (max-width: 1400px) {
  .cb-kpi.hide-volcard { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
.cb-shop { min-width: 168px; }

/* 轨迹详情抽屉：整体字体加大加粗（仅作用于该抽屉，不影响其它视图） */
.track-detail-drawer { font-size: 14px; }
.track-detail-drawer .card-hd h3 { font-size: 15.5px; font-weight: 700; }
.track-detail-drawer .card-hd > div > span,
.track-detail-drawer .card-hd .cb-note { font-size: 13px; font-weight: 500; }
.track-detail-drawer .kv, .track-detail-drawer .kv dt, .track-detail-drawer .kv dd { font-size: 14px; }
.track-detail-drawer .kv dd b, .track-detail-drawer .kv dd.mono { font-weight: 700; }
/* KPI 卡片 */
.track-detail-drawer .kpi .lb { font-size: 13.5px; font-weight: 600; }
.track-detail-drawer .kpi .vl { font-size: 24px; font-weight: 700; margin-top: 7px; }
.track-detail-drawer .kpi .vl.small { font-size: 20px; }
.track-detail-drawer .kpi .sub { font-size: 13px; line-height: 1.45; }
/* 物流链路进度 */
.track-detail-drawer .ch-st .nm { font-size: 14px; font-weight: 700; }
.track-detail-drawer .ch-st .tm { font-size: 12px; }
.track-detail-drawer .ch-st .now { font-size: 11px; padding: 1px 8px; }
/* 轨迹时间线 */
.track-detail-drawer .tl-item .nm { font-size: 15px; font-weight: 650; }
.track-detail-drawer .tl-item .nm .tl-nm { font-weight: 700; }
.track-detail-drawer .tl-item .mt { font-size: 13px; }
.track-detail-drawer .tl-item .ds { font-size: 13.5px; }
.track-detail-drawer .tl-item .tag { font-size: 12px; }
