/* ==========================================================================
   Zorix ERP — 业务前端设计系统
   设计规则：深蓝色导航 + 白色内容区 + 橙色强调，方正/小圆角，克制动效。
   仅在此文件定义颜色与间距，模板中不写内联样式。
   ========================================================================== */

:root {
  --zx-navy-900: #0a2233;
  --zx-navy-800: #10314a;
  --zx-navy-700: #17415f;
  --zx-navy-100: #e8eef3;

  --zx-orange: #e8720c;
  --zx-orange-dark: #c95f07;
  --zx-orange-50: #fdf3e9;

  --zx-ink: #16232e;
  --zx-ink-2: #445565;
  --zx-ink-3: #6b7b8b;
  --zx-ink-4: #9aa7b3;

  --zx-line: #e3e8ee;
  --zx-line-soft: #f0f3f7;
  --zx-bg: #f5f7fa;
  --zx-white: #ffffff;

  --zx-green: #1b7f4c;
  --zx-green-50: #e9f6ef;
  --zx-red: #c0392b;
  --zx-red-50: #fdecea;

  --zx-radius: 10px;
  --zx-radius-sm: 8px;
  --zx-shadow: 0 1px 2px rgba(16, 49, 74, 0.04);
  --zx-shadow-lg: 0 12px 32px rgba(16, 49, 74, 0.12);

  --zx-topbar-h: 58px;
  --zx-sidebar-w: 236px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--zx-bg);
  color: var(--zx-ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--zx-navy-700); text-decoration: none; }
a:hover { color: var(--zx-orange-dark); text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--zx-orange);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1100;
  background: var(--zx-navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--zx-radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 顶部导航 ---------- */
.topbar {
  height: var(--zx-topbar-h);
  background: var(--zx-navy-800);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.topbar__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.topbar__brand:hover { color: #fff; text-decoration: none; }
.topbar__brand span {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.62);
}

.topbar__spacer { flex: 1 1 auto; }

.topbar__user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 12px 5px 6px;
  font-size: 13px;
}
.topbar__user:hover,
.topbar__user:focus { background: rgba(255, 255, 255, 0.1); color: #fff; }

.topbar__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--zx-orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.topbar__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--zx-radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
}
.topbar__icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.dropdown-menu {
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius-sm);
  box-shadow: var(--zx-shadow-lg);
  font-size: 13.5px;
  padding: 6px;
}
.dropdown-item { border-radius: 6px; padding: 8px 10px; }
.dropdown-item:hover { background: var(--zx-bg); color: var(--zx-ink); }

/* ---------- 布局 ---------- */
.shell {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - var(--zx-topbar-h));
}

.sidebar {
  width: var(--zx-sidebar-w);
  flex: 0 0 var(--zx-sidebar-w);
  background: var(--zx-white);
  border-right: 1px solid var(--zx-line);
  padding: 18px 12px;
  position: sticky;
  top: var(--zx-topbar-h);
  height: calc(100vh - var(--zx-topbar-h));
  overflow-y: auto;
}

.sidebar__title {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--zx-ink-4);
  padding: 4px 10px 8px;
}

.nav-list { list-style: none; margin: 0 0 14px; padding: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--zx-radius-sm);
  color: var(--zx-ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}
.nav-item:hover { background: #f4f7fa; color: var(--zx-ink); text-decoration: none; }
.nav-item .icon { color: var(--zx-ink-4); flex: 0 0 auto; }
.nav-item:hover .icon { color: var(--zx-ink-2); }

.nav-item.is-active {
  background: var(--zx-orange-50);
  color: #b85708;
  font-weight: 600;
}
.nav-item.is-active .icon { color: var(--zx-orange); }

.nav-item.is-soon {
  color: var(--zx-ink-4);
  cursor: default;
}
.nav-item.is-soon:hover { background: transparent; }
.nav-item.is-soon .icon { color: #c3ccd5; }

.nav-item__badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--zx-ink-3);
  background: var(--zx-line-soft);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0;
}

