/* 发货台账 v3 · 后台样式
   浅色 SaaS：白卡片 + 细边 + 靛蓝主色，数字等宽，应收红 / 实收绿。 */

:root {
  --bg: #f2f4f1;
  --surface: #ffffff;
  --surface-2: #fafbfa;
  --line: #e3e7e1;
  --line-soft: #eef1ec;
  --ink: #14231d;
  --ink-2: #33453d;
  --muted: #6b7f76;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #e7f3ef;
  /* 墨玉金主题点缀（2026-10-27 方案 B）：金色只用于侧栏选中、徽标、强调框，不进大面积 */
  --gold: #b8862f;
  --gold-soft: #fdf1d7;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar: 232px;
  font-synthesis-weight: none;

  /* ---------- 字体与字号阶梯（2026-10-25 统一） ----------
     原来散着 9/10/10.5/11/11.5/12/12.5/13/13.5 八种几乎一样的小字号，
     视觉上又碎又小。这里收成 5 级小字 + 4 级标题，全部走变量，后续只改这一处。 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  /* 数字/金额单独一套：优先系统 UI 数字字体，配合 tabular-nums 让小数点上下对齐 */
  --font-num: "SF Pro Display", -apple-system, "Segoe UI Variable Display", "Segoe UI",
    "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-2xs: 11px;    /* 角标、行内极简标签 */
  --fs-xs: 12px;     /* 辅助说明、表头、副标题 */
  --fs-sm: 13px;     /* 表格正文、按钮、次要正文 */
  --fs-base: 14px;   /* 正文基准 */
  --fs-md: 15px;     /* 卡片标题、强调正文 */
  --fs-lg: 16px;     /* 区块标题 */
  --fs-xl: 19px;     /* 抽屉标题、合计金额 */
  --fs-2xl: 22px;    /* 页面标题 */
  --fs-3xl: 27px;    /* KPI 数值 */
  /* 2026-10-25 价格行情要一个大号现价数字，补两级大字号，仍然只在这张阶梯里改 */
  --fs-4xl: 34px;    /* 大号现价、强势数字 */
  --fs-5xl: 46px;    /* 行情主视觉数字 */

  /* 行情涨跌配色（涨红跌绿，A 股 / 批发市场惯例）：
     与财务的「差额赚绿亏红」是两套语境，所以单独开一组 --mk-* 变量，不复用 .diff-up/down。 */
  --mk-up: #e5484d;
  --mk-up-soft: #fdeced;
  --mk-down: #16a34a;
  --mk-down-soft: #e9f7ef;
  --mk-flat: #94a3b8;
}

* { box-sizing: border-box; }

/* hidden 属性必须真的藏起来。
   坑：.field{display:flex} 这类作者样式的优先级高于浏览器默认的 [hidden]{display:none}，
   于是 hidden 只挡了元素、没挡住显示（「从档案选择」在手工录入模式下还露在外面，用户看得到却录不进）。 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  /* 中文在 Windows 上被 ClearType 拉细后容易发糊，交回字体引擎自己判断 */
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; }
b, strong { font-weight: 600; }

