/* ===========================================================
 * 鑫邦快运 TMS · 设计系统
 * =========================================================== */
/* hidden 属性必须真的隐藏：.btn 等类自带 display，会盖掉浏览器默认规则 */
[hidden] { display: none !important; }
:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --ink: #101a2e;
  --ink-2: #43536b;
  --muted: #8794a8;
  --line: #e7ecf4;
  --line-2: #eef2f8;
  --primary: #2563eb;
  --primary-dark: #1a4fd6;
  --primary-soft: #eef4ff;
  --primary-soft-2: #dbeafe;
  --primary-line: #bcd3ff;
  --primary-lit: #3b82f6;
  --primary-rgb: 37, 99, 235;
  --sidebar: #0b1220;
  --sidebar-2: #0e1728;
  --row-alt: #f2f6fd;
  --accent: #f97316;
  --accent-soft: #fff4e8;
  --success: #0f9d58;
  --success-soft: #e8f7ef;
  --warn: #d97706;
  --warn-soft: #fef4e6;
  --danger: #dc2626;
  --danger-soft: #feeceb;
  --purple: #7c3aed;
  --purple-soft: #f2ecff;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 26, 46, .05);
  --shadow-md: 0 6px 20px rgba(16, 26, 46, .08);
  --shadow-lg: 0 24px 60px rgba(11, 18, 32, .18);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------------- 外观主题 ----------------
 * 只换「主色 + 侧栏 + 隔行色」，其余用变量派生，避免出现某块还是蓝色。
 * 由系统设置 → 外观 切换，值写在 html[data-theme]。 */
:root[data-theme="green"] {
  --primary: #0f766e; --primary-dark: #0b5d57; --primary-soft: #e8f6f3;
  --primary-soft-2: #d3efea; --primary-line: #a7d9d1; --primary-lit: #14b8a6;
  --primary-rgb: 15, 118, 110;
  --sidebar: #08211f; --sidebar-2: #0a2b27; --row-alt: #f1f8f5;
}
:root[data-theme="amber"] {
  --primary: #c2410c; --primary-dark: #9a3412; --primary-soft: #fff3ea;
  --primary-soft-2: #ffe4d1; --primary-line: #f4c9a9; --primary-lit: #f97316;
  --primary-rgb: 194, 65, 12;
  --sidebar: #20150c; --sidebar-2: #2a1b0e; --row-alt: #fdf6ee;
}
:root[data-theme="violet"] {
  --primary: #6d28d9; --primary-dark: #5b21b6; --primary-soft: #f4efff;
  --primary-soft-2: #e8dcff; --primary-line: #cbb6f4; --primary-lit: #8b5cf6;
  --primary-rgb: 109, 40, 217;
  --sidebar: #150f28; --sidebar-2: #1d1436; --row-alt: #f6f2fd;
}
:root[data-theme="graphite"] {
  --primary: #334155; --primary-dark: #1e293b; --primary-soft: #f1f4f8;
  --primary-soft-2: #e2e8f0; --primary-line: #cbd5e1; --primary-lit: #64748b;
  --primary-rgb: 51, 65, 85;
  --sidebar: #0f141c; --sidebar-2: #161d28; --row-alt: #f2f5f9;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cdd6e4; border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #b3bfd2; background-clip: padding-box; }

/* ---------------- 登录页 ---------------- */
.login {
  position: fixed; inset: 0; z-index: 100;
  display: flex; background: #0b1220;
}
.login-art {
  flex: 1.15; position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% 0%, rgba(var(--primary-rgb), .55), transparent 60%),
    radial-gradient(900px 500px at 90% 100%, rgba(249, 115, 22, .28), transparent 65%),
    linear-gradient(140deg, #0a1120 0%, #0f1c33 55%, #111f38 100%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 56px;
}
.login-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 60% at 40% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--primary-lit), var(--primary-dark));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.5px;
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), .45);
}
.brand-text b { display: block; font-size: 16px; letter-spacing: .5px; }
.brand-text span { font-size: 11px; color: #8ba3c7; letter-spacing: 2.4px; text-transform: uppercase; }
.login-copy { position: relative; z-index: 1; max-width: 460px; }
.login-copy h1 { font-size: 34px; line-height: 1.35; margin: 0 0 16px; font-weight: 700; letter-spacing: -.5px; }
.login-copy p { color: #9fb2cd; line-height: 1.9; margin: 0 0 28px; font-size: 14px; }
.login-stats { display: flex; gap: 36px; position: relative; z-index: 1; }
.login-stats div b { font-size: 22px; display: block; }
.login-stats div span { font-size: 12px; color: #8ba3c7; }
.login-panel { width: 460px; background: #fff; display: flex; flex-direction: column; justify-content: center; padding: 0 56px; }
.login-panel h2 { font-size: 22px; margin: 0 0 6px; }
.login-panel .sub { color: var(--muted); font-size: 13px; margin: 0 0 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 7px; font-weight: 600; }
.login-field input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--surface-2); outline: none; transition: .18s; }
.login-field input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
/* 记住这台设备：勾上后 30 天内打开免输密码 */
.login-remember {
  display: flex; align-items: flex-start; gap: 8px; margin: 10px 2px 0;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none;
}
.login-remember input {
  width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--primary); cursor: pointer;
}
.login-remember em {
  display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 2px;
}
/* 指纹 / 人脸登录：只在 HTTPS 下出现，HTTP 时换成一行说明 */
.login-bio {
  width: 100%; height: 42px; margin-top: 10px; justify-content: center; gap: 7px;
  font-size: 13.5px; border-color: var(--line); background: var(--bg-2); color: var(--text);
}
.login-bio:hover { border-color: var(--primary-line); color: var(--primary); background: var(--primary-soft); }
.login-bio-ico { display: inline-flex; align-items: center; }
.login-bio[disabled] { opacity: .6; cursor: default; }
.login-bio-tip {
  margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 11.5px; line-height: 1.6;
  color: #8a6d3b; background: #fdf7e8; border: 1px solid #f3e3bf;
}

.login-hint { font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.8; }
.login-panel .icp { display: block; text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 14px; text-decoration: none; }
.login-panel .icp:hover { color: var(--primary); text-decoration: underline; }
.login-err { color: var(--danger); font-size: 12px; margin-top: 10px; min-height: 16px; }
/* 「上次使用账号」提示：不再自动登录，只把账号填好、提醒输密码 */
.login-last {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 9px 11px; border-radius: 10px; font-size: 12.2px; line-height: 1.55;
  background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary-dark);
}
.login-last-ico { flex: none; opacity: .75; font-size: 13px; }
.login-last-txt { flex: 1; min-width: 0; }
.login-last-txt b { font-weight: 700; }
.login-last-x {
  flex: none; border: 0; background: transparent; color: var(--primary-dark);
  font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 6px; text-decoration: underline;
}
.login-last-x:hover { background: rgba(var(--primary-rgb), .1); }

/* ---------------- 布局 ---------------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex: 0 0 232px; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #a9b8cf; display: flex; flex-direction: column; overflow: hidden;
}
.sidebar-head { padding: 20px 18px 16px; display: flex; align-items: center; gap: 10px; }
.sidebar-head .brand-text b { color: #fff; font-size: 14.5px; }
.sidebar-head .brand-text span { color: #6d84a5; font-size: 10px; }
.sidebar-org {
  margin: 0 14px 12px; padding: 9px 11px; border-radius: 9px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #d5e0f0;
}
.sidebar-org .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav::-webkit-scrollbar { width: 0; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 10.5px; letter-spacing: 1.6px; color: #5b6f8d; padding: 0 10px 8px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px;
  font-size: 13.2px; color: #aab9d0; cursor: pointer; margin-bottom: 2px;
  transition: background .16s, color .16s; position: relative; user-select: none;
}
.nav-item svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; opacity: .9; }
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #e8effa; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(var(--primary-rgb), .95), rgba(var(--primary-rgb), .62));
  color: #fff; box-shadow: 0 8px 18px rgba(var(--primary-rgb), .3);
}
.nav-item .badge-mini {
  margin-left: auto; font-size: 10.5px; background: rgba(255, 255, 255, .16); color: #fff;
  padding: 1px 6px; border-radius: 20px; font-weight: 600;
}
.nav-item.active .badge-mini { background: rgba(255, 255, 255, .26); }
.nav-lock { margin-left: auto; display: flex; align-items: center; opacity: .5; }
.nav-item .nav-lock svg { width: 12px; height: 12px; stroke-width: 2; }
.sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 11.5px; color: #61748f; line-height: 1.7; }
.sidebar-foot a { color: inherit; text-decoration: none; }
.sidebar-foot a:hover { color: #9bb4d6; text-decoration: underline; }

.main { flex: 1; min-width: 0; margin-left: 232px; }
.topbar {
  height: 62px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px;
  padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.page-title h1 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -.2px; }
.page-title p { margin: 1px 0 0; font-size: 11.5px; color: var(--muted); }
.topbar-search { margin-left: auto; position: relative; }
.topbar-search input {
  width: 260px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); padding: 0 12px 0 34px; outline: none; font-size: 13px; transition: .18s;
}
.topbar-search input:focus { border-color: var(--primary); background: #fff; width: 300px; box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
.topbar-search svg { position: absolute; left: 11px; top: 10px; width: 15px; height: 15px; stroke: var(--muted); fill: none; stroke-width: 1.8; }
.topbar-icon {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; position: relative; transition: .16s;
}
.topbar-icon:hover { border-color: #cfd9e8; background: var(--surface-2); }
.topbar-icon svg { width: 16px; height: 16px; stroke: var(--ink-2); fill: none; stroke-width: 1.8; }
.topbar-icon .red-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); cursor: pointer; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary-soft-2), var(--primary-soft-2)); color: var(--primary-dark); font-weight: 700; font-size: 12.5px;
}
.user-chip b { font-size: 12.5px; display: block; font-weight: 600; }
.user-chip span { font-size: 10.5px; color: var(--muted); }
.content { padding: 20px 26px 44px; }

/* ---------------- 通用元素 ---------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: .1px; }
.card-head .sub { font-size: 11.5px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 14px 16px; }

.btn {
  height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.8px; font-weight: 550; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: #cfd9e8; background: var(--surface-2); color: var(--ink); }
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 6px rgba(var(--primary-rgb), .16); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-soft { background: var(--primary-soft); border-color: #dbe6ff; color: var(--primary-dark); }
.btn-soft:hover { background: #e3edff; color: var(--primary-dark); }
.btn-danger { color: var(--danger); border-color: #f6d3d0; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #f0beb9; }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.btn-link { border: none; background: none; color: var(--primary); cursor: pointer; font-size: 12.5px; padding: 0 2px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.field { display: flex; align-items: center; gap: 6px; }
.field > label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.input, select.input, textarea.input {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 0 11px; font-size: 12.8px; outline: none; transition: .16s; min-width: 0;
}
select.input { padding-right: 26px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238794a8' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
textarea.input { height: auto; padding: 9px 11px; line-height: 1.6; resize: vertical; }
.input-search { padding-left: 31px; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238794a8' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 10px center; }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: #f1f4f9; color: var(--ink-2);
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge-wait { background: var(--warn-soft); color: #b45309; }
.badge-dispatch { background: var(--primary-soft); color: var(--primary-dark); }
.badge-transit { background: var(--purple-soft); color: #6d28d9; }
.badge-signed { background: #e8f4fd; color: #0369a1; }
.badge-receipt { background: var(--success-soft); color: #047857; }
.badge-settled { background: #eef2f7; color: #475569; }
.badge-void { background: #f3f4f6; color: #9ca3af; }
.badge-danger { background: var(--danger-soft); color: #b91c1c; }
.badge-accent { background: var(--accent-soft); color: #c2410c; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; background: #f1f4f9; color: var(--ink-2); }

/* 表格 */
.tbl-wrap { width: 100%; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted);
  background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .2px;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .14s; }
/* 隔行淡色：一屏几十行时靠它分清行与行，颜色强度可在「系统设置 → 外观」调 */
table.tbl tbody tr:nth-child(even) { background: var(--row-alt); }
body[data-zebra="strong"] table.tbl tbody tr:nth-child(even) { background: var(--primary-soft); }
body[data-zebra="off"] table.tbl tbody tr:nth-child(even) { background: transparent; }
table.tbl tbody tr:hover { background: var(--primary-soft); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { font-variant-numeric: tabular-nums; }
table.tbl .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; letter-spacing: -.2px; }
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.row-actions { display: flex; gap: 10px; align-items: center; white-space: nowrap; }