.content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px 30px 56px;
}
.content__inner { max-width: 1360px; }

/* ---------- 页面标题 ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-head__main { flex: 1 1 340px; min-width: 0; }
.page-head h1 {
  font-size: 21px;
  font-weight: 650;
  margin: 0 0 4px;
  color: var(--zx-navy-900);
  letter-spacing: 0.2px;
}
.page-head p { margin: 0; color: var(--zx-ink-3); font-size: 13px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb-bar {
  font-size: 12.5px;
  color: var(--zx-ink-3);
  margin-bottom: 10px;
}
.breadcrumb-bar a { color: var(--zx-ink-3); }
.breadcrumb-bar a:hover { color: var(--zx-orange-dark); }
.breadcrumb-bar .sep { margin: 0 6px; color: var(--zx-ink-4); }

/* ---------- 卡片 ---------- */
.card-zx {
  background: var(--zx-white);
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  box-shadow: var(--zx-shadow);
}
.card-zx__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--zx-line-soft);
}
.card-zx__head h2 {
  font-size: 14.5px;
  font-weight: 650;
  margin: 0;
  color: var(--zx-navy-900);
}
.card-zx__head .hint { font-size: 12.5px; color: var(--zx-ink-3); }
.card-zx__head .spacer { flex: 1 1 auto; }
.card-zx__body { padding: 18px; }
.card-zx__body--flush { padding: 0; }

/* ---------- 指标卡 ---------- */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric {
  background: var(--zx-white);
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  padding: 16px 18px;
  box-shadow: var(--zx-shadow);
}
.metric__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--zx-ink-3);
  margin-bottom: 6px;
}
.metric__value {
  font-size: 27px;
  white-space: nowrap;
  font-weight: 700;
  color: var(--zx-navy-900);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.metric__value.is-muted { color: var(--zx-ink-4); }
.metric__sub { font-size: 12px; color: var(--zx-ink-3); margin-top: 4px; }
.metric__sub .up { color: var(--zx-green); }

/* ---------- 表格 ---------- */
.table-zx { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-zx thead th {
  background: #fafbfc;
  color: var(--zx-ink-3);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--zx-line);
  white-space: nowrap;
}
.table-zx tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--zx-line-soft);
  color: var(--zx-ink);
  vertical-align: middle;
}
.table-zx tbody tr:last-child td { border-bottom: 0; }
.table-zx tbody tr:hover { background: #fafcff; }
.table-zx .col-actions { text-align: right; white-space: nowrap; }
.table-zx .num { font-variant-numeric: tabular-nums; }
.cell-title { font-weight: 600; color: var(--zx-navy-900); }
.cell-sub { font-size: 12px; color: var(--zx-ink-3); }
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace; font-size: 12.5px; }