.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: -0.2px; }
/* 金额、数量统一使用数字字体 + 等宽数字，保证一列小数点上下对齐 */
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.15px; }
.small { font-size: var(--fs-sm); }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.danger { color: var(--danger); }
/* 转换前后数值对比：上升绿、下降红、不变黄 */
.diff-up { color: var(--ok); font-weight: 650; }
.diff-down { color: var(--danger); font-weight: 650; }
.diff-same { color: #eab308; font-weight: 650; }
.strong { font-weight: 650; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.ta-left { text-align: left; }

/* ---------- 登录 ---------- */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-hero {
  position: relative;
  padding: 56px 64px;
  color: #e9f2ec;
  background:
    radial-gradient(1000px 460px at 12% 8%, rgba(212, 169, 78, 0.16), transparent 60%),
    radial-gradient(680px 320px at 88% 92%, rgba(20, 184, 166, 0.2), transparent 62%),
    linear-gradient(160deg, #0c1f19 0%, #123129 52%, #0d1f1a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero-brand { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; letter-spacing: 1px; margin-bottom: 40px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
}
.brand-mark.lg { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }
.login-hero h1 { font-size: 38px; line-height: 1.32; font-weight: 650; letter-spacing: 0.5px; margin-bottom: 16px; }
.hero-sub { color: #a7c4b6; font-size: var(--fs-base); max-width: 420px; }
.hero-stats { display: flex; gap: 40px; margin: 34px 0 30px; }
.hero-stats b { display: block; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; color: #fff; }
.hero-stats span { font-size: var(--fs-sm); color: #8fae9f; }
.hero-points { display: grid; gap: 10px; color: #b8c6dd; font-size: var(--fs-base); }
.hero-points li { position: relative; padding-left: 20px; }
.hero-points li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #0f9488; box-shadow: 0 0 0 3px rgba(15, 148, 136, 0.18); }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 358px; }
.login-card h2 { font-size: 22px; font-weight: 650; margin-bottom: 6px; }
.login-card > p { margin-bottom: 26px; font-size: var(--fs-sm); }
/* gap 由 8px 收到 6px：2026-10-25 角色显示名改成 5 个字的「超级管理员」，比原来宽，
   登录页快捷体验那一排会挤到换行，收一点间距 + 少 3px 内边距，5 个按钮就能留在同一行；
   只影响 .quick-login 里的 .chip，其它地方的 .chip 不动。 */
.quick-login { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 22px; font-size: var(--fs-sm); color: var(--muted); }
.quick-login .chip { padding: 4px 9px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 12px; font-size: var(--fs-sm); cursor: pointer; transition: all 0.15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.login-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.login-foot a { color: var(--brand); }
/* 记住账号和口令（2026-11-17）：口令框下面一行，勾上就自动填下次 */
.login-remember { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: var(--fs-sm); cursor: pointer; user-select: none; }
.login-remember input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; flex: none; }
.login-remember .muted { margin-left: 4px; font-size: 12px; }

/* ---------- 外壳 ---------- */

.app-shell { min-height: 100vh; display: flex; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width 0.18s ease, flex-basis 0.18s ease;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--line-soft); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
/* 2026-10-25 用户要求：「小登牧运」四个字加大一档（14px → 16px），字号仍走 :root 阶梯变量 */
.brand-text b { font-size: var(--fs-lg); letter-spacing: 0.5px; }
.brand-text small { font-size: var(--fs-xs); color: var(--muted); }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px 20px; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 2px; }
/* 分组标题 → 折叠头（2026-11-15 手风琴导航）：组头可点开合，带图标 + 箭头；
   默认只展开当前路由所在的组，侧栏一屏只露一组内容 */
.nav-group-title {
  display: flex; align-items: center; gap: 7px;
  width: 100%; text-align: left; font: inherit;
  background: none; border: 0; cursor: pointer;
  font-size: var(--fs-2xs); font-weight: 600; color: #98a1b0;
  padding: 8px 10px 6px; letter-spacing: 0.1em;
  border-radius: 8px;
  transition: background 0.14s, color 0.14s;
}
.nav-group-title::before {
  content: ""; width: 3px; height: 10px; border-radius: 2px;
  background: currentColor; opacity: 0.4; flex: none;
}
.nav-group-title:hover { color: var(--ink-2); background: #f5f7fa; }
.nav-group-title .nav-caret { margin-left: auto; color: #b3bac6; transition: transform 0.15s ease; flex: 0 0 12px; }
.nav-group.is-open > .nav-group-title .nav-caret { transform: rotate(180deg); }
.nav-group-body { display: none; }
.nav-group.is-open > .nav-group-body { display: block; }
/* 分组内的小标题（如「订单管理」子类目）：比组标题更弱一级 */
.nav-subtitle { font-size: var(--fs-2xs); color: #b3bac6; padding: 8px 10px 2px; letter-spacing: 0.06em; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: var(--fs-base); margin-bottom: 2px;
  transition: background 0.14s, color 0.14s;
}
.nav-item .ico { color: #9ca3af; flex: 0 0 18px; }
.nav-item:hover { background: #f5f7fa; color: var(--ink); }
.nav-item:hover .ico { color: var(--ink-2); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.nav-item.is-active .ico { color: var(--brand); }
/* 占位菜单（部门框架预留，页面待开发）：灰化、不可点，右侧挂「筹备中」小标签 */
.nav-item.is-soon { color: #b3bac6; cursor: default; }
.nav-item.is-soon .ico { color: #c9ced8; }
.nav-item.is-soon:hover { background: transparent; color: #b3bac6; }
.nav-soon-tag {
  margin-left: auto; font-style: normal; font-size: var(--fs-2xs); line-height: 1;
  color: #9ca3af; border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 6px;
  background: #f7f9fc;
}
.nav-label { white-space: nowrap; }
.sidebar-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--muted);
}
.env-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); }
/* 演示账本 / 未起账（11-10）：绿点=本机正式账，橙点=演示假数据，灰点=还没选 */
.env-dot.is-demo { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.env-dot.is-off { background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 56px; flex: 0 0 56px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb i { font-style: normal; color: #d1d5db; }
.crumb b { color: var(--ink); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.global-search {
  display: flex; align-items: center; gap: 8px;
  height: 32px; width: 260px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2);
  color: var(--muted); transition: all 0.15s;
}
.global-search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.global-search input { border: 0; background: transparent; outline: none; flex: 1; font-size: var(--fs-sm); color: var(--ink); min-width: 0; }
.global-search kbd { font: var(--fs-2xs)/1 var(--font-mono); border: 1px solid var(--line); border-radius: 4px; padding: 1px 4px; color: #9ca3af; }
.icon-btn {
  height: 32px; min-width: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--ink-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: #f3f4f6; }
.icon-btn.danger { color: var(--danger); }
.menu-btn { color: var(--muted); }

.popover { position: relative; }
.popover > summary { list-style: none; cursor: pointer; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-panel {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 232px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-md); padding: 6px; z-index: 50;
}
.popover-head { font-size: var(--fs-xs); color: var(--muted); padding: 7px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.popover-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 8px 10px; border-radius: 7px; background: none; border: 0;
  font-size: var(--fs-sm); cursor: pointer; text-align: left; color: var(--ink-2);
}
.popover-item:hover { background: #f5f7fa; }
.popover-item b { font-variant-numeric: tabular-nums; color: var(--ink); }
.popover-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: var(--fs-sm); border-radius: 7px; cursor: pointer; }
.popover-check:hover { background: #f5f7fa; }

/* 门店切换（2026-10-29 P1 门店级）：只在两家以上门店时出现在顶栏 */
.org-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 190px;
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2); font-size: var(--fs-sm);
}
.org-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.org-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-chip .caret { color: var(--muted); flex: 0 0 auto; }
.org-menu { min-width: 214px; }
.org-menu-title { font-size: var(--fs-xs); color: var(--muted); padding: 7px 10px 6px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.org-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 8px 10px; border: 0; border-radius: 7px;
  background: none; color: var(--ink-2); font-size: var(--fs-sm); text-align: left; cursor: pointer;
}
.org-item:hover { background: #f5f7fa; }
.org-item.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; }
.org-item.is-active em { font-style: normal; font-size: var(--fs-xs); color: var(--brand); }
.org-item-tag { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.org-menu-foot {
  display: block; margin-top: 4px; padding: 8px 10px 4px;
  border-top: 1px solid var(--line-soft); font-size: var(--fs-xs); color: var(--muted); text-decoration: none;
}
.org-menu-foot:hover { color: var(--brand); }
@media (max-width: 720px) { .org-chip > span { max-width: 74px; } }
.popover-check input { accent-color: var(--brand); }
.dot-count {
  position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 3px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: var(--fs-2xs); font-style: normal;
  display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums;
}
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; }
.user-chip:hover { background: #f3f4f6; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #0f766e, #14b8a6); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); font-weight: 600; flex: 0 0 28px;
}
.avatar.sm { width: 26px; height: 26px; flex-basis: 26px; font-size: var(--fs-xs); }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta b { font-size: var(--fs-sm); }
.user-meta small { font-size: var(--fs-2xs); color: var(--muted); }

.page { padding: 24px 26px 48px; max-width: 1560px; width: 100%; }

/* ---------- 页头 ---------- */

.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.page-head-main h1 { font-size: var(--fs-2xl); font-weight: 650; letter-spacing: 0.2px; }
.page-desc { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; }
.page-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-block; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.back-link:hover { color: var(--brand); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: var(--fs-sm); cursor: pointer; white-space: nowrap;
  transition: all 0.14s;
}
.btn:hover { border-color: #cbd5e1; background: #fafbfc; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(15, 118, 110, 0.25); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f3f4f6; color: var(--ink); }
.btn-ghost-danger { border-color: transparent; background: transparent; color: var(--danger); }
.btn-ghost-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 28px; padding: 0 10px; font-size: var(--fs-sm); border-radius: 7px; }
.btn-block { width: 100%; height: 38px; font-size: var(--fs-base); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-size: var(--fs-sm); cursor: pointer; }
.link:hover { text-decoration: underline; }
/* 禁用态兜底（2026-11-02）：.link 是 <button> 时 disabled 也要一眼看出点不了 */
.link[disabled] { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.link.danger { color: var(--danger); }
.link-strong { cursor: pointer; color: var(--ink); }
.link-strong:hover { color: var(--brand); text-decoration: underline; }

/* ---------- 卡片与栅格 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: var(--fs-md); font-weight: 650; }
.card-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi {
  background: linear-gradient(180deg, #fff 0%, #fcfdff 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.kpi-ok::before { background: var(--ok); }
.kpi-warn::before { background: #f59e0b; }
.kpi-danger::before { background: var(--danger); }
/* 2026-11-15 用户要求五个语气档的左缘彩条统一（此前 info/brand 漏配，整卡晕染在但彩条缺失）：
   色相与 glass-theme ⑧ 语气色一致（info 天蓝 / brand 亮蓝） */
.kpi-info::before { background: #38bdf8; }
.kpi-brand::before { background: #2ea7ff; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: var(--fs-sm); color: var(--muted); }
.kpi-icon { font-size: var(--fs-sm); color: #cbd5e1; }
.kpi-value { font-family: var(--font-num); font-size: var(--fs-3xl); font-weight: 650; letter-spacing: -0.8px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-unit { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi-foot { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi-delta { font-size: var(--fs-xs); padding: 1px 5px; border-radius: 4px; background: var(--ok-soft); color: var(--ok); font-variant-numeric: tabular-nums; }
.kpi-delta.down { background: var(--danger-soft); color: var(--danger); }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.span-2 { min-width: 0; }

/* ---------- 图表 ---------- */

.chart { width: 100%; height: auto; display: block; }
.chart-grid { stroke: #eef1f5; stroke-width: 1; }
.chart-tick { font-size: var(--fs-xs); fill: #9ca3af; font-family: inherit; }
.chart-dot circle { transition: r 0.12s; }
.chart-dot:hover circle:last-child { r: 5; }
.bar-rect { fill: #bfd3fb; }
.bar-rect.is-hl { fill: var(--brand); }
.chart-bar:hover .bar-rect { fill: var(--brand); }
.chart-foot { display: flex; gap: 24px; margin-top: 8px; font-size: var(--fs-sm); color: var(--muted); }
.chart-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

.segmented { display: inline-flex; background: #f3f4f6; border-radius: 8px; padding: 3px; gap: 2px; }
.seg { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.seg.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 168px; height: 168px; flex: 0 0 168px; }
.donut-total { font-size: var(--fs-md); font-weight: 650; fill: var(--ink); }
.donut-cap { font-size: var(--fs-2xs); fill: var(--muted); }
.legend { flex: 1; display: grid; gap: 6px; min-width: 0; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.legend i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.lg-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-val { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.rank { display: grid; gap: 12px; }
.rank li { display: flex; gap: 10px; align-items: center; }
.rank-no {
  width: 18px; height: 18px; border-radius: 5px; background: #f3f4f6; color: var(--muted);
  font-size: var(--fs-2xs); display: flex; align-items: center; justify-content: center; flex: 0 0 18px;
}
.rank li:nth-child(1) .rank-no { background: var(--danger-soft); color: var(--danger); }
.rank-main { flex: 1; min-width: 0; }
.rank-top { display: flex; justify-content: space-between; font-size: var(--fs-sm); margin-bottom: 4px; }
.rank-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-top b { font-variant-numeric: tabular-nums; }
.rank-track { height: 5px; border-radius: 3px; background: #f1f3f7; overflow: hidden; }
.rank-track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #f87171, #dc2626); }
.mini-track { height: 5px; border-radius: 3px; background: #f1f3f7; overflow: hidden; }
.mini-track i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

/* ---------- 待办 ---------- */

.todo-list { display: grid; gap: 4px; }
.todo { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 9px; transition: background 0.14s; }
.todo:hover { background: #f7f9fc; }
.todo-flag {
  width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm);
  background: #f3f4f6; color: var(--muted);
}
.todo-flag.info { background: var(--brand-soft); color: var(--brand); }
.todo-flag.warn { background: var(--warn-soft); color: var(--warn); }
.todo-flag.danger { background: var(--danger-soft); color: var(--danger); }
.todo-body { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.todo-body b { font-size: var(--fs-sm); }
.todo-body small { font-size: var(--fs-xs); color: var(--muted); }
.todo-count { margin-left: auto; font-size: var(--fs-lg); font-weight: 650; font-variant-numeric: tabular-nums; }
.aging { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.aging-title { font-size: var(--fs-xs); color: var(--muted); margin-bottom: 8px; }
.aging-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.aging-grid div { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; }
.aging-grid span { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.aging-grid b { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* ---------- 筛选与工具栏 ---------- */

.filter-bar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 12px;
}
.filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-field > span { font-size: var(--fs-xs); color: var(--muted); }
.filter-field.grow { flex: 1; min-width: 200px; }
.filter-field input, .filter-field select {
  height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 9px;
  background: #fff; font-size: var(--fs-sm); color: var(--ink); outline: none; width: 100%;
}
.filter-field input:focus, .filter-field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.filter-bar .btn { margin-left: auto; }
/* 日期快捷区间（2026-11-01）：故意不用 .btn，否则会被上面的 margin-left:auto 推到最右边 */
.date-quick-row { display: flex; gap: 6px; align-self: flex-end; }
.date-quick {
  height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; color: #4b5563; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap;
}
.date-quick:hover { border-color: var(--brand); color: var(--brand); }
.date-quick.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }

.summary-bar {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.sum-item {
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 14px; display: flex; flex-direction: column; min-width: 108px;
}
.sum-item span { font-size: var(--fs-2xs); color: var(--muted); }
.sum-item b { font-size: var(--fs-base); font-variant-numeric: tabular-nums; }

.table-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.tt-left { display: flex; align-items: center; gap: 10px; }
.tt-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sel-info { font-size: var(--fs-sm); color: var(--muted); }
.sel-info b { color: var(--brand); }

/* 工具条里的行内复选框（往来台账的「合并同一客户 / 只看有欠款」等） */
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.check-inline input { margin: 0; }

/* 列表页尾批处理操作条：勾选后批量作废/删除/导出选中 */
.batch-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px;
  background: #f8fafc; border: 1px dashed var(--line); border-radius: 9px;
}
.batch-count { font-size: var(--fs-sm); color: var(--muted); margin-right: 4px; }
.batch-count b { color: var(--brand); font-variant-numeric: tabular-nums; }
.batch-bar .btn-danger { margin-left: auto; }

/* 粘贴 / 拖入微信定位快速填入地址 */
.region-paste {
  border: 1px dashed var(--line); border-radius: 9px;
  padding: 10px 12px; background: #f8fafc;
}
.region-paste.is-drag { border-color: var(--brand); background: rgba(15, 118, 110, 0.06); }
.region-paste input { border-style: dashed; }
.region-paste-row { display: flex; gap: 8px; align-items: center; }
.region-paste-row input { flex: 1; }

/* 派车表单：装车地下拉 + 搜索框组合 */
.farm-box select {
  width: 100%; height: 38px; margin-bottom: 8px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: var(--fs-base);
}
.search-inline input {
  height: 32px; width: 220px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: var(--fs-sm); outline: none; background: #fff;
}
.search-inline input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.inline-field input { height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-size: var(--fs-sm); }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs-lg { display: flex; margin-bottom: 14px; }
.tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 8px 14px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab-count { font-size: var(--fs-2xs); background: #f1f3f7; color: var(--muted); border-radius: 999px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.tab.is-active .tab-count { background: var(--brand-soft); color: var(--brand); }

/* ---------- 表格 ---------- */

.card-table { padding: 0; overflow: hidden; }
/* card-table 是零内边距给表格用的；要带标题块时由这里补内边距，别在行内写死 padding */
.card-table > .card-head { padding: 16px 18px 12px; margin-bottom: 0; border-bottom: 1px solid var(--line); align-items: center; }
.card-table > .card-foot { padding: 10px 18px 12px; margin: 0; font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--line); }
.dt-wrap { width: 100%; overflow-x: auto; }
.dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.dt th {
  text-align: left; font-weight: 600; color: #6b7688; font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  padding: 10px 12px; white-space: nowrap; position: relative;
}
/* 表头对齐修正：.dt th 优先级高于通用 .ta-*，这里按同等优先级覆盖 */
.dt th.ta-right { text-align: right; }
.dt th.ta-center { text-align: center; }
.dt th.ta-left { text-align: left; }
.dt th:first-child { padding-left: 16px; }
.dt th:last-child { padding-right: 16px; }
.dt td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dt td:first-child { padding-left: 16px; }
.dt td:last-child { padding-right: 16px; }
.dt tbody tr { transition: background 0.12s; }
.dt tbody tr:hover { background: #f8fafc; }
.dt-row { cursor: pointer; }
.dt tfoot td { background: #fbfcfd; border-top: 1px solid var(--line); font-weight: 600; }
.dt-compact th, .dt-compact td { padding: 8px 10px; font-size: var(--fs-sm); }
.dt-check { width: 36px; padding-right: 0 !important; }
.dt-check input { accent-color: var(--brand); width: 14px; height: 14px; }
/* 台账付款抽屉里「本次付款」那一列的小输入框：右对齐、跟金额列同一视觉节奏 */
.dt input.pay-amt { width: 104px; height: 30px; padding: 0 8px; text-align: right; border: 1px solid var(--line); border-radius: 8px; font-size: var(--fs-sm); color: var(--ink); background: #fff; }
.dt input.pay-amt:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.dt input.pay-amt::placeholder { color: #b9c0cc; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.th-sort:hover { color: var(--ink); }
.sort-arrow { font-size: var(--fs-2xs); color: #c3c9d4; }
.is-sorted .sort-arrow { color: var(--brand); }
.is-sorted .th-sort { color: var(--ink); font-weight: 600; }
.cell-strong { font-weight: 600; }
/* 发货单位列：超长省略、悬停看全名，避免台账横向被撑太宽 */
/* 发货单号列：长单号省略显示，悬停出全号，避免撑宽台账 */
.cell-ref { display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cell-unit { display: block; max-width: 132px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cell-stack { display: flex; flex-direction: column; line-height: 1.35; }
.cell-stack b { font-weight: 600; }
.cell-stack small { font-size: var(--fs-2xs); color: var(--muted); }
.cell-sub { display: block; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.2; }
/* ---------- 运费价目：一套价一行（11-09 用户「这个价格还是太多了」） ----------
   一行 = 一整套价（260 / 280 / 400 三个数字）+ 这套价覆盖的线路；
   点开才是逐条线路。类名统一 pf- 前缀，不复用 .pick-* / .field
   那套（同名撞过三次，都撞在通用名上）。 */
.pf-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-tiersel select {
  height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); cursor: pointer;
}
.pf-search {
  width: 210px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm);
}
.pf-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pf-search::placeholder { color: var(--muted); }
.pf-head { display: flex; align-items: center; gap: 8px; }
.pf-caret {
  flex: none; width: 20px; height: 20px; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink-2); font-size: 11px; line-height: 1;
  transition: transform 0.15s, color 0.15s, border-color 0.15s;
}
/* 三角用 CSS 画，不用字符：不同机器缺字时会显示成方框（踩过） */
.pf-caret::before {
  content: ""; width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.pf-caret.is-open { transform: rotate(90deg); color: var(--brand); border-color: var(--brand); }
/* 组头两行：上面「清远 / 韶关 → 增城 / 从化」，下面「4 条线路」 */
.pf-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pf-name b { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-meta { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 「展开 ▾ / 收起 ▴」：收纳后必须让人一眼知道这行能点开，别只靠一个淡框三角 */
.pf-tip { flex: none; font-size: var(--fs-2xs); color: var(--brand); white-space: nowrap; opacity: 0.8; }
.pf-group:hover .pf-tip { opacity: 1; }
.pf-group > td { background: var(--surface-2); border-top: 1px solid var(--line); }
.pf-group:hover > td { background: var(--brand-soft); }
.pf-child > td { background: transparent; }
.pf-child:hover > td { background: var(--surface-2); }
.pf-child-name { position: relative; padding-left: 40px !important; color: var(--ink-2); }
.pf-child-name::before {
  content: ""; position: absolute; left: 22px; top: 6px; bottom: 6px;
  width: 2px; border-radius: 2px; background: var(--line);
}
/* 子行价格跟组头一样，只写「同上」——再铺三列数字就是用户嫌的那种重复 */
.pf-child-same { color: var(--muted); font-size: var(--fs-2xs); text-align: center; }
/* 价格列右对齐 + 等宽数字，三个价竖着扫得下去 */
.pf-price th.num-col, .pf-price td.num-col { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 操作列不能写 width:1%：浏览器按 1% 给宽，nowrap 的「改这组价 删」直接溢出到表格右边线外 */
.pf-price td.pf-ops, .pf-price th.pf-ops { white-space: nowrap; text-align: right; }
/* 两个按钮紧挨着会渲染成「改这组价删」，得留间距 */
.pf-ops > * + * { margin-left: 10px; }
.pf-price td.num-col > * + * { margin-left: 6px; }
.pf-hint { margin: 0; padding: 0 16px 12px; }

/* ===== 列表收纳 fold-（2026-11-09）：一行一个主键，点开才是子行 =====
   与 .pf-（价目矩阵）视觉同源、都是主题变量；区别是这里组头是 <button> 可点整行。
   新页面要做收纳一律用 fold-，不要复用 pf-，更不要自己起第三套。 */
.fold-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px 12px; }
.fold-search {
  width: 210px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm);
}
.fold-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fold-search::placeholder { color: var(--muted); }
.fold-stat { margin-left: auto; font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; }
/* 组头整行可点：把 button 的默认外观全清掉，让它长得像表格文字 */
.fold-head {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 0; margin: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.fold-head:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.fold-caret {
  flex: none; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink-2); font-size: 11px; line-height: 1;
  transition: transform 0.15s, color 0.15s, border-color 0.15s;
}
/* 三角用 CSS 画，不用字符：不同机器缺字时会显示成方框（踩过） */
.fold-caret::before {
  content: ""; width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.fold-caret.is-open { transform: rotate(90deg); color: var(--brand); border-color: var(--brand); }
.fold-name { flex: 0 1 auto; min-width: 0; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fold-meta { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; }
.fold-tip { font-size: var(--fs-2xs); color: var(--brand); white-space: nowrap; opacity: 0.8; }
.fold-head:hover .fold-tip { opacity: 1; }
.fold-group > td { background: var(--surface-2); border-top: 1px solid var(--line); }
.fold-group:hover > td { background: var(--brand-soft); }
.fold-child > td { background: transparent; }
.fold-child:hover > td { background: var(--surface-2); }
/* 子行层级：缩进 + 一条竖线，别只靠挤前面几个空格 */
.fold-child-cell { position: relative; display: inline-block; padding-left: 34px; color: var(--ink-2); }
.fold-child-cell::before {
  content: ""; position: absolute; left: 16px; top: 2px; bottom: 2px;
  width: 2px; border-radius: 2px; background: var(--line);
}
.fold-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.total-cell { color: var(--ink); }
.row-ops { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.row-ops > * { flex: none; }
.nowrap { white-space: nowrap; }
.w-44 { width: 44px; } .w-80 { width: 80px; } .w-90 { width: 90px; } .w-100 { width: 100px; } .w-110 { width: 110px; } .w-160 { width: 160px; } .w-170 { width: 170px; }
.dt-form td { padding: 6px 8px; }
.dt-form input, .dt-form select {
  width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 6px;
  padding: 0 7px; font-size: var(--fs-sm); outline: none; background: #fff;
}
.dt-form input:focus, .dt-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
/* 过磅明细等录入表格：大字号 + 卡片式布局，一行排不下自动换行到两行/三行，所有数据始终可见 */
.dt-form { display: block; font-size: 16px; }
.dt-form thead { display: none; }
.dt-form tbody, .dt-form tfoot { display: block; }
.dt-form tbody tr {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end;
  padding: 14px 16px; margin: 0 0 12px;
  border: 1px solid var(--line-soft); border-radius: 12px; background: #fff;
}
.dt-form tbody tr:hover { background: #fff; }
.dt-form td { display: block; flex: 1 1 104px; min-width: 96px; padding: 0; border-bottom: 0; }
.dt-form td[data-label]::before {
  content: attr(data-label); display: block;
  font-size: var(--fs-sm); color: var(--muted); font-weight: 500; margin: 0 0 4px;
}
.dt-form td[data-label="品名"], .dt-form td[data-label="产品"], .dt-form td[data-label="规格/等级"] { flex: 2 1 170px; }
.dt-form td[data-calc] { flex: 0 1 128px; min-width: 108px; text-align: right; }
.dt-form td.num, .dt-form td.strong { white-space: nowrap; }
.dt-form td.ta-center { flex: 0 0 44px; min-width: 44px; align-self: center; }
/* 预订单明细：品名 + 重量/只数/车型/预付 + 删除，760px 抽屉里一行排完不折行 */
.dt-form.pre-lines tbody tr { gap: 10px 10px; }
.dt-form.pre-lines td { flex: 1 1 84px; min-width: 74px; padding: 0; }
.dt-form.pre-lines td:first-child { flex: 2 1 140px; min-width: 120px; }
.dt-form.pre-lines td:last-child { flex: 0 0 36px; min-width: 36px; }
.dt-form.pre-lines td[data-label]::before { white-space: nowrap; }
/* 预订单「匹配当天可装货地」摘要与逐行结果（类目与「当天可装」页对齐） */
.match-sum{display:flex;align-items:center;gap:10px;padding:6px 0 10px;flex-wrap:wrap}
.mini-rows{display:flex;flex-direction:column;gap:6px;margin:2px 0 10px}
.mini-row{display:flex;justify-content:space-between;gap:12px;align-items:baseline;padding:7px 10px;background:#fbfcfd;border:1px solid var(--line-soft);border-radius:8px;font-size:13px}
.mini-row small{color:var(--muted);text-align:right}
/* 确认装鸡地抽屉（2026-11-01）：左边单选、右边档案，选中的整行染色，够装 / 缺多少一眼可见 */
.yard-pick-head { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; margin-bottom:12px; }
.yard-pick-head .field { margin:0; min-width:200px; }
.yard-pick-head .form-tip { flex:1 1 260px; margin:0; }
.yard-table tbody tr { cursor:pointer; }
.yard-table tbody tr:hover { background: var(--surface-2); }
.yard-table tbody tr.is-picked { background: var(--brand-soft); }
.yard-pick-col { width:34px; text-align:center; }
.yard-pick-col input { width:16px; height:16px; accent-color: var(--brand); cursor:pointer; }
.yard-empty { padding:22px 0; text-align:center; color:var(--muted); line-height:1.7; }
.yard-warn {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 8px;
  background: var(--warn-soft); color: var(--warn); font-size: var(--fs-sm); line-height:1.6;
}
.yard-unmarked { margin-top:14px; padding-top:12px; border-top:1px dashed var(--line); }
.yard-unmarked-row {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:8px 10px; border:1px solid var(--line-soft); border-radius:8px; background:var(--surface-2);
  margin-bottom:6px;
}
.yard-unmarked-row small { color: var(--muted); }
.dt-form input, .dt-form select {
  width: 100%; height: 44px; font-size: 16px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff;
}
.dt-form input:focus, .dt-form select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
/* 合计行：单行紧凑排布，标签与数字同行，去掉多余间距 */
.dt-form tfoot tr {
  display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: baseline;
  padding: 8px 16px; margin-top: 4px;
  background: #fbfcfd; border: 1px solid var(--line-soft); border-radius: 10px;
}
.dt-form tfoot td { display: block; padding: 0; font-size: var(--fs-base); }
.dt-form tfoot .tf-label { font-weight: 650; color: var(--ink-2); font-size: var(--fs-md); }
.dt-form tfoot .tf-item span { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; margin-right: 6px; }
.dt-form tfoot .tf-item b { font-size: 17px; color: var(--ink); }
.dt-form tfoot .tf-item b[data-total="amount"] { font-size: 19px; color: var(--brand-dark, #115e59); }

/* 过磅明细底部匹配条：车辆匹配 + 智能识别提示 + 运费，同一行紧凑排布 */
.dt-foot-bar {
  display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: end;
  padding: 12px 16px; margin-top: 10px;
  border: 1px solid var(--line-soft); border-radius: 10px; background: #fff;
}
.dt-foot-bar .field { margin: 0; }
.dt-foot-bar .field > span { display: block; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 4px; }
.dt-foot-bar .dt-vehicle { flex: 0 1 300px; min-width: 240px; }
.dt-foot-bar .dt-vehicle-note { font-style: normal; font-size: var(--fs-2xs); color: var(--brand); background: rgba(15, 118, 110, 0.08); padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; text-decoration: none; display: inline-block; }
.dt-foot-bar a.dt-vehicle-note { cursor: pointer; }
.dt-foot-bar a.dt-vehicle-note:hover { background: rgba(15, 118, 110, 0.16); }
.dt-foot-bar .dt-vehicle-note.is-empty { color: var(--muted); background: #f1f3f7; }
.dt-foot-bar .dt-driver { flex: 0 1 170px; min-width: 140px; }
.dt-foot-bar .dt-freight { flex: 0 1 160px; min-width: 130px; }
/* 运费来源小标（2026-10-25 运费自动匹配报价表）：命中显示报价金额，未命中给「去补线路」入口 */
.dt-foot-bar .dt-freight-note {
  font-style: normal; font-size: var(--fs-2xs); font-weight: 500; margin-left: 6px;
  padding: 1px 6px; border-radius: 4px; vertical-align: 1px;
  color: var(--ok); background: var(--ok-soft);
  white-space: normal; text-decoration: none; display: inline-block;
}
.dt-foot-bar .dt-freight-note.is-empty { color: var(--muted); background: #f1f3f7; }
.dt-foot-bar a.dt-freight-note.is-miss { color: var(--warn); background: var(--warn-soft); cursor: pointer; }
.dt-foot-bar a.dt-freight-note.is-miss:hover { background: #fef3c7; }
.dt-foot-bar .dt-payer { flex: 0 1 200px; min-width: 160px; }
.dt-foot-bar .dt-vehicle select, .dt-foot-bar .dt-driver input, .dt-foot-bar .dt-freight input, .dt-foot-bar .dt-payer input {
  width: 100%; height: 42px; font-size: var(--fs-md); padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fff;
}
.dt-foot-bar .dt-vehicle select:focus, .dt-foot-bar .dt-driver input:focus, .dt-foot-bar .dt-freight input:focus, .dt-foot-bar .dt-payer input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.dt-foot-bar .cage-hint { flex: 1 1 260px; font-size: var(--fs-base); color: var(--ink-2); line-height: 1.6; padding-bottom: 9px; }
.dt-foot-bar .cage-hint b { color: var(--ink); }
.dt-foot-bar .cage-hint .danger { color: var(--danger, #dc2626); }
/* 司机一栏：输入框右侧并排显示司机手机号（选车带出后自动出现，点一下复制）
   注意：底栏的 `.field > span` 会把子 span 变成块级灰标签，这里用更高优先级改回 flex */
.dt-foot-bar .dt-driver { flex: 0 1 260px; min-width: 210px; }
.dt-foot-bar .field .dt-driver-box {
  display: flex; align-items: center; gap: 8px; height: 42px; margin-bottom: 0;
  padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-size: 15px; color: var(--ink);
}
.dt-foot-bar .field .dt-driver-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.dt-foot-bar .field .dt-driver-box input {
  flex: 1 1 auto; min-width: 0; width: auto; height: 100%; padding: 0;
  border: none; border-radius: 0; background: transparent; font-size: 15px;
}
.dt-foot-bar .field .dt-driver-box input:focus { border-color: transparent; box-shadow: none; }
.dt-foot-bar .dt-driver-phone {
  flex: none; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer;
  padding-left: 8px; border-left: 1px solid var(--line-soft);
}
.dt-foot-bar .dt-driver-phone:hover { color: var(--brand); }
.dt-foot-bar .dt-driver-phone.is-empty { display: none; }
.dt-form .icon-btn { height: 40px; min-width: 40px; font-size: 17px; }
.perms-table .tick { color: var(--ok); font-weight: 700; }
.perms-table .dash { color: #d1d5db; }
/* 可编辑权限矩阵：勾选框与“已自定义”标记 */
.perms-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; margin: 0; }
.perm-custom-tag { color: var(--brand); font-weight: 600; }
/* 未挂门禁（2026-10-26）：权限点存在于矩阵但页面里还没有对应判断，勾了不生效 */
.perm-ungated { color: var(--warn); font-weight: 600; }
/* 权限矩阵分组（2026-10-26）：按板块折叠 + 搜索过滤；首列吸附，横向滚动时权限名不跑丢 */
.perm-group {
  border: 1px solid var(--line-soft); border-radius: 10px; margin-bottom: 12px;
  background: #fff; overflow: hidden;
}
.perm-group > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer; user-select: none;
  font-size: var(--fs-sm); color: var(--ink);
  background: #f8fafc; list-style: none;
}
.perm-group > summary::-webkit-details-marker { display: none; }
.perm-group > summary::before {
  content: "▸"; font-size: 12px; color: var(--muted); transition: transform 0.15s ease;
}
.perm-group[open] > summary::before { transform: rotate(90deg); }
.perm-group > summary:hover { background: #f1f5f9; }
.perm-group > summary b { font-weight: 600; }
.perm-group-count {
  flex: none; font-size: var(--fs-xs); color: var(--muted);
  background: #eef2f7; border-radius: 999px; padding: 1px 8px;
}
.perm-group-sub { font-size: var(--fs-xs); color: var(--muted); }
.perm-group .dt-wrap { border-top: 1px solid var(--line-soft); }
.perm-group .dt-wrap .perms-table { min-width: 720px; }
.perms-table th:first-child, .perms-table td:first-child {
  position: sticky; left: 0; z-index: 3;
  background: #fff; text-align: left;
  border-right: 1px solid var(--line-soft);
  min-width: 180px;
}
.perms-table thead th:first-child { z-index: 5; background: #fff; }
/* 账号列表：管理员可直接改角色 */
select.role-select {
  height: 28px; border: 1px solid var(--line); border-radius: 6px;
  padding: 0 6px; font-size: var(--fs-sm); background: #fff; color: var(--ink); cursor: pointer; outline: none;
}
select.role-select:hover { border-color: var(--brand); }
.user-cell { display: flex; align-items: center; gap: 9px; }

/* 账号按角色分组（2026-11-01）：组头只露角色名 + 人数 + 板块，点开才列账号；
   搜索框放在组上方，输入即过滤（DOM 过滤，不重绘、不失焦）。 */
.acct-card { padding-bottom: 4px; }
.acct-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 14px 12px;
}
.acct-tools .search-inline { flex: 0 1 340px; }
.acct-tools .search-inline input { width: 100%; height: 34px; }
.acct-stat { font-size: var(--fs-sm); color: var(--muted); }
.acct-stat b { color: var(--ink); font-variant-numeric: tabular-nums; }
.acct-bulk { flex: none; }
.acct-groups { padding: 0 14px; }
.acct-group { margin-bottom: 10px; }
.acct-group > summary { gap: 8px; padding: 11px 14px; }
.acct-group > summary b { font-size: var(--fs-base); }
.acct-count {
  flex: none; font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums;
  background: #eef2f7; border-radius: 999px; padding: 1px 9px;
}
.acct-note { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-off { flex: none; }
.acct-toggle-hint { flex: none; font-size: var(--fs-xs); color: var(--brand); }
.acct-group[open] .acct-toggle-hint { color: var(--muted); }
.acct-group .acct-body { border-top: 1px solid var(--line-soft); }
.acct-group .dt-wrap table { min-width: 640px; }
.acct-none {
  margin: 4px 14px 14px; padding: 10px 12px; border-radius: 8px;
  background: var(--warn-soft); color: var(--warn); font-size: var(--fs-sm);
}
.acct-vacant { margin: 2px 14px 14px; font-size: var(--fs-xs); color: var(--muted); }
.acct-empty { padding: 0 14px 14px; }

.badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  border-radius: 999px; font-size: var(--fs-xs); white-space: nowrap; border: 1px solid transparent;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #d1fae5; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; }
.badge-info { background: var(--brand-soft); color: var(--brand-dark); border-color: #dbeafe; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.badge-mute { background: #f3f4f6; color: var(--muted); border-color: #e5e7eb; }

/* ---------- 分页 ---------- */

.pager { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.pager-info { font-size: var(--fs-sm); color: var(--muted); }
.pager-info b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pager-btns { display: flex; gap: 4px; }
.pg-btn {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--line); background: #fff; font-size: var(--fs-sm); cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.pg-btn:hover { border-color: #cbd5e1; }
.pg-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg-btn.is-disabled { color: #cbd5e1; cursor: default; }
.pager-size { margin-left: auto; font-size: var(--fs-sm); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pager-size select { height: 28px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: var(--fs-sm); }

/* ---------- 抽屉 ---------- */

body.drawer-open { overflow: hidden; }
.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.32); z-index: 100; animation: fade 0.16s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw;
  background: #fff; z-index: 101; display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
  animation: slideIn 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer-wide { width: 760px; }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: var(--fs-lg); font-weight: 650; }
.drawer-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.drawer-foot {
  display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px;
  border-top: 1px solid var(--line); background: var(--surface-2);
}
/* 「操作」分组（2026-11-02）：取消/删除这类处理动作靠左自成一组，流程按钮留在右侧 */
.drawer-foot .foot-ops {
  display: flex; align-items: center; gap: 8px; margin-right: auto;
  padding-left: 10px; border-left: 3px solid var(--line); flex-wrap: wrap;
}
.drawer-foot .foot-ops-label { font-size: var(--fs-xs); color: var(--muted); letter-spacing: 2px; }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.drawer-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 16px; border-radius: 10px; margin-bottom: 14px;
  background: linear-gradient(135deg, #f8fbff, #f2f6fd); border: 1px solid #e4edfb;
}
.dh-name { font-size: 18px; font-weight: 650; letter-spacing: 0.3px; }
.dh-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.dh-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.dh-right { text-align: right; }
.dh-label { font-size: var(--fs-xs); color: var(--muted); display: block; }
.dh-amount { font-size: 21px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.fig { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 8px; padding: 9px 11px; }
.fig span { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.fig b { font-size: var(--fs-base); font-variant-numeric: tabular-nums; }

.drawer-sec { margin-bottom: 18px; }
.drawer-sec h3 { font-size: var(--fs-sm); font-weight: 650; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.sec-note { font-size: var(--fs-2xs); color: var(--muted); font-weight: 400; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.info-row { background: #fff; padding: 8px 11px; display: flex; gap: 10px; font-size: var(--fs-sm); }
.info-row > span { color: var(--muted); flex: 0 0 68px; }
.info-row > div { min-width: 0; word-break: break-word; }
.fee-list { border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.fee-row { display: flex; justify-content: space-between; padding: 7px 11px; font-size: var(--fs-sm); border-bottom: 1px solid var(--line-soft); }
.fee-row:last-child { border-bottom: 0; }
.fee-row span { color: var(--muted); }
.fee-row b { font-variant-numeric: tabular-nums; }
.fee-total { background: var(--surface-2); font-weight: 600; }
.timeline { display: grid; gap: 2px; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; position: relative; }
.timeline .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: 0 0 7px; }
.timeline .tl-main { display: flex; flex-direction: column; line-height: 1.35; }
.timeline small { font-size: var(--fs-2xs); color: var(--muted); }
.note-text { font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }

.pay-order-list { display: grid; gap: 8px; }
.pay-order { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
.po-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.po-main small { font-size: var(--fs-2xs); color: var(--muted); }
.po-money { text-align: right; display: flex; flex-direction: column; }
.po-money span { font-size: var(--fs-2xs); color: var(--muted); }
.po-money b { font-size: var(--fs-base); font-variant-numeric: tabular-nums; }
.po-money.has-input { flex-direction: row; align-items: center; gap: 4px; }
.wage-input { width: 82px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; font-size: var(--fs-sm); text-align: right; font-variant-numeric: tabular-nums; }
.wage-input:focus { outline: none; border-color: var(--brand); }

/* 结算抽屉：按趟勾选（2026-11-06） */
.pay-order.po-pick { cursor: pointer; }
.pay-order.po-pick:hover { background: var(--surface-2); }
.pay-order.po-pick input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; flex: none; }
.pay-order.po-pick input[type="checkbox"]:not(:checked) ~ .po-main,
.pay-order.po-pick input[type="checkbox"]:not(:checked) ~ .po-money { opacity: 0.5; }
.settle-pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.settle-pick-ops { display: flex; gap: 10px; }
.settle-pick-ops .link { font-size: var(--fs-xs); }
.settle-quick { display: flex; align-items: center; gap: 8px; margin: -2px 0 6px; flex-wrap: wrap; }

/* 结款入口（2026-11-06 晚）：未付金额下挂一行小字，结清的行也明说「已结清」，
   避免用户以为整行没有结款功能 */
.owed-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; line-height: 1.35; }
.owed-hint { font-size: var(--fs-2xs); color: var(--brand); white-space: nowrap; }
.owed-hint.muted { color: var(--muted); }
/* 结算金额框置顶后加大字号：一眼看出这是「这次付多少」。
   选择器要比后面的 .field input 更具体，否则高度被覆盖 */
.field.field-amount input.settle-amount {
  font-size: var(--fs-lg, 20px); font-weight: 700; letter-spacing: 0.4px;
  font-family: var(--font-num); height: 46px;
}
.tip-strong { background: var(--surface-2, #f8fafc); border-left: 3px solid var(--brand); padding: 8px 10px; border-radius: 6px; }

/* 车队结算 ↔ 往来台账对账条（2026-11-07）：把「本月 / 往月 / 合计」拆开，
   让"为什么台账只显示一小截"写在页面上 */
.fleet-recon {
  margin: 10px 0 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface-2, #f8fafc);
  display: flex; flex-direction: column; gap: 8px;
}
.fleet-recon .fr-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fleet-recon .fr-head b { font-size: var(--fs-sm); }
.fleet-recon .fr-nums { display: flex; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.fleet-recon .fr-nums > span { display: inline-flex; align-items: baseline; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.fleet-recon .fr-nums b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-md); color: inherit; }
.fleet-recon .fr-nums small { font-size: var(--fs-2xs); color: var(--muted); }
.fleet-recon .fr-all { border-left: 1px dashed var(--line); padding-left: 16px; }
/* 待回磅：钱还没产生，单独一档，别和「未付」混在一起（2026-11-07） */
.fleet-recon .fr-pend { color: var(--muted); }
.fleet-recon .fr-pend b { color: var(--warn, #b45309); }
/* 两层账对照条（2026-11-07）：运费 − 应发 = 毛利，把「欠车主」和「欠司机」为什么不能比大小写死 */
.fleet-layers {
  margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2, #f8fafc); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--muted);
}
.fleet-layers > span { display: inline-flex; align-items: baseline; gap: 5px; }
.fleet-layers b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-md); color: var(--text); }
.fleet-layers b.ok { color: var(--ok, #047857); }
.fleet-layers b.danger { color: var(--danger, #b91c1c); }
.fleet-layers em { font-style: normal; color: var(--muted); font-family: var(--font-num); }
.fleet-layers .muted { flex: 1 1 100%; line-height: 1.6; font-size: var(--fs-2xs); }
.fleet-layers.is-neg { border-color: var(--danger, #b91c1c); background: var(--danger-soft, #fef2f2); }

.fleet-pending {
  margin: 0 0 12px; padding: 9px 12px; border: 1px dashed var(--line);
  border-left: 3px solid var(--muted); border-radius: 9px; background: var(--surface-2, #f8fafc);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.fleet-pending b { font-size: var(--fs-sm); }
.fleet-pending .muted { flex: 1 1 360px; line-height: 1.6; }

/* 公司代垫司机工资提示条（2026-11-07）：公司替车主垫的钱，不显眼就会再付一遍 */
.fleet-advance {
  margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--warn, #f59e0b);
  border-left-width: 3px; border-radius: 9px; background: var(--warn-soft, #fffbeb);
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.fleet-advance b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.fleet-advance .muted { flex: 1 1 320px; }
.batch-deduct {
  width: 84px; padding: 2px 6px; margin: 0 4px; border: 1px solid var(--line);
  border-radius: 6px; font-family: var(--font-num); text-align: right; background: var(--surface);
}

/* 收款预览条（2026-11-06）：把「这次收多少 / 还剩多少」摆明，避免人算着结 */
.settle-preview {
  margin: 6px 0 8px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface-2, #f8fafc);
  display: flex; flex-direction: column; gap: 4px;
}
.settle-preview .sp-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); }
.settle-preview .sp-line span { color: var(--muted); font-size: var(--fs-xs); }
.settle-preview .sp-line b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-md); }
.settle-preview .sp-note { font-size: var(--fs-2xs); color: var(--muted); line-height: 1.5; }
.settle-preview .sp-warn b { color: var(--danger); }

/* ---------- 弹窗与提示 ---------- */

.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); z-index: 120; animation: fade 0.14s; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 420px; max-width: 92vw; background: #fff; border-radius: 12px; z-index: 121;
  padding: 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  animation: pop 0.16s ease;
}
.modal h3 { font-size: var(--fs-lg); font-weight: 650; margin-bottom: 8px; }
.modal-text { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 8px;
  background: #111827; color: #fff; padding: 9px 14px; border-radius: 9px;
  font-size: var(--fs-sm); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  animation: toastIn 0.18s ease;
}
.toast.is-out { opacity: 0; transform: translateY(-4px); transition: all 0.2s; }
.toast-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; }
.toast-warn .toast-dot { background: #f59e0b; }
.toast-error .toast-dot { background: #ef4444; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 表单 ---------- */

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > span { font-size: var(--fs-xs); color: var(--muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-size: var(--fs-base); background: #fff; outline: none; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.field textarea { resize: vertical; min-height: 64px; }
.req { color: var(--danger); font-style: normal; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 32px; }
.input-suffix i { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: var(--fs-xs); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 统一「检索选择器」（可搜索下拉，2026-11-02 合并版）----------
   客户 / 卸鸡队 / 装货养殖场 / 司机 / 车牌 / 转入司机 共用一个控件：
   输入框显示所选名称、点开弹候选列表、输入即过滤、唯一命中自动选中。
   结构件：.pick-combo 容器 + .pick-input 输入框 + .pick-arrow 箭头
   + 隐藏 select（存值）+ .pick-list 候选列表（li.pick-opt）。 */
.pick-combo { position: relative; }
.pick-combo .pick-input { padding-right: 30px; cursor: pointer; }
.pick-combo .pick-arrow {
  position: absolute; right: 10px; top: 9px; pointer-events: none;
  font-size: 12px; color: var(--muted); line-height: 1;
}
.pick-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60;
  margin: 0; padding: 4px; list-style: none;
  max-height: 248px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.pick-opt {
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
  font-size: var(--fs-base); color: var(--ink); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-opt:hover { background: rgba(15, 118, 110, 0.08); }
.pick-opt.is-sel { color: var(--brand); font-weight: 600; }
.pick-opt.is-dead { color: #94a3b8; cursor: not-allowed; text-decoration: line-through; }
.pick-opt.is-hidden { display: none; }
.pick-list .pick-opt:first-child { color: var(--muted); } /* 占位项（请选择…/暂不指定…）淡显 */
/* 修复（2026-11-02 用户反馈「下拉字显示不全」）：下方老弹层组件也有同名 .pick-list
   （flex 纵向 + gap），把本下拉压成 flex 后容器限高会等比压缩每个选项，
   叠加 .pick-opt 的 overflow:hidden 就裁字了。这里改回 block 隔离。 */
.pick-combo .pick-list { display: block; }
@media (max-width: 960px) { .form-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 入库/发货单录入抽屉的明细行输入框：无边框融入表格 */
.doc-input { width: 100%; border: none; border-bottom: 1px dashed var(--line); background: transparent; padding: 6px 4px; font-size: var(--fs-sm); }
.doc-input:focus { outline: none; border-bottom-color: var(--brand); }
/* 默认价（入库单漏价时按客户等级价/品种档案带出）：黄色虚线提醒核对，手改后自动摘掉 */
.doc-input.price-auto { border-bottom-color: #d97706; border-bottom-style: dashed; }
.doc-lines th, .doc-lines td { padding: 4px 6px; }
.field-full { grid-column: 1 / -1; }
/* 字段下的小字说明（如「发货服务部」可改但运费不联动）：贴在下拉下方，不占表单行高 */
.field-note { font-style: normal; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.5; margin-top: -1px; }
/* 供货养殖户 + 联系电话合并控件：左边下拉选人（选项自带电话/存栏），右边电话贴在同一框里，自动带出可手改 */
.field-sub { font-style: normal; color: var(--muted); opacity: 0.85; margin-left: 8px; }
.farm-pick { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.farm-pick:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.farm-pick > select, .farm-pick > input { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.farm-pick > select:focus, .farm-pick > input:focus { border-color: transparent; box-shadow: none; }
.farm-pick > .farm-select { flex: 1 1 auto; min-width: 0; }
.farm-pick > .farm-name { flex: 1 1 auto; min-width: 0; padding-left: 12px; }
.farm-pick > .farm-phone { flex: 0 0 168px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.farm-pick > .farm-toggle {
  flex: none; border: 0; border-left: 1px solid var(--line); background: #f5f7fa;
  color: var(--brand); font-size: var(--fs-sm); padding: 0 10px; cursor: pointer; white-space: nowrap;
}
.farm-pick > .farm-toggle:hover { background: #eef2ff; }
/* 三列布局下（销售公司卡片）右侧电话框收窄，给下拉留空间 */
.field-farm .farm-pick > .farm-phone { flex: 0 0 118px; }
@media (max-width: 720px) { .farm-pick { flex-wrap: wrap; } .farm-pick > .farm-phone { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--line); } }
/* 本单客户（2026-11-03）：客户名 + 手机号并排，交互与外观同供货养殖户控件 */
.cust-pick { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.cust-pick:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.cust-pick > input { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.cust-pick > input:focus { border-color: transparent; box-shadow: none; }
.cust-pick > input[data-field="custName"] { flex: 1 1 auto; min-width: 0; padding-left: 12px; }
.cust-pick > input[data-field="custPhone"] { flex: 0 0 168px; border-left: 1px solid var(--line); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .cust-pick { flex-wrap: wrap; } .cust-pick > input[data-field="custPhone"] { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--line); } }
.form-error { color: var(--danger); font-size: var(--fs-sm); background: var(--danger-soft); border-radius: 7px; padding: 7px 10px; margin: 4px 0 10px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; grid-column: 1 / -1; margin-top: 4px; }
.stack-form { display: grid; gap: 14px; }
/* 底部两卡等高：费用卡（含备注）撑起行高，结算预览卡与之底边对齐；
   费用明细（货款/费用）在卡内下移 15mm，合计压到卡片底部与说明文字成组 */
.form-bottom { align-items: stretch; }
.form-bottom > .card { display: flex; flex-direction: column; min-width: 0; }
.form-bottom > .card.settle .settle-rows { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding-top: 15mm; }
.form-bottom > .card.settle .settle-total { margin-top: auto; }
.form-bottom > .card.settle .muted { margin-top: 12px; }
.settle-rows { display: grid; gap: 6px; font-size: var(--fs-sm); }
.settle-rows > div { display: flex; justify-content: space-between; }
.settle-rows span { color: var(--muted); }
.settle-rows b { font-variant-numeric: tabular-nums; }
.settle-total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 8px; font-size: var(--fs-base); }
.settle-total b { font-size: var(--fs-xl); color: var(--brand); letter-spacing: -0.3px; }
.settle .muted { margin: 12px 0 0; line-height: 1.6; }
/* 结算预览卡头右侧：客户跟车勾选 + 取消/确认（保存按钮跟着表单走，页面顶部不再重复）。
   整组动作包一条浅蓝底色胶囊，跟左侧标题拉开层级，视觉上不再是散排的文字按钮。 */
.card-head.settle-head { align-items: center; }
.settle-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; background: var(--brand-soft); border: 1px solid #d8e6fd; border-radius: 10px; padding: 6px 8px 6px 14px; }
.settle-tools .btn { box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06); }
.ride-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 2px; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; cursor: pointer; user-select: none; }
.ride-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.ride-check:hover { color: var(--ink); }
/* 预订单「客户要求跟车」功能框：整块可点，长说明换行，勾选态高亮边框 */
.ride-card { padding: 12px 16px; transition: border-color 0.15s, background 0.15s; }
.ride-card .ride-check { display: flex; align-items: flex-start; white-space: normal; line-height: 1.65; gap: 10px; font-size: var(--fs-base); }
.ride-card .ride-check input { margin-top: 3px; flex: none; }
.ride-card .ride-check span b { color: var(--ink); font-weight: 600; }
.ride-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ride-card:has(input:checked) .ride-check { color: var(--brand-dark); }
/* 客户跟车锁定态：转发货单时过磅明细只读 */
.doc-input.locked { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.lock-badge { font-size: var(--fs-sm); color: var(--warn); background: var(--warn-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.lock-dot { display: inline-block; padding: 1px 6px; border-radius: 5px; background: var(--line-soft); color: var(--muted); font-size: var(--fs-xs); }
.form-tip.ride-tip { background: var(--brand-soft); color: var(--brand-dark); border-radius: 8px; padding: 8px 11px; }
/* 接客户只派一台车：勾上后选第几台去（2026-11-01） */
.ride-seq { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-left: 25px; font-size: var(--fs-sm); color: var(--ink-2); }
.ride-seq select { min-width: 120px; }
/* 装货场「场存栏 vs 订货量」对比条 */
.pre-stock-gap { grid-column: 1 / -1; }
.gap-line { display: inline-block; padding: 7px 12px; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.5; }
.gap-line b { font-variant-numeric: tabular-nums; }
.gap-ok { background: var(--brand-soft); color: var(--brand-dark); }
.gap-warn { background: var(--warn-soft); color: var(--warn); }
/* 排车口径切换（装满 / 少车） */
.plan-mode-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.plan-mode-label { font-size: var(--fs-sm); color: var(--muted); margin-right: 2px; }
.plan-mode { display: flex; flex-direction: column; gap: 1px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; text-align: left; }
.plan-mode b { font-size: var(--fs-sm); color: var(--ink); font-weight: 600; }
.plan-mode small { font-size: var(--fs-xs); color: var(--muted); }
.plan-mode.is-on { border-color: var(--brand); background: var(--brand-soft); }
.plan-mode.is-on b { color: var(--brand-dark); }

.stat-list { display: grid; gap: 0; }
.stat-list > div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.stat-list span { color: var(--muted); }
.stat-list b { font-variant-numeric: tabular-nums; }
.hr { border: 0; border-top: 1px solid var(--line-soft); margin: 16px 0; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.danger-zone b { display: block; font-size: var(--fs-sm); }
.danger-zone small { color: var(--muted); font-size: var(--fs-xs); }
/* 清理区（2026-11-10）：从页脚橙点跳过来要「看得出是哪一段」。
   负 margin 把底色外扩一圈，净位置不变 —— 不做这件事的话闪动会顶得整页跳一下。 */
.clear-zone { padding: 10px 12px; margin: -10px -12px; border-radius: 12px; }
.clear-zone.is-flash { animation: clearZoneFlash 2.6s ease-out; }
@keyframes clearZoneFlash {
  0% { background: rgba(239, 68, 68, 0.1); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4); }
  60% { background: rgba(239, 68, 68, 0.06); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16); }
  100% { background: transparent; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------- 空状态 ---------- */

.empty { text-align: center; padding: 34px 12px; color: var(--muted); }
.empty-mark { font-size: 22px; color: #d1d5db; margin-bottom: 6px; }
.empty p { font-size: var(--fs-sm); }
.empty small { color: #9ca3af; font-size: var(--fs-xs); }
.skeleton { padding: 12px; display: grid; gap: 8px; }
.sk-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #f1f3f7, #e9edf3, #f1f3f7); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 响应式 ---------- */

.sidebar-mask { display: none; }

body.sidebar-collapsed .sidebar { width: 64px; flex-basis: 64px; }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-group-title,
body.sidebar-collapsed .nav-subtitle,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-foot { display: none; }
body.sidebar-collapsed .brand { justify-content: center; padding: 18px 0 16px; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 10px; }
/* 折叠态隐藏「筹备中」标签，只留图标（与其它菜单一致） */
body.sidebar-collapsed .nav-soon-tag { display: none; }
body.sidebar-collapsed .nav { padding: 10px 8px; }
/* 折叠态只留图标：组体强制展开，所有入口照旧可点（2026-11-15 手风琴导航适配） */
body.sidebar-collapsed .nav-group-body { display: block !important; }

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform 0.2s ease; box-shadow: var(--shadow-md);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-mask { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35); z-index: 25; }
  .page { padding: 16px 14px 40px; }
  .grid-2 { grid-template-columns: 1fr; }
  .global-search { display: none; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
  .page-head { flex-direction: column; }
  .page-actions { margin-left: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr; }
  .modal { width: 92vw; }
}

@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .drawer, .drawer-wide { width: 100vw; max-width: 100vw; }
  .summary-bar { overflow-x: auto; flex-wrap: nowrap; }
  .sum-item { flex: 0 0 auto; }
  .pager-size { margin-left: 0; }
  .page-actions .btn { flex: 1; }
}

/* ===== 派车：车次卡片与手机号匹配 ===== */
.trip-section .trip-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: none;
}
.trip-card + .trip-card { margin-top: 12px; }
.trip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.trip-plate { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trip-plate b { font-size: var(--fs-md); letter-spacing: 0.4px; }
.trip-who { color: var(--muted); font-size: var(--fs-sm); }
/* 司机档案「今日」列：空闲的用品牌色加粗（不用行情涨跌色，避免误读成价格含义） */
.trip-idle { color: var(--brand); font-weight: 600; }
.trip-route { margin: 8px 0 8px; display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-2); flex-wrap: wrap; }
.trip-route i { color: var(--muted); font-style: normal; }
.trip-stats {
  display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: var(--fs-sm); color: var(--muted);
  padding: 8px 0; border-top: 1px dashed var(--line-soft); border-bottom: 1px dashed var(--line-soft);
}
.trip-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.trip-match { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.trip-match input {
  flex: 1; min-width: 200px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: var(--fs-sm);
}
.trip-match input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.trip-empty { margin: 10px 0 0; color: var(--muted); font-size: var(--fs-sm); }

.match-panel {
  margin-top: 10px; border: 1px solid #bfdbfe; background: var(--brand-soft);
  border-radius: 10px; padding: 12px 14px;
}
.match-panel.is-empty { border-color: var(--line); background: var(--surface-2); }
.match-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.match-empty { margin: 0 0 10px; font-size: var(--fs-sm); color: var(--ink-2); }
.match-list { display: grid; gap: 5px; }
.match-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 10px;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 8px;
  font-size: var(--fs-sm); cursor: pointer;
}
.match-row.is-bound { cursor: default; }
.match-row.is-focus { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.match-row .mr-no { font-size: var(--fs-xs); color: var(--muted); min-width: 168px; font-family: ui-monospace, monospace; }
.match-row .mr-name { flex: 1; min-width: 0; }
.match-row .mr-date { color: var(--muted); }
.match-row .mr-num { font-variant-numeric: tabular-nums; text-align: right; min-width: 86px; }
.match-row .mr-op { width: 24px; text-align: right; }
.match-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }

/* ===== 预订单列表：折叠子单行（2026-11-01 用户口径：按客户归总，一单多车点开展开） ===== */
.pre-fold-btn { font-size: var(--fs-xs); padding: 0; }
tr.pre-sub-row > td {
  padding: 0 10px 10px 34px;
  /* 上一行是给 Chromium 108 及以下（Win7 收银机 / Electron 22）的兜底，不认 color-mix */
  background: var(--brand-soft);
  background: color-mix(in srgb, var(--brand-soft) 55%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.pre-cars-fold { display: grid; gap: 6px; }
.pre-fold-label { font-size: var(--fs-xs); color: var(--muted); }
.pre-car-chip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line-soft); border-radius: 8px;
  padding: 6px 10px; font-size: var(--fs-sm);
}
.pre-car-chip.is-done { background: var(--surface-2); }
.pre-car-chip .chip-seq { font-weight: 700; color: var(--brand-dark); min-width: 68px; }
.pre-car-chip .chip-main { display: flex; flex-direction: column; min-width: 150px; }
.pre-car-chip .chip-main small { color: var(--muted); }
.pre-car-chip .chip-state { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 140px; }
.pre-car-chip .chip-state small { color: var(--muted); }
.pre-car-chip .chip-ops { margin-left: auto; }

.banner {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--brand-soft); border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 10px 14px; font-size: var(--fs-sm);
}
.banner b { color: var(--brand-dark); }
.banner .link { margin-left: auto; text-decoration: none; }

/* ===== 养殖场：行政区划录入 ===== */
.region-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.region-grid input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.region-grid input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.addr-preview {
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface-2, #f8fafc);
  border: 1px dashed var(--line);
  font-size: var(--fs-sm);
  color: var(--ink-2, #475569);
  word-break: break-all;
}
.link-muted { color: var(--muted); }
.link-muted:hover { color: var(--ink); }
.card-table .table-toolbar .tt-right .small { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== 派车：养殖场搜索与按单指派 ===== */
.farm-box { position: relative; }
.farm-suggest {
  position: absolute; top: calc(100% - 18px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12); overflow: hidden; padding: 4px;
}
.farm-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; padding: 8px 10px; border-radius: 7px;
  font-size: var(--fs-sm); cursor: pointer; text-align: left;
}
.farm-item:hover { background: var(--brand-soft, #e7f3ef); }
.farm-item b { flex: 0 0 auto; }
.farm-item .mono { color: var(--muted); }
.farm-item small { margin-left: auto; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm-hint { margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-2, #475569); word-break: break-all; min-height: 14px; }

/* 当天可装：挑选抽屉与提示文案 */
.form-tip { margin: 2px 0 0; font-size: var(--fs-xs); color: var(--muted, #64748b); line-height: 1.6; }
/* 单证页「待转换（内部）」作业台提示：入库单未审核，不能对外 */
.form-tip.doc-internal-note { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.form-tip.warn-note { margin: 6px 0 0; padding: 7px 11px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }

/* 图片识别录入抽屉 */
.scan-config { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; background: var(--surface-2, #f8fafc); }
.scan-config summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2, #334155); }
.scan-drop { display: block; border: 1.5px dashed var(--brand, #0f766e); border-radius: 12px; background: var(--brand-soft, #e7f3ef); padding: 26px 16px; text-align: center; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.scan-drop.is-over { background: #cfe9e1; border-color: #115e59; }
.scan-drop-inner b { display: block; font-size: var(--fs-base); color: var(--brand-dark, #115e59); }
.scan-drop-inner span { display: block; margin-top: 4px; font-size: var(--fs-xs); color: var(--muted, #64748b); }
.scan-preview { margin-top: 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 8px; background: #fff; }
.scan-preview img { display: block; max-width: 100%; max-height: 260px; margin: 0 auto; border-radius: 6px; }
.scan-filename { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--muted, #64748b); text-align: center; word-break: break-all; }
.scan-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.scan-status { font-size: var(--fs-sm); color: var(--ink-2, #334155); }
.scan-result { margin-top: 12px; border: 1px solid #d1fae5; border-radius: 10px; padding: 10px 12px; background: #f0fdf4; }
.scan-result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.scan-result-head b { font-size: var(--fs-base); }
.scan-result ul { margin: 0; padding-left: 18px; font-size: var(--fs-sm); line-height: 1.8; color: var(--ink-2, #334155); }
/* 识别明细：品名单独一行，数量/重量/单价/金额做成小标签，逐格对着纸质单核对 */
.scan-result .scan-line { list-style: none; margin: 2px 0 6px -18px; line-height: 1.5; }
.scan-line-head { font-weight: 600; }
.scan-line-body { display: flex; flex-wrap: wrap; margin-top: 3px; }
.scan-chip { display: inline-block; margin: 0 6px 4px 0; padding: 1px 8px; border-radius: 999px; background: rgba(52, 211, 153, 0.16); font-size: var(--fs-xs); white-space: nowrap; }
.scan-chip b { font-weight: 600; margin: 0 2px; }
.scan-warn-tip { color: #b45309; }

/* 磅单识别入库（2026-10-28）：一图一卡，左边原图、右边可改字段。
   卡片自称一套浅色配色：后台可切深色玻璃皮肤，这里若跟着 var(--ink) 走会白底白字。 */
.msi-slip-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.msi-slip { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
.msi-slip.is-ok { border-color: #bbf7d0; }
.msi-slip.is-warn { border-color: #fde68a; }
.msi-slip-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.msi-slip-side img { width: 100%; height: 118px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid #e2e8f0; }
.msi-slip-noimg { display: flex; align-items: center; justify-content: center; height: 118px; border-radius: 8px; background: #f8fafc; border: 1px dashed #e2e8f0; font-size: var(--fs-xs); color: #64748b; }
.msi-slip-side .link { align-self: flex-start; font-size: var(--fs-xs); color: #94a3b8; }
.msi-slip-side .link:hover { color: #b91c1c; }
.msi-slip-tag { display: inline-block; align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); background: #f1f5f9; color: #475569; }
.msi-slip-tag.is-ok { background: #dcfce7; color: #15803d; }
.msi-slip-tag.is-warn { background: #fef3c7; color: #a16207; }
.msi-slip-tag.is-run { background: #e0f2fe; color: #0369a1; }
.msi-slip-tag.is-err { background: #fee2e2; color: #b91c1c; }
.msi-slip-main { min-width: 0; }
.msi-slip-meta { font-size: var(--fs-xs); color: #64748b; line-height: 1.6; word-break: break-all; margin-bottom: 6px; }
.msi-slip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.msi-slip-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.msi-slip-cell > span { font-size: var(--fs-xs); color: #64748b; }
.msi-slip-cell input { width: 100%; height: 32px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: var(--fs-sm); background: #fff; color: #0f172a; font-variant-numeric: tabular-nums; }
.msi-slip-cell input::placeholder { color: #94a3b8; }
.msi-slip-cell input:focus { outline: 2px solid #99f6e4; outline-offset: 0; border-color: #0f766e; }
.msi-slip-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; font-size: var(--fs-sm); color: #334155; }
.msi-slip-foot b { color: #0f172a; font-variant-numeric: tabular-nums; }
.msi-slip-foot .link { font-size: var(--fs-xs); color: #0f766e; }
.msi-slip-err { margin: 6px 0 0; font-size: var(--fs-xs); color: #b91c1c; }
.msi-slip-empty { padding: 22px 16px; border: 1px dashed #cbd5e1; border-radius: 12px; text-align: center; font-size: var(--fs-sm); color: #64748b; background: #fff; }
.msi-slip-sum { margin-top: 14px; padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; display: flex; flex-direction: column; gap: 6px; }
.msi-slip-sum-head { font-size: var(--fs-xs); color: #15803d; }
.msi-slip-sum-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: var(--fs-sm); color: #334155; }
.msi-slip-sum-row b { font-size: var(--fs-base); color: #0f172a; }
.msi-slip-sum-row em { font-style: normal; color: #b45309; font-size: var(--fs-xs); }
@media (max-width: 860px) {
  .msi-slip { grid-template-columns: 1fr; }
  .msi-slip-side img, .msi-slip-noimg { height: 150px; }
  .msi-slip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.picker-search { margin-bottom: 10px; }
.picker-search input {
  width: 100%; height: 34px; padding: 0 12px;
  border: 1px solid var(--line, #e2e8f0); border-radius: 8px; font-size: var(--fs-sm);
}
.pick-list { display: flex; flex-direction: column; gap: 8px; }
.pick-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 10px 12px;
}
.pick-item.is-on { border-color: #bbf7d0; background: #f0fdf4; }
.pick-info { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); min-width: 0; }
.pick-info b { font-size: var(--fs-base); }
.pick-info small { color: var(--muted, #64748b); font-size: var(--fs-xs); }

/* 录入养殖场信息：今天可装勾选项 */
.kpi-lines { display: flex; flex-direction: column; gap: 2px; }
.kpi-line { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--muted, #64748b); }
.kpi-line b { color: var(--ink, #0f172a); font-weight: 600; }
.kpi-line span { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.kpi-line i { font-style: normal; color: var(--muted, #64748b); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-today { flex-direction: row; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.entry-today input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--brand, #0f766e); }
.entry-today span { color: var(--ink-2, #475569); }

.match-ops { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.assign-tip { margin: 8px 0 0; padding: 7px 10px; background: #ecf7f2; border: 1px solid #cfe8de; border-radius: 7px; font-size: var(--fs-xs); color: #115e59; }

.assign-panel {
  margin: -4px 0 8px; border: 1px solid #bfdbfe; background: var(--brand-soft, #e7f3ef);
  border-radius: 10px; padding: 10px 12px;
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
}
.assign-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.assign-field.grow { flex: 1; min-width: 200px; }
.assign-field input, .assign-field select {
  height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: var(--fs-sm); color: var(--ink);
}
.assign-field input:focus, .assign-field select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.assign-actions { display: flex; gap: 8px; }
.match-row .mr-op { display: inline-flex; gap: 6px; }

/* ---------- 薪资维护：方案卡片 ---------- */
.kpi-item-list { list-style: none; margin: 0; padding: 0; }
.kpi-item-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line, #e2e8f0); font-size: var(--fs-base); }
.kpi-item-list li:last-child { border-bottom: none; }
.kpi-item-list li b { color: var(--ink, #0f172a); white-space: nowrap; }
.trip-tier-box { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg-soft, #f8fafc); border: 1px solid var(--line, #e2e8f0); font-size: var(--fs-base); }
.trip-tier-box > b { display: block; margin-bottom: 6px; }
.trip-tier-rows { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; }
.trip-tier-rows span { color: var(--muted, #64748b); margin-right: 6px; }
.trip-tier-rows b { color: var(--ink, #0f172a); }
.warn-text { color: #b45309; font-weight: 600; }
/* 单证台账列多：收紧单元格左右留白，避免多列后横向溢出 */
.doc-wide .dt th, .doc-wide .dt td { padding-left: 8px; padding-right: 8px; }
.doc-wide .dt th:first-child, .doc-wide .dt td:first-child { padding-left: 14px; }
.doc-wide .dt th:last-child, .doc-wide .dt td:last-child { padding-right: 14px; }

/* ==================== 毛鸡销售部（2026-10-24） ==================== */
/* 批发开单收银台 / 批发单 / 价格档案 / 挂账欠款 / 交班业绩 */

.pos {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.pos-left { display: grid; gap: 14px; min-width: 0; }
.pos-right { display: grid; gap: 14px; min-width: 0; }

.pos-panel,
.pos-doc,
.pos-lines,
.pos-pay {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.pos-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pos-panel-head h3 { font-size: var(--fs-base); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.pos-count {
  font-style: normal; font-size: var(--fs-xs); font-weight: 600; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 1px 7px;
}
.pos-line-ops { display: flex; gap: 6px; }

/* 客户区 */
.pos-cust {
  border: 1px solid #d8e6fd; background: linear-gradient(180deg, #f5f9ff, #fff);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.pos-cust.is-over { border-color: #fecaca; background: linear-gradient(180deg, #fff5f5, #fff); }
.pos-cust-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pos-cust-main b { font-size: var(--fs-base); }
.pos-cust-sub { width: 100%; font-size: var(--fs-xs); color: var(--muted); }
.pos-cust-num { display: flex; align-items: baseline; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.pos-cust-num b { font-size: var(--fs-base); font-variant-numeric: tabular-nums; color: var(--ink); }
.pos-cust-warn { margin-top: 6px; font-size: var(--fs-xs); color: var(--danger); }
.pos-cust-empty {
  border: 1px dashed var(--line); border-radius: 10px; padding: 12px;
  font-size: var(--fs-sm); color: var(--muted); text-align: center; margin-bottom: 10px;
}
.pos-cust-list { display: grid; gap: 6px; max-height: 236px; overflow: auto; padding-right: 2px; }
.pos-cust-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; cursor: pointer; text-align: left; transition: border-color 0.14s, background 0.14s;
}
.pos-cust-item:hover { border-color: #c7d7f5; background: #fafcff; }
.pos-cust-item.is-active { border-color: var(--brand); background: var(--brand-soft); }
/* 搜不到客户时就地建档（2026-11-01） */
.pos-cust-new { width: 100%; margin-top: 8px; }
.pos-cust-add { display: block; margin: 8px auto 0; font-size: var(--fs-xs); }
.pci-name { font-weight: 600; font-size: var(--fs-base); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pci-debt { font-size: var(--fs-xs); color: var(--danger); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pci-debt.is-zero { color: var(--muted); }
.pos-lv {
  display: inline-block; font-size: var(--fs-2xs); font-weight: 700; line-height: 1.5;
  padding: 0 5px; border-radius: 5px; border: 1px solid transparent; white-space: nowrap;
}
.pos-lv-A { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.pos-lv-B { color: var(--brand-dark); background: var(--brand-soft); border-color: #bfdbfe; }
.pos-lv-C { color: #6b7280; background: #f3f4f6; border-color: #e5e7eb; }

/* 品种区 */
.pos-goods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pos-good {
  display: flex; flex-direction: column; gap: 1px; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  padding: 9px 10px; cursor: pointer; transition: border-color 0.14s, box-shadow 0.14s, transform 0.1s;
}
.pos-good:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(15, 118, 110, 0.1); }
.pos-good:active { transform: scale(0.985); }
.pos-good b { font-size: var(--fs-sm); line-height: 1.3; }
.pos-good small { font-size: var(--fs-2xs); color: var(--muted); }
.pg-price { font-size: var(--fs-md); font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.pg-price em { font-style: normal; font-size: var(--fs-2xs); font-weight: 500; color: var(--muted); margin-left: 3px; }
.pg-last { font-size: var(--fs-2xs); color: var(--muted); }
/* 在库余量（跨部门衔接：续养入库 − 已批发） */
.pg-stock { font-size: var(--fs-2xs); color: #64748b; }
.pg-stock.is-low { color: var(--warn); }
.pg-stock.is-out { color: var(--danger); }
.pos-hint { font-size: var(--fs-sm); color: var(--muted); padding: 6px 2px; }

/* 明细 */
.pos-table .dt th, .pos-table .dt td { padding-left: 8px; padding-right: 8px; }
.pos-in {
  width: 74px; text-align: right; border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 6px; font-size: var(--fs-base); font-variant-numeric: tabular-nums;
  background: #fff; color: var(--ink); outline: none;
}
.pos-in.w-sm { width: 66px; }
.pos-in:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.pos-in.is-override { background: #fffbeb; border-color: #fde68a; }
.pos-del {
  width: 24px; height: 24px; font-size: var(--fs-xs); color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.pos-del:hover { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }
.pos-empty { padding: 26px 10px; text-align: center; }
.pos-empty p { font-size: var(--fs-base); color: var(--ink-2); margin-bottom: 4px; }
.pos-empty small { font-size: var(--fs-xs); color: var(--muted); }
.pos-doc-fields { display: grid; grid-template-columns: 1fr 1.7fr; gap: 0 14px; }
.pos-doc-fields .field { margin-bottom: 0; }

/* 结算区 */
.pos-pay { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0 18px; align-items: start; }
.pos-pay-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.pos-wipe { display: flex; gap: 6px; align-items: center; }
.pos-wipe input { flex: 1; min-width: 0; }
.pos-sum { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0; font-size: var(--fs-sm); color: var(--ink-2); }
.ps-row b { font-variant-numeric: tabular-nums; }
.ps-total { border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; color: var(--ink); }
.ps-total b { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.3px; }
.ps-recv { padding-top: 6px; }
.ps-recv-box { display: flex; gap: 6px; align-items: center; }
.ps-recv-box input {
  width: 108px; text-align: right; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 8px; font-size: var(--fs-base); font-variant-numeric: tabular-nums; outline: none;
}
.ps-recv-box input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.ps-owed { color: var(--danger); }
.ps-owed b { font-size: var(--fs-md); }
.pos-pay-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 12px; }
.pos-btn-hold { flex: 0 0 116px; height: 46px; }
.pos-btn-pay { flex: 1; height: 46px; font-size: var(--fs-md); font-weight: 650; letter-spacing: 0.2px; }
.pos-err { grid-column: 1 / -1; margin: 8px 0 0; }

/* 顶部信息条 */
.pos-today {
  display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center;
  font-size: var(--fs-sm); color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-bottom: 14px;
}
.pos-today b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pos-resume { margin-left: auto; color: var(--brand); }
.pos-date {
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; background: #fff;
}
.pos-date input, .pos-date select { border: 0; outline: none; background: transparent; font-size: var(--fs-sm); color: var(--ink); }
.pos-search { width: 100%; margin-bottom: 8px; }

/* 小票预览（与打印用的 76mm 版式保持同源） */
.pos-ticket-wrap { background: #f1f5f9; border-radius: 10px; padding: 14px; overflow: auto; }
.pos-ticket { width: 302px; margin: 0 auto; background: #fff; padding: 14px; border: 1px dashed #cbd5e1; font-size: var(--fs-sm); color: #111; }
.pos-ticket .tk h1 { font-size: 15px; margin: 0 0 2px; text-align: center; letter-spacing: 2px; }
.pos-ticket .tk .tk-sub { text-align: center; font-size: var(--fs-xs); color: #555; margin-bottom: 8px; }
.pos-ticket .tk .tk-meta { font-size: var(--fs-xs); border-top: 1px dashed #999; border-bottom: 1px dashed #999; padding: 6px 0; margin-bottom: 6px; }
.pos-ticket .tk .tk-meta div { display: flex; justify-content: space-between; gap: 8px; }
.pos-ticket .tk table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.pos-ticket .tk th, .pos-ticket .tk td { padding: 3px 0; text-align: left; }
.pos-ticket .tk th { border-bottom: 1px solid #999; font-weight: 600; }
.pos-ticket .tk td.r, .pos-ticket .tk th.r { text-align: right; }
.pos-ticket .tk .tk-sum { border-top: 1px dashed #999; margin-top: 6px; padding-top: 6px; }
.pos-ticket .tk .tk-sum div { display: flex; justify-content: space-between; padding: 1px 0; }
.pos-ticket .tk .tk-sum .big { font-size: var(--fs-base); font-weight: 700; }
.pos-ticket .tk .tk-foot { margin-top: 10px; text-align: center; font-size: var(--fs-2xs); color: #555; border-top: 1px dashed #999; padding-top: 6px; }
.pos-ticket .tk-sign { margin-top: 14px; display: flex; justify-content: space-between; font-size: var(--fs-xs); }

/* 价格档案 */
.table-tip { font-size: var(--fs-xs); color: var(--muted); padding: 0 2px 10px; }
.price-chip {
  display: inline-block; margin: 0 2px; padding: 1px 6px; border-radius: 6px;
  font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
  background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--ink-2);
}
.price-chip.is-override { background: var(--warn-soft); border-color: #fde68a; color: var(--warn); font-weight: 600; }
.inline-form {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px;
}
.inline-form .field { margin-bottom: 0; min-width: 150px; }
.inline-form .btn { height: 36px; }

/* 挂账欠款 */
.pay-order.is-pick { cursor: pointer; }
.card-head h3 { font-size: var(--fs-md); font-weight: 650; }

/* 交班 */
.shift-card { margin-bottom: 14px; }
.shift-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shift-head h3 { font-size: var(--fs-base); font-weight: 650; }
.shift-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.shift-cell {
  display: flex; flex-direction: column; gap: 1px;
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px 10px;
}
.shift-cell span { font-size: var(--fs-xs); color: var(--muted); }
.shift-cell b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }

/* 占比条 */
.bar-cell { position: relative; min-width: 92px; padding-bottom: 5px; text-align: right; }
.bar-cell .bar { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--brand); }
.bar-cell em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

@media (max-width: 1240px) {
  .pos { grid-template-columns: 1fr; }
  .pos-cust-list { max-height: 168px; }
  .shift-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .pos-pay { grid-template-columns: 1fr; }
  .pos-doc-fields { grid-template-columns: 1fr; }
  .pos-goods { grid-template-columns: 1fr; }
}

/* 客户类型勾选组（续养客户 / 批发档 / 门市）：一个可点整块的圆角勾选片，
   勾一个就是单选，勾多个就是多选；复选框本体隐藏但保留键盘与读屏可达。 */
.type-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.type-pick {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px 7px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-size: var(--fs-base); line-height: 1.2;
  cursor: pointer; user-select: none; transition: border-color .15s, background .15s, color .15s;
}
.type-pick input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0;
  opacity: 0; pointer-events: none; min-height: 0; box-shadow: none;
}
.type-pick .tick {
  width: 15px; height: 15px; flex: 0 0 15px; border: 1px solid #cbd5e1; border-radius: 4px;
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xs); color: #fff; line-height: 1; transition: background .15s, border-color .15s;
}
.type-pick .tick::after { content: "✓"; opacity: 0; }
.type-pick:hover { border-color: #c3ccd8; background: var(--surface-2); }
.type-pick input:checked ~ .tick { background: var(--brand); border-color: var(--brand); }
.type-pick input:checked ~ .tick::after { opacity: 1; }
.type-pick input:checked ~ span { color: var(--brand-dark); font-weight: 600; }
.type-pick:has(input:checked) { border-color: #bfdbfe; background: var(--brand-soft); }
.type-pick input:focus-visible ~ .tick { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 表格 / 详情抽屉里的类型标签并排显示 */
.type-tags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }

/* 单证台账（23 列）：长文本单行省略，避免「清远麻鸡」之类被挤成竖排把行高撑高 */
.doc-tight .cell-stack { min-width: 0; }
.doc-tight .cell-stack b { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-tight .cell-stack small { white-space: nowrap; }
.doc-tight .cell-ref { max-width: 150px; }
.doc-tight tbody td { white-space: nowrap; }

/* 粘贴 / 拖入定位：拖进来时整块高亮，并把提示文案换成"松手即解析" */
.region-paste { position: relative; transition: border-color .15s, background .15s, box-shadow .15s; }
.region-paste-row { flex-wrap: wrap; }
.region-paste-row input { min-width: 0; }
.region-paste .region-paste-drop { display: none; color: var(--brand); font-weight: 600; }
.region-paste.is-drag { border-color: var(--brand); background: rgba(15, 118, 110, 0.08); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08); }
.region-paste.is-drag .region-paste-tip { display: none; }
.region-paste.is-drag .region-paste-drop { display: inline; }

/* 关联预订单：入库单顶部的预订单下拉 + 「计划 vs 实收」核对条（2026-10-25） */
/* 收款流水「单号」列：徽标跟在单号后面时不要用 td 直系的 -8px 左边距，否则压掉单号末尾几个字 */
.ref-badges { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: middle; }

.pre-link .form-grid { margin-top: 2px; }
/* 关联预订单（2026-11-01 用户口径：这块太大，页面拉太长）：默认只占一行摘要，点「换单」才展开 */
.pre-link-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.pre-link-bar > b { font-size: var(--fs-base); color: var(--ink); font-weight: 600; flex: none; }
.pre-link-now { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pre-link-body { margin-top: 6px; }
.pre-gap.is-mini { padding: 6px 10px; gap: 6px 14px; margin-top: 8px; }
.pre-gap.is-mini b { font-weight: 500; font-size: var(--fs-sm); }
.pre-gap.is-mini .pre-gap-lab { width: auto; font-size: var(--fs-sm); }
/* 预订单 / 订单来源 同排：预订单最宽（选项带单号+客户+只数），来源贴最右（2026-10-27）
   两列标签文字长短不一，控件统一贴底对齐，避免下拉框高低错落
   （原第三列是「客户档案」，2026-10-27 删模块后收成两列） */
.pre-link .form-grid.pre-fields { grid-template-columns: 1.6fr 0.85fr; }
.pre-link .form-grid.pre-fields > .field > select,
.pre-link .form-grid.pre-fields > .field > input { margin-top: auto; }
@media (max-width: 1180px) {
  .pre-link .form-grid.pre-fields { grid-template-columns: 1fr 1fr; }
  /* 折成两列后订单来源独占一行，避免右边空半格看着像漏字段 */
  .pre-link .form-grid.pre-fields > .field:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .pre-link .form-grid.pre-fields { grid-template-columns: 1fr; } }
.pre-gap-host { margin-top: 10px; }
.pre-gap { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafafa; font-size: var(--fs-base); }
.pre-gap-row { display: flex; align-items: center; gap: 14px; }
.pre-gap-lab { flex: none; width: 32px; color: #6b7280; }
.pre-gap-row b { font-weight: 600; }
.pre-gap-no { margin-left: auto; color: #9ca3af; font-size: var(--fs-sm); }
.pre-gap-empty { margin: 10px 0 0; color: #9ca3af; font-size: var(--fs-sm); }

/* 表格里的徽标：把自带的 8px 左内边距抵掉，让徽标里的文字与表头文字起点对齐
   （标准表格单元格内边距 12px，左移 8px 后仍在格子内，不会顶到相邻列）。2026-10-25 对齐修正 */
.dt td > .badge,
.dt td .cell-stack > .badge { margin-left: -8px; }
/* 单证台账 / POS 类表格内边距只有 8px，再左移会贴边，这两类不抵 */
.doc-wide .dt td > .badge,
.doc-wide .dt td .cell-stack > .badge,
.pos-table .dt td > .badge,
.pos-table .dt td .cell-stack > .badge { margin-left: 0; }

/* ---------- 预订单：自动排车 / 快速匹配 / 入库进度（2026-10-25） ---------- */

/* 明细行里「车型」单元格：自动排车结果 + 下单时指定车型
   （2026-10-31：车型固定 400/280/260 三档，每笼 项鸡 8-11 只、阉鸡 6-9 只） */
.pre-plan-cell { vertical-align: middle; }
.pre-plan { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.pre-plan > b { font-size: var(--fs-base); font-weight: 600; color: var(--ink); }
.pre-plan-sub { color: #9ca3af; font-size: var(--fs-xs); }
.pre-plan-empty { color: #9ca3af; font-size: var(--fs-sm); }
.pre-plan-tag {
  display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px;
  font-style: normal; font-size: var(--fs-xs); font-weight: 500;
  color: var(--ok); background: var(--ok-soft);
}
.pre-plan-warn { color: var(--warn); font-size: var(--fs-xs); }
.pre-plan-edit { margin-top: 4px; padding: 0; font-size: var(--fs-xs); text-align: left; }
/* 拆车方案（2026-11-01 P0）：下单只确认系统排好的车，一台车一行，点候选方案即可换 */
.car-scheme {
  margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface-2, #fafaf7); display: flex; flex-direction: column; gap: 8px;
}
.car-scheme.is-empty { padding: 10px 12px; }
.scheme-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.scheme-head > b { font-size: var(--fs-base); color: var(--ink); font-weight: 600; }
.scheme-note { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); }
.scheme-cars { display: flex; flex-wrap: wrap; gap: 6px; }
.scheme-car {
  display: flex; align-items: center; gap: 6px; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.scheme-car b { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.scheme-car .mono { font-size: var(--fs-sm); color: var(--ink); }
.scheme-car small { font-size: var(--fs-xs); color: var(--muted); }
.scheme-seq {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 18px; padding: 0 4px; border-radius: 4px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--brand-dark); background: var(--brand-soft);
}
.scheme-opts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.scheme-label { font-size: var(--fs-xs); color: var(--muted); }
.scheme-opt {
  display: flex; align-items: baseline; gap: 6px; padding: 4px 9px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font-size: var(--fs-sm); color: var(--ink);
}
.scheme-opt small { font-size: var(--fs-xs); color: var(--muted); }
.scheme-opt.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.scheme-opt:hover { border-color: var(--brand); }
.scheme-warn { font-size: var(--fs-xs); color: var(--warn); }
/* 车型指定面板：候选方案一行 + 三档车台数 + 实时校验 */
.pre-plan-panel { display: flex; flex-direction: column; gap: 6px; min-width: 240px; }
.plan-tip { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.plan-opt-row { display: flex; flex-wrap: wrap; gap: 4px; }
.plan-opt {
  display: flex; flex-direction: column; gap: 1px; padding: 4px 6px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink); font-size: var(--fs-xs); text-align: left;
}
.plan-opt:hover { border-color: var(--brand); }
.plan-opt small { color: var(--muted); font-size: 10px; }
.plan-cars { display: flex; gap: 6px; }
.plan-car { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.plan-car > span { font-size: var(--fs-xs); color: var(--muted); display: flex; justify-content: space-between; gap: 4px; }
.plan-car > span small { opacity: .75; }
.plan-car input { width: 100%; padding: 3px 4px; text-align: center; }
.plan-check { margin: 0; font-size: var(--fs-xs); line-height: 1.4; }
.plan-ok { color: var(--ok); }
.plan-warn { color: var(--warn); }
.plan-bad { color: var(--danger); }
.plan-acts { display: flex; flex-wrap: wrap; gap: 4px; }

/* 快速匹配：入库单顶部列出待匹配预订单，点「关联」即带出 */
.pre-quick-head { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; }
.pre-quick-head > b { font-size: var(--fs-base); }
.pre-quick-search { flex: 1; max-width: 280px; margin: 0; }
/* 候选只列最近 5 张（不再内部滚动：滚动条看着像内容被切断），再多用搜索缩范围 */
.pre-quick { display: flex; flex-direction: column; gap: 6px; }
.pre-quick-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fff; }
.pre-quick-row.is-on { border-color: var(--ok); background: rgba(22, 163, 74, 0.06); }
.pre-quick-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; flex: 1; min-width: 0; }
.pre-quick-main > b { font-size: var(--fs-base); }
.pre-quick-main > span { font-size: var(--fs-base); font-weight: 600; }
.pre-quick-sub { flex: none; width: 100%; color: #9ca3af; font-size: var(--fs-xs); }
.pre-quick-ops { flex: none; }

/* 预订单详情里的入库进度条 */
.pre-progress { margin: 4px 0 10px; }
.pre-progress-bar { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.pre-progress-bar > i { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .25s ease; }
.pre-progress-num { margin-top: 6px; font-size: var(--fs-base); }

/* 「一客户一张」重复提示 */
.pre-dup { margin: 0 0 10px; padding: 9px 12px; border: 1px solid #fde68a; border-radius: var(--radius); background: #fffbeb; color: #92400e; font-size: var(--fs-sm); line-height: 1.6; }
.pre-dup .mono { font-weight: 600; }
/* 提示条里的「并进这张单」按钮（2026-11-01）：贴着文案走，不单独占一行 */
.pre-dup .btn { margin: 2px 0 0 8px; vertical-align: middle; }

/* 筛选栏里的勾选框（如「一客户一张」） */
.filter-check { display: flex; align-items: center; gap: 5px; align-self: flex-end; padding-bottom: 8px; font-size: var(--fs-sm); color: #6b7280; cursor: pointer; }
.filter-check input { margin: 0; }

/* ---------- 总经办：经营概览 / 财务中心 / 待办审批（2026-10-25） ---------- */

/* 跨部门数据流：一格一个业务节点，部门 + 数量 + 说明 */
.flow-strip {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px;
  margin-bottom: 16px;
}
.flow-node {
  min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color 0.14s, box-shadow 0.14s, transform 0.14s;
  position: relative; overflow: hidden;
}
.flow-node::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #cbd5e1;
}
.flow-node:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.flow-dept { font-size: var(--fs-2xs); color: var(--muted); letter-spacing: 0.04em; }
.flow-value { font-family: var(--font-num); font-size: var(--fs-xl); font-weight: 650; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.flow-value i { font-style: normal; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); margin-left: 3px; }
.flow-label { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.flow-sub { font-size: var(--fs-2xs); color: var(--muted); }
.flow-go { position: absolute; right: 9px; bottom: 7px; color: #cbd5e1; font-size: var(--fs-xs); line-height: 1; }
.flow-node.is-blue::after { background: #0f766e; }
.flow-node.is-sky::after { background: #14b8a6; }
.flow-node.is-violet::after { background: #7c3aed; }
.flow-node.is-green::after { background: #059669; }
.flow-node.is-amber::after { background: #f59e0b; }
.flow-node.is-red::after { background: #dc2626; }

/* 三张部门卡 */
.dept-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.dept-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
}
.dept-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dept-head h3 { font-size: var(--fs-md); font-weight: 650; }
.dept-head small { display: block; font-size: var(--fs-2xs); color: var(--muted); margin-top: 1px; }
.dept-enter { font-size: var(--fs-xs); color: var(--brand); white-space: nowrap; }
.dept-enter:hover { text-decoration: underline; }
.dept-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dept-metric { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.dept-metric span { display: block; font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; }
.dept-metric b { display: block; font-size: var(--fs-md); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.3px; }
.dept-metric.is-key { background: var(--brand-soft); }
.dept-metric.is-key b { color: var(--brand-dark); }
.dept-card.is-neg .dept-metric.is-key { background: var(--danger-soft); }
.dept-card.is-neg .dept-metric.is-key b { color: var(--danger); }
.dept-foot { font-size: var(--fs-xs); color: var(--muted); border-top: 1px dashed var(--line-soft); padding-top: 9px; }
/* 部门账本模型徽标（2026-10-26）：三个部门赚的不是同一种钱，卡片上直接标出来 */
.dept-tag {
  display: inline-block; font-size: var(--fs-2xs); font-weight: 600; line-height: 1.6;
  padding: 0 7px; border-radius: 999px; margin-left: 6px; vertical-align: 1px;
  background: var(--brand-soft); color: var(--brand-dark); white-space: nowrap;
}
.dept-formula {
  font-size: var(--fs-2xs); color: var(--muted); line-height: 1.55;
  background: var(--surface-2); border-radius: 8px; padding: 7px 10px;
  border-left: 2px solid var(--line);
}
.dept-formula b { color: var(--text); font-weight: 600; }
/* 三种账对照表 */
.model-rows { display: grid; gap: 10px; }
.model-row {
  display: grid; grid-template-columns: 148px 92px minmax(0, 1fr) 168px;
  gap: 12px; align-items: start; padding: 10px 12px;
  background: var(--surface-2); border-radius: 8px;
}
.model-row .mr-dept { font-weight: 600; font-size: var(--fs-sm); }
.model-row .mr-dept small { display: block; font-weight: 400; font-size: var(--fs-2xs); color: var(--muted); margin-top: 2px; }
.model-row .mr-tag { font-size: var(--fs-2xs); color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; justify-self: start; white-space: nowrap; }
.model-row .mr-src { font-size: var(--fs-xs); color: var(--text); line-height: 1.6; }
.model-row .mr-src em { font-style: normal; color: var(--muted); display: block; font-size: var(--fs-2xs); margin-top: 2px; }
.model-row .mr-formula { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; line-height: 1.6; }
.model-row .mr-formula b { color: var(--text); font-weight: 600; display: block; }
@media (max-width: 900px) {
  .model-row { grid-template-columns: 1fr; gap: 6px; }
  .model-row .mr-formula { text-align: left; }
}

/* 品种可售余量 */
.stock-list { display: grid; gap: 10px; }
.stock-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 128px; gap: 14px; align-items: center; }
.stock-name b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.stock-name small { font-size: var(--fs-2xs); color: var(--muted); }
.stock-track { position: relative; height: 10px; border-radius: 6px; background: #f1f3f7; overflow: hidden; }
.stock-track.is-over { background: #fdecec; }
.stock-track.is-over .stock-in { background: #f4c7c7; }
.stock-track.is-over .stock-sold { background: linear-gradient(90deg, #dc2626, #ef4444); }
.stock-in { position: absolute; left: 0; top: 0; bottom: 0; background: #c7d7fb; border-radius: 6px; }
.stock-sold { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #0f766e, #0f9488); border-radius: 6px; }
.stock-num { text-align: right; }
.stock-num b { display: block; font-size: var(--fs-base); font-weight: 650; font-variant-numeric: tabular-nums; }
.stock-num small { font-size: var(--fs-2xs); color: var(--muted); }
.stock-legend { display: flex; gap: 18px; margin-top: 14px; font-size: var(--fs-2xs); color: var(--muted); }
.stock-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.stock-legend .lg-in { background: #c7d7fb; }
.stock-legend .lg-sold { background: #0f766e; }

/* 资金一瞥 */
.money-rows { display: grid; gap: 2px; }
.money-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.money-row b { font-size: var(--fs-md); font-weight: 650; }
.money-sub { display: flex; justify-content: space-between; padding: 3px 0 3px 12px; font-size: var(--fs-xs); color: var(--muted); }
.money-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 11px; border-top: 1px solid var(--line); font-size: var(--fs-sm); font-weight: 600; }
.money-total b { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.4px; }

/* 财务中心快捷入口 */
.entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.entry-card {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 15px; transition: all 0.14s;
}
.entry-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.entry-ico {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand);
}
.entry-card b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.entry-card small { font-size: var(--fs-2xs); color: var(--muted); }
.entry-arrow { margin-left: auto; color: #cbd5e1; }

/* 待办矩阵与复核记录 */
.todo-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.todo-board-card { padding: 14px 16px; }
.todo-board-card .card-head { margin-bottom: 8px; }
.todo-board-card .card-head h3 { font-size: var(--fs-sm); font-weight: 650; }
.todo-board .todo { padding: 8px; }
.review-list { display: grid; gap: 2px; }
.review-list li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.review-list li:last-child { border-bottom: 0; }
.review-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-top: 7px; flex: 0 0 7px; }
.review-list b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.review-list small { display: block; font-size: var(--fs-2xs); color: var(--muted); }
.review-list em { display: block; font-style: normal; font-size: var(--fs-xs); color: var(--ink-2); margin-top: 3px; }

/* 表格行内操作按钮组 */
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }

@media (max-width: 1240px) {
  .flow-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dept-cards { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .todo-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .flow-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dept-metrics { grid-template-columns: 1fr; }
  .entry-grid { grid-template-columns: 1fr; }
  .todo-board { grid-template-columns: 1fr; }
  .stock-row { grid-template-columns: 1fr; gap: 6px; }
  .stock-num { text-align: left; }
}

/* 牧运车队：上游运输需求（续养待提货 + 毛鸡待配送） */
.demand-card { margin-bottom: 14px; }
.demand-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.demand-cols h4 {
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted);
  margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.demand-cols h4 span {
  font-size: var(--fs-2xs); background: #f1f3f7; color: #4b5563;
  border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.demand-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; transition: background 0.14s;
}
.demand-item:hover { background: #f7f9fc; }
.demand-tag {
  font-size: var(--fs-2xs); padding: 2px 7px; border-radius: 5px; flex: none;
  background: var(--brand-soft); color: var(--brand-dark);
}
.demand-item b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.demand-item small { font-size: var(--fs-2xs); color: var(--muted); }
.demand-empty { font-size: var(--fs-sm); color: var(--muted); padding: 6px 2px; }
.demand-foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-soft);
  font-size: var(--fs-xs); color: var(--muted);
}
.demand-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 980px) {
  .demand-cols { grid-template-columns: 1fr; gap: 12px; }
}
.demand-more { font-size: var(--fs-2xs); color: var(--muted); padding: 4px 10px 0; }

/* ---------- 毛鸡销售 · 入库（2026-10-25 新增） ----------
   过磅录入抽屉里的实时结果条走 .figures/.fig 那套；这里只补两条列表页的小样式。 */
.msi-preview { margin-top: 4px; }
.msi-preview .fig b { font-size: var(--fs-md); }
.table-note {
  margin: 0; padding: 10px 14px 12px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--muted);
}
.table-note b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ================= 价格行情（2026-10-25） =================
   设计思路：一块深色「行情牌」压住页面顶部（现价、涨跌、关键指标），
   下面是白卡片的工作区（走势图、品种列表、涨跌榜、价格矩阵）。
   深色牌用来在档口强光下也能一眼看清洗；白卡片负责查数与操作。 */

/* ---------- 工具条：部门切换 + 周期 ---------- */

.mk-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.mk-seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: #eef1f6; border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, .05);
}
.mk-seg-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 18px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink-2); text-align: left;
  transition: background .14s, color .14s, box-shadow .14s;
}
.mk-seg-btn b { font-size: var(--fs-md); font-weight: 600; letter-spacing: .01em; }
.mk-seg-btn small { font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .02em; }
.mk-seg-btn:hover { background: rgba(255, 255, 255, .6); }
.mk-seg-btn.is-active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 2px 8px rgba(16, 24, 40, .06);
}
.mk-seg-btn.is-active small { color: var(--brand); }

.mk-toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mk-periods {
  display: inline-flex; padding: 3px; gap: 2px;
  background: #eef1f6; border-radius: 9px;
}
.mk-period {
  padding: 5px 12px; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--muted);
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  transition: background .14s, color .14s;
}
.mk-period:hover { color: var(--ink-2); }
.mk-period.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.mk-stamp {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--muted); white-space: nowrap;
}

/* 数据来源小标 */
.mk-src {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px;
  border-radius: 5px; font-size: var(--fs-2xs); font-weight: 500; letter-spacing: .02em;
  background: #f1f3f7; color: var(--muted); white-space: nowrap;
}
.mk-src.is-manual { background: var(--brand-soft); color: var(--brand-dark); }
.mk-src.is-auto { background: #eef2ff; color: #4338ca; }
.mk-src.is-seed { background: #f1f3f7; color: #94a3b8; }
.mk-src.is-deal { background: #ecfdf5; color: #047857; }
.mk-src.is-carry { background: #fffbeb; color: var(--warn); }

/* ---------- 上游同步条（2026-11-02） ---------- */

/* 底色/前景全部走变量（2026-11-11）：原来写死 #fbfcfe、#eef2ff 这类浅底，
   深色玻璃主题下就成了黑页面顶上一道发白的条，跟背景完全不搭。
   浅色主题下 --surface-2 / --brand-soft 与原来的浅底几乎同色，观感不变。 */
.mk-feed {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 9px 14px;
  border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--surface-2); font-size: var(--fs-xs); color: var(--muted);
}
/* var(--text) 这套变量在 :root 里并不存在（真名是 --ink），写了等于没写，
   标题一直是继承来的灰字；这里用真变量，深色下才看得清「上游基准价」。 */
.mk-feed b { color: var(--ink); font-size: var(--fs-sm); }
.mk-feed-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: 0 0 auto;
}
.mk-feed-dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.mk-feed-meta { font-variant-numeric: tabular-nums; }
.mk-feed-tag {
  padding: 1px 7px; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-weight: 500;
}
.mk-feed-warn { color: var(--warn); }
.mk-feed .link { margin-left: auto; }
.mk-sub {
  margin: 16px 0 8px; font-size: var(--fs-sm); font-weight: 600; color: var(--text);
}
.mk-feed-ops { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- 产品行情滚动模块（2026-11-02） ---------- */

/* 一块卡：标题 + 跑马灯 + 脚注。放在续养板块顶部，也放在价格行情页顶部当主模块。 */
.mk-board {
  margin: 0 0 12px;
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.mk-board-top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 9px 14px 7px;
}
.mk-board-title { display: flex; align-items: baseline; gap: 8px; }
.mk-board-title b { font-size: var(--fs-md); color: var(--text); letter-spacing: .3px; }
.mk-board-title small { font-size: var(--fs-2xs); color: var(--muted); }
.mk-board-meta {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-2xs); color: var(--muted); font-variant-numeric: tabular-nums;
}
.mk-board-foot {
  padding: 6px 14px 8px; font-size: var(--fs-2xs); color: var(--muted);
  border-top: 1px dashed var(--line-soft);
}

/* 横向匀速滚动的价目带：鼠标移上去暂停，两端做渐隐，看着像行情大屏那种跑马灯 */
.mk-board .mk-roll {
  margin: 0; border: 0; border-radius: 0;
  background: var(--surface-2);
}
.mk-roll {
  position: relative; overflow: hidden;
  margin: 0 0 12px;
  border: 1px solid var(--line-soft); border-radius: 10px;
  background: var(--surface-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 26px, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 26px, #000 calc(100% - 26px), transparent);
}
.mk-roll-track {
  display: flex; align-items: stretch; width: max-content; padding: 8px 0;
  /* 真实时长由 market.js 的 tuneRoll() 按内容宽度算（恒定 px/s），这里只是 JS 没跑时的兜底 */
  animation: mk-roll-move 26s linear infinite;
}
.mk-roll:hover .mk-roll-track { animation-play-state: paused; }
/* 内容一屏放得下就不滚（2026-11-11）：此时两端渐隐会把首尾的品种名吃掉，去掉遮罩 */
.mk-roll.is-static {
  -webkit-mask-image: none; mask-image: none;
}
.mk-roll.is-static .mk-roll-track { animation: none; }
@keyframes mk-roll-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .mk-roll-track { animation: none; }
  .mk-roll { overflow-x: auto; }
}
.mk-roll-block {
  display: flex; flex-direction: column; gap: 5px;
  padding: 0 16px; border-right: 1px dashed var(--line); flex: 0 0 auto;
}
.mk-roll-block:last-child { border-right: 0; }
.mk-roll-head { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.mk-roll-head b { font-size: var(--fs-sm); color: var(--ink); }
.mk-roll-head span { font-size: var(--fs-2xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-roll-cells { display: flex; gap: 10px; white-space: nowrap; align-items: center; }
/* 价在前、服务部名在后：「7.60 东华」= 东华挂 7.60。
   格子做成浅色药丸：底色是状态色的淡淡一层，价格数字用饱和的同色 ——
   红涨、绿跌、橙持平，深浅主题里都是「浅底彩字」，和参考样式一致。 */
.mk-roll-cell {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 2px 9px; border: 0; box-shadow: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  font-size: var(--fs-xs); cursor: default;
}
.mk-roll-cell b {
  font-variant-numeric: tabular-nums; color: var(--text);
  font-weight: 700; font-size: var(--fs-sm);
}
.mk-roll-cell i { font-style: normal; color: var(--text); opacity: .78; }
.mk-roll-cell em { font-style: normal; font-size: var(--fs-2xs); font-weight: 700; }
/* 涨（红）/ 跌（绿）/ 持平（橙）：浅底 + 同色彩字 */
.mk-roll-cell.is-up { background: rgba(255, 90, 95, .16); }
.mk-roll-cell.is-up b { color: #ff5a5f; }
.mk-roll-cell.is-down { background: rgba(34, 197, 94, .16); }
.mk-roll-cell.is-down b { color: #22c55e; }
.mk-roll-cell.is-flat { background: rgba(255, 149, 0, .18); }
.mk-roll-cell.is-flat b { color: #ff9500; }
/* 缺货：中性灰药丸、价格压灰，但「缺」字用金黄色点出来，一眼能找到 */
.mk-roll-cell.is-off { background: rgba(148, 163, 184, .10); }
.mk-roll-cell.is-off b { color: var(--muted); font-weight: 600; }
.mk-roll-cell.is-off i { color: var(--muted); opacity: .75; }
.mk-roll-cell.is-off em { color: #f5c542; }
/* 块头主价同一套字色口径，后面跟 ▲/▼/— 差值 */
.mk-roll-main { font-variant-numeric: tabular-nums; }
.mk-roll-main i { font-style: normal; font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; opacity: .9; }
.mk-roll-main.is-up b, .mk-roll-main.is-up i { color: #ff5a5f; }
.mk-roll-main.is-down b, .mk-roll-main.is-down i { color: #22c55e; }
.mk-roll-main.is-flat b, .mk-roll-main.is-flat i { color: #ff9500; }
/* 「≈ 上游写法」：我方品种名与上游报的名字不是一字不差时挂出来（2026-11-11）。
   不加背景色、只加虚线框 —— 深色/浅色两套主题都不用单独覆盖，也不会抢主价的红绿。 */
.mk-roll-alias {
  padding: 0 5px; border: 1px dashed var(--line-soft); border-radius: 5px;
  color: var(--muted); font-size: var(--fs-2xs); white-space: nowrap; cursor: help;
}



/* ---------- 预警横条 ---------- */

.mk-alertbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 9px 14px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius);
  font-size: var(--fs-sm); color: #92400e;
}
.mk-alertbar-ico {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f59e0b; color: #fff; font-size: var(--fs-2xs); font-weight: 700;
}
.mk-alertbar-body { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-alert-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid #fcd34d; background: #fff; color: #92400e;
  font-size: var(--fs-xs); font-weight: 600;
}
.mk-alert-chip em { font-style: normal; font-weight: 400; color: #b45309; }
.mk-alert-chip:hover { background: #fffbeb; }
.mk-alertbar-tip { margin-left: auto; font-size: var(--fs-2xs); color: #b45309; }

/* ---------- 今日行情牌 ---------- */

.mk-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.35fr);
  gap: 26px; align-items: center;
  padding: 22px 26px; margin-bottom: 16px;
  border-radius: 16px; color: #e8eefb;
  background:
    radial-gradient(720px 300px at 6% 0%, rgba(15, 148, 136, .30), transparent 62%),
    radial-gradient(520px 260px at 96% 110%, rgba(212, 169, 78, .18), transparent 60%),
    linear-gradient(155deg, #0c1f19 0%, #123129 56%, #0d1f1a 100%);
  box-shadow: 0 12px 30px -14px rgba(10, 26, 21, .55);
}
/* 极细网格纹理：像行情终端的底板，不抢数字 */
.mk-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(120deg, rgba(0, 0, 0, .9), transparent 72%);
}
.mk-hero-l, .mk-hero-r { position: relative; }
.mk-hero-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); color: #9fb2d1; letter-spacing: .06em;
}
.mk-hero-dept {
  padding: 2px 9px; border-radius: 5px;
  background: rgba(96, 165, 250, .16); color: #bfdbfe; font-weight: 600;
}
.mk-hero-eyebrow em { font-style: normal; margin-left: auto; color: #7f93b4; letter-spacing: .02em; }
.mk-hero-title { display: flex; align-items: baseline; gap: 9px; margin-top: 10px; }
.mk-hero-title b { font-size: var(--fs-xl); font-weight: 650; color: #fff; letter-spacing: .01em; }
.mk-hero-title small { font-size: var(--fs-xs); color: #8fa4c4; }
.mk-hero-price { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; line-height: 1.16; }
.mk-hero-price i { font-style: normal; font-size: var(--fs-xl); color: #93b4e6; font-weight: 500; }
.mk-hero-price b {
  font-size: var(--fs-5xl); font-weight: 650; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: #fff;
  text-shadow: 0 0 26px rgba(147, 197, 253, .34);
}
.mk-hero-price span { font-size: var(--fs-sm); color: #8fa4c4; }
.mk-hero.is-up .mk-hero-price b { text-shadow: 0 0 28px rgba(229, 72, 77, .42); }
.mk-hero.is-down .mk-hero-price b { text-shadow: 0 0 28px rgba(22, 163, 74, .38); }
/* 今天上游没报：主价位是一个大「—」，不要发光、不要染涨跌色（2026-11-11） */
.mk-hero.is-noprice .mk-hero-price b,
.mk-hero-price.is-none b { color: #8fa4c4; text-shadow: none; font-weight: 500; }
.mk-hero-sub { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.mk-hero-cmp { font-size: var(--fs-xs); color: #8fa4c4; }
.mk-hero-cmp b { color: #cddcf3; font-variant-numeric: tabular-nums; }
.mk-flag {
  padding: 2px 9px; border-radius: 5px; font-size: var(--fs-2xs); font-weight: 600;
}
.mk-flag.is-high { background: rgba(229, 72, 77, .18); color: #fca5a5; border: 1px solid rgba(229, 72, 77, .3); }
.mk-flag.is-low { background: rgba(22, 163, 74, .18); color: #86efac; border: 1px solid rgba(22, 163, 74, .3); }
/* 上游同步价：把「基准 + 加价」摊开给财务看，颜色比涨跌标记低调一档 */
.mk-flag.is-feed { background: rgba(129, 140, 248, .18); color: #c7d2fe; border: 1px solid rgba(129, 140, 248, .3); }
/* 「今天没有挂牌价」：灰，不是跌，也不是涨（2026-11-11） */
.mk-flag.is-none { background: rgba(148, 163, 184, .16); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, .3); }

.mk-hero-r {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: rgba(255, 255, 255, .07); border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
}
/* 毛鸡多两格（到货成本 / 批发毛利）→ 8 格排 4×2，正好两整行；续养仍是 6 格 3×2 */
.mk-hero.is-cogs .mk-hero-r { grid-template-columns: repeat(4, 1fr); }
.mk-stat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 14px; background: rgba(9, 17, 31, .5);
}
.mk-stat > span { font-size: var(--fs-2xs); color: #8fa4c4; letter-spacing: .04em; }
.mk-stat > b { font-size: var(--fs-lg); font-weight: 600; color: #f1f5fb; letter-spacing: -.01em; }
.mk-stat > small { font-size: var(--fs-2xs); color: #6f917f; }
.mk-inline-up { color: var(--mk-up); }
.mk-inline-down { color: #4ade80; }
.mk-inline-flat { color: #cbd5e1; }

/* ---------- 涨跌胶囊 ---------- */

.mk-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 6px;
  font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.mk-pill .mk-pill-ar { font-style: normal; font-size: 9px; line-height: 1; }
.mk-pill b { font-weight: 650; }
.mk-pill em { font-style: normal; font-weight: 500; opacity: .85; }
.mk-pill.is-up { background: var(--mk-up-soft); color: var(--mk-up); }
.mk-pill.is-down { background: var(--mk-down-soft); color: var(--mk-down); }
.mk-pill.is-flat { background: #f1f3f7; color: var(--mk-flat); }
.mk-pill.is-slim { padding: 2px 7px; gap: 4px; font-size: var(--fs-2xs); }
/* 深色行情牌上的胶囊换成半透明底 */
.mk-hero .mk-pill.is-up { background: rgba(229, 72, 77, .18); color: #fca5a5; }
.mk-hero .mk-pill.is-down { background: rgba(22, 163, 74, .18); color: #86efac; }
.mk-hero .mk-pill.is-flat { background: rgba(255, 255, 255, .1); color: #cbd5e1; }
.mk-hero .mk-pill.is-big { padding: 5px 11px; font-size: var(--fs-sm); }

/* ---------- 卡片通用头 ---------- */

.mk-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 15px 18px 12px; border-bottom: 1px solid var(--line-soft);
}
.mk-card-head h2 { font-size: var(--fs-md); font-weight: 650; letter-spacing: .01em; }
.mk-card-head p { margin-top: 2px; font-size: var(--fs-xs); color: var(--muted); }
.mk-empty {
  padding: 34px 20px; text-align: center; color: var(--muted); font-size: var(--fs-sm);
}

.mk-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 3px; }
.mk-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.mk-legend i { width: 16px; height: 2px; border-radius: 2px; display: inline-block; }
.mk-lg-line { background: var(--brand); }
.mk-lg-ma { background: repeating-linear-gradient(90deg, #f59e0b 0 4px, transparent 4px 7px); }
.mk-lg-vol { width: 10px !important; height: 9px !important; border-radius: 2px; background: rgba(15, 118, 110, .28); }

/* 走势图视图切换：折线 / 日K / 周K（2026-10-26） */
.mk-chart-head-r { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.mk-modes { display: inline-flex; padding: 3px; gap: 2px; background: #eef1f6; border-radius: 9px; }
.mk-mode {
  padding: 4px 11px; border: 0; border-radius: 7px; cursor: pointer; background: transparent;
  color: var(--muted); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .02em;
  transition: background .14s, color .14s;
}
.mk-mode:hover { color: var(--ink-2); }
.mk-mode.is-active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.mk-mode.is-off { opacity: .38; cursor: not-allowed; }
.mk-grain {
  display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 5px;
  background: rgba(15, 118, 110, .09); color: var(--brand);
  font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .04em; vertical-align: 2px;
}
.mk-candle-tag { font-size: 10.5px; font-weight: 700; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.mk-candle-legend {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 2px 0 6px; font-size: var(--fs-2xs); color: var(--muted);
}
.mk-candle-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mk-candle-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.mk-candle-legend i.is-dash { width: 16px; height: 2px; background: repeating-linear-gradient(90deg, #f59e0b 0 4px, transparent 4px 7px); }

/* ---------- 主区栅格 ---------- */

.mk-grid-main { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; }
.mk-grid-sub { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }

/* ---------- 走势图 ---------- */

.mk-chart-card, .mk-list-card, .mk-rank-card, .mk-mx-card, .mk-quote-card { overflow: hidden; }
.mk-rank-card, .mk-mx-card { margin-bottom: 16px; }
.mk-chart { position: relative; padding: 6px 12px 0; }
.mk-chart-svg { display: block; width: 100%; height: auto; max-height: 360px; }
.mk-grid { stroke: #eef1f6; stroke-width: 1; }
.mk-tick { fill: #9aa4b4; font-size: var(--fs-2xs); font-family: var(--font-num); }
.mk-vol-base { stroke: #eef1f6; stroke-width: 1; stroke-dasharray: 3 4; }
.mk-dot { fill: #fff; stroke: var(--brand); stroke-width: 1.6; opacity: 0; transition: opacity .12s; }
.mk-mark circle { fill: #fff; }
.mk-mark text { font-size: 10px; font-family: var(--font-num); font-weight: 600; }
.mk-mark.is-high circle { stroke: var(--mk-up); stroke-width: 1.8; fill: var(--mk-up); }
.mk-mark.is-high text { fill: var(--mk-up); }
.mk-mark.is-low circle { stroke: var(--mk-down); stroke-width: 1.8; fill: var(--mk-down); }
.mk-mark.is-low text { fill: var(--mk-down); }
.mk-cursor line { stroke: #94a3b8; stroke-width: 1; stroke-dasharray: 3 3; }
.mk-cursor circle { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.mk-chart-empty { padding: 60px 20px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }

.mk-chart-tip {
  position: absolute; top: 10px; left: 0; z-index: 3; min-width: 132px;
  padding: 9px 11px; border-radius: 10px;
  background: rgba(10, 26, 21, .94); color: #e8eefb;
  box-shadow: 0 10px 24px -8px rgba(10, 26, 21, .5);
  pointer-events: none; transition: left .06s linear;
}
.mk-tip-date { font-size: var(--fs-2xs); color: #8fae9f; letter-spacing: .04em; }
.mk-tip-price { display: flex; align-items: baseline; gap: 4px; margin: 2px 0 6px; }
.mk-tip-price b { font-size: var(--fs-xl); font-weight: 650; color: #fff; letter-spacing: -.01em; }
.mk-tip-price em { font-style: normal; font-size: var(--fs-2xs); color: #8fae9f; }
.mk-tip-row { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: #a7c4b6; padding: 1px 0; }
.mk-tip-row > span { color: #6f917f; min-width: 40px; }
.mk-tip-row b { color: #e8eefb; font-weight: 600; }
.mk-tip-row i { font-style: normal; }
.mk-tip-row .mk-src { height: 17px; padding: 0 6px; }

.mk-chart-foot {
  padding: 10px 18px 13px; border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--muted); line-height: 1.7;
}
.mk-chart-foot b { color: var(--warn); font-weight: 500; }

/* ---------- 品种列表 ---------- */

.mk-list { max-height: 440px; overflow-y: auto; }
.mk-row {
  position: relative; width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto 76px;
  align-items: center; gap: 10px;
  padding: 6px 16px; border: 0; border-bottom: 1px solid var(--line-soft);
  background: transparent; cursor: pointer; text-align: left;
  transition: background .12s;
}
.mk-row:last-child { border-bottom: 0; }
.mk-row::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  border-radius: 0 2px 2px 0; background: transparent; transition: background .12s;
}
.mk-row:hover { background: #fafbfc; }
.mk-row.is-active { background: var(--brand-soft); }
.mk-row.is-active::before { background: var(--brand); }
.mk-row-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mk-row-name b {
  display: flex; align-items: center; gap: 5px; line-height: 1.3;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mk-row-name small { font-size: var(--fs-2xs); color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 「档案价 / 沿用」标记（2026-11-11）：不是今天的挂牌价就别装成挂牌价 */
.mk-row-src {
  flex: none; padding: 0 4px; border-radius: 4px;
  border: 1px solid var(--line-soft);
  font-size: var(--fs-2xs); font-style: normal; font-weight: 500;
  color: var(--muted); letter-spacing: 0;
}
.mk-row-price { font-size: var(--fs-md); font-weight: 650; color: var(--ink); letter-spacing: -.01em; }
/* 今天没有挂牌价：价格位是「—」，不印档案底价（2026-11-11） */
.mk-row-price.is-none { color: var(--muted); font-weight: 600; }
.mk-row-add {
  flex: none; padding: 2px 8px; border-radius: 6px;
  border: 1px dashed var(--line); background: transparent;
  font-size: var(--fs-2xs); color: var(--brand); white-space: nowrap;
}
.mk-row:hover .mk-row-add { border-style: solid; background: var(--brand-soft); }
.mk-row-noadd { flex: none; padding: 2px 8px; font-size: var(--fs-2xs); color: var(--muted); }
.mk-row-gap { display: block; width: 76px; }
.mk-row-flag {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  display: inline-block;
}
.mk-row-flag.is-high { background: var(--mk-up); box-shadow: 0 0 0 3px rgba(229, 72, 77, .14); }
.mk-row-flag.is-low { background: var(--mk-down); box-shadow: 0 0 0 3px rgba(22, 163, 74, .14); }

.mk-spark { display: block; width: 76px; height: 24px; }
.mk-spark svg { display: block; width: 100%; height: 100%; }
.mk-spark.is-empty { background: linear-gradient(90deg, #f1f3f7 0 100%); border-radius: 4px; height: 2px; margin-top: 14px; }

/* ---------- 涨跌榜 ---------- */

.mk-rank-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.mk-rank-col { padding: 10px 6px 12px; }
.mk-rank-col + .mk-rank-col { border-left: 1px solid var(--line-soft); }
.mk-rank-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 12px 8px; font-size: var(--fs-2xs); color: var(--muted);
}
.mk-rank-hd > span { font-weight: 700; letter-spacing: .08em; }
.mk-rank-hd > span.is-up { color: var(--mk-up); }
.mk-rank-hd > span.is-down { color: var(--mk-down); }
.mk-rank-row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 110px 62px;
  grid-template-areas: "name bar pct" "name bar price";
  align-items: center; gap: 2px 10px;
  padding: 7px 12px; border: 0; border-radius: 8px; background: transparent;
  cursor: pointer; text-align: left; transition: background .12s;
}
.mk-rank-row:hover { background: #fafbfc; }
.mk-rank-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; }
.mk-rank-name b {
  font-size: var(--fs-sm); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mk-rank-name small { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-rank-bar { grid-area: bar; height: 5px; border-radius: 3px; background: #f1f3f7; overflow: hidden; }
.mk-rank-bar i { display: block; height: 100%; border-radius: 3px; }
.mk-rank-bar i.is-up { background: linear-gradient(90deg, #f8b4b6, var(--mk-up)); }
.mk-rank-bar i.is-down { background: linear-gradient(90deg, #a7e0bd, var(--mk-down)); }
.mk-rank-pct { grid-area: pct; font-size: var(--fs-sm); font-weight: 650; text-align: right; }
.mk-rank-pct.is-up { color: var(--mk-up); }
.mk-rank-pct.is-down { color: var(--mk-down); }
.mk-rank-price { grid-area: price; font-size: var(--fs-2xs); color: var(--muted); text-align: right; }

/* ---------- 价格矩阵 ---------- */

/* 价格对照：跟周期走（7/30/60 天），行数多了限高滚动、表头吸顶 */
.mk-mx-wrap { max-height: 480px; overflow: auto; }
.mk-mx thead th { position: sticky; top: 0; z-index: 1; }
.mk-mx { width: 100%; border-collapse: collapse; }
.mk-mx th {
  padding: 9px 8px; text-align: center; vertical-align: bottom;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-2); white-space: nowrap;
  background: var(--surface-2);
}
.mk-mx th span { display: block; }
.mk-mx th small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.mk-mx .mk-mx-date {
  text-align: left; padding-left: 16px; position: sticky; left: 0; z-index: 2;
  background: var(--surface); font-weight: 500; color: var(--muted);
}
.mk-mx thead .mk-mx-date { background: var(--surface-2); }
.mk-mx-date b { display: block; font-size: var(--fs-xs); color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-mx-date small { font-size: var(--fs-2xs); color: var(--muted); }
.mk-mx-cell {
  padding: 8px 10px; text-align: center;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums; color: var(--ink-2);
}
.mk-mx tbody tr:hover .mk-mx-cell { background: #fafbfc; }
.mk-mx-cell.is-up { color: var(--mk-up); background: rgba(229, 72, 77, .05); font-weight: 600; }
.mk-mx-cell.is-down { color: var(--mk-down); background: rgba(22, 163, 74, .06); font-weight: 600; }

/* ---------- 报价记录 ---------- */

.mk-q-wrap { overflow-x: auto; }
.mk-q { width: 100%; border-collapse: collapse; }
.mk-q th {
  padding: 8px 16px; text-align: left; background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-2xs); font-weight: 600; color: var(--muted); letter-spacing: .04em;
}
.mk-q td { padding: 9px 16px; border-bottom: 1px solid var(--line-soft); font-size: var(--fs-sm); }
.mk-q tbody tr:last-child td { border-bottom: 0; }
.mk-q tbody tr:hover td { background: #fafbfc; }
.mk-q-date b { display: block; font-variant-numeric: tabular-nums; font-weight: 600; }
.mk-q-date small { font-size: var(--fs-2xs); color: var(--muted); }
.mk-unit { font-style: normal; font-weight: 500; }

/* ---------- 响应式 ---------- */

@media (max-width: 1320px) {
  .mk-grid-main { grid-template-columns: 1fr; }
  .mk-list { max-height: none; display: grid; grid-template-columns: 1fr 1fr; }
  .mk-row { border-right: 1px solid var(--line-soft); }
  .mk-row::before { top: 6px; bottom: 6px; }
}
@media (max-width: 1180px) {
  .mk-hero { grid-template-columns: 1fr; gap: 18px; }
  .mk-hero-r { grid-template-columns: repeat(3, 1fr); }
  .mk-hero.is-cogs .mk-hero-r { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .mk-grid-sub { grid-template-columns: 1fr; }
  .mk-seg-btn { padding: 6px 13px; }
  .mk-toolbar { align-items: stretch; }
  .mk-toolbar-right { justify-content: space-between; }
}
@media (max-width: 820px) {
  .mk-list { grid-template-columns: 1fr; }
  .mk-row { border-right: 0; }
  .mk-hero-r { grid-template-columns: 1fr 1fr; }
  .mk-hero.is-cogs .mk-hero-r { grid-template-columns: 1fr 1fr; }
  .mk-hero-price b { font-size: var(--fs-4xl); }
  .mk-rank-cols { grid-template-columns: 1fr; }
  .mk-rank-col + .mk-rank-col { border-left: 0; border-top: 1px solid var(--line-soft); }
}

/* 毛鸡入库 · 付款登记抽屉（2026-10-25）：一行一笔，撤销按钮贴右 */
.pay-log { margin-top: 2px; border-top: 1px solid var(--line-soft); }
.pay-log-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
}
.pay-log-row > .mono { color: var(--muted); font-size: var(--fs-xs); }
.pay-log-row > b { min-width: 84px; font-variant-numeric: tabular-nums; }
.pay-log-row > small { flex: 1; color: var(--muted); font-size: var(--fs-xs); }
.drawer-sub { margin: 14px 0 2px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }

/* ================= 车队运力动态（2026-10-25） =================
   与价格走势共用一套周期口径，视觉上分两块：
   左边是深色球面（Canvas 动画：自转 + 飞线光点），右边是浅色数据卡（概览 / 车辆 / 司机）。 */

/* ---------- 子视图切换 ---------- */

.mk-tabs { display: inline-flex; gap: 4px; padding: 4px; background: #eef1f6; border-radius: 12px; margin-bottom: 14px; }
.mk-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 7px 18px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--ink-2); text-align: left;
  transition: background .14s, color .14s, box-shadow .14s;
}
.mk-tab b { font-size: var(--fs-md); font-weight: 600; }
.mk-tab small { font-size: var(--fs-2xs); color: var(--muted); }
.mk-tab:hover { background: rgba(255, 255, 255, .6); }
.mk-tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 2px 8px rgba(16, 24, 40, .06); }
.mk-tab.is-active small { color: var(--brand); }

/* 工具条左侧的说明块（运力视图没有部门切换，用这块占位） */
.mk-seg-info { display: flex; flex-direction: column; gap: 2px; padding: 7px 18px; background: #fff; }
.mk-seg-info b { font-size: var(--fs-md); font-weight: 600; }
.mk-seg-info small { font-size: var(--fs-2xs); color: var(--muted); }

/* ---------- 地球仪 ---------- */

.mk-geo-card { display: flex; flex-direction: column; min-width: 0; align-self: start; }
.mk-geo-card .mk-card-head { flex-wrap: nowrap; align-items: flex-start; }
.mk-geo-card .mk-card-head > div:first-child { min-width: 0; flex: 1 1 auto; }
.mk-geo-card .mk-card-head p { max-width: 42em; }
.mk-geo-ctrl { flex-wrap: nowrap; white-space: nowrap; }
.mk-geo-ctrl { display: flex; gap: 8px; flex: none; }
/* 高度（2026-11-17 地图通栏改版）：不再按 1.56:1 比例锁死 —— 通栏后宽度吃满整行，
   比例会把高度顶到上千像素。现在高度随视口（62vh，480~780px 之间），
   地图内部 fitHubs 按画布实际宽高自动配视野，宽一点只会看得更开阔 */
.mk-geo {
  position: relative; height: clamp(480px, 62vh, 780px);
  background: radial-gradient(720px 420px at 50% 42%, #0d1b2e 0%, #070f1c 70%, #050a13 100%);
  border-top: 1px solid var(--line-soft);
  overflow: hidden;
}
.mk-geo canvas { display: block; width: 100%; max-width: 100%; height: 100%; cursor: grab; touch-action: none; }
.mk-geo canvas:active { cursor: grabbing; }
.mk-geo-tip {
  position: absolute; z-index: 3; min-width: 150px; max-width: 200px;
  padding: 9px 11px; border-radius: 10px; pointer-events: none;
  background: rgba(10, 26, 21, .94); color: #e8eefb;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .6);
}
.mk-geo-tip b { display: block; font-size: var(--fs-md); font-weight: 650; color: #fff; }
.mk-geo-tip span { display: block; font-size: var(--fs-2xs); color: #8fae9f; margin-top: 1px; }
.mk-geo-tip em { display: block; font-style: normal; font-size: var(--fs-2xs); color: #c4ddd2; margin-top: 5px; line-height: 1.6; }

.mk-geo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 18px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2);
}
.mk-geo-legend {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: var(--fs-2xs); color: var(--muted);
}
.mk-geo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mk-geo-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.mk-dot-ref { width: 6px !important; height: 6px !important; background: rgba(148, 163, 184, .55); }
.mk-dot-fleet { background: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, .2); }
.mk-dot-load { background: #14b8a6; box-shadow: 0 0 0 3px rgba(20, 184, 166, .22); }
.mk-dot-drop { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .22); }
.mk-dot-both { background: #818cf8; box-shadow: 0 0 0 3px rgba(129, 140, 248, .22); }
.mk-geo-hint {
  flex: none; padding: 2px 9px; border-radius: 999px;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line);
  font-size: var(--fs-2xs); font-variant-numeric: tabular-nums;
}
/* 链路体检条（2026-11-02）：一行摘要 + 可展开的未标地写法清单 */
.mk-diag { border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
.mk-diag-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 7px 18px; border: 0; background: transparent; cursor: pointer;
  font-size: var(--fs-2xs); color: var(--muted); text-align: left;
}
.mk-diag-bar:hover { color: var(--ink-2); }
.mk-diag-bar b { flex: none; font-weight: 600; }
.mk-diag-body { padding: 2px 18px 12px; font-size: var(--fs-2xs); color: var(--ink-2); line-height: 1.7; }
.mk-diag-body p { margin: 4px 0; }
.mk-diag-list { margin: 2px 0 6px; padding-left: 18px; }
.mk-diag-list li { margin: 1px 0; font-variant-numeric: tabular-nums; }
/* ---------- 运力数据卡（2026-11-17 改版：地图通栏后，三张卡在地图下面并排） ---------- */

/* 地图下面三卡并排（2026-11-17 改版）：概览 / 车辆车次 / 司机频率 */
.mk-grid-cap3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
/* 概览卡在窄列里 6 格排 3 列会挤（「12 / 15 台」放不下），统一 2 列 × 3 行 */
.mk-grid-cap3 .mk-cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-cap-card { overflow: hidden; }
.mk-cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); }
.mk-cap-cell { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; background: var(--surface); }
.mk-cap-cell > span { font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .03em; }
.mk-cap-cell > b { font-size: var(--fs-xl); font-weight: 650; color: var(--ink); letter-spacing: -.01em; line-height: 1.2; }
.mk-cap-cell > small { font-size: var(--fs-2xs); color: var(--muted); }
.mk-cap-foot {
  padding: 10px 16px; border-top: 1px solid var(--line-soft);
  font-size: var(--fs-xs); color: var(--muted);
}
.mk-cap-foot b { color: var(--ink); font-weight: 650; font-size: var(--fs-md); }

.mk-cap-list { display: flex; flex-direction: column; }
.mk-cap-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(52px, .9fr) auto;
  grid-template-areas: "name bar num" "meta bar num";
  align-items: center; gap: 2px 12px;
  padding: 9px 16px; border-bottom: 1px solid var(--line-soft);
}
.mk-cap-row:last-child { border-bottom: 0; }
.mk-cap-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; }
.mk-cap-name b { font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-cap-name small { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-cap-bar { grid-area: bar; height: 6px; border-radius: 3px; background: #eef1f6; overflow: hidden; }
.mk-cap-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #7dd3fc, var(--brand)); }
.mk-cap-bar.is-driver i { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.mk-cap-bar.is-route { height: 4px; margin-top: 4px; width: 100%; max-width: 180px; }
.mk-cap-bar.is-route i { background: linear-gradient(90deg, #99d6c8, #0f9488); }
.mk-cap-num { grid-area: num; display: flex; align-items: baseline; gap: 3px; }
.mk-cap-num b { font-size: var(--fs-lg); font-weight: 650; font-variant-numeric: tabular-nums; }
.mk-cap-num small { font-size: var(--fs-2xs); color: var(--muted); }
.mk-cap-meta { grid-area: meta; min-width: 0; font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mk-q td .mk-cap-bar { display: block; }

/* ---------- 响应式 ---------- */

@media (max-width: 1180px) {
  .mk-geo { height: clamp(360px, 52vh, 620px); }
  .mk-grid-cap3 { grid-template-columns: 1fr; }
  .mk-cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .mk-geo { height: clamp(300px, 46vh, 520px); }
  .mk-cap-grid { grid-template-columns: 1fr 1fr; }
  .mk-tabs .mk-tab { padding: 6px 12px; }
}

/* ---------- 云同步面板（2026-10-26 阶段一 · 数据上云） ---------- */
.sync-warn-text {
  color: var(--danger, #dc2626);
}

/* 二级菜单（2026-10-26 导航整合）：档案类功能收进父项，点开合，激活子项时自动展开 */
.nav-children { display: none; flex-direction: column; margin: 0 0 4px 16px; padding-left: 10px; border-left: 1px solid var(--line); }
.nav-children.is-open { display: flex; }
.nav-parent { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; }
.nav-parent .nav-caret { margin-left: auto; color: #9ca3af; transition: transform 0.15s ease; flex: 0 0 12px; }
.nav-parent.is-open .nav-caret { transform: rotate(180deg); }
.nav-parent.is-active { color: var(--brand-dark); }
.nav-child { padding: 7px 10px; font-size: var(--fs-sm); }
/* 壳页（hub）页签条与页面自带的页签间距 */
.hub-tabs { margin-bottom: 16px; }
.hub-body { min-width: 0; }

/* 养殖场「上游公司报增重」录入行的样式已随该模块于 2026-10-27 删除（改为「服务部报均重」单值） */

/* ============================================================
   墨玉金主题 · 侧栏（2026-10-27 方案 B 落地）
   深墨绿渐变侧栏 + 金色选中态；主内容区仍是浅色，看账不累。
   金色只做点缀（选中项、logo、徽标），不大面积铺。
   ============================================================ */

.sidebar {
  background: linear-gradient(178deg, #10231e 0%, #143028 55%, #0d1f1a 100%);
  border-right: 0;
}
.brand { border-bottom-color: rgba(255, 255, 255, 0.08); }
.brand-mark {
  background: linear-gradient(135deg, #d4a94e, #b8862f);
  color: #10231e;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.brand-text b { color: #f3ead6; }
.brand-text small { color: #9fbfb2; }
.nav-group-title { color: #86a89a; }
.nav-group-title:hover { color: #ecf5f0; background: rgba(255, 255, 255, 0.06); }
.nav-group-title .nav-caret { color: #6f917f; }
.nav-subtitle { color: #6f917f; }
.nav-item { color: #cfe3da; }
.nav-item .ico { color: #86a89a; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #ecf5f0; }
.nav-item:hover .ico { color: #cfe3da; }
.nav-item.is-active {
  background: linear-gradient(135deg, rgba(212, 169, 78, 0.2), rgba(212, 169, 78, 0.1));
  color: #f3d9a4;
}
.nav-item.is-active .ico { color: #d4a94e; }
.nav-item.is-soon { color: #5f7d70; }
.nav-item.is-soon .ico { color: #4e6a5e; }
.nav-item.is-soon:hover { background: transparent; color: #5f7d70; }
.nav-soon-tag {
  color: #86a89a; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05);
}
.nav-parent .nav-caret { color: #86a89a; }
.nav-parent.is-active { color: #f3d9a4; }
.nav-children { border-left-color: rgba(255, 255, 255, 0.12); }
.sidebar-foot { border-top-color: rgba(255, 255, 255, 0.08); color: #9fbfb2; }
/* 页脚构建号（2026-11-08）：右对齐的等宽小字，232px 侧栏里两段文字不换行、不挤掉左侧环境字样 */
.sidebar-foot .foot-env { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 演示态页脚做成可点（2026-11-10）：整个「橙点 + 演示账本 · 假数据 + 箭头」是一块的，
   鼠标移上去才亮，平时不跟导航抢注意力。 */
.sidebar-foot .foot-env-link {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 3px 5px 3px 3px; margin: -3px 0; border-radius: 7px;
  color: #9fbfb2; text-decoration: none; /* 侧栏是深色底：显式给色，别继承到灰蓝 */
}
.sidebar-foot .foot-env-link .foot-env { min-width: 0; }
.sidebar-foot .foot-env-link:hover { background: rgba(255, 255, 255, 0.09); color: #f3d9a4; }
.sidebar-foot .foot-env-link:active { background: rgba(255, 255, 255, 0.14); }
.sidebar-foot .foot-env-link:focus-visible { outline: 2px solid rgba(245, 158, 11, 0.7); outline-offset: 1px; }
.sidebar-foot .foot-env-go { flex: none; opacity: 0.5; transition: opacity 0.15s, transform 0.15s; }
.sidebar-foot .foot-env-link:hover .foot-env-go { opacity: 1; transform: translateX(2px); }
.sidebar-foot .foot-build {
  margin-left: auto; flex: none; font-size: var(--fs-2xs); color: #7f9c8f;
  letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
body.sidebar-collapsed .sidebar-foot .foot-build { display: none; }
/* 侧栏标语（墨玉金主题）：底部一行小字，收起时自动隐藏 */
.sidebar-tagline {
  padding: 0 18px 14px; font-size: var(--fs-2xs); color: #86a89a;
  letter-spacing: 0.32em; text-align: center; opacity: 0.75; white-space: nowrap;
}
body.sidebar-collapsed .sidebar-tagline { display: none; }

/* 顶栏微调：暖白底贴合墨玉基调 */
.topbar { background: rgba(250, 251, 249, 0.92); border-bottom-color: var(--line); }
/* 登录页光晕同步墨玉绿 */
.login-hero {
  background:
    radial-gradient(1000px 460px at 12% 8%, rgba(15, 118, 110, 0.42), transparent 60%),
    linear-gradient(150deg, #10231e, #1a3d33 55%, #0d1f1a);
}

/* ---------- 版本与更新（2026-10-27） ----------
   顶栏的「检查更新」按钮、系统设置里的版本卡，共用同一套样式：
   结论用一条淡底 + 语义色，避免只剩一句不显眼的灰字。 */
.icon-btn.update-btn { position: relative; }
.icon-btn.update-btn .dot-count { top: 2px; right: 2px; }
.update-list { margin-bottom: 4px; }
.update-list b.mono { font-family: var(--font-mono); font-size: var(--fs-sm); letter-spacing: 0.02em; }
.update-verdict {
  margin: 10px 0 12px; padding: 8px 12px; border-radius: 8px;
  font-size: var(--fs-sm); line-height: 1.5; background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line-soft);
}
.update-verdict.ok { background: var(--ok-soft); border-color: #c7f0dd; color: var(--ok); }
.update-verdict.warn { background: var(--warn-soft); border-color: #f5e3bd; color: var(--warn); }
.update-verdict.danger { background: var(--danger-soft); border-color: #f6d5d5; color: var(--danger); }
.update-verdict.info { color: var(--brand); background: var(--brand-soft); border-color: #cfe8e2; }
.update-verdict.muted { color: var(--muted); }

/* ---------- 可装日期日历（2026-10-28 按日可装） ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.cal-head b { font-size: 15px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-week i { font-style: normal; text-align: center; font-size: 12px; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--ink); font-size: 13px; cursor: pointer;
}
.cal-day:hover { border-color: var(--brand); }
.cal-day.is-past { color: var(--muted); opacity: 0.55; }
.cal-day.is-today { border-color: var(--brand); font-weight: 700; }
.cal-day.is-sel { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 700; }
.yard-day-btns { display: flex; gap: 6px; align-items: center; }
.yard-date-input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--ink); }

/* ============================================================
   客户欠款评级（2026-10-28）
   一套变量三处复用：表格徽章 .credit-badge / 筛选胶囊 .credit-chip /
   详情标尺 .cr-seg。色阶从绿到深红，越靠后越该催款。
   深色主题只在 glass-theme.css 里覆盖这组变量，组件规则不用复制。
   ============================================================ */
.credit-a { --cr-bg: #ecfdf5; --cr-ink: #047857; --cr-line: #a7f3d0; --cr-solid: #10b981; }
.credit-b { --cr-bg: #eff6ff; --cr-ink: #1d4ed8; --cr-line: #bfdbfe; --cr-solid: #3b82f6; }
.credit-c { --cr-bg: #fefce8; --cr-ink: #a16207; --cr-line: #fde68a; --cr-solid: #eab308; }
.credit-d { --cr-bg: #fff7ed; --cr-ink: #c2410c; --cr-line: #fdba74; --cr-solid: #f97316; }
.credit-e { --cr-bg: #fef2f2; --cr-ink: #b91c1c; --cr-line: #fecaca; --cr-solid: #ef4444; }
.credit-f { --cr-bg: #991b1b; --cr-ink: #ffffff; --cr-line: #7f1d1d; --cr-solid: #b91c1c; }
.credit-all { --cr-bg: #f3f4f6; --cr-ink: #374151; --cr-line: #e5e7eb; --cr-solid: #9ca3af; }

.credit-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 8px; border-radius: 999px; border: 1px solid var(--cr-line, var(--line));
  background: var(--cr-bg, var(--surface)); color: var(--cr-ink, var(--ink));
  font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap; letter-spacing: 0.2px;
}

/* 筛选条 */
.credit-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.credit-bar-head { min-width: 132px; }
.credit-bar-head > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.credit-bar-head > small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.credit-bar-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.credit-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--cr-line, var(--line)); background: transparent; color: var(--cr-ink, var(--ink));
  font-size: 12px; font-weight: 600; line-height: 1.5; transition: background 0.15s ease, border-color 0.15s ease;
}
.credit-chip:hover:not(:disabled) { background: var(--cr-bg, var(--surface-2)); }
.credit-chip.is-on { background: var(--cr-bg, var(--surface-2)); border-color: var(--cr-ink, var(--ink)); box-shadow: 0 0 0 1px var(--cr-line, var(--line)) inset; }
.credit-chip:disabled { opacity: 0.4; cursor: default; }
.credit-chip b { font-size: 12px; font-weight: 800; }
.credit-chip em {
  font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; text-align: center;
  padding: 0 5px; border-radius: 999px; background: rgba(127, 127, 127, 0.16);
}

/* 详情标尺 */
.credit-ruler { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 10px 0 2px; }
.cr-seg { text-align: center; }
.cr-seg i { display: block; height: 6px; border-radius: 3px; background: var(--cr-line, var(--line)); opacity: 0.8; }
.cr-seg b { display: block; margin-top: 5px; font-size: 13px; font-weight: 800; color: var(--muted); }
.cr-seg span { display: block; font-size: 10px; color: var(--muted); line-height: 1.3; margin-top: 1px; }
.cr-seg.is-on i { background: var(--cr-solid, var(--brand)); opacity: 1; height: 8px; margin-top: -1px; }
.cr-seg.is-on b { color: var(--cr-ink, var(--ink)); }
.cr-seg.is-on span { color: var(--cr-ink, var(--ink)); font-weight: 700; }

.credit-line { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.credit-advice { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.credit-party {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.credit-party.is-risk { border-color: #fecaca; background: #fef2f2; }
.credit-party > span { font-size: 11px; color: var(--muted); }
.credit-party b { font-size: 12px; font-weight: 600; color: var(--ink); }
.credit-party small { font-size: 11px; color: var(--muted); }
.drawer-sec h3 .credit-badge { margin-left: 6px; vertical-align: 2px; }

/* 在线更新（2026-10-28）：系统设置里的「上传更新包」 */
.update-upload .up-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 2px 0 10px; }
.up-bar { height: 8px; border-radius: 999px; background: rgba(127, 127, 127, .22); overflow: hidden; margin: 10px 0 8px; }
.up-bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent, #2bb673); transition: width .18s ease; }
.up-result { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.7; word-break: break-all; }
.up-result.ok { background: rgba(43, 182, 115, .12); border: 1px solid rgba(43, 182, 115, .38); }
.up-result.err { background: rgba(220, 80, 80, .12); border: 1px solid rgba(220, 80, 80, .38); }
.update-upload #update-token { font-family: var(--mono, ui-monospace, monospace); }

/* 手动填写待建档（2026-11-01）：客户档案页顶部的自动归档清单 */
.auto-archive .auto-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.auto-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 12px; line-height: 1.4;
  /* 2026-11-13：一个 chip 里现在可能同时有名字 / 电话 / 服务部 / 状态 / 次数 / 日期 + 两个按钮，
     内容长了要在 chip 内折行，不然整条会撑出容器 */
  flex-wrap: wrap; max-width: 100%;
}
.auto-chip small { min-width: 0; }
.auto-chip b { font-weight: 600; color: var(--ink); }
.auto-chip small { color: var(--muted); font-size: 11px; }
.auto-chip .link { font-size: 11px; padding: 0 2px; }

/* 归档池分组（2026-11-01 扩展四类：客户 / 温氏户头 / 养户名称 / 过磅组织） */
.auto-groups { display: grid; gap: 12px; margin-top: 10px; }
.auto-group { border-top: 1px dashed var(--line); padding-top: 10px; }
.auto-group:first-child { border-top: 0; padding-top: 0; }
.auto-group-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.auto-group-head b { font-size: var(--fs-sm); color: var(--ink); }
.auto-group-head small { font-size: 11px; color: var(--muted); }
.auto-group .auto-chips { margin-top: 8px; }
.auto-chip.is-more { border-style: dashed; color: var(--muted); }

/* 一键匹配车辆抽屉（2026-11-01）：已配车 / 当天空车 / 新建三块，手机上也能逐行看清 */
.match-block { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.match-block:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.match-block-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.match-block-head b { font-size: var(--fs-sm); color: var(--ink); }
.match-block-head small { font-size: 11px; color: var(--muted); }
.match-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.match-row {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
  padding: 9px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #fbfcfd;
}
.match-veh { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.match-veh b { font-size: 13px; }
.match-veh small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-meta { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-width: 0; }
.match-meta small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.match-ops { display: flex; gap: 8px; justify-content: flex-end; }
.match-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 12px; margin-top: 10px; }
.match-form .field { margin: 0; }
/* 派车顺序提示 + 笼位不够的提示（2026-11-01）：流程一句话写清，装不下的车直说差几笼 */
.match-flow {
  margin: 0 0 4px; padding: 8px 10px; border-radius: 8px;
  background: var(--surface-2); color: var(--ink-2);
  font-size: 11px; line-height: 1.6;
}
.match-flow b { color: var(--ink); }
.match-warn { color: var(--danger, #c0392b) !important; white-space: normal !important; line-height: 1.45; }
.match-row.is-short { background: var(--surface-2); border-style: dashed; opacity: .82; }
.match-list-short { margin-top: 6px; }
.cell-sub.warn { color: var(--danger, #c0392b); }
/* 已被别的单订满、不能再选的场（2026-11-01 货源预减）：列出来说明原因，避免"场都装完了还能匹配" */
.match-booked { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.match-booked-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed var(--line-soft); font-size: 12px; }
.match-booked-row:first-of-type { border-top: 0; }
.match-booked-row small { color: var(--muted); }
.match-booked-row .cell-sub.warn { color: var(--danger, #c0392b); }
@media (max-width: 520px) {
  .match-row { grid-template-columns: 1fr auto; }
  .match-meta { grid-column: 1 / -1; }
}

/* ===== 手机窄屏顶栏（2026-11-15）：面包屑不许折行，超长用省略号 =====
   之前 390px 下「公司总经理 / 工作台」会被折成「公司总经 办 / 工作 台」，很难看。
   布局规则放 admin.css（两种皮肤共用）；宽度阈值对齐既有的 720px 手机档。 */
@media (max-width: 720px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .crumb { min-width: 0; gap: 6px; }
  .crumb a, .crumb b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .crumb a { max-width: 88px; flex: 0 1 auto; }
  .crumb b { max-width: 120px; }
  .user-chip { flex: 0 1 auto; min-width: 0; }
  .user-meta { min-width: 0; }
  .user-meta b, .user-meta small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; }
}

/* ===== 车队运费明细：搜索框 + 候选下拉（2026-11-06） =====
   输入框右边带一个 ▾，点开是本月的车主 / 车牌 / 司机清单，点一下直接筛。
   存在的理由：财务反馈三轮「框里打字筛不了」，根子是中文输入法在整页重绘时把拼音吞掉；
   给一条完全不用打字的路径，最稳。变量取主题色，深色玻璃与浅色都能用。 */
.fleet-pick { position: relative; display: inline-flex; align-items: center; }
.fleet-pick .search-inline input { padding-right: 30px; }
.fleet-pick-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.fleet-pick-btn:hover, .fleet-pick-btn:focus-visible { background: var(--brand-soft); color: var(--brand-dark); outline: none; }
.fleet-pick-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 100%; max-height: 264px; overflow: auto; padding: 5px;
  background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.fleet-pick-pop[hidden] { display: none; }
.fleet-pick-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; padding: 7px 9px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink, inherit); font: inherit; text-align: left;
  white-space: nowrap; cursor: pointer;
}
.fleet-pick-item:hover { background: var(--brand-soft); }
.fleet-pick-item.is-on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.fleet-pick-name { font-size: 13px; }
.fleet-pick-count { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.fleet-pick-empty { padding: 9px; color: var(--muted); font-size: 12px; }

/* ---------- 按趟结款工作台（2026-11-07） ----------
   用户口径：「按日期/车主/司机筛选出来分笔结付，或按日期阶段付款」。
   上面筛选条 + 中间逐趟表 + 底部常驻结款条，筛选和结款在同一屏里完成。 */
.fleet-work { padding: 0; overflow: hidden; }
.fw-filter { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.fw-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.fw-row + .fw-row { margin-top: 8px; }
.fw-dates { display: flex; align-items: center; gap: 6px; }
.fw-dates input[type="date"] {
  height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-family: var(--font-num); font-size: var(--fs-sm); color: var(--ink);
}
.fw-label { font-size: var(--fs-xs); color: var(--muted); }
.fw-quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: 4px; }
.fw-chip {
  height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); font-size: var(--fs-xs); cursor: pointer;
}
.fw-chip:hover { border-color: var(--brand); color: var(--brand); }
.fw-chip.is-on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.fw-filter .field { min-width: 148px; margin: 0; }
.fw-filter .field > span { font-size: var(--fs-xs); color: var(--muted); }
.fw-filter .field select { height: 34px; }
.fw-reset { margin-left: auto; }
.fw-sum {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--ink-2);
}
.fw-sum b { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.fw-sum b.danger { color: var(--danger); }
.fw-sum-pick { color: var(--muted); }
.fw-sum-pick b { color: var(--brand-dark); }
.fw-table { overflow-x: auto; }
.fw-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--brand); }
.fw-bar {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--line);
  background: var(--surface); box-shadow: 0 -2px 10px rgba(16, 24, 40, 0.06);
}
.fw-bar-amount { display: flex; align-items: center; gap: 6px; }
.fw-bar-amount > span:first-child { font-size: var(--fs-xs); color: var(--muted); }
.fw-bar-amount input {
  width: 148px; height: 38px; padding: 0 10px; text-align: right;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 700; color: var(--ink);
}
.fw-bar-amount input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.fw-bar-tip { font-size: var(--fs-xs); color: var(--muted); }
.fw-bar-tip b { color: var(--brand-dark); font-family: var(--font-num); }
.fw-bar-ops { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.settle-amount-sm {
  width: 128px; height: 34px; padding: 0 8px; text-align: right;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--fs-md); font-weight: 600;
}
@media (max-width: 720px) {
  .fw-reset { margin-left: 0; }
  .fw-bar-ops { margin-left: 0; width: 100%; justify-content: flex-end; }
}

/* 工作台汇总条右侧：已勾统计 + 全选 / 清空 / 结款主按钮都在首屏，不用滚到表格底部 */
.fw-sum-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fw-sum-right .link { font-size: var(--fs-xs); color: var(--brand); background: none; border: 0; cursor: pointer; padding: 0; }
.fw-sum-right .link:hover { text-decoration: underline; }
.fw-sum-right .btn { height: 32px; padding: 0 14px; }
@media (max-width: 900px) {
  .fw-sum-right { width: 100%; justify-content: flex-start; }
}
.fw-sum-pick { border-left: 1px dashed var(--line); padding-left: 14px; }
@media (max-width: 900px) {
  .fw-sum-pick { border-left: 0; padding-left: 0; }
}

/* ---------- 价目表单「打勾多选」面板 ----------
   fpick- 前缀避开既有 .pick-* 类（下拉弹层 1083 行 / 勾选列表 1478 行，同名类撞过两次）。
   配色全部走主题变量：浅色 = 白底墨字；深色玻璃主题由 glass-theme.css 覆盖同一组变量，
   面板自动变玻璃面 + 亮字，两套主题都不用复制规则（2026-11-07 nn 重设计）。
   注意 .field input 后代规则会命中面板里的输入框/勾选框，凡面板内 input 都要显式还原。 */
.fpick-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
  /* .field 是 flex column，不锁 flex:none 面板会被 grid 行高压缩到只剩搜索框（列表被裁没） */
  flex: none;
}
.fpick-bar { padding: 8px 8px 0; }
.fpick-search {
  display: block;
  width: 100%; height: 32px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  background: var(--surface-2);
  color: var(--ink);
}
.fpick-search::placeholder { color: var(--muted); }
.fpick-search:focus { outline: none; border-color: var(--brand); }
/* 已选摘要整行：圆片可点（点一下=取消勾选），多选时换行铺开，不截断 */
.fpick-count {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12px;
  color: var(--muted);
}
.fpick-picked-label { flex: none; color: var(--muted); }
.fpick-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px 2px 9px;
  cursor: pointer;
  max-width: 100%;
}
.fpick-chip:hover { filter: brightness(0.96); }
.fpick-chip-x { font-size: 13px; line-height: 1; opacity: 0.75; }
.fpick-chip:hover .fpick-chip-x { opacity: 1; }
.fpick-list {
  height: 248px;
  overflow: auto;
  padding: 2px 6px 8px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}
.fpick-group-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 4px 4px;
  letter-spacing: 0.02em;
}
.fpick-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 2px 6px;
}
.fpick-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  user-select: none;
  min-width: 0;
}
.fpick-item:hover { background: var(--line-soft); }
.fpick-item input {
  accent-color: var(--brand); margin: 0; flex: none;
  /* .field input 的后代规则会命中面板里的 checkbox（padding/边框/width:100% 把地名挤到下一行），显式还原成裸勾选框 */
  width: 16px; height: 16px; padding: 0; border: 0; background: transparent;
}
.fpick-item:has(input:checked) { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.fpick-item.fpick-special {
  color: var(--brand-dark);
  font-weight: 600;
  padding-left: 8px;
  border-bottom: 1px dashed var(--line);
  border-radius: 0;
  margin: 2px 2px 4px;
}
.fpick-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-2);
}
.fpick-foot .small { white-space: nowrap; }
.fpick-foot .link { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0; font: inherit; white-space: nowrap; }
.fpick-foot .link:hover { color: var(--ink); text-decoration: underline; }

/* ---------- 运费表单：三种笼位价并排填（一条线路一套价） ----------
   .field input 会命中一切后代输入框（撞过），这里显式给宽度和字号。 */
.fprice-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.fprice-cell { flex: 1 1 140px; min-width: 130px; display: flex; flex-direction: column; gap: 4px; }
.fprice-cell > span { font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; }
.fprice-cell > input {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-size: var(--fs-md); font-variant-numeric: tabular-nums;
}
.fprice-cell > input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fprice-cell > input::placeholder { color: var(--muted); font-size: var(--fs-2xs); }

/* ===== 客户档案：所在地区四格 + 补区县工作台（2026-11-08） =====
   独立前缀 cust-（备忘纪律：.field input 会命中一切后代输入框，
   新组件不许复用通用类名，样式一律自己写全）。 */
.cust-region-warn {
  margin-left: 6px;
  color: var(--warn, #b45309);
  font-size: var(--fs-xs, 12px);
}
.cust-dist-missing {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: var(--fs-xs, 12px);
  line-height: 18px;
  vertical-align: 1px;
  white-space: nowrap;
}
.cust-dist-intro { padding: 2px 2px 12px; }
/* 目的地坐标状态（2026-11-13）：有坐标才画得准，没有就先按区县/市估算 */
.cust-geo-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
  font-size: var(--fs-xs, 12px);
  line-height: 18px;
  vertical-align: 1px;
  white-space: nowrap;
}
.cust-geo-tag.is-on {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
.cust-geo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}
.cust-geo-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.cust-geo-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cust-geo-who b { font-size: var(--fs-sm); }
.cust-geo-who small { color: var(--ink-2, #475569); font-size: var(--fs-xs, 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-geo-row input {
  flex: 0 0 210px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
}
.cust-geo-row .btn { flex: 0 0 auto; }
.cust-dist-intro b { display: block; font-size: var(--fs-md, 15px); margin-bottom: 4px; }
.cust-dist-intro p { margin: 0; color: var(--ink-2, #475569); font-size: var(--fs-sm); line-height: 1.65; }
.cust-dist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 54vh;
  overflow: auto;
  padding-right: 4px;
}
.cust-dist-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.1fr) minmax(0, 1.2fr) 104px 118px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line-soft, #e2e8f0);
  border-radius: 9px;
  background: var(--surface, #fff);
}
.cust-dist-check { display: flex; align-items: center; justify-content: center; margin: 0; }
.cust-dist-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.cust-dist-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.cust-dist-who b { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-dist-who small { color: var(--muted); font-size: var(--fs-xs, 12px); }
.cust-dist-now {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--ink-2, #475569);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.cust-dist-now > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cust-dist-now .cust-dist-basis {
  color: var(--muted);
  font-size: var(--fs-xs, 12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cust-dist-row select {
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface, #fff);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-family: inherit;
}
.cust-dist-row select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.cust-dist-basis { color: var(--muted); font-size: var(--fs-xs, 12px); }
@media (max-width: 860px) {
  .cust-dist-row {
    grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "c who now" "c city dist";
    row-gap: 6px;
  }
  .cust-dist-check { grid-area: c; }
  .cust-dist-who { grid-area: who; }
  .cust-dist-now { grid-area: now; }
  .cust-dist-row select[data-city] { grid-area: city; }
  .cust-dist-row select[data-district] { grid-area: dist; }
}

/* ===== 运力图「市内环」图例（2026-11-08）=====
   同市运输不再丢掉，画成节点上方的小环；图例里给一个同形状的空心圈对上号。
   只在该周期真有同市趟次时才出现（没环就不解释，免得添噪音）。 */
.mk-geo-legend .mk-dot-loop {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: transparent;
  border: 1.6px solid #f59e0b;
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, .6);
}
.mk-geo-loop-note { color: var(--muted); }

/* ===== 运力图空态 + 飞线诊断（2026-11-08）=====
   一条飞线都没有时，画布就是一块黑底，用户只能理解成「坏了」；
   这里在画布上盖一块说明（不挡拖动：pointer-events: none）。 */
.mk-geo-empty {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 32px;
  text-align: center;
  pointer-events: none;
  background: radial-gradient(420px 220px at 50% 46%, rgba(6, 14, 26, .72), rgba(6, 14, 26, .38));
}
.mk-geo-empty b { color: #e8eefb; font-size: var(--fs-md, 15px); }
.mk-geo-empty span { max-width: 560px; color: rgba(203, 213, 225, .88); font-size: var(--fs-sm); line-height: 1.7; }
.mk-diag-pre {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line-soft, #e2e8f0);
  border-radius: 10px;
  background: var(--surface-2, rgba(148, 163, 184, .08));
  color: var(--ink, #0f172a);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
}

/* ===== 运力图空态里的「补装卸地」入口 + 补录工作台（2026-11-08）=====
   空态层为了不挡拖拽设了 pointer-events:none，按钮必须自己开回来，
   否则按钮画得出来、点不动（这个坑记一笔）。 */
.mk-geo-fix {
  pointer-events: auto;
  margin-top: 4px;
}
.cap-fix-intro { padding: 2px 2px 12px; }
.cap-fix-intro b { color: var(--ink); }
.cap-fix-intro { color: var(--ink-2, #475569); font-size: var(--fs-sm); line-height: 1.7; }
.cap-fix-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 56vh;
  overflow: auto;
  padding-right: 4px;
}
.cap-fix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 8px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft, #e2e8f0);
  border-radius: 9px;
  background: var(--surface, #fff);
}
.cap-fix-who {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.cap-fix-who b { font-size: var(--fs-sm); }
.cap-fix-who small { color: var(--muted); font-size: var(--fs-xs, 12px); }
.cap-fix-miss {
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .14);
  color: #b45309;
  font-size: var(--fs-xs, 12px);
  line-height: 18px;
  white-space: nowrap;
}
.cap-fix-row select {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface, #fff);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-family: inherit;
}
.cap-fix-row select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }

/* ---------- 云同步冲突面板（2026-11-09） ----------
   以前冲突只有一行红字，弹窗错过就再也没有入口能处理，而且每 15 秒被重新弹一次。
   这里摊开成可操作的表：本机几条 / 云端几条 / 云端谁什么时候改的，各给一个按钮。
   颜色全走主题变量，浅色/深色都跟着变，不写死背景色。 */
/* 通道诊断（2026-11-12 〇-193）：最近 20 次云请求的耗时/成败，把「感觉掉线」换成数字。
   一行小圆点，成功绿、失败红；不写死背景，浅色/深色主题都跟着变量走。 */
.sync-health { margin-top: 10px; }
.sync-health-sum { margin: 0 0 8px; font-size: 12px; line-height: 1.7; color: var(--ink-3, #6b7a72); }
.sync-health-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sync-health-cell {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line, #e5e7eb);
  background: var(--surface-2, #f6f8f7);
  color: var(--ink-2, #33453d);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sync-health-cell.is-ok { border-color: var(--ok-line, #b8e0c8); background: var(--ok-soft, #f1faf4); color: var(--ok, #1f7a45); }
.sync-health-cell.is-bad { border-color: var(--bad-line, #f0c2bc); background: var(--bad-soft, #fdf3f2); color: var(--bad, #b3261e); }

.sync-conflict {
  margin-top: 14px;
  border: 1px solid #f0cf92;
  background: var(--warn-soft, #fffbeb);
  border-radius: var(--radius-sm, 8px);
  padding: 14px 16px;
}
.sync-conflict-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.sync-conflict-head > b { font-size: 13px; color: var(--warn, #b45309); }
.sync-conflict-head > span { font-size: 12px; line-height: 1.7; color: var(--ink-2, #33453d); }
.sync-conflict-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.sync-conflict-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e3e7e1);
  border-radius: var(--radius-sm, 8px);
  padding: 10px 12px;
}
.sync-conflict-name { display: flex; align-items: baseline; gap: 8px; min-width: 130px; }
.sync-conflict-name > b { font-size: 13px; color: var(--ink, #14231d); }
.sync-conflict-name > span { font-size: 11px; }
.sync-conflict-nums { flex: 1 1 240px; font-size: 12px; line-height: 1.7; color: var(--ink-2, #33453d); }
.sync-conflict-nums > b { font-family: var(--font-num); color: var(--ink, #14231d); }
.sync-conflict-act { display: flex; gap: 8px; }
.sync-conflict-act .btn { white-space: nowrap; }

@media (max-width: 720px) {
  .sync-conflict-act { width: 100%; }
  .sync-conflict-act .btn { flex: 1 1 0; }
}

/* ---------- 运费维护 V5：6 档表 + 线路挂档（11-09 用户口径） ----------
   「实际上我们的运费价格就这些：260笼 1800/2000/…400笼 2600/…」
   —— 所以页面第一屏就是这张表，第二屏只有一个「目的地 → 第几档」。
   类名统一 fc- 前缀，绝不复用 .field / .pick-* / .card-sub 那一套（同名撞过三次）。 */
.fc-card { margin-bottom: 16px; }
.fc-band-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 0 16px 12px;
}
.fc-tabs { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.fc-tab {
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
  padding: 6px 14px; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.2;
}
.fc-tab:hover { color: var(--ink); }
.fc-tab.is-on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.fc-hint-inline { font-size: var(--fs-2xs); color: var(--muted); }
.fc-band-wrap { padding: 0 16px 14px; }
/* 档位表：档位列窄、价格列等宽、最后一列说明 */
.fc-band-table { table-layout: auto; }
.fc-band-table th, .fc-band-table td { padding: 8px 12px; }
/* 118px：档位名 + 「标准价」小标 / 删档 × 要摆得下（11-10 从 96 放宽） */
.fc-band-table .fc-band-col { width: 118px; white-space: nowrap; }
.fc-band-table .fc-price { width: 150px; }
.fc-band-table .fc-used { color: var(--muted); font-size: var(--fs-2xs); white-space: nowrap; }
/* 标准价档的小标记：一眼看出来哪一档在兜底，不用去第二屏查 */
.fc-band-std {
  margin-left: 6px; padding: 1px 5px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: var(--fs-2xs); font-style: normal; vertical-align: 1px;
}
/* 删档 ×：只有空档才出现，平时低调，hover 才红 */
.fc-band-del {
  margin-left: 4px; width: 18px; height: 18px; padding: 0;
  border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface); color: var(--muted);
  font-size: 13px; line-height: 1; cursor: pointer; vertical-align: middle;
}
.fc-band-del:hover { border-color: #ef4444; background: rgba(239, 68, 68, 0.1); color: #ef4444; }
/* 表格下方的「增加一档」操作条 */
.fc-band-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 2px 2px; }
.fc-band-tip { font-size: var(--fs-2xs); color: var(--muted); line-height: 1.5; }
/* 价格输入框：等宽数字 + 右对齐，三个数竖着扫得下去；
   显式写宽高和边框，别让全局 input 规则串进来（.field input 命中一切后代，撞过） */
.fc-input {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font-size: var(--fs-md); font-variant-numeric: tabular-nums;
}
.fc-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fc-input::placeholder { color: var(--muted); }
.fc-band-table .fc-input { text-align: right; }
.fc-dash { color: var(--muted); }
.fc-search {
  width: 220px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm);
}
.fc-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
/* 挂档表 */
.fc-route-wrap { overflow-x: auto; }
.fc-route-table th, .fc-route-table td { padding: 9px 12px; }
.fc-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-ops-col { white-space: nowrap; text-align: right; width: 1%; }
/* 两个单字按钮（改 / 删）10px 看着像连在一起，放宽到 16px 并给点击区留白 */
.fc-ops-col > * + * { margin-left: 16px; }
.fc-ops-col .link { padding: 2px 2px; }
.fc-muted { color: var(--muted); }
.fc-band-chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: var(--fs-2xs); white-space: nowrap;
}
.fc-band-chip.is-special { background: var(--warn-soft, rgba(200,140,0,.14)); color: var(--warn, #a06400); }
.fc-special-note { display: block; margin-top: 3px; font-size: var(--fs-2xs); color: var(--muted); }
.fc-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
/* 待归位 */
.fc-pending { margin: 0 16px 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); }
.fc-pending-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: var(--fs-sm); }
.fc-pending-head .fc-muted { font-size: var(--fs-2xs); }
.fc-pending-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fc-pending-item {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 4px 8px 4px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font-size: var(--fs-2xs);
}
.fc-pending-item:hover { border-color: var(--brand); color: var(--ink); }
.fc-pending-item i { font-style: normal; color: var(--brand); }
.fc-pending-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.fc-pending-foot .fc-muted { font-size: var(--fs-2xs); }
/* 试算 */
.fc-calc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 16px 16px; }
.fc-calc > .fc-input { width: 190px; }
.fc-calc-out {
  flex: 1 1 240px; min-width: 220px; min-height: 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 6px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm);
}
.fc-calc-out b { font-size: 18px; font-variant-numeric: tabular-nums; }
.fc-calc-out span { color: var(--muted); font-size: var(--fs-2xs); }
.fc-calc-out.is-hit b { color: var(--ok, #1a7f4b); }
.fc-calc-out.is-miss b { color: var(--danger, #c0392b); }
/* 老价目折叠 */
.fc-legacy { margin-bottom: 16px; padding: 0; }
.fc-legacy > summary {
  display: flex; align-items: baseline; gap: 8px; cursor: pointer;
  padding: 14px 16px; font-size: var(--fs-sm); list-style: none;
}
.fc-legacy > summary::-webkit-details-marker { display: none; }
.fc-legacy > summary .fc-muted { font-size: var(--fs-2xs); }
.fc-legacy .dt-wrap { padding: 0 16px 14px; max-height: 320px; overflow: auto; }
.fc-legacy-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.fc-legacy-foot .fc-muted { font-size: var(--fs-2xs); }
.fc-legacy-done {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-size: var(--fs-sm);
}
.fc-legacy-done .fc-muted { font-size: var(--fs-2xs); }
.fc-legacy-done .link { margin-left: auto; }
/* 挂档表单 */
.fc-form { display: flex; flex-direction: column; gap: 14px; }
.fc-field { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-sm); }
.fc-field > span { color: var(--ink-2); }
.fc-field > span em { font-style: normal; color: var(--muted); font-size: var(--fs-2xs); margin-left: 6px; }
.fc-field > input, .fc-field > select {
  height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-md);
}
.fc-field > input:focus, .fc-field > select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.fc-special-box { padding: 12px; border-radius: 10px; background: var(--surface-2); }
.fc-special-tip { margin: 0 0 10px; font-size: var(--fs-2xs); color: var(--muted); }
/* 装鸡地多选（11-10）：一个 div 里 chips + 输入框，回车/点「加入」收一个。
   别复用 .field / .pick-* 的输入样式，那两组会串到别的抽屉里去。 */
.fc-multi { display: flex; flex-direction: column; gap: 8px; }
.fc-multi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-multi-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 6px 4px 10px; border-radius: 999px;
  border: 1px solid var(--brand-line, var(--line)); background: var(--brand-soft, var(--surface-2));
  color: var(--ink); font-size: var(--fs-sm); line-height: 1.4;
}
.fc-multi-x {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  width: 18px; height: 18px; border-radius: 50%; line-height: 1; font-size: 14px; padding: 0;
}
.fc-multi-x:hover { background: var(--line); color: var(--danger, #c0392b); }
.fc-multi-entry { display: flex; gap: 8px; align-items: center; }
.fc-multi-entry > input {
  flex: 1 1 auto; min-width: 0; height: 38px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-md);
}
.fc-multi-entry > input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fc-multi-add { flex: 0 0 auto; height: 38px; padding: 0 14px; }
.fc-multi-field > span em { display: block; margin: 2px 0 0; }
/* 批量挂档 */
.fc-bulk { display: flex; flex-direction: column; gap: 12px; }
.fc-bulk-tip { margin: 0; font-size: var(--fs-sm); color: var(--ink-2); }
.fc-bulk-top { display: flex; gap: 10px; align-items: flex-end; }
.fc-bulk-top .fc-field { min-width: 180px; }
.fc-bulk-top .fc-multi-field { flex: 1 1 320px; min-width: 240px; }
.fc-bulk-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.fc-bulk-search { width: 100%; }
.fc-custom { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.fc-tiers > summary .fc-muted { max-width: 100%; }
.fc-tiers .tier-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 16px 14px; }
.fc-copy { margin-top: 10px; }
.table-toolbar .fc-copy { margin-top: 0; }

/* 按装鸡地分组（11-09 口径 V6）：一块一个装鸡地，块内同价目的地并成一行。
   注意别复用 .field / .pick-* —— 那两组是旧定义，会串到别的抽屉里去。 */
.fc-group-table { table-layout: auto; }
.fc-group-table th, .fc-group-table td { padding: 9px 12px; }
.fc-grp + .fc-grp .fc-grp-head td { border-top: 1px solid var(--line); }
.fc-grp-head td { background: var(--surface-2); padding: 8px 12px; }
.fc-grp-name { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); word-break: break-all; }
.fc-grp-note { margin-left: 10px; font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap; }
.fc-grp-note.is-warn { color: var(--danger); font-weight: 600; }
.fc-grp-add { margin-left: 12px; font-size: var(--fs-2xs); white-space: nowrap; }
.fc-grp-fix { margin-left: 8px; color: var(--danger); font-weight: 600; }
.fc-grp-empty { color: var(--muted); font-size: var(--fs-2xs); padding: 10px 12px 12px 26px; }
.fc-default-bar { display: flex; align-items: center; gap: 8px; }
.fc-mini {
  height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm);
}
.fc-mini:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fc-mini-text { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.fc-form textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm);
  resize: vertical; line-height: 1.6;
}
.fc-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 装鸡地清单（11-10）：清单折成一行，空的不再占表格位置 */
.fc-places-strip {
  margin: 0 16px 10px; padding: 8px 12px; border: 1px solid var(--line-soft);
  border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm);
}
.fc-places-strip.is-flat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-style: dashed; }
.fc-places-strip > summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  cursor: pointer; list-style: none;
}
.fc-places-strip > summary::-webkit-details-marker { display: none; }
.fc-places-strip > summary b { font-size: var(--fs-sm); color: var(--ink-2); }
.fc-places-strip > summary .fc-muted {
  font-size: var(--fs-2xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: min(520px, 55vw);
}
.fc-places-toggle { font-style: normal; font-size: var(--fs-2xs); color: var(--brand); margin-left: auto; }
.fc-place-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fc-place-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: var(--fs-2xs); color: var(--ink-2);
}
.fc-place-x {
  border: none; background: transparent; cursor: pointer; color: var(--muted);
  font-size: 14px; line-height: 1; padding: 0 4px; border-radius: 999px;
}
.fc-place-x:hover { color: var(--danger); background: var(--danger-soft); }
.fc-place-add { font-size: var(--fs-2xs); padding: 4px 10px; }
.fc-places-tip { margin: 8px 0 0; font-size: var(--fs-2xs); }

/* 按日期重算运费（11-10） */
.fc-rc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 16px 14px; }
.fc-rc-date { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.fc-rc-date input {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm);
}
.fc-rc-date input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fc-rc-sum { font-size: var(--fs-sm); color: var(--ink-2); }
.fc-rc-empty { padding: 18px 16px; color: var(--muted); font-size: var(--fs-sm); }
.fc-rc-ck { width: 34px; text-align: center; }
.fc-rc-ck input { width: 15px; height: 15px; cursor: pointer; vertical-align: middle; }
.fc-rc-kind {
  font-style: normal; font-size: var(--fs-2xs); color: var(--muted);
  margin-left: 6px; white-space: nowrap;
}
.fc-rc-table tr.is-off { opacity: 0.45; }
.fc-rc-table td.is-up { color: var(--danger); font-weight: 600; }
.fc-rc-table td.is-down { color: var(--ok); font-weight: 600; }
.fc-rc-skip { margin: 10px 16px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.fc-rc-skip > summary { cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.fc-rc-skip > summary .fc-muted { font-size: var(--fs-2xs); margin-left: 0; }
.fc-rc-skip .dt-wrap { margin-top: 10px; }
.fc-rc-tip { margin: 8px 0 0; font-size: var(--fs-2xs); }
.fc-rc-last {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 12px 16px 0; padding: 10px 12px; border-radius: 10px;
  background: var(--brand-soft); font-size: var(--fs-sm); color: var(--ink-2);
}
.fc-rc-hist { margin: 10px 16px 14px; }
.fc-rc-hist > summary { cursor: pointer; font-size: var(--fs-2xs); color: var(--muted); }
.fc-rc-hist-list { margin-top: 8px; display: grid; gap: 6px; }
.fc-rc-hist-list > div {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  font-size: var(--fs-2xs); color: var(--muted);
}
.fc-rc-hist-list i { font-style: normal; }
.fc-rc-undone { font-style: normal; color: var(--warn); }

/* ---------- 外聘车运价（2026-11-10）----------
   用户口径：这套价只是自己车队的，外聘车同线路可能不同价，要能区分开。
   页面两屏：按车看价 / 外聘运费台账。全部 of- 前缀，不复用 .field input（撞过三次）。 */
.of-card { margin-bottom: 14px; }
.of-head-btn { margin-left: auto; }
.of-picker {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2);
}
.of-picker-label { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.of-picker-sel {
  min-width: 260px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm);
}
.of-picker-hint { font-size: var(--fs-2xs); color: var(--muted); }
.of-chip {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap;
}
.of-money { font-variant-numeric: tabular-nums; }
.of-tip {
  margin: 10px 16px 14px; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.75;
}
.of-tip b { color: var(--ink-2); }
.of-empty { padding: 34px 16px 30px; text-align: center; color: var(--muted); }
.of-empty b { display: block; font-size: var(--fs-md); color: var(--ink); margin-bottom: 6px; }
.of-empty p { margin: 0 auto 14px; max-width: 560px; font-size: var(--fs-xs); line-height: 1.85; text-align: left; }
.of-empty p b { display: inline; font-size: inherit; color: var(--ink-2); margin: 0; }
.of-empty .btn { text-decoration: none; display: inline-flex; align-items: center; }
.of-range { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.of-range input {
  height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: var(--fs-xs);
}
.of-check { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink-2); }
.of-warn { color: var(--warn); }
.of-form-head {
  /* 这里同时挂了 .field（竖排 label 的样式），必须显式改回横排，否则车牌/车队/车型竖着堆三行 */
  display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--brand-soft); font-size: var(--fs-sm); color: var(--ink-2);
}
.of-form-head small { color: var(--muted); font-size: var(--fs-2xs); }

/* ===== 预订单空列表：说清「为什么空」（2026-11-11 〇-183） =====
   用户报「刚下的单后台找不到」。预订单页有六个筛选 + 两条默认收起规则，
   清不干净就空；而空列表和「单子被删」在屏幕上长得一样。
   这块把在用的筛选条件、全库张数、被收起的已入库数摊开，并给一键出口。 */
.pre-empty { padding: 30px 16px 34px; text-align: center; }
.pre-empty-t { margin: 0 0 8px; font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.pre-empty-d { margin: 0 auto; max-width: 620px; font-size: var(--fs-sm); line-height: 1.7; color: var(--muted); }
.pre-empty-d b { color: var(--text); font-variant-numeric: tabular-nums; }
.pre-empty-ops { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* 工具条上「另有 N 张已入库已收起」：常显的收起提示（2026-11-11 〇-183） */
.pre-hid {
  margin-right: 10px;
  padding: 2px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--brand-dark);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.8;
  cursor: pointer;
}
.pre-hid:hover { background: var(--brand-soft); }

/* ===== 「数据截至」（2026-11-11 〇-184） =====
   用户现场「手机上下完单，后台没有」：电脑端云令牌过期，页面停在三小时前的快照，
   而屏幕上没有任何一处看得出来。这一枚小标就是那一眼。
   常态是安静的灰字；超过 3 分钟变琥珀；登录失效 / 未接云端变红并可直接点。 */
.pre-sync {
  margin-left: 10px;
  padding: 2px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pre-sync:hover { background: var(--brand-soft); }
.pre-sync.is-warn {
  border-color: rgba(214, 138, 12, 0.4);
  background: rgba(255, 168, 20, 0.12);
  color: #a2660a;
}
.pre-sync.is-bad {
  border-color: rgba(214, 60, 18, 0.45);
  background: rgba(240, 78, 35, 0.12);
  color: var(--brand-dark);
}
.pre-sync.is-bad:hover { background: rgba(240, 78, 35, 0.2); }
html[data-theme="dark"] .pre-sync { color: #8b929c; }
html[data-theme="dark"] .pre-sync.is-warn { color: #ffc46b; background: rgba(255, 168, 20, 0.14); }
html[data-theme="dark"] .pre-sync.is-bad { color: #ffa78a; background: rgba(240, 78, 35, 0.18); }

/* ---------- 内部往来（finance-hub，2026-11-14） ---------- */
.it-recent { margin-top: 10px; border-top: 1px solid var(--line-soft); }
.it-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); flex-wrap: wrap; }
.it-row .mono { flex: none; min-width: 120px; }
.it-row b.num { margin-left: auto; }

/* ============================================================
   现场留证缩略图 + 查看层（2026-11-15 〇-253）
   司机签收上报最多传 5 个图片/视频，调度在车次卡上直接看：
   缩略图 3 列铺开，视频带播放角标，没传上去的标「待上传」。
   点开是查看层（图片大图 / 视频直接播），标题带车次号和订单号。
   全部走变量，深浅皮肤都不写死底色。
   ============================================================ */
.trip-media-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 2px;
  max-width: 420px;
}
.trip-media-cell {
  position: relative;
  padding: 0;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line, #e2e8f0);
  background: rgba(127, 127, 127, 0.08);
  cursor: zoom-in;
}
.trip-media-cell img,
.trip-media-cell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trip-media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.55);
  color: #fff;
  font-size: 11px;
  font-style: normal;
}
.trip-media-pend {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  padding: 1px 3px;
  border-radius: 5px;
  background: rgba(190, 18, 60, 0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}
.trip-proof { align-items: center; }

.tmv-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 12, 20, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.tmv-box {
  width: min(920px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--card, #fff);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.tmv-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  font-size: 13px;
  color: var(--ink, #0f172a);
}
.tmv-head b { font-size: 14px; }
.tmv-head span { color: var(--ink-2, #64748b); }
.tmv-at { margin-left: auto; font-size: 12px; }
.tmv-x {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--ink-2, #64748b);
  cursor: pointer;
  padding: 0 2px;
}
.tmv-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b1017;
  padding: 6px;
}
.tmv-media {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 6px;
}
.tmv-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line, #e2e8f0);
  font-size: 12px;
  color: var(--ink-2, #64748b);
}
.tmv-nav { margin-left: auto; display: flex; gap: 6px; }
.tmv-nav button,
.tmv-open {
  border: 1px solid var(--line, #e2e8f0);
  background: transparent;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--ink, #0f172a);
  cursor: pointer;
  text-decoration: none;
}
html[data-theme="dark"] .tmv-box { background: #1b1f27; }
html[data-theme="dark"] .tmv-head,
html[data-theme="dark"] .tmv-foot { border-color: rgba(255, 255, 255, 0.12); }
html[data-theme="dark"] .tmv-head,
html[data-theme="dark"] .tmv-head b { color: #eef1f6; }
html[data-theme="dark"] .tmv-nav button,
html[data-theme="dark"] .tmv-open { color: #eef1f6; border-color: rgba(255, 255, 255, 0.16); }

/* ==================== 批发开单 v2（2026-11-16 按触屏收银机重做） ====================
   三栏：客户与品种 / 本单明细（行卡片 + 称重条） / 过磅明细 + 结算。
   口径同收银台：按笼过磅、逐磅累加、右栏常驻合计；颜色全部走主题变量。 */
.pb-pos { grid-template-columns: 292px minmax(0, 1fr) 352px; gap: 12px; }
.pb-left, .pb-mid, .pb-right { display: grid; gap: 12px; min-width: 0; align-content: start; }
.pb-left { position: sticky; top: 10px; }
.pb-right { position: sticky; top: 10px; }
.pb-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow-sm); min-width: 0;
}
.pb-card .pos-panel-head { margin-bottom: 8px; }

/* 多客户页签 */
.pb-tabs {
  display: flex; align-items: center; gap: 6px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px;
}
.pb-tab {
  display: inline-flex; align-items: baseline; gap: 6px; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  border-radius: 10px; padding: 6px 10px; font-size: var(--fs-sm); cursor: pointer; max-width: 220px;
}
.pb-tab b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.pb-tab i { font-style: normal; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.pb-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.pb-tab.is-cur { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.pb-tab.is-cur i { color: var(--brand-dark); }
.pb-tab-day { font-size: var(--fs-2xs, 10px); color: var(--muted); }
.pb-tabs-hint { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; padding-right: 4px; }

/* 单据信息条 */
.pb-doc { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 0 12px; }
.pb-doc .field { margin-bottom: 0; }
.pb-doc .field input[readonly] { background: var(--surface-2); color: var(--ink-2); }

/* 明细行卡片 */
.pb-lines { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.pb-lines-body { display: grid; gap: 10px; }
.pb-line { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.pb-line.is-sel { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.08); }
.pb-line-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pb-line-name { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pb-line-name b { font-size: var(--fs-base); }
.pb-line-name small { font-size: var(--fs-xs); color: var(--muted); }
.pb-line-amt { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: var(--fs-md); color: var(--ink); }
.pb-del {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; line-height: 1;
}
.pb-del:hover { color: var(--danger); border-color: #fecaca; background: var(--danger-soft); }

/* 七个可改格子 */
.pb-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pb-cell { display: grid; gap: 2px; min-width: 0; }
.pb-cell > span { font-size: var(--fs-xs); color: var(--muted); display: flex; align-items: baseline; gap: 3px; }
.pb-cell > span i { font-style: normal; font-size: var(--fs-2xs, 10px); color: var(--muted-2, var(--muted)); }
.pb-cell input {
  width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
  font-size: var(--fs-base); color: var(--ink); background: var(--surface); outline: none;
}
.pb-cell input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.pb-cell.is-strong input { font-weight: 650; }
.pb-cell input::placeholder { color: var(--muted); font-weight: 400; }

/* 称重条：已称几磅 + 本磅笼数/每笼只数/毛重 + 记一磅 */
.pb-weigh {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line);
}
.pb-weigh-info { font-size: var(--fs-xs); color: var(--muted); }
.pb-weigh-info.is-btn {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px;
  padding: 4px 8px; cursor: pointer; color: var(--ink-2);
}
.pb-weigh-info.is-btn b { color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.pb-weigh-info.is-open { border-color: var(--brand); background: var(--brand-soft); }
.pb-weigh-warn { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; }
.pb-wf { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--muted); }
.pb-wf input {
  width: 62px; text-align: right; border: 1px solid var(--line); border-radius: 7px;
  padding: 4px 6px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; outline: none;
}
.pb-wf.is-gross input { width: 96px; font-weight: 650; }
.pb-wf input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1); }
.pb-weigh-btn {
  border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 9px;
  padding: 6px 12px; font-size: var(--fs-sm); font-weight: 650; cursor: pointer;
}
.pb-weigh-btn:hover { filter: brightness(1.05); }
.pb-mini {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 8px; padding: 4px 8px; font-size: var(--fs-xs); cursor: pointer;
}
.pb-mini:hover { border-color: var(--brand); color: var(--brand-dark); }

/* 行内逐磅展开 */
.pb-pound-list { margin-top: 8px; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.pb-pound-item {
  display: grid; grid-template-columns: 64px 1fr 1fr 1fr 1fr; gap: 8px;
  padding: 5px 10px; font-size: var(--fs-xs); color: var(--ink-2);
  border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums;
}
.pb-pound-item:first-child { border-top: 0; }
.pb-pound-item.is-last { background: var(--brand-soft); }
.pb-pi-no { color: var(--muted); }
.pb-pi-net { font-weight: 650; color: var(--ink); }
.pb-pound-sum { padding: 6px 10px; font-size: var(--fs-xs); background: var(--surface-2); color: var(--ink-2); }

/* 合计条（常驻） */
.pb-sum-bar {
  display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 4px 2px; border-top: 1px solid var(--line);
  font-size: var(--fs-sm); color: var(--muted);
}
.pb-sum-bar b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pb-sum-goods b { font-size: var(--fs-md); color: var(--ink); }
.pb-spacer { flex: 1 1 auto; }

/* 右栏：过磅明细 */
.pb-pounds .pos-panel-head h3 { gap: 6px; }
.pb-pound-scroll { max-height: 300px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
.pb-pr {
  display: grid; grid-template-columns: minmax(0, 1.5fr) 58px repeat(3, minmax(0, 1fr));
  gap: 6px; align-items: center; padding: 6px 8px; font-size: var(--fs-xs);
  border-top: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; cursor: pointer;
}
.pb-pr:first-child { border-top: 0; }
.pb-pr:hover { background: var(--surface-2); }
.pb-pr.is-last { background: var(--brand-soft); }
.pb-pr.is-manual .pb-pr-name i { color: var(--warn, #b45309); }
.pb-pr-name { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.pb-pr-name b, .pb-pr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-pr-name i { font-style: normal; font-size: var(--fs-2xs, 10px); color: var(--muted); }
.pb-pr-cages { color: var(--muted); }
.pb-pr-num { text-align: right; color: var(--ink-2); }
.pb-pr-num.is-sub { color: var(--muted); }
.pb-pr-num.is-net { font-weight: 650; color: var(--ink); }
.pb-pound-foot {
  display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--line); font-size: var(--fs-xs); color: var(--muted);
}
.pb-pound-foot b { color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 3px; }
.pb-pounds-empty { display: grid; gap: 4px; padding: 14px 6px; text-align: center; }
.pb-pounds-empty b { font-size: var(--fs-sm); color: var(--ink-2); }
.pb-pounds-empty span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }

/* 右栏：结算 */
.pb-pay { display: grid; gap: 8px; }
.pb-pay-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.pb-pay-fields .field { margin-bottom: 4px; }
.pb-paysum { background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 10px; padding: 8px 12px; }
.pb-pay-actions { display: flex; gap: 10px; margin-top: 4px; }
.pb-warn { font-size: var(--fs-xs); color: var(--danger); margin: 2px 0; }
.pb-err { margin: 4px 0 0; }

/* 空态与退货标记 */
.pb-empty { display: grid; gap: 6px; padding: 26px 10px; }
.pb-empty b { font-size: var(--fs-base); color: var(--ink-2); }
.pb-empty small { font-size: var(--fs-xs); color: var(--muted); line-height: 1.8; }
.pb-return-flag {
  margin-left: 4px; font-size: var(--fs-xs); font-weight: 650; color: var(--danger);
  background: var(--danger-soft); border-radius: 999px; padding: 2px 8px;
}
.pb-basket input { width: 66px; text-align: right; }

/* 品种卡「已选」标记 */
.pos-good { position: relative; }
.pos-good.is-picked { border-color: var(--brand); background: var(--brand-soft); }
.pg-badge {
  position: absolute; top: 6px; right: 6px; font-size: var(--fs-2xs, 10px);
  color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 6px;
}

/* 窄屏（≤1500）先收左栏，右栏仍在右侧；≤1200 三栏摊成一栏 */
@media (max-width: 1500px) {
  .pb-pos { grid-template-columns: 262px minmax(0, 1fr) 320px; }
  .pb-cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .pb-pos { grid-template-columns: minmax(0, 1fr); }
  .pb-left, .pb-right { position: static; }
  .pb-cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pb-doc { grid-template-columns: 1fr 1fr; }
}

/* ---------- 装车批次（〇-280 2026-11-18）：看板槽位 / 到场排队 / 加车行 ---------- */
.batch-farm-row {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; align-items: end;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  margin-bottom: 6px;
}
/* 〇-285：场行空态提示 / 行内建档小表单 —— 占满整行 */
.batch-farm-row .form-tip { grid-column: 1 / -1; margin: 0; }
.batch-farmq {
  grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.batch-farmq .form-grid { margin: 0; }
/* 〇-287：预览区「今天可派的车」 */
.scheme-free { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; }

/* 〇-289：车型组合计数器（大车/中车/细车 ×N，可点加减重算可派的车） */
.scheme-mix { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.scheme-mix-item {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.scheme-mix-item.is-on { border-color: var(--accent, #2563eb); }
.scheme-mix-item b { font-size: var(--fs-sm); }
.mix-count { min-width: 30px; text-align: center; font-weight: 700; }
.mix-btn {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1; cursor: pointer;
}
.mix-btn:hover { border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); }
.scheme-warn-line { margin-top: 6px; padding: 5px 8px; border-radius: 8px; background: rgba(217, 119, 6, 0.1); }

/* 〇-290：车型组合实时余量（还剩/超出多少只） */
.scheme-mix-status {
  margin-top: 8px; padding: 6px 10px; border-radius: 8px; font-size: var(--fs-sm);
  background: rgba(37, 99, 235, 0.08); border: 1px dashed var(--line);
}
.scheme-mix-status.is-over { background: rgba(217, 119, 6, 0.1); border-color: var(--warn); color: var(--warn); }
.scheme-free-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.scheme-free-head b { font-size: var(--fs-sm); color: var(--ink); }
.scheme-free-list { display: flex; flex-wrap: wrap; gap: 6px; }
.scheme-free-car {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
/* 〇-288：预选车 chips 可点选 */
button.scheme-free-car { cursor: pointer; }
button.scheme-free-car:hover { border-color: var(--brand); }
.scheme-free-car.is-picked { border-color: var(--brand); background: var(--brand-soft); }
.scheme-free-car.is-picked b { color: var(--brand-dark); }
.scheme-free-car b { font-size: var(--fs-xs); color: var(--ink); }
.scheme-free-car small { font-size: var(--fs-xs); color: var(--muted); }
.slot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px;
}
.batch-slot {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 8px;
}
.batch-slot.is-off { opacity: 0.55; }
.slot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slot-head > b { font-size: var(--fs-base); color: var(--ink); }
.slot-seq {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 20px; padding: 0 6px; border-radius: 5px;
  font-size: var(--fs-xs); font-weight: 600; color: var(--brand-dark); background: var(--brand-soft);
}
.slot-head small { margin-left: auto; }
.slot-meta { display: flex; flex-direction: column; gap: 3px; }
.slot-meta small { font-size: var(--fs-xs); color: var(--muted); }
.slot-meta small b { color: var(--ink); }
.slot-form { gap: 6px; }
.slot-ride span { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--ink); }
.slot-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.queue-list { display: flex; flex-direction: column; gap: 6px; }
.queue-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: var(--fs-sm); color: var(--ink);
}
.queue-row small { color: var(--muted); margin-right: auto; }
.queue-row .mono { color: var(--ink); }
.queue-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  font-size: var(--fs-sm); font-weight: 600; color: #fff; background: var(--brand);
}