/* 行内「打印」二级菜单（打印运单 / 打印标签） */
.row-pop-wrap { position: relative; display: inline-flex; }
.row-pop-trigger { display: inline-flex; align-items: center; gap: 2px; }
.row-pop-trigger .caret { transition: transform .15s ease; }
.row-pop-trigger.on { color: var(--primary); }
.row-pop-trigger.on .caret { transform: rotate(180deg); }
.row-pop {
  position: fixed; z-index: 9000; min-width: 224px; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 36px rgba(16, 26, 46, .18); animation: rowPopIn .12s ease-out;
}
@keyframes rowPopIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.row-pop-head { padding: 3px 9px 7px; margin-bottom: 4px; border-bottom: 1px solid #f1f5fb; font-size: 11.5px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; }
.row-pop-item { display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 8px 9px; border: 0; background: none; border-radius: 7px; cursor: pointer; text-align: left; color: var(--ink); }
.row-pop-item:hover { background: #f2f7ff; }
.row-pop-item svg { flex: none; margin-top: 1px; color: var(--muted); }
.row-pop-item:hover svg { color: var(--primary); }
.row-pop-item b { display: block; font-size: 12.8px; font-weight: 600; }
.row-pop-item em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.row-pop-item:hover b { color: var(--primary); }
.empty { padding: 46px 0; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { width: 40px; height: 40px; stroke: #cfd8e6; fill: none; stroke-width: 1.3; margin-bottom: 10px; }

/* 受保护模块的占位页 */
.lock-page { padding: 64px 24px 70px; min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.lock-page-ico {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #eef2f9, #e3e9f4); color: #7c8ba3;
  border: 1px solid #dde4ef;
}
.lock-page-ico svg { width: 30px; height: 30px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.lock-page-t { font-size: 16px; font-weight: 650; color: var(--ink); }
.lock-page-s { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.8; }
.lock-page .btn { margin-top: 20px; height: 36px; padding: 0 18px; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.pager .spacer { flex: 1; }
.pager button {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; color: var(--ink-2); font-size: 12.5px;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi .kpi-label { font-size: 12px; color: var(--muted); }
.kpi .kpi-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.kpi .kpi-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.kpi .kpi-val { font-size: 24px; font-weight: 700; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .kpi-val small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi .kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.trend { font-weight: 650; font-size: 11.5px; }
.trend.up { color: var(--danger); }
.trend.down { color: var(--success); }
.trend.flat { color: var(--muted); }
.ico-blue { background: var(--primary-soft); color: var(--primary); }
.ico-green { background: var(--success-soft); color: var(--success); }
.ico-orange { background: var(--accent-soft); color: #ea580c; }
.ico-purple { background: var(--purple-soft); color: var(--purple); }
.ico-red { background: var(--danger-soft); color: var(--danger); }

/* 网格 */
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-2-1 { grid-template-columns: 1.7fr 1fr; }

/* 待办列表 */
.todo-item { display: flex; align-items: center; gap: 11px; padding: 11px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.todo-item:last-child { border-bottom: none; }
.todo-item:hover .todo-t { color: var(--primary); }
.todo-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 32px; }
.todo-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.todo-t { font-size: 12.8px; font-weight: 600; }
.todo-s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.todo-n { margin-left: auto; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 进度条 */
.progress { height: 6px; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary-lit), var(--primary)); }
.progress.warn > i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress.danger > i { background: linear-gradient(90deg, #f87171, #dc2626); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(9, 15, 28, .45); backdrop-filter: blur(2px); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px 40px; overflow-y: auto; animation: fadeIn .16s ease; }
.modal {
  width: 620px; max-width: 100%; background: #fff; border-radius: 12px; box-shadow: var(--shadow-md);
  animation: popIn .2s cubic-bezier(.2, .9, .3, 1); overflow: hidden;
}
.modal.wide { width: 860px; }
.modal.narrow { width: 460px; }
.modal-head { display: flex; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.modal-head .sub { font-size: 11.5px; color: var(--muted); margin-left: 10px; }
.modal-head .x { margin-left: auto; width: 28px; height: 28px; border-radius: 7px; border: none; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.modal-head .x:hover { background: #f1f4f9; color: var(--ink); }
.modal-body { padding: 16px 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row.full { grid-column: 1 / -1; }
.form-row > label { font-size: 12px; color: var(--ink-2); font-weight: 550; }
.form-row > label .req { color: var(--danger); margin-left: 2px; }
.form-row .input { width: 100%; }
.hint { font-size: 11px; color: var(--muted); }
.form-err { color: var(--danger); font-size: 12px; margin-top: 6px; }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(9, 15, 28, .4); z-index: 210; animation: fadeIn .15s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 94vw; background: #fbfcfe;
  box-shadow: -20px 0 50px rgba(9, 15, 28, .16); z-index: 211; display: flex; flex-direction: column;
  animation: slideIn .24s cubic-bezier(.2, .9, .3, 1);
}
.drawer-head { padding: 18px 22px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px 30px; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--line); background: #fff; display: flex; gap: 10px; justify-content: flex-end; }

/* 详情 */
.detail-hero { display: flex; align-items: flex-start; gap: 14px; }
.detail-hero .no { font-size: 18px; font-weight: 700; letter-spacing: -.4px; }
.detail-hero .meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-top: 14px; overflow: hidden; }
.panel-h { padding: 11px 15px; font-size: 12.5px; font-weight: 650; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; }
.panel-h .right { margin-left: auto; }
.panel-b { padding: 14px 15px; }
.kv { display: grid; grid-template-columns: 78px 1fr; gap: 9px 12px; font-size: 12.8px; }
.kv dt { color: var(--muted); font-size: 12px; }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.route { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.route .pt { flex: 1; }
.route .pt .c { font-size: 15px; font-weight: 700; }
.route .pt .a { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.route .mid { flex: 0 0 96px; text-align: center; color: var(--muted); font-size: 11px; position: relative; }
.route .mid .line { height: 1px; background: repeating-linear-gradient(90deg, #cbd5e1 0 4px, transparent 4px 8px); margin: 7px 0 5px; position: relative; }
.route .mid .line::after { content: ""; position: absolute; right: -1px; top: -3px; border: 3.5px solid transparent; border-left-color: #94a3b8; }
.fee-table { width: 100%; font-size: 12.8px; }
.fee-table td { padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.fee-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.fee-table tr.total td { border-bottom: none; font-weight: 700; font-size: 14px; padding-top: 10px; }
.fee-table label { color: var(--muted); font-size: 12px; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1.5px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 3px; width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid #c7d3e6;
}
.tl-item:first-child::before { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14); }
.tl-t { font-size: 12.8px; font-weight: 600; }
.tl-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tl-time { font-size: 11px; color: #9aa7ba; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Toast */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #101a2e; color: #fff; font-size: 12.8px; padding: 9px 16px; border-radius: 9px;
  box-shadow: 0 10px 26px rgba(11, 18, 32, .3); display: flex; align-items: center; gap: 8px;
  animation: toastIn .22s ease;
}
.toast.ok { background: #0f7a4a; }
.toast.err { background: #b91c1c; }
.toast svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.pick-row.sel { background: var(--primary-soft); }
.pick-main .t { font-size: 12.8px; font-weight: 600; }
.pick-main .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-card.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .1); }
.veh-card .p { font-size: 13.5px; font-weight: 700; letter-spacing: -.2px; }
.veh-card .m { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.veh-chip.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .08); }
.dv-f .input { width: 100%; height: 34px; font-size: 12.6px; padding: 0 9px; }
.dv-stat .warn { color: var(--warn); }
.dv-cap .over { color: var(--danger); font-weight: 650; }
.cf-note.warn { background: var(--danger-soft); color: #9b1c1c; }

/* 图表 */
.chart-box { padding: 6px 4px 0; }
.legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; font-size: 12.3px; }
.bar-row .nm { width: 118px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar { flex: 1; height: 8px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.bar-row .bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--primary-lit), var(--primary)); }
.bar-row .vl { width: 74px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }

/* 统计小卡 */
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mini { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; }
.mini .l { font-size: 11.5px; color: var(--muted); }
.mini .v { font-size: 19px; font-weight: 700; margin-top: 4px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.mini .mini-s { font-size: 11px; color: var(--muted); margin-top: 3px; }
/* 成本 / 利润受密码保护：锁定态卡片可点，数值用圆点遮蔽 */
.mini.is-locked { cursor: pointer; background: #fbfcfe; border-style: dashed; }
.mini.is-locked:hover { border-color: #c6d6f0; background: #f6f9ff; }
.mini.is-locked .l { display: flex; align-items: center; gap: 4px; }
.mini.is-locked .v { color: #c3cede; letter-spacing: 3px; }
.fin-unlock-link { display: inline-flex; align-items: center; gap: 4px; color: #1c5cff; }
.fin-tag-open { color: #0f7a4a; background: #f1faf4; border-color: #d5ecdc; }

/* 财务统计：单票成本录入与利润 */
.cost-btn { border: none; background: none; font: inherit; font-variant-numeric: tabular-nums; color: var(--ink);
  cursor: pointer; padding: 2px 6px; border-radius: 6px; border-bottom: 1px dashed #c3cede; }
.cost-btn:hover { background: var(--primary-soft); color: var(--primary); border-bottom-color: var(--primary); }
.cost-btn.est { color: #8a6a2f; }
.fin-est { font-style: normal; font-size: 9.5px; margin-left: 3px; padding: 0 3px; border-radius: 4px;
  background: #fff4e2; color: #b45309; vertical-align: 1px; }
.cost-prev { font-size: 19px; font-weight: 700; color: #0f7a4a; font-variant-numeric: tabular-nums;
  padding: 8px 12px; background: #f4faf6; border: 1px solid #d9ebdf; border-radius: 9px; }
.cost-tip { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.cost-tip .btn-link { margin-left: 2px; white-space: nowrap; }

/* 财务统计宽表：信息列与运单管理一致 + 成本/利润，列多时操作列吸附右侧 */
.fin-date-wrap { display: inline-flex; align-items: center; gap: 6px; }
.fin-date-wrap .input { width: 136px; }
table.tbl.fin-wide { font-size: 13px; }
table.tbl.fin-wide th, table.tbl.fin-wide td { padding-left: 9px; padding-right: 9px; white-space: nowrap; }
table.tbl.fin-wide td .ell { max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 「运费 / 成本 / 利润」三段金额挨在一起，用分隔线划出金额区 */
table.tbl.fin-wide th.col-amt, table.tbl.fin-wide td.col-amt { border-left: 1px solid var(--line); }
table.tbl.fin-wide th.col-cost, table.tbl.fin-wide td.col-cost { border-left: none; }
table.tbl.fin-wide th.col-profit, table.tbl.fin-wide td.col-profit {
  border-right: 1px solid var(--line); min-width: 96px;
}
table.tbl.fin-wide th:last-child, table.tbl.fin-wide td:last-child {
  position: sticky; right: 0; z-index: 2; background: #fff;
  box-shadow: -10px 0 14px -10px rgba(15, 23, 42, .22);
}
table.tbl.fin-wide thead th:last-child { background: var(--surface-2); z-index: 3; }
table.tbl.fin-wide tbody tr:hover td:last-child { background: var(--primary-soft); }
/* 操作列是 sticky 的，隔行/选中的背景要同步，否则右侧会露出白块 */
table.tbl.fin-wide tbody tr:nth-child(even) td:last-child { background: var(--row-alt); }
table.tbl.fin-wide tbody tr.is-sel td:last-child { background: var(--primary-soft); }
body[data-zebra="off"] table.tbl.fin-wide tbody tr:nth-child(even) td:last-child { background: #fff; }
body[data-zebra="strong"] table.tbl.fin-wide tbody tr:nth-child(even) td:last-child { background: var(--primary-soft); }

/* 财务管理：运费已结的单整行淡绿，扫一眼就知道哪些单收清了。
   末列是 sticky 的，要单独给一版，否则横向滚动后右边会露白块；
   勾选态优先级最高，仍是选中蓝 */
table.tbl.fin-wide tbody tr.is-paid td { background: #eaf7ef; }
table.tbl.fin-wide tbody tr.is-paid td:last-child,
body[data-zebra] table.tbl.fin-wide tbody tr.is-paid td:last-child { background: #eaf7ef; }
table.tbl.fin-wide tbody tr.is-paid:hover td { background: #dff2e6; }
table.tbl.fin-wide tbody tr.is-paid:hover td:last-child,
body[data-zebra] table.tbl.fin-wide tbody tr.is-paid:hover td:last-child { background: #dff2e6; }
table.tbl.fin-wide tbody tr.is-paid.is-sel td { background: var(--primary-soft); }
table.tbl.fin-wide tbody tr.is-paid.is-sel td:last-child,
body[data-zebra] table.tbl.fin-wide tbody tr.is-paid.is-sel td:last-child { background: var(--primary-soft); }

/* 超过 5 天仍未结算：整行淡红，与已结的淡绿形成对照。
   同样要压过末列 sticky 白底、隔行色与 hover */
table.tbl.fin-wide tbody tr.is-overdue td { background: #fdecea; }
table.tbl.fin-wide tbody tr.is-overdue td:last-child,
body[data-zebra] table.tbl.fin-wide tbody tr.is-overdue td:last-child { background: #fdecea; }
table.tbl.fin-wide tbody tr.is-overdue:hover td { background: #fbdcd8; }
table.tbl.fin-wide tbody tr.is-overdue:hover td:last-child,
body[data-zebra] table.tbl.fin-wide tbody tr.is-overdue:hover td:last-child { background: #fbdcd8; }
table.tbl.fin-wide tbody tr.is-overdue td[data-col="settle"] .badge-accent {
  background: #f9cfc9; color: #9f1a12;
}
table.tbl.fin-wide tbody tr.is-overdue.is-sel td { background: var(--primary-soft); }
table.tbl.fin-wide tbody tr.is-overdue.is-sel td:last-child,
body[data-zebra] table.tbl.fin-wide tbody tr.is-overdue.is-sel td:last-child { background: var(--primary-soft); }

/* 运单管理：超过 5 天未结的单同样标红。
   这张表的末列也是 sticky 的，勾选态优先于标红 */
table.tbl.tbl-pick tbody tr.is-overdue td { background: #fdecea; }
table.tbl.tbl-pick tbody tr.is-overdue td:last-child,
body[data-zebra] table.tbl.tbl-pick tbody tr.is-overdue td:last-child { background: #fdecea; }
table.tbl.tbl-pick tbody tr.is-overdue:hover td { background: #fbdcd8; }
table.tbl.tbl-pick tbody tr.is-overdue:hover td:last-child,
body[data-zebra] table.tbl.tbl-pick tbody tr.is-overdue:hover td:last-child { background: #fbdcd8; }
table.tbl.tbl-pick tbody tr.is-overdue td:nth-child(12) .badge-accent {
  background: #f9cfc9; color: #9f1a12;
}
table.tbl.tbl-pick tbody tr.is-overdue.is-sel td,
table.tbl.tbl-pick tbody tr.is-overdue.is-sel td:last-child { background: var(--primary-soft); }
table.tbl.tbl-pick tbody tr.is-overdue.is-sel:hover td,
table.tbl.tbl-pick tbody tr.is-overdue.is-sel:hover td:last-child { background: #e6efff; }

/* 列顺序提示条 + 列头拖动排序 */
.fin-colbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 18px 0; font-size: 12px; color: #8794a8;
}
.fin-colbar .btn-link { margin-left: 0; font-size: 12px; }
.fin-colbar .spacer { flex: 1; }
.fin-colbar-tag {
  padding: 1px 7px; border-radius: 9px; font-size: 11.5px;
  color: #1c5cff; background: var(--primary-soft); border: 1px solid #d6e4ff;
}

/* 列头：列名本身就是筛选入口（无图标），点击弹出搜索 / 筛选 / 隐藏列 */
table.tbl.fin-wide thead th { vertical-align: bottom; padding-top: 6px; padding-bottom: 7px; }
.fin-th-name {
  display: inline-block; padding: 2px 5px; margin: -2px -1px;
  border: 0; border-radius: 5px; background: transparent;
  font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit;
  cursor: pointer; transition: background .12s, color .12s;
}
button.fin-th-name:hover { background: #e9f0ff; color: #1c5cff; }
button.fin-th-name:active { background: #dbe7ff; }
/* 该列正在筛选：列名变蓝并带一条下划线 */
button.fin-th-name.on { color: #1c5cff; box-shadow: inset 0 -2px 0 #1c5cff; }
button.fin-th-name.on:hover { background: #e9f0ff; }
/* 开单时间列：列名右侧的升序 / 降序切换 */
button.fin-th-sort {
  display: inline-block; margin-left: 4px; padding: 1px 5px;
  border: 1px solid var(--line); border-radius: 5px; background: #fff;
  font-size: 12px; line-height: 1.2; color: #8794a8; cursor: pointer;
  vertical-align: middle; transition: background .12s, color .12s, border-color .12s;
}
button.fin-th-sort:hover, button.fin-th-sort.on { border-color: #b9cbea; color: #1c5cff; background: #e9f0ff; }
.wb-sortdir { white-space: nowrap; }
.wb-sortdir.on { color: #1c5cff; border-color: #b9cbea; background: #e9f0ff; }

/* 列筛选面板（搜索 / 取值 / 隐藏列） */
.fin-fpanel {
  position: fixed; z-index: 1200; width: 242px;
  background: #fff; border: 1px solid #dbe3ef; border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .18);
  font-size: 12.5px; color: #33415c; overflow: hidden;
}
.fin-fp-head {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 10px 8px; font-weight: 650; color: #101a2e;
  border-bottom: 1px solid #f1f4f9;
}
.fin-fp-x {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  color: #97a3b6; font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 4px;
}
.fin-fp-x:hover { background: #f1f4f9; color: #33415c; }
.fin-fp-body { padding: 9px 10px 8px; }
.fin-fp-q { width: 100%; box-sizing: border-box; height: 30px; font-size: 12.5px; }
.fin-fp-sub {
  display: flex; align-items: center; gap: 6px;
  margin: 9px 0 4px; font-size: 11.5px; color: #8794a8;
}
.fin-fp-sub .btn-link { margin-left: auto; font-size: 11.5px; }
.fin-fp-vals { max-height: 168px; overflow-y: auto; margin: 0 -2px; }
.fin-fp-val {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 4px; border-radius: 5px; cursor: pointer; font-size: 12.4px;
}
.fin-fp-val:hover { background: #f5f8ff; }
.fin-fp-val input { width: 14px; height: 14px; margin: 0; accent-color: #1c5cff; cursor: pointer; }
.fin-fp-val span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin-fp-val i { font-style: normal; color: #97a3b6; font-size: 11.5px; }
.fin-fp-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-top: 1px solid #f1f4f9; background: #fafbfe;
}
.fin-fp-foot .spacer { flex: 1; }
.fin-fp-foot .btn-link { font-size: 12px; }
.fin-fp-foot .fin-fp-hide { color: #d0342c; }

/* 勾选列 + 选中条（批量录入成本 / 导出所选） */
table.tbl.fin-wide th.col-chk, table.tbl.fin-wide td.col-chk {
  width: 38px; min-width: 38px; padding-left: 12px; padding-right: 2px; text-align: center;
}
table.tbl.fin-wide input[type="checkbox"] {
  width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: #1c5cff; vertical-align: middle;
}
table.tbl.fin-wide tbody tr.is-sel { background: var(--primary-soft); }
table.tbl.fin-wide tbody tr.is-sel:hover { background: #e6efff; }
.fin-selbar {
  display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 18px 0; padding: 8px 12px;
  border: 1px solid #c9dcff; border-radius: 10px;
  background: linear-gradient(180deg, #f4f8ff, var(--primary-soft)); font-size: 12.5px; color: #3a4a63;
}
.fin-selbar.on { display: flex; }
.fin-selbar-ico { color: #1c5cff; font-weight: 700; }
.fin-selbar .spacer { flex: 1; }
.fin-selbar .btn-link { font-size: 12px; }

/* 批量录入成本弹窗 */
.bc-head, .bc-row {
  display: grid; grid-template-columns: 104px minmax(150px, 1fr) 96px 116px 96px;
  align-items: center; gap: 10px;
}
.bc-head {
  padding: 0 4px 7px; font-size: 11.5px; color: #8794a8; font-weight: 600;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1;
}
.bc-list { max-height: 52vh; overflow-y: auto; }
.bc-row { padding: 7px 4px; border-bottom: 1px solid #f1f4f9; }
.bc-row:last-child { border-bottom: none; }
.bc-no { font-size: 12.4px; color: #33415c; }
.bc-route { font-size: 12.6px; color: #101a2e; }
.bc-route .cell-sub { font-size: 11.4px; max-width: 230px; }
.bc-amt { font-size: 13px; color: #33415c; }
.bc-in { min-width: 0; overflow: hidden; }
.bc-in .input {
  width: 100%; box-sizing: border-box; height: 30px; padding: 0 8px;
  font-size: 13px; text-align: right;
}
.bc-in .input::-webkit-outer-spin-button, .bc-in .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bc-in .input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.bc-profit { min-width: 0; font-size: 13px; white-space: nowrap; }

/* 批量收款弹窗 */
.bp-top { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bp-f { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: #8794a8; font-weight: 600; }
.bp-f .input { height: 32px; font-size: 12.8px; }
.bp-f:nth-of-type(1) .input { width: 130px; }
.bp-f:nth-of-type(2) .input { width: 180px; }
.bp-head, .bp-row {
  display: grid; grid-template-columns: 106px minmax(150px, 1fr) 96px 116px 118px;
  align-items: center; gap: 10px;
}
.bp-head {
  padding: 0 4px 7px; font-size: 11.5px; color: #8794a8; font-weight: 600;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1;
}
.bp-list { max-height: 50vh; overflow-y: auto; }
.bp-row { padding: 7px 4px; border-bottom: 1px solid #f1f4f9; }
.bp-row:last-child { border-bottom: none; }
.bp-no { font-size: 12.4px; color: #33415c; }
.bp-who { font-size: 12.6px; color: #101a2e; min-width: 0; }
.bp-who .bp-cust { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-who .cell-sub { font-size: 11.4px; max-width: 230px; }
.bp-total { font-size: 13px; color: #33415c; }
.bp-in { min-width: 0; overflow: hidden; }
.bp-in .input { width: 100%; box-sizing: border-box; height: 30px; font-size: 13px; text-align: right; padding: 0 8px; }
.bp-in .input::-webkit-outer-spin-button, .bp-in .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bp-in .input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.bp-state { font-size: 12px; min-width: 0; white-space: nowrap; }
.bp-sum {
  margin-top: 10px; padding: 9px 12px; border-radius: 9px;
  background: #f4f8ff; border: 1px solid #dbe7ff; font-size: 12.8px; color: #3a4a63;
}
table.tbl.fin-wide thead th[data-move] { cursor: grab; user-select: none; -webkit-user-select: none; }
table.tbl.fin-wide thead th[data-move]:hover { color: var(--primary); background: var(--primary-soft); }
table.tbl.fin-wide thead th[data-move]:active { cursor: grabbing; }
html.col-drag-on, html.col-drag-on * { cursor: grabbing !important; user-select: none !important; }
table.tbl.fin-wide thead th.col-dragging { opacity: .42; background: var(--primary-soft); }
table.tbl.fin-wide thead th.col-drop { box-shadow: inset 3px 0 0 #1c5cff; color: #1c5cff; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { padding: 9px 14px; font-size: 12.8px; color: var(--ink-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 550; }
.tab:hover { color: var(--primary); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }

/* 空态/提示条 */
.notice { display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: var(--warn-soft); color: #92400e; font-size: 12.3px; line-height: 1.7; border: 1px solid #fbe3c0; }
.notice.info { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary-line); }
.notice svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; }

.dash-hero {
  background: linear-gradient(115deg, #0f1c33 0%, #16305c 55%, #1e4d8f 100%);
  border-radius: var(--radius); padding: 20px 24px; color: #fff; margin-bottom: 16px;
  display: flex; align-items: center; gap: 24px; position: relative; overflow: hidden;
}
.dash-hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, .35), transparent 68%);
}
.dash-hero h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.dash-hero p { margin: 0; font-size: 12.5px; color: #a9c0e0; line-height: 1.8; }
.dash-hero .quick { margin-left: auto; display: flex; gap: 10px; position: relative; z-index: 1; }
.dash-hero .quick .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #fff; }
.dash-hero .quick .btn:hover { background: rgba(255, 255, 255, .2); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 1280px) {
  .g-2-1, .g-1-2 { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { width: 68px; flex-basis: 68px; }
  .sidebar .brand-text, .nav-group-title, .sidebar-org, .sidebar-foot, .nav-item span { display: none; }
  .nav-item { justify-content: center; }
  .main { margin-left: 68px; }
  .login-art { display: none; }
  .login-panel { width: 100%; }
  .form-grid, .form-grid.c3 { grid-template-columns: 1fr; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================================================
 * 托运单式开单表单（sheet）
 * =========================================================== */
.sheet { border: 2px solid #c9dcf5; border-radius: 4px; padding: 14px 16px 12px; background: #fff; }
.sheet-meta .m { display: flex; align-items: center; gap: 5px; color: #101a2e; }
.sheet-meta .m > span { font-weight: 550; white-space: nowrap; }
.sheet-meta .r { margin-left: auto; }
.sheet-meta .r input { width: 128px; }
table.sheet-t td.lab { text-align: center; font-weight: 600; font-size: 12.6px; background: #f8fafd; padding: 0 4px; }
table.sheet-t td.sumcell { text-align: center; font-weight: 700; font-size: 14px; color: var(--primary-dark); padding: 6px 4px; }
.pi { display: block; width: 100%; border: none !important; outline: none; background: transparent; box-shadow: none !important; padding: 9px 6px; font-size: 13px; text-align: center; height: auto; }
.pi:focus { border: none !important; box-shadow: none !important; background: #f4f8ff; }
.pi.ta-l { text-align: left; }
select.pi { cursor: pointer; }
.dx { font-size: 13px; padding: 0 8px; text-align: left; color: #101a2e; }
.dx b { color: #c2410c; font-weight: 700; letter-spacing: .5px; }
.sheet-hint { font-size: 11px; color: #8794a8; margin-top: 9px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sheet-hint .btn-link { font-size: 11.5px; }
.load-sum .ls b { font-size:13.5px; color:#101a2e; font-variant-numeric:tabular-nums; }
.tab .n { display:inline-block; min-width:18px; height:17px; line-height:17px; padding:0 5px; margin-left:6px; border-radius:9px; background:#eef2f8; color:#71809a; font-size:10.5px; font-weight:650; text-align:center; }
.tab.on .n { background:#e3edfd; color:var(--primary); }

.track-now { border:1px solid var(--line); border-radius:10px; background:#f8fafd; padding:12px 14px; }
.track-now .tn-h { font-size:11.5px; color:#8794a8; margin-bottom:6px; }
.track-now .tn-b { font-size:13px; color:#101a2e; }
.track-now .tn-b b { color:#0f766e; }
.track-now .tn-s { font-size:11.5px; color:#8794a8; margin-top:4px; }
.track-list { max-height:210px; overflow-y:auto; padding-right:4px; }
.tr-item { display:flex; gap:10px; padding:8px 0 8px 2px; border-bottom:1px dashed #eef2f8; }
.tr-item:last-child { border-bottom:none; }
.tr-item > i { width:7px; height:7px; border-radius:50%; background:var(--primary); margin-top:6px; flex:none; }
.tr-t { font-size:12.5px; font-weight:600; color:#101a2e; }
.tr-s { font-size:11.5px; color:#43536b; margin-top:2px; }
.tr-time { font-size:11px; color:#8794a8; margin-top:2px; }
/* 物流跟踪：编辑态提示条 */
.t-edit-bar { display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:12px; padding:8px 12px; border-radius:8px;
  background:#fff7ed; border:1px solid #fed7aa; color:#b45309; font-size:12.5px; }
.t-edit-bar[hidden] { display:none; }
.t-edit-bar .btn-link { color:#b45309; font-weight:600; }

/* ===========================================================
 * 系统设置：角色权限编辑
 * =========================================================== */
.perm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.perm-item { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 9px; padding: 8px 11px; font-size: 12.5px; cursor: pointer; transition: .15s; user-select: none; }
.perm-item:hover { border-color: #c3d4f2; }
.perm-item input { accent-color: var(--primary); width: 14px; height: 14px; cursor: pointer; }
.perm-item.off { opacity: .55; background: #f6f8fb; }

/* ===========================================================
 * 开单：发货人 / 收货人联想下拉
 * =========================================================== */
.ac-drop { position: absolute; z-index: 30; background: #fff; border: 1.5px solid #c9dcf5; border-radius: 9px; box-shadow: 0 10px 28px rgba(16,26,46,.14); max-height: 232px; overflow-y: auto; display: none; }
.ac-item { padding: 7px 11px; cursor: pointer; border-bottom: 1px solid #f1f5fa; font-size: 12.5px; line-height: 1.5; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: #f2f7ff; }
.ac-item b { color: #101a2e; margin-right: 8px; }
.ac-item span { color: #43536b; margin-right: 8px; }
.ac-item span.a { color: #8794a8; font-size: 11.5px; display: block; }

/* ===========================================================
 * 大尺寸弹窗 / 托运单预览
 * =========================================================== */
.modal.xl { width: 1290px; }
.modal.xl .modal-body { max-height: 76vh; }
.pv-bar { display: flex; align-items: center; gap: 14px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); background: #f8fafd; flex-wrap: wrap; }
.pv-tip { font-size: 11.5px; color: #8794a8; }
.pv-off { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; color: #43536b; }
.pv-off b { font-weight: 600; color: #101a2e; }
.pv-off input { width: 58px; height: 28px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font-size: 12px; outline: none; }
.pv-off input:focus { border-color: var(--primary); }
.pv-step { width: 24px; height: 26px; border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; color: #43536b; font-size: 13px; line-height: 1; }
.pv-step:hover { border-color: #b9cbea; color: var(--primary); }
.pv-toggle { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; user-select: none; font-size: 12px; color: #43536b; }
.pv-toggle input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--primary); }
.pv-stage { background: #e9edf3; height: calc(70vh - 40px); display: grid; place-items: center; overflow: hidden; }
.pv-paper { background: #fff; box-shadow: 0 10px 30px rgba(16, 26, 46, .2); overflow: hidden; }
.sh-no .btn-link { font-size: 11px; margin-left: 3px; vertical-align: 1px; }

/* ===========================================================
 * 开单弹窗：高度放大 1.2 倍（行高、内边距同比放大）
 * =========================================================== */
.modal.xl .modal-body { max-height: 82vh; }
.waybill-modal .modal-body { padding: 16px 18px; }
.waybill-modal .sheet { padding: 20px 20px 16px; }
.waybill-modal .sheet-head { margin-bottom: 10px; }
.waybill-modal .sh-logo .x3l { font-size: 34px; }
.waybill-modal .sh-title { font-size: 24px; }
.waybill-modal .sheet-meta { margin: 6px 2px 12px; gap: 20px; }
.waybill-modal .sheet-meta input, .waybill-modal .sheet-meta select { height: 32px; font-size: 13.5px; }
.waybill-modal table.sheet-t th { padding: 10px 2px; font-size: 12.8px; }
.waybill-modal table.sheet-t td.lab { font-size: 13px; }
.waybill-modal .pi { padding: 15px 6px; font-size: 13.5px; }
.waybill-modal .sheet-hint { margin-top: 14px; font-size: 11.5px; }

/* ===========================================================
 * 字段打印排版：系统设置内可编辑，运单打印弹窗只读预览
 * =========================================================== */
.fpv { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.fpv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); background: #f8fafd; flex-wrap: wrap; font-size: 12.5px; color: #43536b; }
.fpv-g { display: flex; align-items: center; gap: 6px; }
.fpv-g > span { color: #8794a8; }
.fpv-g > i { font-style: normal; color: #b6c0d0; font-size: 11.5px; }
.fpv-bar select, .fpv-bar input[type="number"] { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 12.5px; background: #fff; color: #101a2e; outline: none; }
.fpv-bar input[type="number"] { width: 70px; text-align: center; }
.fpv-bar select:focus, .fpv-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.fpv-btn { height: 30px; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 12.5px; color: #43536b; cursor: pointer; }
.fpv-btn:hover { border-color: #b9cbea; color: var(--primary); }
.fpv-chk { display: flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.fpv-chk input { accent-color: var(--primary); width: 14px; height: 14px; cursor: pointer; }
.fpv-tip { font-size: 12.5px; color: #6b7a90; }
.fpv-tip b { color: #101a2e; font-weight: 650; }
.fpv-saved { font-size: 11.5px; color: #b6c0d0; }
.fpv-saved.on { color: #16a34a; }
.fpv-zoom { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.fpv-zoom button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 12.5px; color: #43536b; cursor: pointer; line-height: 1; }
.fpv-zoom button:hover { border-color: #b9cbea; color: var(--primary); }
.fpv-zoom span { min-width: 48px; text-align: center; font-size: 12.5px; font-weight: 650; color: #101a2e; font-variant-numeric: tabular-nums; }
.fpv-stage { position: relative; height: 560px; overflow: auto; background: #e9edf3; padding: 26px; display: flex; }
.fpv-holder { position: relative; margin: auto; flex: none; }
.fpv-paper { position: absolute; left: 0; top: 0; background: #fff; box-shadow: 0 10px 30px rgba(16, 26, 46, .22); transform-origin: top left; }
.fpv-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, #eff3f9 1px, transparent 1px), linear-gradient(to bottom, #eff3f9 1px, transparent 1px); background-size: 5mm 5mm; }
.fpv-foot { display: flex; gap: 18px; padding: 8px 14px; border-top: 1px solid var(--line-2); background: #fbfcfe; font-size: 12px; color: #8794a8; }
.fpv-foot .r { margin-left: auto; }
.fp-host .fpv-stage { height: calc(76vh - 132px); }
.fp-item { position: absolute; white-space: nowrap; padding: 0.6mm 1.2mm; border: 1px dashed transparent; border-radius: 1mm; user-select: none; outline: none; }
.fp-item b { font-size: var(--fp-fs, 4.5mm); font-weight: 600; color: #101a2e; }
.fp-item i { font-style: normal; font-size: calc(var(--fp-fs, 4.5mm) * 0.78); color: #8794a8; margin-right: 1.2mm; }
.fp-edit .fp-item { cursor: grab; }
.fp-edit .fp-item:hover { border-color: #a9c5ec; background: #f2f7ff; }
.fp-edit .fp-item:focus-visible { border-color: var(--primary); background: #eef5ff; }
.fp-edit .fp-item.on { border-color: var(--primary); background: #e8f1ff; z-index: 6; box-shadow: 0 2px 8px rgba(var(--primary-rgb), .22); }
.fp-edit .fp-item.drag { cursor: grabbing; border-color: var(--primary); background: #e8f1ff; z-index: 7; }
.fp-hide-lb .fp-item i { display: none; }

/* ===== 打印面板：左边预览、右边打印机与份数 ===== */
.pp { display: flex; align-items: stretch; margin: -12px -16px; }
.pp-prev { flex: 1; min-width: 0; border-right: 1px solid var(--line-2); }
.pp-prev .fpv-stage { height: calc(76vh - 196px); }
.pp-set { width: 306px; flex: none; padding: 16px 18px; overflow: auto; background: #fbfcfe; }
.pp-sec + .pp-sec { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pp-h { font-size: 13px; font-weight: 650; color: #101a2e; margin-bottom: 8px; }
.pp-ptr { width: 100%; height: 34px; }
.pp-tip { margin: 7px 0 0; font-size: 11.5px; line-height: 1.6; color: #8794a8; }
.pp-step { display: flex; align-items: stretch; width: 152px; }
.pp-step button { width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; color: #43536b; font-size: 15px; line-height: 1; cursor: pointer; }
.pp-step button:first-of-type { border-radius: 6px 0 0 6px; }
.pp-step button:last-of-type { border-radius: 0 6px 6px 0; }
.pp-step button:hover { border-color: #b9cbea; color: var(--primary); }
.pp-step input { flex: 1; width: 100%; min-width: 0; height: 34px; border: 1px solid var(--line); border-left: 0; border-right: 0; border-radius: 0; text-align: center; font-size: 13.5px; font-weight: 650; color: #101a2e; outline: none; background: #fff; }
.pp-step input:focus { border-color: var(--primary); }
.pp-step input::-webkit-outer-spin-button, .pp-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pp-step input { -moz-appearance: textfield; appearance: textfield; }
.pp-kv { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12.5px; color: #8794a8; }
.pp-kv b { color: #101a2e; font-weight: 600; }
.pp-link { margin-top: 8px; font-size: 12.5px; }
@media (max-width: 900px) {
  .pp { flex-direction: column; }
  .pp-prev { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .pp-prev .fpv-stage { height: 300px; padding: 16px; }
  .pp-set { width: auto; overflow: visible; padding: 14px 16px 18px; }
}

.card.flash { box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .3); transition: box-shadow .25s; }

/* ===========================================================
 * 可读性优化（整体放大字号 + 行距/点击区域）
 * 说明：原有版式按 12.5~13px 设计，长时间录入偏小，
 * 这里统一上调 1~1.5px，并略微加宽表格行高，便于阅读。
 * =========================================================== */
body { font-size: 14.5px; }

/* 侧边导航 */
.nav-item { font-size: 14px; height: auto; padding: 9px 10px; }
.nav-group-title { font-size: 11px; }
.sidebar-org { font-size: 12.5px; }
.sidebar-foot { font-size: 11.5px; }

/* 顶栏 */
.page-title h1 { font-size: 17px; }
.page-title p { font-size: 12.5px; }
.topbar-search input { font-size: 13.5px; }
.user-chip b { font-size: 13px; }
.user-chip span { font-size: 11px; }

/* 卡片与按钮 */
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12.2px; }
.btn { font-size: 13.4px; }
.btn-sm { font-size: 12.8px; }
.btn-link { font-size: 13.2px; }
.card-body { font-size: 13.4px; }

/* 表单 */
.field > label { font-size: 12.8px; }
.input, .field .input, select.input { font-size: 13.4px; }
.form-row > label { font-size: 12.8px; }
.form-row .input, .form-row select, .form-row textarea { font-size: 13.4px; }
.hint { font-size: 11.6px; }

/* 表格 */
table.tbl { font-size: 13.6px; }
table.tbl th { font-size: 12.4px; padding: 11px 12px; }
table.tbl td { padding: 11px 12px; }
table.tbl .mono { font-size: 12.8px; }
.cell-sub { font-size: 12px; }
.tag { font-size: 11.6px; }
.badge { font-size: 12px; padding: 3px 8px; }
.row-actions .btn-link { font-size: 13px; }

/* 分页 / 空状态 / 弹层 */
.pager { font-size: 13px; }
.pager button { font-size: 13px; }
.empty { font-size: 13.5px; }
.modal-head h3 { font-size: 16px; }
.modal-head .sub { font-size: 12.2px; }
.row-pop-item b { font-size: 13.4px; }
.row-pop-item em { font-size: 11.6px; }

/* 开单托运单表单 */
.waybill-modal .sheet-meta input, .waybill-modal .sheet-meta select { font-size: 14px; }
.waybill-modal table.sheet-t th { font-size: 13.4px; }
.waybill-modal table.sheet-t td.lab { font-size: 13.6px; }
.waybill-modal .pi { font-size: 14px; }
.waybill-modal .sheet-hint { font-size: 12px; }

/* 工作台 / 报表图表文字 */
.kpi .kpi-label { font-size: 12.6px; }
.kpi .kpi-foot { font-size: 12px; }
.todo-t { font-size: 13.4px; }
.todo-s { font-size: 12px; }

/* ===========================================================
 * 运单列表：勾选 + 批量删除
 * =========================================================== */
table.tbl-pick th.col-chk, table.tbl-pick td.col-chk {
  width: 38px; min-width: 38px; padding-left: 14px; padding-right: 0; text-align: center;
}
table.tbl-pick input[type="checkbox"] {
  width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: #1c5cff; vertical-align: middle;
}
table.tbl-pick tbody tr.is-sel { background: var(--primary-soft); }
table.tbl-pick tbody tr.is-sel:hover { background: #e6efff; }

.batch-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 18px 12px; padding: 9px 12px;
  border: 1px solid #c9dcff; border-radius: 10px;
  background: linear-gradient(180deg, #f4f8ff, var(--primary-soft));
}
.batch-bar[hidden] { display: none; }
.batch-count { display: inline-flex; align-items: center; gap: 6px; font-size: 13.2px; color: #10305e; }
.batch-count svg { color: #1c5cff; }
.batch-count b { font-size: 15px; color: #1c5cff; }
.batch-x { color: #6b7c96; font-size: 12.2px; }
.batch-bar .spacer { flex: 1; }

/* 删除确认弹窗 */
.del-nums {
  margin: 9px 0 10px; padding: 9px 11px; border-radius: 8px;
  background: #fff6f5; border: 1px solid #f6d7d3;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.8px; line-height: 1.7; color: #b42318;
  word-break: break-all;
}
.del-notes { font-size: 12.8px; line-height: 1.9; color: #5a6b84; }
.del-notes b { color: #b42318; }
.del-step {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e3e9f2;
  font-size: 12px; color: #8794a8;
}
.del-warn { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 9px; background: #fff6f5; border: 1px solid #f6d7d3; }
.del-warn > svg { color: #e5484d; flex: 0 0 auto; margin-top: 1px; }
.del-warn b { font-size: 13.6px; color: #b42318; }
.del-warn-s { margin-top: 4px; font-size: 12.4px; line-height: 1.7; color: #7a8798; }

/* 运单列表：发货方 / 收货人列（超长省略，悬停看全名） */
table.tbl-pick { font-size: 13.2px; }
table.tbl-pick th, table.tbl-pick td { padding-left: 8px; padding-right: 8px; }
table.tbl-pick th.col-chk, table.tbl-pick td.col-chk { padding-left: 12px; }
table.tbl-pick td .ell { max-width: 152px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.tbl-pick td .ell.mono { font-size: 12.4px; color: #6b7c96; letter-spacing: .2px; }
table.tbl-pick thead th:nth-child(4), table.tbl-pick thead th:nth-child(5) { min-width: 152px; }
table.tbl-pick tbody td:nth-child(6) > div:first-child { white-space: nowrap; }
/* 列多时「操作」列吸附在右侧：跟踪 / 预览 / 打印始终可见，桌面和手机都不用左右拖找按钮 */
table.tbl-pick th:last-child, table.tbl-pick td:last-child {
  position: sticky; right: 0; z-index: 2; background: #fff;
  box-shadow: -10px 0 14px -10px rgba(15, 23, 42, .22);
}
table.tbl-pick thead th:last-child { background: var(--surface-2); z-index: 3; }
table.tbl-pick tbody tr:hover td:last-child { background: #f9fbff; }
table.tbl-pick tbody tr.is-sel td:last-child { background: var(--primary-soft); }

/* ===========================================================
 * 提示条操作按钮（删除后「撤销」）
 * =========================================================== */
.toast.has-act { padding-right: 8px; }
.toast-act {
  border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 12.4px; font-weight: 650; height: 24px; padding: 0 10px;
  border-radius: 7px; cursor: pointer; margin-left: 4px; transition: .15s;
}
.toast-act:hover { background: rgba(255, 255, 255, .26); }

/* 删除单条记录确认框 */
.del-one { margin: 10px 0 4px; padding: 10px 12px; border-radius: 9px; background: #f7f9fc; border: 1px solid #e6ecf5; }
.del-one-n { font-size: 14px; font-weight: 700; color: #101a2e; }
.del-one-r { margin-top: 3px; font-size: 12.6px; color: #5a6b84; word-break: break-all; }

/* ===========================================================
 * 批量导入（发货人 / 收货人）
 * =========================================================== */
.imp-tip {
  background: #f5f8ff; border: 1px solid #dbe6ff; border-radius: 9px;
  padding: 10px 12px; font-size: 12.8px; line-height: 1.85; color: #3d4d66;
}
.imp-tip b { color: #10305e; }
.imp-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; flex-wrap: wrap; }
.imp-row label.btn { cursor: pointer; margin: 0; }
.imp-file { font-size: 12.2px; color: #8794a8; }
.imp-area {
  width: 100%; min-height: 148px; resize: vertical; line-height: 1.7;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.8px;
  padding: 10px 12px; height: auto;
}
.imp-preview { margin-top: 10px; }
.imp-empty { font-size: 12.4px; color: #8794a8; padding: 10px 2px; }
.imp-sum { font-size: 12.8px; color: #3d4d66; margin-bottom: 8px; }
.imp-sum b { color: #101a2e; }
.imp-sum b.ok { color: #0f7a4a; }
.imp-sum b.bad { color: #b42318; }
.imp-tbl-wrap { max-height: 236px; overflow: auto; border: 1px solid #e7ecf4; border-radius: 9px; }
table.imp-tbl { font-size: 12.6px; }
table.imp-tbl th { position: sticky; top: 0; background: #f7f9fc; z-index: 1; font-size: 12px; padding: 8px 10px; }
table.imp-tbl td { padding: 7px 10px; }
table.imp-tbl tr.imp-dup td, table.imp-tbl tr.imp-inner td { color: #9aa6b8; }
table.imp-tbl tr.imp-bad td { background: #fff8f8; }
.imp-badge { display: inline-block; font-size: 11.6px; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }





/* ===========================================================
 * 开单表单：发货人 / 收货人 下拉框（输入联想 + ▾ 选择）
 * =========================================================== */
.pi-combo { display: flex; align-items: center; width: 100%; }
.pi-combo .pi { flex: 1 1 auto; min-width: 0; }
.pi-caret {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  color: #7d8ca3; font-size: 11px; line-height: 1; padding: 6px 7px;
  border-radius: 6px; transition: .15s;
}
.pi-caret:hover { background: #eaf1ff; color: #1c5cff; }
.pi.bad { background: #fff5f5 !important; box-shadow: inset 0 0 0 1.5px #f0a8a8 !important; border-radius: 4px; }
.ac-head {
  position: sticky; top: 0; z-index: 1; background: #f5f8ff; color: #3d4d66;
  font-size: 11.6px; padding: 7px 11px; border-bottom: 1px solid #e2eaf7;
}

/* 客户管理：双击行直接编辑 */
tr.cdb-row { cursor: pointer; }
tr.cdb-row:hover td { background: #f4f8ff; }

/* ===========================================================
 * 侧边栏二级菜单（系统设置 → 基础设置 / 打印模板）
 * =========================================================== */
.nav-item.has-sub .nav-caret { margin-left: auto; display: flex; align-items: center; opacity: .7; transition: transform .18s ease; }
.nav-item.has-sub .nav-caret svg { width: 14px; height: 14px; }
.nav-item.has-sub[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }
.nav-sub { display: none; margin: 1px 0 3px 12px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .1); }
.nav-sub.open { display: block; }
/* 桌面端：鼠标移到「系统设置」就展开子项，移开自动收起（不再点一下固定住） */
@media (hover: hover) and (min-width: 769px) {
  .nav-item.has-sub:hover + .nav-sub,
  .nav-sub:hover { display: block; animation: navsub-in .15s ease both; }
  .nav-item.has-sub:hover { background: rgba(255, 255, 255, .055); color: #e8effa; }
  .nav-item.has-sub:hover .nav-caret { transform: rotate(180deg); }
  .nav-sub { margin-top: 0; }
}
@keyframes navsub-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-sub-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 7px;
  font-size: 13px; color: #94a7c1; cursor: pointer; user-select: none; transition: background .15s, color .15s;
}
.nav-sub-item::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; flex: none; }
.nav-sub-item:hover { background: rgba(255, 255, 255, .055); color: #e8effa; }
.nav-sub-item.active { background: rgba(var(--primary-rgb), .24); color: #fff; }
.nav-sub-item.active::before { background: #7cb0ff; opacity: 1; box-shadow: 0 0 0 3px rgba(124, 176, 255, .18); }

/* 打印模板弹窗 */
.fp-modal-note { margin-right: auto; display: flex; align-items: center; gap: 5px; font-size: 12px; color: #8794a8; }
#fp-editor .fpv { border: 0; border-radius: 0; }

/* ---------------- 打印模板：托运单 / 标签 双标签页 ---------------- */
.pt-tabs { display: flex; gap: 6px; padding: 10px 16px 0; border-bottom: 1px solid var(--line-2); background: #f8fafd; }
.pt-tab {
  display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0;
  background: transparent; color: #5c6b80; font-size: 13px; cursor: pointer; position: relative; top: 1px;
}
.pt-tab svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.pt-tab:hover { color: var(--primary); }
.pt-tab.on { background: #fff; border-color: var(--line); color: var(--primary); font-weight: 650; }
.pt-body { padding: 14px 16px 16px; max-height: calc(78vh - 64px); overflow: auto; }
.pt-body .fp-host .fpv-stage { height: calc(70vh - 230px); }
.pt-print { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfcfe; }
.pt-print-h { display: flex; align-items: baseline; gap: 10px; font-size: 13px; color: #101a2e; }
.pt-print-h span { font-size: 11.5px; color: #8794a8; }
.pt-print-row { display: flex; gap: 8px; margin-top: 9px; }
.pt-print-row .input { height: 34px; flex: 1; max-width: 440px; }
.pt-print-tip { margin-top: 8px; font-size: 11.5px; color: #8794a8; line-height: 1.75; display: flex; gap: 5px; }
.pt-print-tip svg { width: 12px; height: 12px; flex: none; margin-top: 3px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.pt-print-tip b { color: #43536b; }

/* ---------------- 标签模板编辑器 ---------------- */
.lbv-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px 10px 0 0; background: #f8fafd;
  font-size: 12.5px; color: #43536b;
}
.lbv-bar select, .lbv-bar input[type="number"] { height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 12.5px; background: #fff; color: #101a2e; outline: none; }
.lbv-bar input[type="number"] { width: 66px; text-align: center; }
.lbv-bar select:focus, .lbv-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.lbv-wrap { display: flex; border: 1px solid var(--line); border-top: none; border-radius: 0 0 10px 10px; overflow: hidden; background: #fff; }
.lbv-stage { flex: 1; min-width: 0; height: 400px; background: #e9edf3; padding: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lbv-holder { position: relative; flex: none; }
.lbv-paper { position: absolute; left: 0; top: 0; transform-origin: top left; background: #fff; box-shadow: 0 8px 24px rgba(16, 26, 46, .2); }
.lbv-stage-tip { font-size: 11.5px; color: #7b8aa0; }
.lbv-side { width: 318px; flex: none; border-left: 1px solid var(--line-2); padding: 12px 14px; display: flex; flex-direction: column; max-height: 400px; overflow: hidden; }





.lbv-chip.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); }
.lbv-list { display: flex; flex-direction: column; gap: 5px; flex: 1; min-height: 70px; overflow: auto; padding-right: 2px; }
.lbv-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; cursor: pointer; }
.lbv-item.on { border-color: var(--primary); background: #f5f9ff; }
.lbv-item-n { flex: 1; min-width: 0; font-size: 12px; color: #101a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbv-item-t { font-size: 11px; color: #8794a8; }
.lbv-fs { width: 52px; height: 24px; border: 1px solid var(--line); border-radius: 5px; text-align: center; font-size: 11.5px; color: #101a2e; padding: 0 2px; }
.lbv-mini { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 12px; color: #43536b; cursor: pointer; padding: 0; line-height: 1; }
.lbv-mini.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); font-weight: 700; }
.lbv-del:hover { border-color: #f3c1bd; color: #d0342c; background: #fff6f5; }
.lbv-hint { flex: none; margin-top: 10px; font-size: 11px; color: #8794a8; line-height: 1.7; }
.lbv-note { flex: none; margin-left: auto; font-size: 11.5px; color: #8794a8; }

/* 标签纸面（屏幕预览，尺寸由毫米内联控制） */
.lbv-paper .lb, .lbp-paper .lb { background: #fff; color: #000; box-sizing: border-box; overflow: hidden; position: relative; }
.lbv-paper .lb-i, .lbp-paper .lb-i { position: absolute; line-height: 1.28; white-space: pre-wrap; word-break: break-all; color: #000; }
.lbv-paper .lb-i-k, .lbp-paper .lb-i-k { margin-right: .8mm; font-weight: 400; color: #333; }
.lbv-paper .lb-i-bar svg, .lbp-paper .lb-i-bar svg { display: block; width: 100%; height: 100%; }
.lbv-paper .lb-i-qr svg, .lbp-paper .lb-i-qr svg { display: block; width: 100%; height: 100%; }
.lbv-paper .lb-qr-ph, .lbp-paper .lb-qr-ph { display: block; font-size: 2.4mm; text-align: center; color: #777; }
.lbv-paper .lb-i[data-id] { cursor: move; outline: 1px dashed transparent; }
.lbv-paper .lb-i[data-id]:hover { outline-color: rgba(var(--primary-rgb), .45); }
.lbv-paper .lb-i[data-id].on { outline: 1.5px solid var(--primary); background: rgba(var(--primary-rgb), .07); }
.lbv-paper .lb-i.drag { opacity: .85; }

/* ---------------- 打印标签面板 ---------------- */
.lbp { display: flex; min-height: 440px; }
.lbp-stage { flex: 1; min-width: 0; background: #e9edf3; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lbp-holder { position: relative; flex: none; }
.lbp-paper { position: absolute; left: 0; top: 0; transform-origin: top left; background: #fff; box-shadow: 0 8px 24px rgba(16, 26, 46, .2); }
.lbp-stage-tip { font-size: 12px; color: #6b7a90; }
.lbp-side { width: 322px; flex: none; border-left: 1px solid var(--line-2); padding: 14px 16px; }
.lbp-row { padding: 10px 0; border-bottom: 1px dashed var(--line-2); }

.lbp-row > label { display: block; font-size: 12px; color: #8794a8; margin-bottom: 7px; }
.lbp-row .input { height: 34px; margin-top: 8px; width: 100%; }
.lbp-step { margin-top: 2px; }
.lbp-step input { border: 1px solid var(--line); border-left: 0; border-right: 0; border-radius: 0; }

.lbp-tip { display: flex; gap: 6px; font-size: 11.5px; color: #8794a8; line-height: 1.7; padding: 10px 0; border-bottom: 1px dashed var(--line-2); }
.lbp-tip svg { width: 12px; height: 12px; flex: none; margin-top: 3px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lbp-printer b { font-size: 13px; color: #101a2e; }
.lbp-none { font-size: 12.5px; color: #b6c0d0; }


/* ---------------- 标签 · 蓝牙直打（手机连便携机） ---------------- */
.lbp2 .lbp-side { max-height: calc(78vh - 96px); overflow-y: auto; }

/* 输出方式切换 */
.lbb-out { display: flex; gap: 3px; padding: 3px; background: #dbe3ee; border-radius: 9px; flex: none; }
.lbb-out button {
  border: 0; background: transparent; color: #5b6b82; font-size: 12.5px; font-weight: 600;
  padding: 6px 15px; border-radius: 7px; cursor: pointer; font-family: inherit; line-height: 1.4;
}
.lbb-out button.on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(16, 26, 46, .16); }

/* 点阵预览：直接显示打印机要打的黑白位图 */
.lbb-cv {
  display: flex; align-items: center; justify-content: center;
  padding: 9px; background: #fff; border-radius: 3px;
  box-shadow: 0 8px 24px rgba(16, 26, 46, .2); max-width: 100%;
}
.lbb-cv-img { display: block; max-width: 100%; max-height: 46vh; image-rendering: pixelated; }
.lbb-cv-none { font-size: 12px; color: #b6c0d0; padding: 24px 12px; text-align: center; }

/* 连接卡片 */
.lbb-conn {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe;
}
.lbb-dot { width: 9px; height: 9px; border-radius: 50%; background: #c9d3e2; flex: none; box-shadow: 0 0 0 3px rgba(201, 211, 226, .35); }
.lbb-dot.on { background: #17a34a; box-shadow: 0 0 0 3px rgba(23, 163, 74, .16); }
.lbb-conn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lbb-conn-t b { font-size: 12.5px; color: #101a2e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbb-conn-t span { font-size: 11px; color: #8794a8; line-height: 1.5; }









.lbb-tip { border-bottom: none; padding-bottom: 0; }
.lbb-tip b { color: #43536b; }

/* 窄纸条码密度提醒 */
.lbb-warn {
  display: flex; gap: 6px; margin-top: 11px; padding: 8px 10px;
  border: 1px solid #ffe0a8; background: #fffaef; border-radius: 8px;
  font-size: 11.5px; color: #92600b; line-height: 1.65;
}
.lbb-warn svg { width: 12px; height: 12px; flex: none; margin-top: 3px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lbb-warn[hidden] { display: none !important; }

/* 鸿蒙浏览器等拿不到蓝牙接口时的引导卡片 */
.lbb-hms {
  margin-top: 11px; padding: 12px 13px;
  border: 1px solid #cfdcf5; background: #f5f9ff; border-radius: 9px;
}
.lbb-hms b { display: block; font-size: 12.5px; color: #101a2e; margin-bottom: 5px; }
.lbb-hms p { margin: 0 0 10px; font-size: 11.5px; color: #5b6b84; line-height: 1.7; }
.lbb-hms .btn { display: inline-flex; align-items: center; gap: 5px; }
.lbb-hms[hidden] { display: none !important; }

/* 鸿蒙扫描出来的设备列表 */
.lbd-list { display: flex; flex-direction: column; gap: 7px; max-height: 56vh; overflow: auto; }
.lbd-item {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  width: 100%; text-align: left; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
  font: inherit; transition: border-color .15s, background .15s;
}
.lbd-item:hover, .lbd-item:active { border-color: #9dbcf7; background: #f6f9ff; }
.lbd-item b { font-size: 13.5px; color: #101a2e; }
.lbd-item span { font-size: 11px; color: #8794a8; word-break: break-all; }

/* 手机上标题与副标题都压一行，别让弹窗头变两行高 */
.modal:has(.lbp2) .modal-head h3 { flex: none; white-space: nowrap; }
.modal:has(.lbp2) .modal-head .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 编辑器里的「蓝牙直打」入口 */
.lbv-ble { color: var(--primary-dark) !important; border-color: var(--primary-line) !important; background: var(--primary-soft) !important; }
.lbv-ble svg { stroke: currentColor; }
.lbv-bar .fpv-saved, .lbv-ble { display: inline-flex; align-items: center; gap: 4px; }

/* hidden 属性要压得住 .btn / flex 的 display */
.lbb-blebox[hidden], .lbb-cv[hidden], .lbp-holder[hidden], [data-printrow][hidden], #lb-test[hidden] { display: none !important; }
/* 鸿蒙浏览器没有蓝牙：连接卡片与参数区要真正收起来（flex/grid 会盖掉 hidden） */
.lbb-conn[hidden], .lbb-set[hidden], .lbb-tip[hidden] { display: none !important; }

@media (max-width: 760px) {
  .lbp2 .lbp-side { max-height: none; overflow: visible; }
  .lbb-out button { padding: 8px 17px; font-size: 13px; }
  .lbb-cv-img { max-height: 40vh; }
  .lbb-conn { padding: 12px 11px; }
  .lbb-conn-t b { font-size: 13.5px; }



}

@media (max-width: 760px) {
  .lbv-wrap { flex-direction: column; }
  .lbv-stage { height: 320px; width: 100%; }
  .lbv-side { width: auto; border-left: none; border-top: 1px solid var(--line-2); max-height: none; overflow: visible; }
  .lbp { flex-direction: column; }
  .lbp-stage { min-height: 300px; }
  .lbp-side { width: auto; border-left: none; border-top: 1px solid var(--line-2); }
  .pt-tabs { padding: 8px 10px 0; }
  .pt-tab { padding: 0 10px; font-size: 12.5px; }
}


/* ===========================================================
 * 托运单纸面版式 1:1（开单 / 预览与纸质单据一致，含品牌水印与业务专用章）
 * =========================================================== */
.waybill-modal .sheet.xp {
  position: relative; border: 0; border-radius: 0; padding: 20px 26px 14px; background: #fff;
  font-family: "SimSun", "宋体", "Songti SC", serif; color: #111; overflow: hidden;
}
.xp-wm { position: absolute; left: 50%; top: 47%; width: 660px; max-width: 76%; transform: translate(-50%, -50%); opacity: .13; pointer-events: none; z-index: 0; }
.xp-stamp { position: absolute; right: 260px; bottom: 38px; width: 176px; opacity: .7; pointer-events: none; z-index: 1; }
.stamp-img { position: absolute; pointer-events: none; z-index: 1; }
.xp-head { position: relative; z-index: 2; display: flex; align-items: center; }
.xp-logo { width: 248px; text-align: center; flex: none; }
.xp-logo-img { display: block; margin: 0 auto; height: 65px; }
.xp-logo .x {
  display: block; font-family: Arial, "Helvetica Neue", sans-serif; font-size: 47px; font-weight: 900;
  font-style: italic; color: #1e5bd6; letter-spacing: -1px; border-bottom: 4px solid #e0141c; padding-bottom: 2px;
}
.xp-logo i { display: block; font-style: normal; font-size: 13px; color: #e0141c; font-weight: 700; letter-spacing: 7px; margin-top: 4px; text-indent: 7px; }
.xp-title {
  flex: 1; text-align: center; font-size: 42px; font-weight: 800; color: #d0131b; letter-spacing: 3px;
  font-family: "STZhongsong", "SimHei", "Microsoft YaHei", serif; white-space: nowrap;
}
.xp-no { flex: none; width: 252px; text-align: right; font-family: "SimHei", "Microsoft YaHei"; color: #d0131b; font-weight: 700; font-size: 22px; }
.xp-no input {
  width: 168px; border: 0; outline: none; background: transparent; color: #d0131b; font-weight: 700;
  font-size: 21px; font-family: "SimSun", "宋体", serif; letter-spacing: 1px; text-align: left; padding: 0 2px; height: 30px;
}
.xp-no input::placeholder { color: #f3b6b3; font-weight: 400; font-size: 14px; }
.xp-no .btn-link { font-size: 13px; margin-left: 4px; color: var(--primary); vertical-align: 6px; }
.xp-meta {
  position: relative; z-index: 2; display: flex; align-items: baseline; gap: 20px; margin: 14px 2px 10px;
  padding-left: 14px;
  font-family: "SimHei", "Microsoft YaHei"; font-size: 21px; font-weight: 700; color: #111; flex-wrap: wrap;
}
.xp-meta > span:nth-of-type(2) { margin-left: 14px; }
.xp-meta input {
  border: 0; outline: none; background: transparent; font-family: "SimSun", "宋体", serif;
  font-size: 20px; font-weight: 700; text-align: center; width: 92px; color: #173a63;
}
/* 始发站 / 到站要装得下「乌鲁木齐」「呼和浩特」这类四五个字的站名 */
.xp-meta input#f-from { width: 116px; }
.xp-meta input#f-to { width: 136px; }
.xp-meta input:focus { background: #fff8e1; }
.xp-meta input[type="date"] { width: 168px; font-size: 19px; }
.xp-meta .r { margin-left: auto; display: flex; align-items: baseline; gap: 12px; }
table.xp-t { position: relative; z-index: 2; width: 100%; border-collapse: collapse; table-layout: fixed; }
table.xp-t td, table.xp-t th { border: 2px solid #111; padding: 0; vertical-align: middle; word-break: break-all; background: transparent; }
table.xp-t th {
  font-family: "SimHei", "Microsoft YaHei"; font-weight: 700; font-size: 18.5px; text-align: center;
  padding: 9px 2px; background: transparent;
}
table.xp-t td.lab {
  font-family: "SimHei", "Microsoft YaHei"; font-weight: 700; font-size: 19.5px; text-align: center;
  padding: 0 4px; background: transparent; white-space: nowrap;
}
.xp .pi {
  padding: 11px 6px; font-size: 19px; font-family: "SimSun", "宋体", serif; color: #111;
  text-align: center; background: transparent; font-weight: 700; color: #173a63;
}
.xp .pi:focus { background: #fff8e1; }
.xp .pi.ta-l { text-align: left; padding-left: 12px; font-size: 18px; }
.xp .pi.rm { text-align: left; padding-left: 12px; font-weight: 700; font-size: 18px; letter-spacing: .5px; color: #173a63; }
.xp .pi.bad { box-shadow: inset 0 -2px 0 #dc2626; }
.xp .pi::placeholder { color: #c8cfd9; font-size: 14px; font-weight: 400; }
.xp select.pi {
  appearance: none; -webkit-appearance: none; text-align: center; text-align-last: center;
  font-family: "SimSun", "宋体", serif; font-size: 19px; color: #111; padding: 11px 10px; cursor: pointer; width: 100%;
}
.xp .pi-combo .pi { padding-right: 20px; font-size: 18px; }
.xp .pi-caret {
  background: transparent; border: 0; color: #9aa7b8; font-size: 14px; width: 18px; flex: none;
  margin-left: -18px; cursor: pointer; padding: 0; position: relative; z-index: 3;
}
.xp .pi-caret:hover { background: transparent; color: #1c5cff; }
table.xp-t td.sumcell { text-align: center; font-weight: 700; font-size: 23px; font-family: "SimHei", "Microsoft YaHei"; color: #111; padding: 4px; }
table.xp-t tr.xp-blank td { height: 42px; }
table.xp-t td.dx-cell { font-size: 19.5px; padding: 11px 14px; font-family: "SimHei", "Microsoft YaHei"; font-weight: 700; white-space: nowrap; }
table.xp-t td.dx-cell b { font-family: "SimSun", "宋体", serif; color: #111; font-weight: 700; letter-spacing: 1px; }
table.xp-t td.lab.vlabel { writing-mode: vertical-rl; letter-spacing: 8px; padding: 6px 2px; font-size: 18px; }
table.xp-t td.clause { font-size: 13px; line-height: 1.32; padding: 4px 14px; text-align: justify; font-family: "SimSun", "宋体", serif; }
/* 特约事项右侧：扫码查跟踪二维码（宽度与打印稿的 22mm 视觉比例一致） */
table.xp-t td.xp-qc { padding: 4px 6px; text-align: center; vertical-align: middle; }
table.xp-t td.xp-qc .xp-qrsvg { display: block; width: 120px; height: 120px; margin: 0 auto; }
table.xp-t td.xp-qc .xp-qc-t {
  font-family: "SimHei", "Microsoft YaHei"; font-size: 10.5px; line-height: 1.2;
  letter-spacing: .5px; color: #111; margin-top: 3px; white-space: nowrap;
}
table.xp-t td.xp-qc .xp-qc-ph { font-size: 11px; line-height: 1.4; color: #98a4b5; }
table.xp-t tr.xp-sign td { height: 54px; }
.xp-foot {
  position: relative; z-index: 2; display: flex; align-items: baseline; margin-top: 10px;
  font-family: "SimHei", "Microsoft YaHei"; font-weight: 700; font-size: 20px; color: #111;
}
.xp-foot .sp { flex: 1; text-align: center; }
.xp-foot > span:last-child { padding-right: 1em; }
.waybill-modal .sheet-hint { margin-top: 12px; font-size: 12.5px; }

/* ---------- 企业 Logo 上传（系统设置 → 企业信息） ---------- */
.logo-up-row {
  display: flex; gap: 14px; align-items: flex-start; grid-column: 1 / -1;
  padding: 12px; border: 1px dashed #c9d5e3; border-radius: 10px; background: #f8fafc;
  margin-bottom: 14px;
}
.logo-up-box {
  width: 84px; height: 84px; flex: none; border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid #e3e9f2; display: grid; place-items: center;
}
.logo-up-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.logo-up-empty { font-size: 11px; color: #98a6ba; }
.logo-up-t { font-size: 13px; font-weight: 650; color: #2a3547; }
.logo-up-s { font-size: 12px; color: #8794a8; margin-top: 3px; line-height: 1.55; }

/* 品牌区（登录页 + 系统左上角）：上传 Logo 后以白底圆角块承载图片 */
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }
.brand-logo.has-img { background: #fff; box-shadow: 0 6px 16px rgba(15, 23, 42, .22); }

.imp-drop:hover, .imp-drop.over { border-color: var(--primary-lit); background: var(--primary-soft); }




.imp-tbl th { position: sticky; top: 0; background: #f4f7fb; z-index: 1; }
.imp-tbl .imp-cell { min-width: 90px; padding: 4px 8px; height: 30px; font-size: 12.5px; }
.imp-tbl tr.imp-bad { background: #fdf1f0; }
.imp-tbl tr.imp-ok { background: #fff; }
.imp-sum { margin-top: 10px; font-size: 12.5px; color: #55627a; }


/* ===========================================================
 * 响应式布局：大屏自适应 / 平板 / 手机
 * =========================================================== */
.nav-toggle { display: none; }
.nav-mask { display: none; }

/* 笔记本（≤1280）：收窄外边距，让内容区更宽 */
@media (max-width: 1280px) {
  .content { padding: 18px 18px 40px; }
  .topbar { padding: 0 18px; gap: 12px; }
}

/* 平板（≤980）：图标栏模式下的内容适配 */
@media (max-width: 980px) {
  .content { padding: 14px 14px 40px; }
  .topbar-search input { width: 190px; }
  .topbar-search input:focus { width: 210px; }
  .modal.xl { width: calc(100vw - 28px); }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* 手机 / 窄窗口（≤768）：侧边栏改抽屉，弹窗全屏，表格横向滚动 */
@media (max-width: 768px) {
  .sidebar {
    width: 268px; flex: 0 0 268px; transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 10px 0 40px rgba(3, 8, 20, .38); z-index: 60;
  }
  body.nav-open .sidebar { transform: none; }
  /* 抽屉内恢复完整文字（覆盖 980 图标栏的隐藏规则） */
  .sidebar .brand-text, .sidebar-org, .sidebar-foot, .nav-group-title, .nav-item span { display: block; }
  .nav-item { justify-content: flex-start; }
  .sidebar-head { padding: 18px 16px 14px; }
  .main { margin-left: 0; }
  .nav-toggle { display: grid; }
  .nav-mask {
    display: block; position: fixed; inset: 0; z-index: 55; background: rgba(9, 15, 28, .48);
    opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  body.nav-open .nav-mask { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .topbar { height: 56px; padding: 0 12px; gap: 8px; }
  .topbar-search { display: none; }
  .page-title h1 { font-size: 15px; }
  .page-title p { display: none; }
  .topbar-icon { width: 32px; height: 32px; }
  .user-chip { padding-left: 8px; gap: 7px; }
  .user-chip b { font-size: 12px; }
  .user-chip span { display: none; }
  .avatar { width: 30px; height: 30px; font-size: 12px; }

  .content { padding: 12px 12px 64px; }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 13px; }
  .kpi .kpi-val { font-size: 20px; }
  .g-2, .g-3, .g-2-1, .g-1-2, .form-grid, .form-grid.c3, .dispatch-grid { grid-template-columns: 1fr; }
  /* 财务统计四张卡手机上两列排布，省出首屏高度 */
  .mini-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mini { padding: 11px 12px; }
  .mini .v { font-size: 17px; }
  .card-head { flex-wrap: wrap; padding: 13px 14px; }
  .card-head .right { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .card-body { padding: 13px 14px; }
  .card-head .right .btn, .toolbar .btn { flex: 1 1 auto; justify-content: center; }

  table.tbl { min-width: 780px; }
  /* 财务统计列多：手机上横向滚动，避免客户名 / 金额被压成竖排 */
  table.fin-tbl { min-width: 1000px; }
  table.fin-tbl td, table.fin-tbl th { white-space: nowrap; }
  table.fin-wide { min-width: 1040px; }
  /* 手机上先看金额：隐藏次要列（件数重量/付款送货/司机/开单时间），点运单号可看完整信息
     按列标识隐藏，拖过列顺序也不会错位 */
  table.fin-wide [data-col="qty"], table.fin-wide [data-col="pay"], table.fin-wide [data-col="delivery"],
  table.fin-wide [data-col="created"] { display: none; }
  table.fin-wide th:last-child, table.fin-wide td:last-child { min-width: 62px; }
  table.fin-wide th.col-chk, table.fin-wide td.col-chk { min-width: 34px; width: 34px; padding-left: 10px; }
  .fin-colbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
  .fin-colbar.is-empty { display: none; }
  .fin-colbar-hint { display: none; }
  .fin-colbar .btn-link { font-size: 11.5px; }
  .fin-fpanel { width: 226px; }
  .fin-selbar { margin: 10px 12px 0; gap: 8px; }
  .fin-selbar .btn { flex: 0 0 auto; }
  .bc-head, .bc-row { grid-template-columns: 90px minmax(90px, 1fr) 104px 82px; gap: 6px; }
  .bc-head span:nth-child(3), .bc-row .bc-amt { display: none; }
  .bp-head, .bp-row { grid-template-columns: 88px minmax(88px, 1fr) 96px 84px; gap: 6px; }
  .bp-head span:nth-child(3), .bp-row .bp-total { display: none; }
  .bp-top { align-items: stretch; }
  .bp-f:nth-of-type(1) .input, .bp-f:nth-of-type(2) .input { width: 100%; }
  .fin-date-wrap .input { width: 128px; }
  .tbl-wrap { -webkit-overflow-scrolling: touch; }

  /* 弹窗全屏化 */
  .modal-mask { padding: 0; align-items: stretch; }
  .modal, .modal.xl, .modal.wide, .modal.narrow { width: 100%; max-width: 100%; min-height: 100%; border-radius: 0; }
  .modal-body, .modal.xl .modal-body { max-height: none; }
  .modal-head { position: sticky; top: 0; background: #fff; z-index: 2; }
  .modal-foot { position: sticky; bottom: 0; padding: 10px 12px; gap: 6px; }
  .modal-foot .btn { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 6px; font-size: 12.3px; gap: 4px; }
  .modal-foot .btn svg { display: none; }
  .modal-foot .fp-modal-note { display: none; }


  /* 托运单纸面：横向滚动查看，保持可读字号 */
  .waybill-modal .modal-body { overflow-x: auto; }
  .waybill-modal .sheet.xp { min-width: 920px; }
  .pv-stage { height: calc(100vh - 200px); }

  .login-panel { padding: 0 22px; }
  .login-panel h2 { font-size: 20px; }

  /* 工作台欢迎横幅：手机上下堆叠 */
  .dash-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 18px; }
  .dash-hero > div:first-child { width: 100%; }
  .dash-hero .quick { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .dash-hero .quick .btn { flex: 1; justify-content: center; }
}

/* ================= 移动端开单卡片表单（.sheet.wb-m） ================= */
.sheet.wb-m { background: #f2f5fa; border: 0; border-radius: 12px; padding: 2px; box-shadow: none; }
.wb-m .wm-sec { background: #fff; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px 14px; margin-bottom: 10px; }
.wb-m .wm-t { font-size: 13px; font-weight: 700; color: #173a63; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.wb-m .wm-t::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--primary); flex: none; }
.wb-m label { display: block; font-size: 12px; color: #8794a8; margin: 0; min-width: 0; }
.wb-m .wm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wb-m .wm-grid.wm-3 { grid-template-columns: 1fr 1fr; }
.wb-m .wm-grid.wm-3 > label:nth-child(3) { grid-column: 1 / -1; }
.wb-m .wm-grid.wm-4 { grid-template-columns: repeat(4, 1fr); }
.wb-m input, .wb-m select {
  display: block; width: 100%; box-sizing: border-box; height: 42px; margin-top: 5px;
  border: 1px solid var(--line); border-radius: 9px; padding: 0 10px;
  font-size: 16px; color: #173a63; font-weight: 600; background: #fff; outline: none;
}
.wb-m select { cursor: pointer; }
.wb-m input::placeholder { color: #b3bdcc; font-weight: 400; }
.wb-m input:focus, .wb-m select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.wb-m .pi-combo.wm-combo { display: flex; align-items: center; }
.wb-m .wm-combo input { flex: 1 1 auto; min-width: 0; margin-top: 0; }
.wb-m .pi-caret { flex: 0 0 auto; border: 1px solid var(--line); background: #f6f9ff; color: #4d607e; font-size: 13px; line-height: 1; width: 42px; height: 42px; border-radius: 9px; margin-left: 8px; cursor: pointer; }
.wb-m .pi-caret:active { background: #eaf1ff; }
.wb-m .wm-no { display: flex; align-items: center; gap: 6px; }
.wb-m .wm-no input { flex: 1 1 auto; min-width: 0; margin-top: 5px; }
.wb-m .wm-no .btn-link { flex: none; font-size: 13px; padding: 4px 6px; margin-top: 5px; }
.wb-m .wm-sum { display: flex; align-items: baseline; justify-content: space-between; background: #fffbe8; border: 1px solid #f3e3ab; border-radius: 9px; padding: 10px 14px; margin-top: 12px; }
.wb-m .wm-sum span { font-size: 13px; color: #8a7a35; font-weight: 600; }
.wb-m .wm-sum b { font-size: 22px; color: #d0131b; font-family: "SimHei", "Microsoft YaHei"; }
.wb-m .wm-dx { font-size: 12.5px; color: #8794a8; margin-top: 8px; }
.wb-m .wm-dx b { color: #173a63; font-weight: 700; }
.wb-m .wm-remark { height: 56px; }
.wb-m .wm-clause { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-top: 2px; font-size: 12.5px; color: #6b7a92; }
.wb-m .wm-clause summary { cursor: pointer; font-weight: 600; color: #43536b; }
.wb-m .wm-clause > div { margin-top: 8px; line-height: 1.9; }
.wb-m .sheet-hint { padding: 2px 6px 6px; }
/* 联想下拉在卡片表单中相对弹窗定位，宽度撑满 */
.wb-m ~ .ac-drop, .waybill-modal .ac-drop { max-width: calc(100vw - 32px); }

/* ================= 预览：1:1 模式与手机适配 ================= */
/* start 对齐：居中会让溢出的纸面左半无法滚动到（scrollLeft 最小 0） */
.pv-stage.pv-1 { display: grid; place-items: start start; overflow: auto; padding: 16px; }
.pv-stage.pv-1 .pv-paper { margin: 0; }
.pv-zoombtn { flex: none; height: 30px; padding: 0 14px; font-size: 12.5px; margin-left: auto; }
.pv-bar { position: relative; }
/* 手机上预览条：隐藏位置微调（桌面功能），按钮收窄 */
@media (max-width: 768px) {
  .pv-off { display: none; }
  .pv-bar { padding: 8px 12px; gap: 8px; }
  .pv-tip { font-size: 11px; }
  .pv-stage { height: calc(100vh - 168px); }
  .pv-stage.pv-1 { padding: 10px; }
  /* 卡片表单不超宽无需横滚；纸面（横屏）保留横向滚动 */
  .waybill-modal .modal-body { padding: 12px 12px 8px; overflow-x: hidden; }
  .waybill-modal .modal-body:has(.sheet.xp) { overflow-x: auto; }
  .waybill-modal .sheet.xp { min-width: 920px; }
}

/* ============ 手机弹窗：头/脚固定，内容区独立滚动（修长表单滚不动） ============ */
@media (max-width: 768px) {
  .modal-mask { padding: 0 !important; align-items: stretch; overflow: hidden; }
  .modal, .modal.xl, .modal.wide, .modal.narrow {
    display: flex; flex-direction: column;
    width: 100%; max-width: 100%; height: 100%; min-height: 0; max-height: none;
    border-radius: 0; overflow: hidden;
  }
  .modal-head { position: relative; top: auto; flex: 0 0 auto; }
  .modal-foot {
    position: relative; bottom: auto; flex: 0 0 auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .modal-body, .modal.xl .modal-body, .waybill-modal .modal-body {
    flex: 1 1 auto; min-height: 0; max-height: none;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .waybill-modal .modal-body:has(.sheet.xp) { overflow-x: auto; }
  /* 纸面模式底部提示不要紧贴按钮 */
  .waybill-modal .sheet-hint { padding-bottom: 6px; }
}

/* ============ 手机横屏查看：顶栏旋转按钮仅手机/窄高屏显示 ============ */
#btn-rotate { display: none; }
@media (max-width: 768px), (max-height: 520px) {
  #btn-rotate { display: grid; }
}
#btn-rotate:active { background: #eaf1ff; }
.pv-bar #pv-rot { margin-left: auto; }
.pv-bar #pv-rot + #pv-zoom { margin-left: 8px; }
/* 全屏横屏时页面铺满 */
:fullscreen, :-webkit-full-screen { width: 100%; height: 100%; }

/* ============ 软件横屏（系统锁定竖屏时整体旋转 90°） ============ */
html.rot-ls { height: 100%; overflow: hidden; }
html.rot-ls #app-layer {
  position: fixed; top: 0; left: 0;
  width: var(--rl-w, 100vh); height: var(--rl-h, 100vw);
  transform: rotate(90deg) translateY(-100%);
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--bg);
}
/* 应用铺满旋转层，内容区内部滚动（顶栏常驻） */
html.rot-ls .app { height: 100%; min-height: 0; overflow: hidden; }
html.rot-ls .main { height: 100%; min-height: 0; display: flex; flex-direction: column; }
html.rot-ls .content { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
html.rot-ls .sidebar { height: 100%; }
/* 弹窗高度按逻辑高度（旋转后的可视高）计算 */
html.rot-ls .pv-stage { height: calc(var(--rl-h, 100vw) - 168px); }
html.rot-ls .modal, html.rot-ls .modal.xl, html.rot-ls .modal.wide { max-height: 100%; }

/* 运单号可点击预览 */
.no-link { cursor: pointer; color: var(--primary-dark); }
.no-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* 预览纸张：B5 横版 220×170mm，图片直出，支持双指缩放 / 长按保存 */
.pv-img {
  display: block; width: 100%; height: auto; background: #fff;
  -webkit-user-drag: none; -webkit-touch-callout: default; user-select: auto;
  image-rendering: auto;
}
.pv-paper { line-height: 0; }
.pv-stage { touch-action: pan-x pan-y; overscroll-behavior: contain; }
.pv-stage.pv-1 { padding: 12px; }

/* 全屏查看：按手机屏幕实际可用尺寸整屏看图（去掉工具栏与底部按钮） */
.modal-mask:fullscreen { padding: 0 !important; overflow: hidden; background: #0b1020; display: block; }
.modal-mask:-webkit-full-screen { padding: 0 !important; overflow: hidden; background: #0b1020; display: block; }
.modal-mask:fullscreen .modal,
.modal-mask:-webkit-full-screen .modal {
  width: 100% !important; max-width: none !important; height: 100% !important; min-height: 0;
  margin: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column;
}
.modal-mask:fullscreen .pv-bar,
.modal-mask:-webkit-full-screen .pv-bar { display: none; }
.modal-mask:fullscreen .modal-head,
.modal-mask:-webkit-full-screen .modal-head { display: none; }
.modal-mask:fullscreen .modal-foot,
.modal-mask:-webkit-full-screen .modal-foot { display: none; }
.modal-mask:fullscreen .modal-body,
.modal-mask:-webkit-full-screen .modal-body {
  flex: 1 1 auto; min-height: 0; max-height: none; padding: 0 !important; overflow: hidden; background: #0b1020;
}
.modal-mask:fullscreen .pv-stage,
.modal-mask:-webkit-full-screen .pv-stage {
  height: 100%; width: 100%; padding: 4px; background: #0b1020; place-items: center;
}
.modal-mask:fullscreen .pv-paper,
.modal-mask:-webkit-full-screen .pv-paper { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.modal-mask:fullscreen .pv-stage.pv-1,
.modal-mask:-webkit-full-screen .pv-stage.pv-1 { padding: 4px; }

/* 横屏手机（宽>768 但高度小）也隐藏位置微调 */
@media (max-height: 520px) {
  .pv-off { display: none; }
  .pv-tip { font-size: 11px; }
}
/* 横屏手机：弹窗宽度不超过屏幕 */
@media (max-height: 520px) {
  .modal, .modal.xl, .modal.wide, .modal.narrow { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; }
}

/* 保存图片浮层：全屏展示生成的图片，长按即可存入相册（微信等内置浏览器的兜底方案） */
.save-ov {
  position: fixed; inset: 0; z-index: 500; background: rgba(9, 15, 28, .92);
  display: flex; flex-direction: column; padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  animation: fadeIn .18s ease;
}
.save-ov-head { display: flex; align-items: center; justify-content: space-between; color: #fff; }
.save-ov-head b { font-size: 15px; }
.save-ov-tip {
  margin-top: 8px; color: #ffd76a; font-size: 12.5px; line-height: 1.7;
  background: rgba(255, 215, 106, .1); border: 1px solid rgba(255, 215, 106, .35);
  border-radius: 8px; padding: 8px 10px;
}
.save-ov-body { flex: 1; min-height: 0; margin-top: 10px; display: grid; place-items: center; overflow: hidden; }
.save-ov-body img {
  max-width: 100%; max-height: 100%; background: #fff; border-radius: 4px;
  -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; -webkit-user-drag: none;
}

.save-ov-actions { margin-top: 10px; display: flex; justify-content: center; }
.save-ov-actions .btn-big { min-width: 62%; height: 42px; font-size: 14.5px; }

/* ===========================================================
 * PDF 导出：先预览，再改名称 / 选文件夹保存
 * =========================================================== */
.pdf-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  border-bottom: 1px solid var(--line-2); background: #f8fafd; flex-wrap: wrap;
}
.pdf-bar b { font-size: 13px; color: #334155; white-space: nowrap; }
.pdf-bar input {
  height: 32px; width: 260px; padding: 0 10px; font-size: 13.5px; font-weight: 600;
  border: 1px solid #cfd8e5; border-radius: 8px; background: #fff; color: #101a2e; outline: none;
}
.pdf-bar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.pdf-tip { font-size: 12px; color: #8b98ab; }
.pdf-stage { height: calc(72vh - 96px); min-height: 360px; background: #525659; }
.pdf-stage iframe { width: 100%; height: 100%; border: 0; display: block; background: #525659; }

@media (max-width: 768px) {
  .pdf-bar { padding: 8px 12px; gap: 8px; }
  .pdf-bar input { width: 100%; }
  .pdf-tip { display: none; }
  .pdf-stage { height: calc(100vh - 210px); min-height: 280px; }
}

/* ===========================================================
 * 视觉优化 v2：字体 / 表格密排 / 列表列宽 / 移动端卡片
 * =========================================================== */
:root {
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "MiSans",
          "Microsoft YaHei UI", "Microsoft YaHei", "Hiragino Sans GB",
          system-ui, -apple-system, "Segoe UI", sans-serif;
  --muted: #7c8a9e;
}

/* 金额 / 数量 / 单号：数字等宽，列与列之间更整齐 */
.num, .mono, .kpi-val, .mini .v, .fin-tbl td.num, .mono input { font-variant-numeric: tabular-nums; }

/* 表头：底色更浅、字重更稳，单元格留出呼吸感 */
table.tbl { font-size: 13px; }
table.tbl th {
  font-size: 12px; color: #6b7a90; background: #f6f9fd;
  letter-spacing: .35px; font-weight: 600;
}
table.tbl td { padding: 12px 14px; }
.cell-sub { font-size: 11.5px; color: #8b98ab; }

/* ---- 运单列表：桌面端列宽（修「货物」被挤成竖排、时间被截断） ---- */
@media (min-width: 761px) {
  .tbl-pick td:nth-child(2),
  .tbl-pick td:nth-child(9),
  .tbl-pick td:nth-child(13),
  .tbl-pick td:nth-child(14) { white-space: nowrap; }
  .tbl-pick td:nth-child(4),
  .tbl-pick td:nth-child(5) { min-width: 116px; }
  .tbl-pick td:nth-child(6) { min-width: 104px; }
  .tbl-pick td:nth-child(7) { min-width: 82px; white-space: nowrap; }
  .tbl-pick td:nth-child(8) { min-width: 92px; }
  .tbl-pick td:nth-child(8), .tbl-pick td:nth-child(8) .cell-sub, .tbl-pick td:nth-child(6) .cell-sub { white-space: nowrap; }
  /* 付款方式 / 送货方式 在列表里信息量低，交给详情看，腾出列宽 */
  .tbl-pick th:nth-child(10), .tbl-pick td:nth-child(10),
  .tbl-pick th:nth-child(11), .tbl-pick td:nth-child(11) { display: none; }
}
/* 窄一点的桌面再收一列「结算」，避免横向滚动 */
@media (min-width: 761px) and (max-width: 1180px) {
  .tbl-pick th:nth-child(12), .tbl-pick td:nth-child(12) { display: none; }
}

/* ---- 手机：运单列表改成卡片（每单一块，信息不再被裁） ---- */
@media (max-width: 760px) {
  .tbl.tbl-pick { min-width: 0; }
  .tbl-pick thead { display: none; }
  .tbl-pick tbody { display: block; }
  .tbl-pick tbody tr {
    display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, auto);
    column-gap: 10px; row-gap: 3px; align-items: center;
    padding: 12px 13px; border-bottom: 1px solid var(--line-2);
  }
  .tbl-pick tbody tr:hover { background: transparent; }
  .tbl-pick tbody tr.is-sel { background: #f4f8ff; }
  table.tbl.tbl-pick td { display: block; padding: 0; border: 0; min-width: 0; overflow: hidden; }
  table.tbl.tbl-pick td.col-chk { width: 22px; min-width: 22px; padding: 0; }
  table.tbl.tbl-pick td .ell { max-width: 100%; }
  table.tbl.tbl-pick td:nth-child(2) { text-align: left; }
  table.tbl.tbl-pick th:last-child, table.tbl.tbl-pick td:last-child { position: static; box-shadow: none; }
  .tbl-pick td:nth-child(1) { grid-area: 1 / 1; }
  .tbl-pick td:nth-child(2) { grid-area: 1 / 2; }
  .tbl-pick td:nth-child(3) { grid-area: 1 / 3; justify-self: end; }
  .tbl-pick td:nth-child(6) { grid-area: 2 / 1 / 3 / 3; font-weight: 600; }
  .tbl-pick td:nth-child(7) { grid-area: 2 / 3; justify-self: end; font-size: 12px; color: #6b7a90; white-space: nowrap; }
  .tbl-pick td:nth-child(4) { grid-area: 3 / 1 / 4 / 3; }
  .tbl-pick td:nth-child(9) { grid-area: 3 / 3; justify-self: end; font-size: 14px; }
  .tbl-pick td:nth-child(5) { grid-area: 4 / 1 / 5 / 3; }
  .tbl-pick td:nth-child(8) { grid-area: 4 / 3; justify-self: end; font-size: 12px; color: #6b7a90; white-space: nowrap; }
  .tbl-pick td:nth-child(13) { grid-area: 5 / 1 / 6 / 3; font-size: 11.5px; }
  .tbl-pick td:nth-child(14) { grid-area: 5 / 3 / 6 / 4; justify-self: end; }
  table.tbl.tbl-pick td:nth-child(10),
  table.tbl.tbl-pick td:nth-child(11),
  table.tbl.tbl-pick td:nth-child(12) { display: none; }
  .tbl-pick td:nth-child(2) .cell-sub,
  .tbl-pick td:nth-child(4) .cell-sub,
  .tbl-pick td:nth-child(5) .cell-sub { display: inline; margin-left: 6px; }
  .tbl-pick td:nth-child(7) .cell-sub { display: none; }
  .tbl-pick .row-actions { gap: 14px; }
  .tbl-pick .row-actions .btn-link { padding: 5px 0; font-size: 13px; }
  table.tbl.tbl-pick tbody tr > td[colspan] { grid-column: 1 / -1; display: block; padding: 10px 0; }

  /* 财务：筛选控件在手机上排整齐，表格改为可横向滑动 */
  .fin-tbl, .fin-tbl.fin-wide { min-width: 660px; }
  .fin-date-wrap { width: 100%; display: flex; align-items: center; gap: 6px; }
  .fin-date-wrap .input { flex: 1 1 0; min-width: 0; width: auto; }
  #fin-q { width: 100% !important; }
  #fin-cust { flex: 1 1 100%; max-width: none !important; }
  #fin-range, #fin-status { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .fin-colbar { font-size: 11px; }

  /* 受保护模块占位：手机上别太占高 */
  .lock-page { padding: 42px 20px 46px; }
  .lock-page-s { font-size: 12.5px; line-height: 1.7; }
}

/* 财务表格：桌面收紧内边距让更多列放下；手机提示可横滑 */
@media (min-width: 761px) and (max-width: 1700px) {
  .fin-tbl [data-col="delivery"], .fin-tbl [data-col="pay"], .fin-tbl [data-col="settle"], .fin-tbl [data-col="created"] { display: none; }
}
.tbl-scroll-hint { display: none; }
@media (min-width: 761px) {
  .fin-tbl th, .fin-tbl td { padding-left: 8px; padding-right: 8px; }
  .fin-tbl { min-width: 1130px; }
  .fin-tbl td, .fin-tbl th { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .fin-tbl td[data-col="sender"], .fin-tbl th[data-col="sender"],
  .fin-tbl td[data-col="receiver"], .fin-tbl th[data-col="receiver"] { max-width: 148px; }
  .fin-tbl td[data-col="route"], .fin-tbl th[data-col="route"] { max-width: 110px; }
  .fin-tbl td[data-col="cargo"], .fin-tbl th[data-col="cargo"] { max-width: 92px; }
  .fin-tbl td:last-child, .fin-tbl th:last-child, .fin-tbl td.col-chk, .fin-tbl th.col-chk { max-width: none; }
  .fin-date-wrap .input { width: 148px; }
  .fin-colbar { flex-wrap: wrap; row-gap: 4px; }
}
@media (max-width: 760px) {
  .tbl-scroll-hint { display: block; padding: 8px 14px 2px; font-size: 11.5px; color: #9aa7b8; }
}

/* 客户/供应商数据库：手机端隐藏「最近使用」，电话不折行，地址可滑动 */
@media (max-width: 760px) {
  table#cdb-table { min-width: 0; }
  table#cdb-table td:nth-child(3), table#cdb-table th:nth-child(3) { white-space: nowrap; min-width: 98px; }
  table#cdb-table td:nth-child(5), table#cdb-table th:nth-child(5) { display: none; }
  table#cdb-table td:nth-child(1), table#cdb-table th:nth-child(1) { width: 30px; min-width: 30px; }
  table#cdb-table td:nth-child(2) { max-width: 118px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  table#cdb-table td:last-child .row-actions, table#cdb-table td:last-child > div { gap: 6px; justify-content: flex-end; }
  table#cdb-table td:last-child .btn-link { font-size: 12px; padding: 4px 0; }

  table#cdb-table td:nth-child(4), table#cdb-table th:nth-child(4) { display: none; }
}

.ap-themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ap-theme {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px; text-align: left;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  cursor: pointer; transition: border-color .16s, box-shadow .16s, background .16s; position: relative;
}
.ap-theme:hover { border-color: var(--primary-line); background: var(--surface-2); }
.ap-theme.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.ap-swatch { width: 34px; height: 34px; border-radius: 9px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.ap-meta { display: flex; flex-direction: column; min-width: 0; }
.ap-meta b { font-size: 12.8px; font-weight: 650; color: var(--ink); }
.ap-meta i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ap-tick { margin-left: auto; flex: none; display: none; color: var(--primary); }
.ap-tick svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.ap-theme.on .ap-tick { display: inline-flex; }
.ap-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.ap-seg button {
  border: 0; background: transparent; padding: 8px 18px; font-size: 12.8px; color: var(--ink-2);
  cursor: pointer; border-right: 1px solid var(--line); transition: background .14s, color .14s;
}
.ap-seg button:last-child { border-right: 0; }
.ap-seg button:hover { background: var(--primary-soft); }
.ap-seg button.on { background: var(--primary); color: #fff; }
.ap-hint { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
/* 外观设置页：顶部说明条 */
.ap-wrap { max-width: 1080px; }
.ap-lead {
  padding: 11px 15px; margin-bottom: 14px; border-radius: 11px; font-size: 12.5px; line-height: 1.7;
  color: var(--ink-2); background: var(--primary-soft); border: 1px solid var(--primary-line);
}
/* 全站字体：每个按钮用自己的字体渲染预览 */
.ap-fonts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ap-font {
  position: relative; display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 12px 14px 11px; text-align: left; cursor: pointer; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s;
}
.ap-font:hover { border-color: var(--primary-line); background: var(--surface-2); }
.ap-font.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.ap-font-prev { font-size: 17px; line-height: 1.4; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ap-font-meta { display: flex; flex-direction: column; }
.ap-font-meta b { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.ap-font-meta i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }
.ap-font.on .ap-tick { display: inline-flex; }
.ap-font .ap-tick { position: absolute; top: 10px; right: 11px; }
.ap-custom { display: none; gap: 9px; margin-top: 14px; align-items: center; max-width: 520px; }
.ap-custom.show { display: flex; }
.ap-custom .input { flex: 1; min-width: 0; }
@media (max-width: 1100px) { .ap-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ap-fonts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .ap-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-fonts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-seg button { padding: 8px 12px; }
  .ap-font-prev { font-size: 15px; }
  .ap-custom { flex-direction: column; align-items: stretch; }
}

/* ---------------- 撤销结算 / 收款提示 ---------------- */
.un-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.un-row span { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.un-row b { text-align: right; font-weight: 650; color: var(--ink); }
.un-pick { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.un-pick label { display: flex; align-items: center; gap: 9px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.un-pick label:hover { border-color: var(--primary-line); }
.un-pick label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); color: var(--ink); }
.un-pick input { flex: 0 0 auto; margin: 0; }
.un-tip { margin-top: 12px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface-2); font-size: 11.5px; color: var(--muted); line-height: 1.75; }

/* ---------------- 导出「另存为」弹窗 ---------------- */
.sv-field { display: flex; align-items: center; gap: 12px; }
.sv-field > label { flex: 0 0 auto; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.sv-field .input { flex: 1 1 auto; min-width: 0; }
.sv-meta { margin-top: 10px; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.sv-meta b { color: var(--ink); font-weight: 650; }
.sv-note { margin-top: 9px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface-2); font-size: 11.5px; color: var(--muted); line-height: 1.75; }
.sv-dest { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.sv-dest-h { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.sv-dest-b { margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.85; }
@media (max-width: 620px) {
  .sv-field { flex-direction: column; align-items: stretch; gap: 6px; }
  .sv-field > label { font-size: 12px; }
}


/* ---------------- 物流跟踪 · 中转查询 ---------------- */
.tq {
  margin-top: 14px; padding: 12px 14px 13px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2);
}
.tq-h { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--ink-2); }
.tq-h b { font-size: 13px; color: var(--ink); font-weight: 650; }
.tq-state { font-size: 11.5px; color: var(--muted); }
.tq-state.is-hit { color: #0f7a4a; font-weight: 600; }
.tq-state.is-miss { color: #b45309; }
.tq .form-grid { margin-top: 0; }
.tq .ap-hint { font-size: 11.5px; }
.tq-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tq-tip { font-size: 11.5px; color: var(--muted); }
.tq-empty {
  margin-top: 9px; padding: 8px 11px; border-radius: 9px;
  background: var(--warn-soft); border: 1px solid #f3dfc2;
  font-size: 12px; color: #8a5312; line-height: 1.7;
}
.tq-paste { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.tq-paste textarea {
  width: 100%; min-height: 92px; resize: vertical;
  line-height: 1.75; font-size: 12.2px;
}
.tq-preview {
  margin-top: 9px; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; max-height: 240px; overflow-y: auto; background: var(--surface);
}
.tq-preview:empty { display: none; }
.tq-ph {
  padding: 7px 11px; background: var(--surface-2);
  border-bottom: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted);
}
.tq-ph b { color: var(--ink); }
.tq-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 11px;
  border-bottom: 1px solid var(--line-2); font-size: 12px; cursor: pointer;
}
.tq-row:last-child { border-bottom: 0; }
.tq-row:hover { background: var(--primary-soft); }
.tq-row.is-dup { opacity: .58; }
.tq-row input[type="checkbox"] { width: 14px; height: 14px; flex: none; }
.tq-t { flex: 0 0 118px; color: var(--ink-2); font-size: 11.5px; }
.tq-s {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 11px;
}
.tq-l {
  flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tq-n {
  flex: 1 1 32%; min-width: 0; color: var(--muted); font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 620px) {
  .tq { padding: 11px 12px; }
  .tq-row { flex-wrap: wrap; }
  .tq-t { flex-basis: 100%; }
}

/* ---------------- 弹窗标题栏里的额外入口（物流跟踪 → 中转查询） ---------------- */
.modal-head .head-extra { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.modal-head .head-extra ~ .x { margin-left: 10px; flex: none; }

.mq-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-size: 12.2px; font-weight: 550;
  cursor: pointer; white-space: nowrap; transition: background .16s, border-color .16s, color .16s;
}
.mq-btn:hover, .mq-btn.is-on {
  border-color: var(--primary-line); color: var(--primary); background: var(--primary-soft);
}
/* 自动查询没成功：按钮着黄，提示「点开看看原因」，不要静默 */
.mq-btn.is-warn {
  border-color: #f2c27b; color: #a5610d; background: #fff7e9;
}
.mq-btn svg { flex: none; }
.mq-cnt { font-style: normal; font-size: 11px; font-weight: 700; color: #0f7a4a; }
.mq-cnt:empty { display: none; }
@media (max-width: 620px) {
  .mq-btn { padding: 0 8px; font-size: 11.8px; }
  /* 窄屏优先保住按钮文字：副标题（单号·城市）在正文顶部已有，直接收起，别把关闭按钮顶出屏幕 */
  .modal-head:has(.mq-btn) .sub { display: none; }
  .modal-head:has(.mq-btn) h3 { flex: none; white-space: nowrap; }
}

/* ===== 补丁 20261110（最终）：运单列表列显示 / 拖动换序 / 点列名筛选（仅电脑端） ===== */
/* 原版在电脑端按「第 N 列」隐藏了「付款方式」「送货方式」「结算」三列。
   列顺序现在可以左右拖动，按位置判断会误伤别的列，所以这里统一放开；
   哪些列要显示，交给用户点列名 →「隐藏此列」自己控制。手机端一行未改。 */
@media (min-width: 761px) {
  .tbl-pick th:nth-child(n), .tbl-pick td:nth-child(n) { display: table-cell; min-width: 0; white-space: normal; }

  /* 列宽 / 换行按列标识走，拖动换序后不会串到别的列 */
  .tbl-pick td[data-k="from"], .tbl-pick td[data-k="to"] { min-width: 116px; }
  .tbl-pick td[data-k="route"] { min-width: 104px; }
  .tbl-pick td[data-k="cargo"] { min-width: 82px; }
  .tbl-pick td[data-k="qty"] { min-width: 92px; }
  .tbl-pick td[data-k="no"], .tbl-pick td[data-k="fee"], .tbl-pick td[data-k="time"],
  .tbl-pick td[data-k="act"], .tbl-pick td[data-k="cargo"], .tbl-pick td[data-k="qty"],
  .tbl-pick td[data-k="qty"] .cell-sub, .tbl-pick td[data-k="route"] .cell-sub,
  .tbl-pick td[data-k="pay"], .tbl-pick td[data-k="deliv"] { white-space: nowrap; }

  /* 表头：列名本身就是筛选入口，整格可拖动（高亮样式与财务管理列表一致） */
  table.tbl.tbl-pick thead th { vertical-align: bottom; padding-top: 6px; padding-bottom: 7px; white-space: nowrap; }
  table.tbl.tbl-pick thead th[data-move] { cursor: grab; }
  table.tbl.tbl-pick thead th[data-move]:active { cursor: grabbing; }
  table.tbl.tbl-pick thead th.col-dragging { opacity: .42; background: var(--primary-soft); }
  table.tbl.tbl-pick thead th.col-drop { box-shadow: inset 3px 0 0 #1c5cff; color: #1c5cff; }
}

/* ===== 补丁 20261111：分页条加「每页 N 条」选择器（运单 / 客户 / 财务共用） ===== */
.pager-per {
  display: inline-flex; align-items: center; gap: 5px;
  margin-left: 12px; font-size: 12.5px; color: var(--muted); white-space: nowrap;
}
.pager-per-sel {
  height: 28px; padding: 0 4px 0 6px; font-size: 12.5px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
  cursor: pointer; font-family: inherit;
}
.pager-per-sel:hover { border-color: var(--primary); }
.pager-per-sel:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
@media (max-width: 760px) {
  .pager { flex-wrap: wrap; row-gap: 6px; }
  .pager-per { margin-left: 0; }
}

/* 补丁 20261111：标签模板「字段名」开关（默认只打内容） */
.lbv-labrow { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.lbv-labrow .lbv-labb { width: auto; height: 26px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.lbv-labrow .lbv-note { margin-left: 0; flex: 1 1 130px; }




.lbb-paper .btn { height: 26px; padding: 0 8px; font-size: 12px; }


.lbb-offx .lbb-offb { width: 30px; height: 30px; padding: 0; border: 1px solid #d5d9e0; border-radius: 6px; background: #fff; color: #43536b; font-size: 12px; line-height: 1; cursor: pointer; }
.lbb-offx .lbb-offb:hover { border-color: var(--primary); color: var(--primary); }
.lbb-offx .lbb-offb:active { background: rgba(var(--primary-rgb), .08); }


/* 补丁 20261111d：只读展示项（分辨率固定 203dpi，不可改） */
.lbb-set input.lbb-ro { height: 32px; padding: 0 8px; border: 1px solid #e2e6ec; border-radius: 6px; background: #f5f7fa; color: #6b7a90; font-size: 12px; }
@media (max-width: 760px) { .lbb-set input.lbb-ro { height: 40px; font-size: 13px; } }

/* 补丁 20261111e：模板编辑器 → 打印参数区（标签纸/分辨率/纸缝/浓度/速度/左右偏移/条码内容） */
.lbv-pcfg { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfd; }
.lbv-pcfg-h { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #43536b; flex-wrap: wrap; }
.lbv-pcfg-h b { font-size: 13px; }
.lbv-pcfg-h span { font-size: 11.5px; color: #8794a8; }
.lbv-pcfg-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.lbv-pf { display: flex; align-items: center; gap: 5px; }
.lbv-pf > span { font-size: 11.5px; color: #6b7a90; white-space: nowrap; }
.lbv-pf input[type="number"], .lbv-pf select, .lbv-pf input.lbv-ro {
  height: 30px; padding: 0 7px; border: 1px solid #d5d9e0; border-radius: 6px;
  background: #fff; color: #1c2b45; font-size: 12px; line-height: 28px; outline: none;
}
.lbv-pf input[type="number"] { width: 66px; text-align: center; }
.lbv-pf select { min-width: 92px; }
.lbv-pf input.lbv-ro { width: 76px; background: #f2f4f8; color: #6b7a90; border-color: #e4e8ee; text-align: center; }
.lbv-pf input:focus, .lbv-pf select:focus { border-color: var(--primary); }
.lbv-pf i { font-style: normal; color: #8794a8; font-size: 12px; }
.lbv-pf em { font-style: normal; font-size: 11px; color: #8794a8; }
.lbv-pf-off input[type="number"] { width: 62px; }
.lbv-pcfg-note { margin-top: 9px; font-size: 11.5px; color: #6b7a90; display: flex; gap: 5px; align-items: flex-start; line-height: 1.6; }
.lbv-pcfg-note svg { flex: none; margin-top: 2px; }
.lbv-pcfg-note.ok { color: #16794e; }
.lbv-pcfg-note.warn { color: #a86400; }
@media (max-width: 760px) {
  .lbv-pcfg { padding: 10px 12px; }
  .lbv-pcfg-row { gap: 10px 12px; }
  .lbv-pf { flex: 1 1 46%; }
  .lbv-pf input[type="number"], .lbv-pf select, .lbv-pf input.lbv-ro { height: 36px; font-size: 13px; }
  .lbv-pf > span { font-size: 12px; }
}

/* 补丁 20261111f：模板编辑器 —— 字段改成下拉勾选，已放置列表吃满剩余高度 */
.lbv-stage { height: 540px; }
.lbv-side { width: 336px; height: 540px; max-height: 540px; position: relative; }
.lbv-fh { flex: none; display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.lbv-addbtn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border: 1px solid var(--primary-line); border-radius: 8px; background: var(--primary-soft);
  color: var(--primary-dark); font-size: 12.5px; font-weight: 650; cursor: pointer; white-space: nowrap;
}
.lbv-addbtn:hover { border-color: var(--primary); }
.lbv-addbtn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.lbv-addbtn b { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: var(--primary-dark); }
.lbv-addbtn.on b { background: rgba(255, 255, 255, .22); color: #fff; }
.lbv-addbtn em { font-style: normal; font-size: 10px; opacity: .8; }
.lbv-fh .lbv-note { font-size: 11.5px; }

/* 下拉弹层：绝对定位浮在列表上方，不占常驻高度 */
.lbv-addpop {
  position: absolute; left: 12px; right: 12px; top: 50px; z-index: 30;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(16, 26, 46, .18); padding: 10px 11px 9px;
  max-height: 340px;
}
.lbv-addpop[hidden] { display: none; }   /* display:flex 会盖掉 hidden，需要显式恢复 */
.lbv-addpop-h { flex: none; }
.lbv-addpop-g { flex: 1; min-height: 0; overflow: auto; }
.lbv-addpop-f { flex: none; }
.lbv-addpop-h { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; font-weight: 650; color: #101a2e; margin-bottom: 8px; }
.lbv-addpop-h span { font-size: 11px; font-weight: 400; color: #8794a8; }
.lbv-addpop-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lbv-fitem {
  display: flex; align-items: center; gap: 6px; padding: 7px 8px; text-align: left;
  border: 1px solid var(--line-2); border-radius: 7px; background: #fff;
  font-size: 12px; color: #101a2e; cursor: pointer;
}
.lbv-fitem:hover { border-color: #b9c8e0; }
.lbv-fitem i { width: 12px; flex: none; font-style: normal; font-size: 11px; color: var(--primary); }
.lbv-fitem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbv-fitem.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); font-weight: 650; }
.lbv-addpop-f { display: flex; justify-content: flex-end; margin-top: 9px; }
.lbv-done { height: 28px; padding: 0 14px; border: 1px solid var(--primary); border-radius: 7px; background: var(--primary); color: #fff; font-size: 12px; cursor: pointer; }
.lbv-done:hover { filter: brightness(1.05); }

/* 已放置：列表占满剩余高度，行更高好点按 */
.lbv-fh2 { margin: 12px 0 8px; font-size: 12.5px; font-weight: 650; color: #101a2e; flex-wrap: wrap; }
.lbv-fh2 b { color: var(--primary); font-size: 13px; }
.lbv-fh2 > span { font-size: 11px; font-weight: 400; color: #8794a8; }
.lbv-list { min-height: 180px; }
.lbv-item { padding: 6px 7px; }
.lbv-item:hover { border-color: #c7d5ea; background: #fbfdff; }
.lbv-empty { padding: 18px 10px; text-align: center; font-size: 12px; color: #9aa7ba; line-height: 1.8; }
.lbv-labtip { flex: 1; min-width: 0; font-size: 11px; color: #8794a8; }

@media (max-width: 760px) {
  .lbv-stage { height: 320px; }
  .lbv-side { width: auto; height: auto; max-height: none; }
  .lbv-addbtn { height: 40px; font-size: 13px; }
  .lbv-addpop { left: 0; right: 0; top: 56px; max-height: 300px; }
  .lbv-addpop-g { grid-template-columns: 1fr 1fr; }
  .lbv-fitem { padding: 9px 8px; font-size: 12.5px; }
  .lbv-list { min-height: 0; }
  .lbv-item { padding: 8px; }
}

/* ── 补丁 20261111g：模板字段可旋转（信封标签要横着打） ──────────── */
.lbv-mini.lbv-rot { width: 40px; font-size: 10.5px; letter-spacing: -.2px; }
.lbv-mini.lbv-rot.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); font-weight: 700; }
@media (max-width: 760px) {
  .lbv-mini.lbv-rot { width: 44px; font-size: 11px; }
}

/* ── 补丁 20261111h：选中项属性栏（左 / 上 / 长度 / 字高·条高） ────────── */
.lbv-prop { margin: 0 0 8px; padding: 8px 9px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: #f7fafd; }
.lbv-prop-empty { font-size: 11.5px; line-height: 1.7; color: #8794a8; }
.lbv-prop-empty b { color: #43536b; font-weight: 650; }
.lbv-prop-h { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 12px; color: #101a2e; }
.lbv-prop-h > span { flex: none; font-size: 10.5px; color: #fff; background: var(--primary); border-radius: 4px; padding: 1px 5px; }
.lbv-prop-h > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.lbv-prop-h > em { flex: none; font-style: normal; font-size: 11px; color: #8794a8; }
.lbv-prop-g { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lbv-prop-g label { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11.5px; color: #43536b; }
.lbv-prop-g label { white-space: nowrap; }
.lbv-prop-g input { flex: 1; min-width: 0; width: 100%; height: 27px; border: 1px solid var(--line); border-radius: 5px;
  text-align: center; font-size: 12px; color: #101a2e; padding: 0 2px; background: #fff; }
.lbv-prop-g i { flex: none; font-style: normal; font-size: 10.5px; color: #8794a8; }
@media (max-width: 760px) {
  .lbv-prop-g input { height: 32px; font-size: 13px; }
  .lbv-prop-g { gap: 8px; }
}

/* ── 补丁 20261112a：字段在纸面上四个方向随便拖（手机也跟手）+ 四向微调 ──── */
/* 手指按在纸面/字段上时不再触发页面滚动，否则拖动会被 pointercancel 打断 */
.lbv-paper, .lbv-paper .lb-i { touch-action: none; -webkit-user-select: none; user-select: none; }
/* 小字段（一个「1」、一个短日期）也要好抓：给个最小可点面积，选中/拖动时才置顶 */
.lbv-paper .lb-i[data-id] { min-width: 6mm; min-height: 4mm; z-index: 1; }
.lbv-paper .lb-i[data-id].on { z-index: 8; }
.lbv-paper .lb-i.drag { z-index: 9; cursor: grabbing; }
/* 样例运单里没内容的字段：编辑时用虚线占位，能看见也能拖（不参与打印） */
.lbv-paper .lb-i-empty { outline: 1px dashed rgba(16, 26, 46, .45); outline-offset: 1px; border-radius: 1mm; }
.lbv-paper .lb-i-ph { color: rgba(16, 26, 46, .42); font-weight: 500; }
/* 属性栏里的四向微调 */
.lbv-nudge { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.lbv-nb { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #101a2e;
  font-size: 15px; line-height: 1; cursor: pointer; padding: 0; }
.lbv-nb:hover { border-color: var(--primary-line); color: var(--primary-dark); }
.lbv-nb:active { background: var(--primary-soft); border-color: var(--primary-line); }
.lbv-steprow { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; color: #43536b; }
.lbv-steprow select { height: 26px; border: 1px solid var(--line); border-radius: 5px; background: #fff;
  font-size: 12px; color: #101a2e; padding: 0 4px; }
.lbv-steprow em { margin-left: auto; font-style: normal; font-size: 10.5px; color: #8794a8; }
@media (max-width: 760px) {
  .lbv-nb { height: 38px; font-size: 17px; }
  .lbv-steprow { font-size: 12px; }
  .lbv-steprow select { height: 30px; font-size: 13px; }
  .lbv-steprow em { display: none; }
}

/* ── 补丁 20261112b：字段「行数」（长地址自动折成两三行） ──────────────── */
.lbv-linebar { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 11.5px; color: #43536b; }
.lbv-linebar > span { flex: none; }
.lbv-linebar select { flex: none; height: 27px; border: 1px solid var(--line); border-radius: 5px;
  background: #fff; font-size: 12px; color: #101a2e; padding: 0 4px; }
.lbv-linebar em { flex: 1; min-width: 0; font-style: normal; font-size: 10.5px; color: #8794a8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 限定行数的字段：编辑时给个淡淡的框，能看出「这块地方就这么大」 */
.lbv-paper .lb-i[data-id][style*="max-height"] { background: rgba(var(--primary-rgb), .04); }
@media (max-width: 760px) {
  .lbv-linebar { font-size: 12px; }
  .lbv-linebar select { height: 32px; font-size: 13px; }
  .lbv-linebar em { display: none; }
}

/* ── 补丁 20261112c：打印预览里提示字段压在一起 ──────────────────────── */
.lbp-stage-tip .lbp-ov { color: #c2410c; font-weight: 700; }

/* ── 补丁 20261112d：字段边框手柄（拖右/下/右下角改长度和高度） ───────── */
.lbv-paper .lb-i[data-id].on { outline: 1px dashed var(--primary-line); outline-offset: 1px; }
.lbv-paper .lb-i .lb-i-h { display: none; position: absolute; z-index: 12; background: var(--primary);
  border-radius: .6mm; opacity: .92; touch-action: none; }
.lbv-paper .lb-i.on .lb-i-h, .lbv-paper .lb-i.resizing .lb-i-h { display: block; }
.lbv-paper .lb-i .lb-i-hr { right: -1.2mm; top: 14%; bottom: 14%; width: 2.4mm; cursor: ew-resize; }
.lbv-paper .lb-i .lb-i-hb { left: 14%; right: 14%; bottom: -1.2mm; height: 2.4mm; cursor: ns-resize; }
.lbv-paper .lb-i .lb-i-hrb { right: -1.6mm; bottom: -1.6mm; width: 3.2mm; height: 3.2mm;
  cursor: nwse-resize; border: 1px solid #fff; }
.lbv-paper .lb-i.resizing { outline: 1px solid var(--primary); }
.lbv-paper .lb-i.resizing, .lbv-paper .lb-i.resizing * { cursor: inherit; }
@media (max-width: 760px) {
  .lbv-paper .lb-i .lb-i-hr { width: 3.4mm; right: -1.7mm; }
  .lbv-paper .lb-i .lb-i-hb { height: 3.4mm; bottom: -1.7mm; }
  .lbv-paper .lb-i .lb-i-hrb { width: 4.4mm; height: 4.4mm; right: -2.2mm; bottom: -2.2mm; }
}

/* ── 补丁 20261112e：字段宽度只跟「设定长度 / 内容」走，位置不再压窄；
     内容比纸还长时在属性栏说清楚（否则只会看到「一挪就变两三行、显示不全」） ── */
.lbv-warn { margin-top: 7px; padding: 6px 8px; border-radius: 6px;
  background: #fff6ed; border: 1px solid #ffd9b8; color: #a35a12;
  font-size: 11px; line-height: 1.5; }
.lbv-warn b { font-weight: 800; }
@media (max-width: 760px) { .lbv-warn { font-size: 12px; } }

/* ── 补丁 20261112f：像 Excel 一样拖边框改大小 ——
     鼠标悬停字段就显示虚线框和边缘手柄，右 / 下整条边都能抓（不用先点选）；
     手柄从「一个小点」变成「整条边」，悬停即出现，抓中边缘直接拖 ── */
.lbv-paper .lb-i[data-id] { cursor: move; }
.lbv-paper .lb-i[data-id]:hover { outline: 1px dashed var(--primary-line); outline-offset: 1px; }
.lbv-paper .lb-i[data-id]:hover .lb-i-h,
.lbv-paper .lb-i.on .lb-i-h,
.lbv-paper .lb-i.resizing .lb-i-h { display: block; }
/* 右边整条边 = 拖动改「长度」；下边整条边 = 拖动改「高度（行数）」 */
.lbv-paper .lb-i .lb-i-hr { top: 0; bottom: 0; right: -1.5mm; width: 3mm; }
.lbv-paper .lb-i .lb-i-hb { left: 0; right: 0; bottom: -1.5mm; height: 3mm; }
.lbv-paper .lb-i .lb-i-hrb { right: -2mm; bottom: -2mm; width: 4mm; height: 4mm; }
/* 手柄上给出和 Excel 一致的光标提示 */
.lbv-paper .lb-i .lb-i-hr { cursor: ew-resize; }
.lbv-paper .lb-i .lb-i-hb { cursor: ns-resize; }
.lbv-paper .lb-i .lb-i-hrb { cursor: nwse-resize; }
@media (max-width: 760px) {
  .lbv-paper .lb-i .lb-i-hr { width: 4.4mm; right: -2.2mm; }
  .lbv-paper .lb-i .lb-i-hb { height: 4.4mm; bottom: -2.2mm; }
  .lbv-paper .lb-i .lb-i-hrb { width: 5.4mm; height: 5.4mm; right: -2.7mm; bottom: -2.7mm; }
}

/* ── 补丁 20261112g：字段打印编辑器的「打印字段」列表 ──
   点 chip 切换该字段打印 / 不打印；off 的字段纸面和打印输出里都不出现 */
.fpv-fields-bar { flex-wrap: wrap; gap: 5px; }
.fpv-fh { font-size: 12px; font-weight: 650; color: #101a2e; flex: none; margin-right: 4px; }
.fpv-fchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line);
  background: #f1f5fb; border-radius: 999px; padding: 3px 9px 3px 6px; font-size: 11.5px; color: #8794a8;
  cursor: pointer; line-height: 1.4; transition: all .12s; }
.fpv-fchip i { font-style: normal; font-weight: 800; font-size: 11px; width: 14px; text-align: center; }
.fpv-fchip.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); }
.fpv-fchip.on i { color: var(--primary); }
.fpv-fchip:hover { border-color: var(--primary); }
@media (max-width: 760px) { .fpv-fchip { padding: 5px 10px 5px 8px; font-size: 12.5px; } }

/* ── 补丁 20261112h：「整体移动」按钮选中态 ── */
.fpv-btn.on { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary-dark); font-weight: 650; }

/* ── 补丁 20261112i：输入联想支持键盘 ↑↓ 选择（高亮行）── */
.ac-item.hi { background: #e8f1ff; box-shadow: inset 2.5px 0 0 var(--primary); }

/* ── 补丁 20261118a：托运单预览整页放大 1.5 倍 ──
   纸面按 1.5 倍基准显示，单据内部版式等比不变（字、行高、表格都不重排）；
   放大后超出可视区时允许上下左右拖动查看，不再被裁掉 */
.pv-stage.pv-scroll { display: block; overflow: auto; padding: 10px; }
.pv-stage.pv-scroll .pv-paper { margin: 0 auto; }

/* ── 补丁 20261118b：中转公司 · 公众号关注与提醒同步 ── */
.wx-qr-box {
  width: 132px; height: 132px; border: 1px dashed #c9d5e3; border-radius: 10px; background: #f8fafc;
  display: grid; place-items: center; overflow: hidden; padding: 6px;
}
.wx-qr-box img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.wx-qr-box .logo-up-empty { font-size: 11.5px; color: #98a4b5; line-height: 1.5; text-align: center; }
.wx-qr-box.wx-qr-auto { border-style: solid; border-color: #dfe6ef; background: #fff; padding: 7px; }
.wx-qr-box svg { display: block; }
.form-row > label.tc-check {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 400; font-size: 12.8px;
  color: #101a2e; height: 34px;
}
.form-row > label.tc-check input { width: 15px; height: 15px; }
#wx-in { width: 100%; min-height: 104px; font-size: 13px; line-height: 1.7; }
#wx-out .tbl td { vertical-align: middle; }
#wx-out select.input { height: 32px; }

/* ── 补丁 20261118c：蓝桥账号绑定（手机号 + 验证码） ── */
.lqb {
  border: 1px solid #e3eaf3; border-radius: 10px; background: #fbfdff;
  padding: 12px 14px;
}
.lqb.lqb-on { border-color: #bbe5cd; background: #f6fdf9; }
.lqb-t { font-size: 13px; color: #101a2e; line-height: 1.6; }
.lqb-t b { color: #0f7a4a; }
.lqb-sub { font-size: 11.8px; color: #8794a8; font-weight: 400; margin-left: 6px; }
.lqb-time { font-size: 11.5px; color: #8794a8; margin-left: 8px; }
.lqb-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.lqb-row .btn[disabled] { opacity: .6; cursor: default; }
.lqb-tip { font-size: 12px; color: #5c6b80; }

/* ── 补丁 20261118d：蓝桥运单中心直接同步 ── */
.lqs-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lqs-bar .input { height: 34px; }
#lq-days, #lq-state { width: 128px; flex: none; }
#lq-key { width: 230px; flex: 0 1 230px; }
.lqs-tip { font-size: 12.2px; color: #8794a8; }
.lqs-tbl td { vertical-align: middle; }
.lqs-tbl tr.lqs-off td { color: #98a4b5; }
.lqs-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.6px; letter-spacing: .2px; }
.lqs-pick { height: 30px; width: 100%; min-width: 130px; font-size: 12.5px; }
.lqs-detail > td { background: #fbfdff; padding: 0 !important; border-bottom: 1px solid #eef3f9; }
.lqs-box { padding: 8px 14px 10px; }
.lqs-t { display: flex; gap: 10px; align-items: flex-start; font-size: 12.4px; padding: 5px 0; border-bottom: 1px dotted #eef3f9; }
.lqs-t:last-child { border-bottom: 0; }
.lqs-t-time { width: 92px; flex: none; color: #5c6b80; font-variant-numeric: tabular-nums; }
.lqs-t-site { width: 72px; flex: none; color: #0f7a4a; }
.lqs-t-txt { flex: 1; min-width: 0; color: #101a2e; line-height: 1.6; }
.lqs-t-st { width: 64px; flex: none; text-align: right; color: #8794a8; }
.lqs-info { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.4px; color: #5c6b80; padding: 2px 0 8px; }
.lqs-info b { color: #101a2e; }
.lqs-empty { font-size: 12.4px; color: #98a4b5; padding: 4px 0; }
.lqs-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 12.6px; color: #5c6b80; flex-wrap: wrap; }
.lqs-foot b { color: #101a2e; }

/* ---------- 蓝桥自动同步卡片（3.9.54） ---------- */
.lqa-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lqa-btns { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lqa-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13.2px; color: #101a2e; cursor: pointer; }
.lqa-sel { display: inline-flex; align-items: center; gap: 5px; font-size: 12.6px; color: #5c6b80; }
.lqa-sel .input { height: 32px; width: auto; min-width: 96px; }
.lqa-chk { display: flex; align-items: flex-start; gap: 7px; margin-top: 11px; font-size: 12.4px; color: #5c6b80; line-height: 1.7; cursor: pointer; }
.lqa-chk input { margin-top: 3px; }
.lqa-res { margin-top: 12px; border: 1px solid #eaf0f7; border-radius: 9px; background: #fbfdff; padding: 10px 12px; }
.lqa-res-h { font-size: 12.6px; color: #5c6b80; line-height: 1.8; }
.lqa-res-h b { color: #101a2e; }
.lqa-list { margin-top: 6px; }
.lqa-li { display: flex; gap: 10px; align-items: baseline; font-size: 12.4px; padding: 4px 0; border-bottom: 1px dotted #eef3f9; }
.lqa-li:last-child { border-bottom: 0; }
.lqa-li-no { font-family: ui-monospace, Menlo, Consolas, monospace; color: #101a2e; width: 132px; flex: none; }
.lqa-li-t { flex: 1; min-width: 0; color: #0f7a4a; }
.lqa-li-lq { color: #b6c0d0; font-size: 11.6px; flex: none; }
.lqa-idle { font-size: 12.3px; color: #8794a8; margin-top: 4px; line-height: 1.8; }
.lqa-err { font-size: 12.4px; color: #dc2626; margin-top: 4px; }
.lqa-warn { font-size: 12.6px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 10px 12px; }
@media (max-width: 760px) {
  .lqa-bar { gap: 8px; row-gap: 10px; }
  .lqa-btns { flex: 1 0 100%; }
  .lqa-sel .input { min-width: 84px; }
  .lqa-li { flex-wrap: wrap; }
  .lqa-li-no { width: auto; }
  .lqa-li-lq { width: 100%; }
}

/* ---------- 列表行悬停高亮（2026-11-18 v3.9.59） ----------
   鼠标停在哪一条，整行浅蓝铺底 + 左边缘竖线滑进来，
   一眼看清当前行；颜色全走主题变量，换肤一起变。 */
table.tbl tbody tr > td {
  transition: background-color .18s ease, box-shadow .22s ease;
}
table.tbl tbody tr > td:first-child {
  box-shadow: inset 0 0 0 0 var(--primary);
}
table.tbl tbody tr:hover > td { background-color: var(--primary-soft-2); }
table.tbl tbody tr:hover > td:first-child { box-shadow: inset 3px 0 0 0 var(--primary); }

/* 财务表：普通行单独铺（避开下面的彩色行），末列是固定列，一起变色免得右边断层 */
table.tbl.fin-wide tbody tr:not(.is-paid):not(.is-overdue):not(.is-sel):hover > td,
table.tbl.fin-wide tbody tr:not(.is-paid):not(.is-overdue):not(.is-sel):hover > td:last-child {
  background-color: var(--primary-soft-2);
}
/* 已收（绿）/ 逾期（红）行：悬停各加深一档，颜色含义不丢 */
table.tbl.fin-wide tbody tr.is-paid:hover > td { background-color: #d5eddd; }
table.tbl.fin-wide tbody tr.is-overdue:hover > td { background-color: #f9d2cc; }
/* 勾选中的行：悬停再深一档，选中态照样看得出来 */
table.tbl tbody tr.is-sel:hover > td,
table.tbl.fin-wide tbody tr.is-sel:hover > td,
table.tbl.fin-wide tbody tr.is-paid.is-sel:hover > td,
table.tbl.fin-wide tbody tr.is-overdue.is-sel:hover > td {
  background-color: var(--primary-soft-2);
}

/* ---------- 批量分享托运单图片（2026-11-18 v3.9.60） ----------
   与「预览」同款渲染，缩略图横排；勾掉的不发出去。 */
.wbs { position: relative; padding: 12px 16px 6px; }
.wbs-hint {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12.6px; line-height: 1.75; color: #43536b;
  background: var(--primary-soft-2, #f2f7ff); border: 1px solid #dbe8fb;
  border-radius: 9px; padding: 9px 12px;
}
.wbs-hint svg { flex: none; margin-top: 3px; color: var(--primary, #2563eb); }
.wbs-bar { display: flex; align-items: center; gap: 12px; margin: 11px 2px 9px; font-size: 12.6px; color: #5c6b80; }
.wbs-bar .spacer { flex: 1; }
.wbs-bar-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: #101a2e; }
.wbs-prog { color: #8794a8; }
.wbs-prog.done { color: #0f7a4a; }
.wbs-sum { color: #5c6b80; }
.wbs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 12px; max-height: 58vh; overflow: auto; padding: 2px 2px 10px;
}
.wbs-card {
  border: 1px solid #e6edf7; border-radius: 10px; overflow: hidden;
  background: #fff; display: flex; flex-direction: column;
  transition: border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.wbs-card:hover { border-color: #cfe0f6; box-shadow: 0 4px 14px rgba(37,99,235,.09); }
.wbs-card.off { opacity: .45; }
.wbs-thumb {
  position: relative; aspect-ratio: 22 / 17; background: #f6f9fe;
  display: flex; align-items: center; justify-content: center; cursor: zoom-in;
  border-bottom: 1px solid #eef3f9;
}
.wbs-thumb img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s ease; }
.wbs-card.is-ok .wbs-thumb img { opacity: 1; }
.wbs-wait { position: absolute; font-size: 12px; color: #98a4b5; }
.wbs-card.is-ok .wbs-wait { display: none; }
.wbs-card.is-err .wbs-thumb { background: #fff6f5; }
.wbs-card.is-err .wbs-wait { color: #dc2626; }
.wbs-meta {
  padding: 7px 9px 9px; display: grid; grid-template-columns: 1fr auto;
  gap: 3px 8px; align-items: center;
}
.wbs-pick { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.8px; color: #101a2e; cursor: pointer; }
.wbs-pick b { font-family: ui-monospace, Menlo, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbs-meta em {
  grid-column: 1 / -1; font-style: normal; font-size: 11.8px; color: #8794a8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wbs-dl { height: 26px; padding: 0 9px; font-size: 12px; }
.wbs-light {
  position: absolute; inset: 0; background: rgba(9,17,32,.88); z-index: 6;
  display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out;
}
.wbs-light[hidden] { display: none; }
.wbs-light img { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 14px 44px rgba(0,0,0,.45); }

@media (max-width: 760px) {
  .wbs { padding: 10px 12px 4px; }
  .wbs-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 9px; max-height: 52vh; }
  .wbs-hint { font-size: 12.2px; padding: 8px 10px; }
  .wbs-meta em { display: none; }
  .wbs-bar { flex-wrap: wrap; row-gap: 6px; }
}

/* ---------- 打印内容选择：只打字段 / 整张原版（2026-11-19 v3.9.61） ---------- */
.pp-radio {
  display: flex; gap: 8px; align-items: flex-start; cursor: pointer;
  padding: 8px 10px; border: 1px solid #e6edf7; border-radius: 9px;
  background: #fff; transition: border-color .15s ease, background .15s ease;
}
.pp-radio + .pp-radio { margin-top: 7px; }
.pp-radio:hover { border-color: #cfe0f6; background: #f8fbff; }
.pp-radio input { margin: 2px 0 0; flex: none; accent-color: var(--primary, #2563eb); }
.pp-radio span { min-width: 0; }
.pp-radio b { display: block; font-size: 12.8px; font-weight: 650; color: #101a2e; }
.pp-radio em {
  display: block; margin-top: 2px; font-style: normal;
  font-size: 11.5px; line-height: 1.55; color: #8794a8;
}
.pp-radio input:checked + span b { color: var(--primary, #2563eb); }
.pp-prev-note {
  margin: 0; padding: 7px 12px 9px; font-size: 11.6px; line-height: 1.6;
  color: #5c6b80; background: #f4f9ff; border-top: 1px dashed var(--line);
}
.pp-prev-note.is-full { color: #8a5a00; background: #fff9ec; }
.pp-radio-sub { margin-top: 7px; padding-top: 9px; border-top: 1px dashed #e6edf7; border-radius: 9px; }
.pp-radio-sub b { color: #33507a; }

/* ---------- 字段打印：整幅位置偏移（2026-11-19 v3.9.63） ---------- */
.fpv-shift-bar { gap: 14px; background: #f4f9ff; }
.fpv-shift-bar > b { color: #101a2e; font-weight: 650; white-space: nowrap; }
.fpv-shift-g { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fpv-shift-g > span { color: #8794a8; }
.fpv-shift-g i { font-style: normal; color: #b6c0d0; font-size: 11.5px; }
.fpv-shift-bar input[type="number"] { width: 62px; text-align: center; }
.fpv-shift-tip { flex: 1 0 100%; font-size: 11.4px; line-height: 1.6; color: #7d8ba0; }

/* ---------- 字段打印：固定字段（2026-11-22 v3.9.68） ---------- */
.fpv-fix-bar { gap: 10px; background: #f7f6ff; align-items: center; }
.fpv-fix-bar > b { color: #101a2e; font-weight: 650; white-space: nowrap; }
.fpv-fix-cnt { font-size: 11.5px; color: #8b7cc0; }
.fpv-fix-empty { font-size: 11.8px; color: #8794a8; flex: 1 1 240px; line-height: 1.6; }
.fpv-fix-list { flex: 1 0 100%; display: flex; flex-direction: column; gap: 8px; }
.fpv-fix-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; background: #fff; border: 1px solid #e6e2f7; border-radius: 9px;
}
.fpv-fix-text {
  flex: 1 1 260px; min-width: 180px; min-height: 34px; max-height: 120px;
  resize: vertical; font-size: 12.6px; line-height: 1.5; padding: 7px 9px;
}
.fpv-fix-g { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fpv-fix-g > span { color: #8794a8; font-size: 11.6px; }
.fpv-fix-g i { font-style: normal; color: #b6c0d0; font-size: 11.5px; }
.fpv-fix-row input[type="number"] { width: 60px; text-align: center; }
.fpv-fix-align { width: 62px; }
.fpv-fix-tip { flex: 1 0 100%; font-size: 11.4px; line-height: 1.6; color: #7d8ba0; }
/* 纸面上的固定文字：按设定宽度折行（普通字段是 nowrap） */
.fpv-paper .fp-item.fp-fix { white-space: pre-wrap; word-break: break-word; line-height: 1.25; color: #101a2e; box-sizing: border-box; }
.fpv-paper .fp-item.fp-fix .fp-fix-ph { color: #b6c0d0; font-size: 11px; margin: 0; font-style: normal; }

/* ---------- 信封标签：收货人电话打印开关（2026-11-23 v3.9.70） ---------- */
.lbp-row label.fpv-chk { display: flex; margin: 0; font-size: 12.6px; color: #43536b; }
.lbp-row label.fpv-chk span { font-size: 12.6px; }
.lbv-mini.lbv-rp { color: #9a6a20; border-color: #e6d1a8; }

/* ---------- 场景背景：登录页 + 工作台横幅（2026-11-26 v3.9.75） ---------- */
/* 图片放在静态资源目录，随系统部署；配色主题仍独立生效 */
:root[data-scene="xinbang"] { --scene-img: url('../img/themes/xinbang.jpg'); }
:root[data-scene="snow"]   { --scene-img: url('../img/themes/snow.jpg'); }
:root[data-scene="wheat"]  { --scene-img: url('../img/themes/wheat.jpg'); }
:root[data-scene="meadow"] { --scene-img: url('../img/themes/meadow.jpg'); }
:root[data-scene="xinbang"] .login-art,
:root[data-scene="snow"] .login-art,
:root[data-scene="wheat"] .login-art,
:root[data-scene="meadow"] .login-art {
  background:
    linear-gradient(90deg, rgba(6, 15, 32, .84) 0%, rgba(6, 15, 32, .46) 58%, rgba(6, 15, 32, .12) 100%),
    var(--scene-img) center / cover no-repeat;
}
/* 工作台横幅本身很扁，加高一点并让各场景对准画面主体，避免只露出一条边角 */
.dash-hero { min-height: 126px; }
:root[data-scene="xinbang"] .dash-hero {
  background: linear-gradient(90deg, rgba(7, 20, 42, .72) 0%, rgba(7, 20, 42, .36) 62%, rgba(7, 20, 42, .10) 100%),
    var(--scene-img) center 20% / cover no-repeat;
}
:root[data-scene="snow"] .dash-hero {
  background: linear-gradient(90deg, rgba(7, 20, 42, .72) 0%, rgba(7, 20, 42, .36) 62%, rgba(7, 20, 42, .10) 100%),
    var(--scene-img) center 26% / cover no-repeat;
}
:root[data-scene="wheat"] .dash-hero {
  background: linear-gradient(90deg, rgba(7, 20, 42, .72) 0%, rgba(7, 20, 42, .36) 62%, rgba(7, 20, 42, .10) 100%),
    var(--scene-img) center 62% / cover no-repeat;
}
:root[data-scene="meadow"] .dash-hero {
  background: linear-gradient(90deg, rgba(7, 20, 42, .72) 0%, rgba(7, 20, 42, .36) 62%, rgba(7, 20, 42, .10) 100%),
    var(--scene-img) center 74% / cover no-repeat;
}
/* 外观设置：场景背景缩略图卡片 */
.ap-scenes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ap-scene {
  display: flex; flex-direction: column; gap: 7px; padding: 8px; position: relative;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  cursor: pointer; text-align: left; transition: border-color .16s, box-shadow .16s, background .16s;
}
.ap-scene:hover { border-color: var(--primary-line); background: var(--surface-2); }
.ap-scene.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12); }
.ap-scene-thumb {
  display: block; width: 100%; aspect-ratio: 15 / 10; border-radius: 8px;
  background: #e8edf5 center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
}
.ap-scene[data-ap-scene="none"] .ap-scene-thumb { background: linear-gradient(135deg, #eef2f8, #cbd5e1); }
.ap-scene-name { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.ap-scene .ap-tick { position: absolute; top: 12px; right: 12px; padding: 2px; border-radius: 50%; background: rgba(255, 255, 255, .92); }
.ap-scene.on .ap-tick { display: inline-flex; }
@media (max-width: 760px) { .ap-scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 月结运单整行高亮（2026-11-29 v3.9.78） ----------
   淡琥珀底 + 琥珀竖线；已收绿 / 选中蓝优先，逾期时琥珀加深 + 红竖线保留风险提示 */
table.tbl.tbl-pick tbody tr.is-monthly > td,
table.tbl.fin-wide tbody tr.is-monthly > td { background-color: #fff6e4; }
table.tbl.tbl-pick tbody tr.is-monthly > td:first-child,
table.tbl.fin-wide tbody tr.is-monthly > td:first-child { box-shadow: inset 3px 0 0 0 #e0a12a; }
table.tbl tbody tr.is-monthly:hover > td { background-color: #ffebc2; }
/* 已收绿优先 */
table.tbl.fin-wide tbody tr.is-monthly.is-paid > td { background-color: #eaf7ef; }
table.tbl.fin-wide tbody tr.is-monthly.is-paid:hover > td { background-color: #d5eddd; }
/* 月结 + 逾期：琥珀加深 + 红竖线，月结身份和逾期风险同时可见 */
table.tbl tbody tr.is-monthly.is-overdue > td { background-color: #ffe6b8; }
table.tbl tbody tr.is-monthly.is-overdue > td:first-child { box-shadow: inset 3px 0 0 0 #d0342c; }
table.tbl tbody tr.is-monthly.is-overdue:hover > td { background-color: #ffd99a; }
/* 勾选蓝优先；月结竖线始终保留琥珀色，逾期/已结时仍能一眼认出 */
table.tbl tbody tr.is-monthly.is-sel > td,
table.tbl tbody tr.is-monthly.is-overdue.is-sel > td,
table.tbl.fin-wide tbody tr.is-monthly.is-paid.is-sel > td { background-color: var(--primary-soft); }
table.tbl tbody tr.is-monthly.is-sel > td:first-child { box-shadow: inset 3px 0 0 0 var(--primary); }
table.tbl tbody tr.is-monthly.is-sel:hover > td { background-color: var(--primary-soft-2); }

/* ---------- 运单列表：勾选后的运费合计条（2026-11-29 v3.9.79） ---------- */
.wb-sel-sum {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 10px; padding: 10px 14px;
  border: 1px solid #d9e5f7; border-radius: 10px;
  background: linear-gradient(90deg, #f2f7ff, #fff);
  font-size: 13px; color: #43536b;
}
.wb-sel-sum[hidden] { display: none; }
.wb-sel-sum .spacer { flex: 1; }
.wb-sel-sum b { color: #101a2e; font-weight: 700; }
.wb-sel-sum span:last-child b { color: var(--primary, #2563eb); font-size: 15px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .wb-sel-sum { margin: 0 12px 10px; padding: 9px 12px; font-size: 12.5px; }
}

/* ---------- 财务管理：表格底部「按当前筛选」金额统计（2026-12-01 v3.9.88） ----------
   翻页只换列表，合计仍按整份筛选结果；成本 / 利润未解锁时继续打码。 */
.fin-sumbar {
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  padding: 10px 16px; border-top: 1px solid var(--line-2);
  background: linear-gradient(90deg, #f7faff, #fff);
  font-size: 12.5px; color: #43536b;
}
.fin-sumbar .fin-sum-t { color: #8794a8; }
.fin-sumbar .spacer { flex: 1; }
.fin-sumbar b { color: #101a2e; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-sumbar i { font-style: normal; color: #8794a8; }
.fin-sumbar .fin-amt b { color: #1d4ed8; }
.fin-sumbar .fin-paid b { color: #1c5cff; }
.fin-sumbar .fin-cost b { color: #b45309; }
.fin-sumbar .fin-profit b { color: #0f7a4a; }
.fin-sumbar .fin-profit.neg b { color: #d0342c; }
.fin-sumbar [data-fin-unlock] { cursor: pointer; color: #8794a8; }
@media (max-width: 760px) {
  .fin-sumbar { padding: 9px 12px; gap: 8px 12px; font-size: 12px; }
  .fin-sumbar .spacer { display: none; }
}