/* ---------- 徽标 ---------- */
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-soft--on { background: var(--zx-green-50); color: var(--zx-green); }
.badge-soft--off { background: var(--zx-line-soft); color: var(--zx-ink-3); }
.badge-soft--warn { background: var(--zx-orange-50); color: #b85708; }
.badge-soft--type { background: #eef3f8; color: var(--zx-navy-700); }
.badge-soft--danger { background: var(--zx-red-50); color: var(--zx-red); }
.badge-soft--info { background: #eef5fb; color: #1c4f70; }
.badge-soft--soon {
  background: transparent;
  border: 1px dashed #cfd8e0;
  color: var(--zx-ink-3);
  font-size: 11px;
}

/* ---------- 按钮 ---------- */
.btn { font-size: 13.5px; border-radius: var(--zx-radius-sm); padding: 8px 14px; font-weight: 500; }
.btn-zx-primary {
  background: var(--zx-orange);
  border: 1px solid var(--zx-orange);
  color: #fff;
}
.btn-zx-primary:hover,
.btn-zx-primary:focus {
  background: var(--zx-orange-dark);
  border-color: var(--zx-orange-dark);
  color: #fff;
}
.btn-zx-secondary {
  background: #fff;
  border: 1px solid #d7dee7;
  color: var(--zx-ink);
}
.btn-zx-secondary:hover {
  background: #f7f9fb;
  border-color: #c3ccd5;
  color: var(--zx-ink);
}
.btn-zx-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--zx-navy-700);
  padding: 4px 8px;
}
.btn-zx-ghost:hover { background: var(--zx-bg); color: var(--zx-navy-900); }
.btn-zx-danger {
  background: var(--zx-red);
  border: 1px solid var(--zx-red);
  color: #fff;
}
.btn-zx-danger:hover { background: #a53224; border-color: #a53224; color: #fff; }
.btn-zx-danger-ghost {
  background: #fff;
  border: 1px solid #f0cfcb;
  color: var(--zx-red);
  padding: 4px 8px;
}
.btn-zx-danger-ghost:hover { background: var(--zx-red-50); color: var(--zx-red); }
.btn-sm { font-size: 12.5px; padding: 5px 10px; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--zx-line-soft);
}
.filter-bar .field { min-width: 150px; }
.filter-bar .field--grow { flex: 1 1 260px; min-width: 220px; }
.filter-bar label {
  display: block;
  font-size: 12px;
  color: var(--zx-ink-3);
  margin-bottom: 4px;
}

/* --- 月份筛选（本月 / 全部 / 年月）-------------------------------- */
.month-filter__basis {
  color: var(--zx-ink-3);
  font-weight: 400;
  margin-left: 4px;
  white-space: nowrap;
}
.month-filter__row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.month-filter__row input[type="month"] { width: 150px; }
.dash-period { margin-bottom: 14px; }
.dash-period label { display: block; font-size: 12px; color: var(--zx-ink-3); margin-bottom: 4px; }

/* --- 工作台业务入口 ------------------------------------------------- */
.entry-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.entry {
  flex: 1 1 180px;
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--zx-line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.entry:hover { border-color: var(--zx-orange); box-shadow: 0 2px 10px rgba(15, 38, 64, 0.06); }
.entry__title { display: block; font-size: 13.5px; font-weight: 650; color: var(--zx-ink); }
.entry__meta { display: block; font-size: 12px; color: var(--zx-ink-3); margin-top: 2px; }

/* ---------- 表单 ---------- */
.form-label { font-size: 13px; font-weight: 600; color: var(--zx-ink); margin-bottom: 5px; }
.form-control,
.form-select {
  font-size: 14px;
  border: 1px solid #d7dee7;
  border-radius: var(--zx-radius-sm);
  padding: 8px 12px;
  color: var(--zx-ink);
  background-color: #fff;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--zx-orange);
  box-shadow: 0 0 0 3px rgba(232, 114, 12, 0.14);
}
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--zx-red);
  background-image: none;
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}
.form-text { font-size: 12px; color: var(--zx-ink-3); }
.field-error {
  display: block;
  font-size: 12.5px;
  color: var(--zx-red);
  margin-top: 5px;
}
.req { color: var(--zx-orange); margin-left: 2px; }
.form-section { padding: 20px 22px; border-bottom: 1px solid var(--zx-line-soft); }
.form-section:last-of-type { border-bottom: 0; }
.form-section__title {
  font-size: 13px;
  font-weight: 650;
  color: var(--zx-navy-900);
  margin: 0 0 4px;
}
.form-section__desc { font-size: 12.5px; color: var(--zx-ink-3); margin: 0 0 16px; }
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 22px;
  background: #fbfcfd;
  border-top: 1px solid var(--zx-line);
  border-radius: 0 0 var(--zx-radius) var(--zx-radius);
}
.form-actions .spacer { flex: 1 1 auto; }
.form-check-input:checked { background-color: var(--zx-orange); border-color: var(--zx-orange); }
.form-check-input:focus { border-color: var(--zx-orange); box-shadow: 0 0 0 3px rgba(232, 114, 12, 0.14); }
.form-check-label { font-size: 13.5px; }

/* ---------- 空状态 ---------- */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--zx-ink-3);
}
.empty-state__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f2f5f8;
  color: var(--zx-ink-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.empty-state h3 { font-size: 14.5px; font-weight: 600; color: var(--zx-ink); margin: 0 0 6px; }
.empty-state p { font-size: 13px; margin: 0 auto 16px; max-width: 420px; }
.empty-state--compact { padding: 30px 20px; }

/* ---------- 提示条 ---------- */
.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--zx-radius);
  border: 1px solid var(--zx-line);
  background: #fff;
  font-size: 13px;
  color: var(--zx-ink-2);
}
.notice--info { background: #f4f8fb; border-color: #dbe6ef; }
.notice--soon { background: #fbfcfd; border-color: var(--zx-line); }
.notice__title { font-weight: 600; color: var(--zx-navy-900); margin: 0 0 2px; font-size: 13.5px; }
.notice p { margin: 0; }

.alert { border-radius: var(--zx-radius-sm); font-size: 13.5px; border: 1px solid transparent; }
.alert-success { background: var(--zx-green-50); border-color: #cce8d9; color: #14603a; }
.alert-danger { background: var(--zx-red-50); border-color: #f4cdc7; color: #8f2a1e; }
.alert-warning { background: #fff7e8; border-color: #f5e0b8; color: #8a5a12; }
.alert-info { background: #eef5fb; border-color: #d5e5f2; color: #1c4f70; }

/* ---------- 分页 ---------- */
.pagination-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--zx-line-soft);
  font-size: 13px;
  color: var(--zx-ink-3);
  flex-wrap: wrap;
}
.pagination-bar .spacer { flex: 1 1 auto; }
.pagination { margin: 0; gap: 4px; }
.page-link {
  border: 1px solid var(--zx-line);
  border-radius: 6px;
  color: var(--zx-ink-2);
  font-size: 13px;
  padding: 5px 10px;
}
.page-link:hover { background: var(--zx-bg); color: var(--zx-ink); }
.page-item.active .page-link {
  background: var(--zx-navy-800);
  border-color: var(--zx-navy-800);
  color: #fff;
}
.page-item.disabled .page-link { color: var(--zx-ink-4); border-color: var(--zx-line-soft); }

/* ---------- 登录页 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--zx-bg);
}
.auth-card {
  width: 100%;
  max-width: 392px;
  background: #fff;
  border: 1px solid var(--zx-line);
  border-radius: 12px;
  box-shadow: var(--zx-shadow-lg);
  padding: 32px 28px 26px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.auth-brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--zx-navy-800);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.auth-brand__text { font-weight: 700; letter-spacing: 0.08em; color: var(--zx-navy-900); font-size: 15px; }
.auth-brand__sub { font-size: 11.5px; color: var(--zx-ink-3); letter-spacing: 0.1em; }
.auth-card h1 { font-size: 19px; font-weight: 650; margin: 0 0 4px; color: var(--zx-navy-900); }
.auth-card .lead { font-size: 13px; color: var(--zx-ink-3); margin: 0 0 22px; }
.auth-foot { margin-top: 18px; font-size: 12px; color: var(--zx-ink-4); text-align: center; }

/* ---------- 工具类 ---------- */
.text-muted-zx { color: var(--zx-ink-3) !important; }
.text-strong { color: var(--zx-navy-900); font-weight: 600; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.row-tight { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
/* 「渠道商采购」时采购方只剩一个下拉，撑满整行，不留半个空格。 */
.row-tight--single { grid-template-columns: 1fr; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--zx-topbar-h);
    bottom: 0;
    height: auto;
    z-index: 1040;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: var(--zx-shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .content { padding: 20px 16px 48px; }
  .sidebar-backdrop {
    position: fixed;
    inset: var(--zx-topbar-h) 0 0 0;
    background: rgba(10, 34, 51, 0.36);
    z-index: 1035;
  }
  .grid-2, .row-tight { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .metric-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 19px; }
  .table-zx thead th,
  .table-zx tbody td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


/* ---------- 订单详情 / 订单表单 ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(270px, 1fr);
  gap: 14px;
  align-items: start;
}
.detail-layout > aside .card-zx:last-child { margin-bottom: 0; }

.kv-list { margin: 0; }
.kv-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--zx-line-soft);
  font-size: 13px;
}
.kv-list > div:last-child { border-bottom: 0; }
.kv-list dt { color: var(--zx-ink-3); font-weight: 400; margin: 0; }
.kv-list dd { margin: 0; text-align: right; color: var(--zx-ink); }

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin: 0;
}
.kv-grid__wide { grid-column: 1 / -1; }
.kv-grid dt { font-size: 12px; color: var(--zx-ink-3); font-weight: 500; margin-bottom: 2px; }
.kv-grid dd { margin: 0; font-size: 13.5px; }

.line-table td { padding: 8px 10px; vertical-align: top; }
.line-table thead th { padding: 8px 10px; }
.line-table { table-layout: fixed; min-width: 780px; }
.line-table th:nth-child(1) { width: 29%; }
.line-table th:nth-child(2) { width: 11%; }
.line-table th:nth-child(3) { width: 7%; }
.line-table th:nth-child(4) { width: 13%; }
.line-table th:nth-child(5) { width: 13%; white-space: nowrap; }
.line-table th:nth-child(6) { width: 19%; }
.line-table th:nth-child(7) { width: 8%; }
.line-table input.form-control,
.line-table select.form-select { font-size: 13px; padding: 6px 8px; }
.line-table .field-error { display: block; font-size: 11.5px; }
.line-table tr.is-removed { opacity: 0.45; }
.line-table tr.is-removed input,
.line-table tr.is-removed select { text-decoration: line-through; }
.line-table__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.line-table__foot .text-muted-zx { font-size: 12.5px; }
.line-remove {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--zx-ink-3);
  white-space: nowrap;
  margin: 0;
}
.line-remove input { width: 14px; height: 14px; margin-top: 0; }

.order-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
  color: var(--zx-ink-3);
}
.order-total strong {
  font-size: 20px;
  color: var(--zx-navy-900);
  font-variant-numeric: tabular-nums;
}

.form-actions--sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: #fbfcfd;
  border-radius: 0 0 var(--zx-radius) var(--zx-radius);
  flex-wrap: wrap;
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline__item {
  position: relative;
  padding: 0 0 16px 20px;
  border-left: 1px solid var(--zx-line);
}
.timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline__dot {
  position: absolute;
  left: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--zx-orange);
}
.timeline__title { font-size: 13px; font-weight: 600; color: var(--zx-navy-900); }
.timeline__text { font-size: 12.5px; color: var(--zx-ink-2); margin-top: 2px; }

@media (max-width: 992px) {
  .detail-layout { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
}

/* --- 单选卡片（客户归属 / 订单来源）--------------------------------- */
.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.choice {
  flex: 1 1 210px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--zx-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.choice:hover { border-color: #c3cfda; }
.choice input { margin-top: 3px; flex: none; }
.choice:has(input:checked) {
  border-color: var(--zx-orange);
  box-shadow: 0 0 0 3px rgba(232, 114, 12, .12);
}
.choice__body { display: block; }
.choice__title { display: block; font-size: 13.5px; font-weight: 600; color: var(--zx-ink); }
.choice__desc { display: block; font-size: 12px; color: var(--zx-ink-3); line-height: 1.5; margin-top: 2px; }

/* 订单来源下的「采购关系」：视觉上从属于上面的大类选择，不抢主选择的层级 */
.choice-group--sub {
  margin-top: 4px;
  padding-left: 12px;
  border-left: 2px solid var(--zx-line);
}
.choice-group--sub .choice { flex: 1 1 240px; padding: 9px 12px; }
.choice-group--sub .choice__title { font-size: 13px; }

.link-quiet { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.link-quiet:hover { color: var(--zx-orange); border-bottom-color: currentColor; }

/* --- 只读回显 / 行内按钮（订单表单）-------------------------------- */
.readout {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px dashed var(--zx-line);
  border-radius: 6px;
  background: #fafbfc;
  color: var(--zx-ink-2);
  font-size: 13.5px;
}
.field-inline { display: flex; gap: 8px; align-items: center; }
.field-inline > select { flex: 1 1 auto; min-width: 0; }
.form-section--tight { padding-bottom: 6px; }
.notice--warn { background: #fff8f0; border-color: #f0d5b6; }

/* --- 渠道价格表 ----------------------------------------------------- */
.price-table { table-layout: fixed; }
.price-table__money { width: 20%; }
.price-table__input { width: 22%; }
.price-table td, .price-table th { vertical-align: middle; }
.price-table .form-control-sm { text-align: right; }

/* --- InnoGrit 品牌标识 ---------------------------------------------- */
.topbar__brand { align-items: center; }
.topbar__logo { height: 17px; width: auto; display: block; }
.auth-brand__logo { height: 22px; width: auto; display: block; }

/* --- 页内页签（库存等"一个菜单多个视图"的模块）---------------------- */
.tabs-bar {
  display: flex;
  gap: 2px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--zx-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar { display: none; }
.tabs-bar__item {
  padding: 9px 13px;
  font-size: 13.5px;
  color: var(--zx-ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs-bar__item:hover { color: var(--zx-navy-900); }
.tabs-bar__item.is-active {
  color: var(--zx-navy-900);
  font-weight: 600;
  border-bottom-color: var(--zx-orange);
}
.num-strong { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--zx-navy-900); }

/* --- 批量入库（M2.1.1）------------------------------------------------ */
.receive-row {
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  padding: 14px 16px 4px;
  margin-bottom: 12px;
  background: #fcfdff;
}
.receive-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.receive-row__title { font-size: 12.5px; color: var(--zx-ink-2); font-weight: 600; }
.receive-row__unit { margin-left: 8px; font-weight: 400; color: var(--zx-ink-3); }
.receive-row .row-tight { margin-bottom: 0; }
.serial-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--zx-ink-3);
  margin: -6px 0 12px;
}
.serial-status__warn.is-warning { color: var(--zx-red); }
.line-table__foot {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- 发货进度与发货单 ------------------------------------------------ */
.progress-table td .num,
.progress-table th .num { font-variant-numeric: tabular-nums; }
.progress-table tr.is-short td { background: #fff8f2; }
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef5fb;
  color: #1c4f70;
  white-space: nowrap;
}
.stock-pill--short { background: var(--zx-orange-50); color: #b85708; }
.ship-item {
  border: 1px solid var(--zx-line);
  border-radius: var(--zx-radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.ship-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.ship-item__title { font-weight: 600; color: var(--zx-navy-900); font-size: 13.5px; }
.ship-item__meta { font-size: 12px; color: var(--zx-ink-3); }
.serial-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--zx-line-soft);
  border-radius: var(--zx-radius-sm);
  background: #fff;
}
.serial-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  padding: 4px 6px;
  border-radius: 6px;
}
.serial-option:hover { background: var(--zx-bg); }
.ship-empty { font-size: 12.5px; color: var(--zx-ink-3); }
.js-stock-hint.is-warning { color: #b85708; }
.ship-item__head .spacer { flex: 1 1 auto; }
.ship-item.is-over { border-color: var(--zx-orange); background: #fffaf5; }
.js-ship-count.is-warning { color: var(--zx-red); font-weight: 600; }
.notice--ok { border-color: #cfe8d5; background: #f4fbf6; }
.ship-error {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--zx-red);
}
.ship-error[hidden] { display: none; }
