/* ==================================================================
 * 后台样式（按参考截图重构：深色侧栏 + Ant 式工具栏 / 表格）
 * 组件类自带完整样式，避免与 Tailwind 原子类互相覆盖
 * ================================================================== */
:root {
  --blue: #1673dd;
  --blue-hover: #1466c7;
  --sidebar: #0f172a;
  --sidebar-2: #16233a;
  --panel: #f7f8fa;
  --border: #eef1f5;
  --border-strong: #d9e0e8;
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #8a94a6;
  --header: #e8f2fc;
}

body {
  background: #fff;
  color: var(--text);
}

/* ----------------------------- 侧边栏 ----------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: 240px;
  flex-direction: column;
  background: var(--sidebar);
  color: #fff;
  transition: transform .2s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
}
.brand-mark {
  display: flex;
  width: 34px;
  height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
}
.brand-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .2px;
  color: #fff;
}
.brand-sub {
  margin-top: 2px;
  font-size: 11px;
  color: #8fa0b8;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  color: #c3ccdb;
  transition: background .15s, color .15s;
}
.nav-item svg { color: #8fa0b8; flex: none; }
.nav-item:hover { background: var(--sidebar-2); color: #fff; }
.nav-item:hover svg { color: #cbd5e1; }
.nav-item.active { background: var(--blue); color: #fff; font-weight: 500; }
.nav-item.active svg { color: #fff; }

.sidebar-foot {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(148, 163, 184, .12);
}
.login-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 10px;
}
.login-icon {
  display: flex;
  width: 28px;
  height: 28px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sidebar-2);
  color: #94a3b8;
}
.login-label { font-size: 11px; color: #7c8aa0; }
.login-phone { margin-top: 1px; font-size: 13px; color: #e5eaf3; }
.logout-btn {
  display: flex;
  width: 100%;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid #24344d;
  background: var(--sidebar-2);
  font-size: 13px;
  color: #cbd5e1;
  transition: .15s;
}
.logout-btn:hover { background: #1c2c46; color: #fff; }
.sys-card {
  margin-top: 12px;
  border-radius: 6px;
  background: var(--sidebar-2);
  padding: 10px 12px;
}
.sys-title { font-size: 11px; color: #7c8aa0; }
.sys-state {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-size: 13px;
  color: #cbd5e1;
}
.dot-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 0 24px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}
.avatar {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f2fc;
  color: var(--blue);
}

/* ------------------------------ 主体 ------------------------------ */
.main { padding: 14px 24px 24px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.tabs { display: flex; align-items: flex-end; gap: 26px; height: 42px; }
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 11px;
  white-space: nowrap;
  border: 0;
  background: none;
  font-size: 17px;
  color: #6b7280;
}
.tab.tab-active { color: var(--blue); font-weight: 600; }
.tab.tab-active::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}
.tab-badge {
  padding: 0 5px;
  border-radius: 9px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  line-height: 16px;
  transform: translateY(-6px);
}

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 按钮 */
.btn {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
  transition: .15s;
}
.btn:hover { border-color: #b9c4d4; color: var(--blue); }
.btn.btn-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}
.btn.btn-primary:hover { border-color: var(--blue-hover); background: var(--blue-hover); color: #fff; }
.btn.btn-icon { width: 32px; justify-content: center; padding: 0; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 搜索行 */
.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.search-left, .search-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.control {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #374151;
  outline: none;
}
.control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.search-box { position: relative; display: flex; align-items: center; }
.search-box > svg {
  position: absolute;
  left: 9px;
  color: #9aa5b5;
  pointer-events: none;
}
.search-box input {
  width: 260px;
  height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #f5f6f8;
  font-size: 13px;
  outline: none;
}
.search-box input::placeholder { color: #b0b8c6; }
.search-box input:focus { background: #fff; border-color: var(--blue); }
.search-box .btn { margin-left: 8px; }

/* 高级筛选 */
.filter-panel {
  margin-bottom: 12px;
  padding: 13px 16px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.filter-title { font-size: 13px; font-weight: 600; color: #1f2937; }
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--blue);
}
.link-btn:hover { text-decoration: underline; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
}
.filter-grid .field-label { width: 66px; flex: none; }
.field { display: flex; align-items: center; gap: 10px; min-width: 0; }
.field-label {
  width: 66px;
  flex: none;
  text-align: right;
  font-size: 13px;
  color: var(--text-2);
}
.field-body { display: flex; min-width: 0; flex: 1; gap: 6px; }
.field .control, .field select.control { width: 100%; min-width: 0; }
.date-range {
  position: relative;
  display: flex;
  height: 32px;
  width: 100%;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #9aa5b5;
}
.date-cell { position: relative; display: flex; flex: 1; min-width: 0; }
.date-cell input { width: 100%; }
.date-ph {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #b0b8c6;
  pointer-events: none;
}
.date-range svg { flex: none; color: #9aa5b5; }
.date-range input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #374151;
  outline: none;
}
.date-range input::-webkit-calendar-picker-indicator { opacity: 0; width: 0; margin: 0; }
.date-range input[type="date"]:not(.has-value)::-webkit-datetime-edit { color: transparent; }
.date-range input[type="date"] { cursor: pointer; }

/* 状态标签栏 */
.status-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 8px;
  flex-wrap: wrap;
}
.status-list { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.status-tab {
  height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: 13px;
  color: var(--text-2);
}
.status-tab:hover { color: var(--blue); }
.status-tab.active {
  border-color: var(--blue);
  background: #f5f9ff;
  color: var(--blue);
  font-weight: 500;
}
.status-meta { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }

/* 表格 */
.table-wrap { overflow: auto; border-top: 1px solid var(--border); }
table.data {
  width: 100%;
  min-width: 1040px;
  border-spacing: 0;
  border-collapse: separate;
  font-size: 13px;
}
table.data thead th {
  height: 40px;
  padding: 0 12px;
  background: var(--header);
  color: #374151;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
table.data tbody td {
  height: 46px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}
table.data tbody tr:hover td { background: #f8fbff; }
table.data .col-check { width: 38px; padding-left: 16px; }
table.data .col-time { color: #6b7280; }
table.data .col-actions { text-align: right; }

.badge {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1;
}
.badge-amber  { background: #fffbe6; border-color: #ffe58f; color: #d48806; }
.badge-blue   { background: #eef5ff; border-color: #bcd8ff; color: #1673dd; }
.badge-cyan   { background: #e6fffb; border-color: #87e8de; color: #08979c; }
.badge-indigo { background: #f0f5ff; border-color: #adc6ff; color: #2f54eb; }
.badge-purple { background: #f9f0ff; border-color: #d3adf7; color: #722ed1; }
.badge-violet { background: #f4f0ff; border-color: #c7b6f5; color: #5b21b6; }
.badge-red    { background: #fff1f0; border-color: #ffa39e; color: #cf1322; }
.badge-green  { background: #f6ffed; border-color: #b7eb8f; color: #389e0d; }
.badge-gray   { background: #fafafa; border-color: #d9d9d9; color: #8c8c8c; }

.link { border: 0; background: none; padding: 0; font-size: 13px; color: var(--blue); }
.link:hover { text-decoration: underline; }
.link-orange { color: #fa8c16; }
.more-btn {
  border: 0;
  background: none;
  padding: 0 2px;
  color: #8a94a6;
  font-size: 15px;
  line-height: 1;
}
.more-btn:hover { color: var(--blue); }

/* 分页 */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 4px 0;
  font-size: 13px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.pager { display: flex; align-items: center; gap: 6px; }
.page-btn {
  display: inline-flex;
  min-width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: var(--text-2);
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.page-btn:disabled { opacity: .4; }
.jump-input {
  width: 44px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  outline: none;
}
.jump-input:focus { border-color: var(--blue); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px;
  text-align: center;
}
.empty-title { margin-top: 12px; font-size: 14px; color: #374151; }
.empty-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* 抽屉 */
.drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, .35);
  opacity: 0;
  transition: opacity .2s;
}
.drawer-mask.show { opacity: 1; }
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  display: flex;
  width: 100%;
  max-width: 520px;
  flex-direction: column;
  background: #fff;
  box-shadow: -6px 0 24px rgba(15, 23, 42, .12);
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}
.drawer-title { font-size: 16px; font-weight: 600; color: #1f2937; }
.drawer-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
}
.sec-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px 10px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .45);
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 560px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}
.modal-title { font-size: 16px; font-weight: 600; color: #1f2937; }
.modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 20px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
}
.form-label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.form-label .req { color: #ff4d4f; margin-right: 2px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 8px);
  border-radius: 4px;
  background: #1f2937;
  padding: 9px 14px;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 响应式 */
@media (max-width: 1279px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .topbar { justify-content: space-between; }
}
@media (max-width: 767px) {
  .main { padding: 12px 14px 20px; }
  .page-head { flex-wrap: wrap; row-gap: 10px; }
  .filter-grid { grid-template-columns: 1fr; }
  .field-label { width: 62px; }
  .search-box input { width: 100%; }
  .search-left { width: 100%; }
  .search-box { flex: 1; }
  .table-wrap { display: none; }
  .tabs { width: 100%; height: 38px; }
  .tab { font-size: 16px; white-space: nowrap; }
  .toolbar { width: 100%; justify-content: flex-start; gap: 6px; }
  .toolbar .btn { padding: 0 9px; }
}

/* 移动端订单卡片 */
.order-card {
  border-bottom: 1px solid var(--border);
  padding: 14px 14px 12px;
}
.order-card:active { background: #f8fbff; }
.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.order-card-no { font-size: 13px; font-weight: 600; color: #1f2937; }
.order-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.order-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin-top: 10px;
  font-size: 13px;
}
.order-card-grid dt { font-size: 11px; color: var(--muted); }
.order-card-grid dd { margin-top: 2px; color: var(--text); }
.order-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 10px;
}

/* 行内「更多」下拉 */
.more-menu {
  position: absolute;
  z-index: 70;
  min-width: 132px;
  padding: 4px 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
}
.more-menu button {
  display: block;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  background: none;
  text-align: left;
  font-size: 13px;
  color: var(--text-2);
}
.more-menu button:hover { background: #f5f9ff; color: var(--blue); }

/* 平台图标 */
.plat {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}
.plat-xhs { color: #ff2442; }
.plat-xy { color: #f5a623; }
.plat-dy { color: #161823; }
.plat-offline { color: #1673dd; }

/* 区间触发器 */
.date-range { cursor: pointer; user-select: none; }
.date-range:hover { border-color: #b9c4d4; }
.date-range:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .12); }
.range-value { font-size: 12px; color: #b0b8c6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-range.has-value .range-value { color: #374151; }
.range-sep { margin: 0 2px; }

/* 双月区间选择面板 */
.range-panel {
  position: fixed;
  z-index: 80;
  width: 600px;
  max-width: calc(100vw - 16px);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
}
.range-nav {
  display: grid;
  grid-template-columns: 74px 1fr 1fr 74px;
  align-items: center;
  padding: 10px 8px 6px;
}
.range-nav-left, .range-nav-right { display: flex; gap: 8px; }
.range-nav-right { justify-content: flex-end; }
.range-nav button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #8a94a6;
  font-size: 14px;
  line-height: 1;
}
.range-nav button:hover { background: #f5f9ff; color: var(--blue); }
.range-title { text-align: center; font-size: 15px; font-weight: 600; color: #1f2937; }
.range-grid-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 0 8px 6px; }
.range-month { padding: 0 8px; }
.range-month + .range-month { border-left: 1px solid var(--border); }
.range-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.range-week span { text-align: center; font-size: 12px; color: #8a94a6; }
.range-days { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.range-day {
  display: flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}
.range-day.out { color: #c9ced8; }
.range-day:hover { background: #f0f7ff; }
.range-day.in-range { background: #e8f2fc; }
.range-day.today { color: var(--blue); font-weight: 600; }
.range-day.sel, .range-day.sel:hover { background: var(--blue); color: #fff; font-weight: 600; }
.range-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 8px 12px;
}
.range-foot .btn { height: 28px; }

@media (max-width: 639px) {
  .range-panel { width: min(94vw, 330px); }
  .range-nav { grid-template-columns: 62px 1fr 62px; }
  .range-title[data-title="1"], .range-month[data-month="1"] { display: none; }
  .range-grid-wrap { grid-template-columns: 1fr; }
}

/* 记录时间：类型下拉 + 区间 */
.field-body > select { flex: none; }
.field-body > .date-range { flex: 1; min-width: 0; width: auto; }

/* ==================================================================
 * 开单弹窗（按截图 1:1）
 * ================================================================== */
.modal-mask.order-mask {
  align-items: center;
  overflow-y: auto;
  padding: 24px 16px;
}
.order-modal {
  display: flex;
  flex-direction: column;
  width: min(1200px, 72vw);
  max-height: 96vh;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 12px 48px rgba(15, 23, 42, .2);
}
.order-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
}
.order-modal-title { font-size: 17px; font-weight: 600; color: #1f2937; }
.order-modal-body { flex: 1; overflow-y: auto; padding: 2px 20px 6px; }
.order-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 7px 18px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.order-modal-foot .btn { height: 34px; padding: 0 18px; font-size: 14px; }

.sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0 5px;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}
.sec-head::before {
  content: '';
  width: 3px;
  height: 16px;
  border-radius: 1px;
  background: var(--blue);
}

.ff { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ff-label {
  flex: none;
  width: 82px;
  text-align: right;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
}
.ff-label .req { color: #ff4d4f; margin-right: 2px; }
.ff .control, .ff select.control { flex: 1; min-width: 0; height: 34px; font-size: 14px; }
.ff .control::placeholder { color: #b0b8c6; }
.ff-static { font-size: 14px; color: #6b7280; }

.form-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px 20px; }
.form-grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 9px 40px; }

/* 日期触发器（大尺寸） */
.order-modal .date-range { height: 34px; font-size: 14px; }
.order-modal .range-value { font-size: 14px; }
.date-trigger {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.date-trigger:hover { border-color: #b9c4d4; }
.date-trigger svg { color: #9aa5b5; flex: none; }
.date-trigger .range-value { font-size: 14px; color: #b0b8c6; }
.date-trigger.has-value .range-value { color: #374151; }

/* 交货方式单选 */
.radio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 30px; }
.radio-item { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.radio-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-dot {
  width: 16px;
  height: 16px;
  border: 1px solid #b9c4d4;
  border-radius: 50%;
  background: #fff;
  position: relative;
}
.radio-item input:checked + .radio-dot { border-color: var(--blue); }
.radio-item input:checked + .radio-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--blue);
}

/* 客户信息 */
.cust-hint { margin: 0 0 8px; font-size: 13px; color: #8a94a6; }
.cust-hint .link-hint { color: var(--blue); }
.cust-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 26px; align-items: center; }
.paste-wrap { position: relative; }
.paste-wrap textarea {
  width: 100%;
  height: 122px;
  padding: 10px 14px 44px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  outline: none;
}
.paste-wrap textarea::placeholder { color: #b0b8c6; }
.paste-wrap textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.paste-btn {
  position: absolute;
  right: 10px;
  bottom: 9px;
  height: 32px;
  padding: 0 16px;
  font-size: 14px;
}
.cust-fields { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding-top: 0; }
.cust-fields .ff-label { width: 76px; }
.cust-fields .control { height: 34px; }

/* 设备明细 */
.dev-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-bottom: 8px;
}
.dev-head-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dev-hint { font-size: 14px; color: var(--text-2); }
.dev-head .btn { height: 34px; padding: 0 16px; font-size: 14px; }
.dev-head-right { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dev-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.dev-left-col { min-width: 0; }
.dev-right-col { min-width: 0; }
.dev-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dev-search { position: relative; flex: 1.1; min-width: 0; }
.dev-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #9aa5b5; }
.dev-search input {
  width: 100%;
  height: 34px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.dev-code { position: relative; flex: 1.6; min-width: 0; }
.dev-code input {
  width: 100%;
  height: 34px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}
.dev-code .cam {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  background: none;
  border: 0;
  padding: 2px;
}
.dev-search input:focus, .dev-code input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 115, 221, .08);
}
.dev-remove {
  display: flex;
  width: 34px;
  height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: #fff;
  color: #8a94a6;
  font-size: 15px;
}
.dev-remove:hover { border-color: #ff4d4f; color: #ff4d4f; }
.dev-right { display: flex; align-items: center; gap: 0; min-width: 0; }
.acc-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  outline: none;
}
.acc-add {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 0 4px 4px 0;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
}
.acc-add:hover { background: var(--blue-hover); }
.acc-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #bcd8ff;
  border-radius: 3px;
  background: #f0f7ff;
  font-size: 12px;
  color: var(--blue);
}
.acc-tag button { border: 0; background: none; color: #7fa8d8; font-size: 13px; line-height: 1; padding: 0; }
.dev-add-row { margin-top: 6px; }
.dev-add {
  border: 0;
  background: none;
  padding: 0;
  font-size: 14px;
  color: var(--blue);
}
.dev-add:hover { text-decoration: underline; }

/* 单日期 / 档期面板 */
.single-panel .range-grid-wrap { grid-template-columns: 1fr; }
.single-panel .range-month + .range-month { border-left: 0; }

@media (max-width: 1023px) {
  .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .cust-grid { grid-template-columns: 1fr; }
  .cust-fields { padding-top: 4px; }
  .dev-row { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .ff-top { align-items: flex-start; }
  .ff-top > .ff-label { line-height: 34px; }
  .modal-mask.order-mask { padding: 0; }
  .order-modal { width: 100vw; max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .order-modal-body { padding: 4px 14px 8px; }
  .form-grid-4 { grid-template-columns: 1fr; }
  .ff-label { width: 76px; }
}

.order-modal-form { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.input-affix {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  height: 38px;
  padding-left: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
}
.input-affix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.input-affix > span { color: #8a94a6; font-size: 14px; }
.input-affix input {
  flex: 1;
  min-width: 0;
  height: 32px;
  border: 0;
  padding: 0 10px 0 6px;
  background: transparent;
  font-size: 14px;
  outline: none;
}

.order-modal-head .btn-icon { border: 0; background: none; width: 28px; height: 28px; color: #6b7280; }
.order-modal-head .btn-icon:hover { background: #f5f7fa; color: #1f2937; }

.ff-top { align-items: center; }
.ff-top > .ff-label { line-height: normal; }
.radio-row { min-height: 34px; }

@media (max-width: 1023px) {
  .modal-mask.order-mask { padding: 12px 10px; }
  .order-modal { width: min(92vw, 100%); max-height: 88vh; }
}
@media (max-width: 639px) {
  .ff-top { align-items: flex-start; }
  .ff-top > .ff-label { line-height: 34px; }
  .modal-mask.order-mask { padding: 0; }
  .order-modal { width: 100vw; max-width: 100vw; min-height: 100vh; max-height: 100vh; border-radius: 0; }
}

/* 多设备行之间的间距 */
#device-rows { display: flex; flex-direction: column; gap: 10px; }

/* 配件多选 */
.acc-select {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.acc-select:hover { border-color: #b9c4d4; }
.acc-select.open { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.acc-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #b0b8c6;
}
.acc-value.has-value { color: #374151; }
.acc-arrow { flex: none; color: #9aa5b5; }
.acc-panel {
  position: fixed;
  z-index: 80;
  width: 260px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .16);
}
.acc-panel-head {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: #8a94a6;
}
.acc-options { max-height: 196px; overflow-y: auto; padding: 4px 0; }
.acc-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.acc-option:hover { background: #f5f9ff; }
.acc-option input { accent-color: var(--blue); }
.acc-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #8a94a6;
}
.acc-panel-foot .btn { height: 26px; padding: 0 10px; font-size: 12px; }
.acc-list { margin-top: 8px; }

@media (max-width: 1023px) {
  .dev-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* 下拉清除按钮 */
.select-wrap { position: relative; display: flex; flex: 1; min-width: 0; }
.select-wrap > select.control { width: 100%; padding-right: 34px; }
.select-wrap > select.control.has-value { background-image: none; padding-right: 34px; }
.select-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid #c9cdd6;
  border-radius: 50%;
  background: transparent;
  color: #9aa5b5;
  padding: 0;
}
.select-clear:hover { border-color: #8a94a6; color: #4b5563; }
.select-clear.hidden { display: none; }
.acc-clear {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid #c9cdd6;
  border-radius: 50%;
  background: transparent;
  color: #9aa5b5;
  padding: 0;
}
.acc-clear:hover { border-color: #8a94a6; color: #4b5563; }
.acc-clear.hidden { display: none; }
.acc-select.has-value .acc-arrow { display: none; }
.acc-select.has-value { padding-right: 32px; }

/* 可清除下拉：自绘箭头，有值时换成清除按钮 */
.select-wrap > select.control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa5b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
.select-wrap > select.control.has-value {
  background-image: none;
  padding-right: 34px;
}

/* 配件搜索 */
.acc-search { position: relative; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.acc-search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa5b5;
  pointer-events: none;
}
.acc-search input {
  width: 100%;
  height: 30px;
  padding: 0 10px 0 28px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.acc-search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.acc-search input::placeholder { color: #b0b8c6; }
.acc-options { max-height: 168px; overflow-y: auto; padding: 4px 0; }
.acc-empty { padding: 14px 12px; text-align: center; font-size: 12px; color: #9aa5b5; }

/* 配件可搜索输入框 */
.acc-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: #374151;
  outline: none;
  padding: 0;
}
.acc-input::placeholder { color: #b0b8c6; }
.acc-select:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.acc-select.has-value .acc-input { color: #374151; }
.acc-select.open .acc-arrow { display: none; }

/* 配件输入框由外层容器统一显示聚焦态，输入框本身不再画光圈 */
.acc-input:focus { box-shadow: none; outline: none; }

/* ==================================================================
 * 订单详情弹窗（双栏卡片）
 * ================================================================== */
.detail-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, 92vw);
  min-height: min(680px, 88vh);
  max-height: 92vh;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .2);
}
.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}
.detail-title-row { display: flex; align-items: center; gap: 8px; padding-right: 40px; }
.d-name { font-size: 19px; font-weight: 600; color: #111827; }
.d-head-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.d-amount { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 20px; font-weight: 700; color: #111827; }
.d-amount svg { color: #8a94a6; }
.detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 600;
  color: #111827;
}
.detail-title .dot-green { width: 8px; height: 8px; }
.d-head-tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid transparent;
}
.d-head-tag.blue { background: #e8f2fc; border-color: #bcd8ff; color: #1673dd; }
.d-head-tag.amber { background: #fff7e6; border-color: #ffe0a3; color: #d48806; }
.d-head-tag.gray { background: #f5f6f8; border-color: #e5e9f0; color: #4b5563; }
.d-head-tag.purple { background: #f4f0ff; border-color: #ddd0ff; color: #6b46c1; }
.d-icon-btn {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #8a94a6;
}
.d-icon-btn:hover { background: #f5f7fa; color: #4b5563; }
.detail-amount {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}
.detail-amount svg { color: #8a94a6; }
.detail-close {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #8a94a6;
}
.detail-close:hover { background: #f5f7fa; color: #1f2937; }

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .82fr);
  flex: 1;
  min-height: 0;
}
.detail-main { overflow-y: auto; padding: 14px 20px 16px; }
.detail-mid { overflow-y: auto; border-left: 1px solid #eef1f5; padding: 14px 20px 16px; }
.detail-side { overflow-y: auto; border-left: 1px solid #eef1f5; padding: 14px 20px 16px; }

.detail-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eef1f5;
  border-radius: 8px;
}
.detail-thumb {
  display: flex;
  width: 72px;
  height: 72px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f7f8fa;
  color: #b0b8c6;
}
.detail-product h4 { font-size: 17px; font-weight: 600; color: #1f2937; }
.detail-sn { margin-top: 8px; font-size: 13px; color: #9aa5b5; }

.detail-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.detail-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.detail-row .lbl { color: #8a94a6; }
.detail-row .val { color: #1f2937; }
.detail-row .money { color: #fa8c16; font-weight: 600; }
.detail-row .muted { color: #9aa5b5; font-size: 13px; }

.detail-handover {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-radius: 6px;
  background: #f7f8fa;
  font-size: 13px;
  color: #4b5563;
}
.detail-handover .lbl { color: #8a94a6; }

.detail-note {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #fff7ed;
  font-size: 13px;
  color: #9a3412;
}
.detail-note .lbl { color: #ea580c; }

.detail-time { margin-top: 12px; text-align: right; font-size: 12px; color: #b0b8c6; }

.parts-box { padding: 10px 12px; border-radius: 6px; background: #eef5ff; }
.parts-title { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #1673dd; }
.parts-items { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: #1f2937; }
.parts-item { display: inline-flex; padding: 2px 6px; border-radius: 4px; background: #fff; font-size: 12px; }

.side-block { margin-top: 14px; }
.side-block + .side-block { padding-top: 14px; border-top: 1px dashed #eef1f5; }
.side-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eef5ff;
  color: #1673dd;
  font-size: 12px;
}
.side-line { margin-top: 8px; display: flex; align-items: center; gap: 6px; font-size: 14px; color: #1f2937; }
.side-line svg { color: #4b5563; }
.side-sub { margin-top: 4px; font-size: 13px; color: #9aa5b5; }
.side-link { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #1673dd; background: none; border: 0; padding: 0; }
.side-link:hover { text-decoration: underline; }
.side-wait { margin-top: 4px; font-size: 13px; color: #c4cad4; }

.detail-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 22px;
  border-top: 1px solid #eef1f5;
}
.detail-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 4px;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 13px;
}
.detail-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.detail-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.d-act { border: 0; background: none; padding: 0; font-size: 14px; color: #1673dd; }
.d-act:hover { text-decoration: underline; }
.d-act.outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #bcd8ff;
  border-radius: 6px;
  background: #fff;
  font-size: 15px;
}
.d-act.outline.orange { border-color: #ffd591; color: #d46b08; font-size: 14px; height: 32px; }
.detail-actions { gap: 18px; }
.d-act.green { color: #16a34a; }
.d-act.purple { color: #7c3aed; }
.d-act.icon { display: inline-flex; align-items: center; gap: 5px; }

@media (max-width: 1200px) {
  .detail-body { display: block; overflow-y: auto; }
  .detail-main, .detail-mid, .detail-side { overflow: visible; }
  .detail-mid, .detail-side { border-left: 0; border-top: 1px solid #eef1f5; }
}
@media (max-width: 767px) {
  .detail-modal { width: 96vw; max-height: 94vh; }
}

.detail-row .val { font-size: 13.5px; }
.detail-row .val.sm { font-size: 12.5px; letter-spacing: .2px; }
.detail-row .d-icon-btn { width: 22px; height: 22px; }
.detail-row .d-head-tag { height: 20px; font-size: 11px; padding: 0 6px; }

.detail-row .val.sm { font-size: 12px; letter-spacing: 0; }
.detail-row .d-head-tag { height: 19px; font-size: 10.5px; padding: 0 5px; }
.detail-handover { line-height: 1.7; }

.detail-row { gap: 6px; }
.detail-row .lbl { font-size: 13px; }
.detail-row .val.sm { font-size: 11.5px; }

/* 详情弹窗分区标题 / 键值网格 / 图片占位 */
.d-sec-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}
.d-sec-title::before {
  content: '';
  width: 3px;
  height: 12px;
  border-radius: 1px;
  background: var(--blue);
}
.d-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.d-kv-item { font-size: 12px; color: #8a94a6; }
.d-kv-item b {
  display: block;
  margin-top: 3px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.d-note-imgs { display: flex; gap: 8px; margin-top: 10px; }
.d-note-img {
  display: flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d9e0e8;
  border-radius: 6px;
  background: #fafbfc;
  color: #c4cad4;
}
.parts-thumb-row { display: flex; gap: 8px; margin-top: 10px; }
.parts-thumb {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d9e0e8;
  border-radius: 6px;
  background: #fafbfc;
  color: #c4cad4;
}

/* 详情弹窗紧凑化 */
.detail-main, .detail-mid { padding-top: 10px; }
.detail-row { gap: 6px; }
.detail-rows { gap: 10px; }
.d-kv { gap: 8px 14px; }
.detail-handover { padding: 10px 12px; }
.d-note-img { width: 48px; height: 48px; }
.parts-thumb { width: 48px; height: 48px; }
.note-row { display: flex; align-items: flex-start; gap: 10px; }
.note-row .detail-note { padding: 9px 12px; font-size: 12.5px; }
.d-sec-title { margin-bottom: 8px; }
/* 详情左栏紧凑 */
.detail-title-row { padding-right: 36px; }
.detail-title-row .d-amount { margin-top: 0; margin-left: auto; font-size: 18px; gap: 4px; }
.detail-title-row .d-amount svg { width: 15px; height: 15px; }
.detail-rows { gap: 6px; }
.detail-row { font-size: 13px; }
.detail-row .lbl { font-size: 12.5px; }
.d-sec-title { margin-bottom: 6px; }
.d-kv { gap: 6px 12px; }
.detail-handover { padding: 8px 10px; font-size: 12.5px; gap: 8px; }
.note-row .detail-note { padding: 7px 10px; }
.d-note-img { width: 42px; height: 42px; }
.detail-main { padding-top: 12px; }
.detail-rows { gap: 9px; }
.d-sec-title { margin-bottom: 8px; }
.detail-handover { padding: 10px 12px; }
.d-note-img { width: 46px; height: 46px; }
/* 顶部留白 + 区块间距（去掉头部信息后更透气） */
.detail-main { padding-top: 26px; }
.detail-mid { padding-top: 26px; }
.detail-side { padding-top: 26px; }
.d-sec-title { margin-bottom: 9px; }
.detail-handover { padding: 11px 12px; }
.note-row .detail-note { padding: 9px 12px; }
.detail-main, .detail-mid, .detail-side { padding-top: 38px; }
.detail-rows { gap: 11px; }
.detail-handover { padding: 12px 12px; }
.note-row .detail-note { padding: 10px 12px; }
.d-note-img { width: 50px; height: 50px; }

/* ============ 自绘下拉 ============ */
.cs-wrap { position: relative; display: flex; flex: 1; min-width: 0; }
select.cs-native {
  position: absolute !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.cs-trigger {
  display: flex;
  width: 100%;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #374151;
  text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.cs-trigger:hover { border-color: #b9c4d4; }
.cs-trigger.open { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.cs-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-label.is-placeholder { color: #b0b8c6; }
.cs-arrow { flex: none; color: #9aa5b5; transition: transform .15s; }
.cs-trigger.open .cs-arrow { transform: rotate(180deg); }
.cs-clear {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9cdd6;
  border-radius: 50%;
  background: transparent;
  color: #9aa5b5;
  padding: 0;
}
.cs-clear:hover { border-color: #8a94a6; color: #4b5563; }
.cs-clear.hidden { display: none; }
.cs-trigger.has-value .cs-arrow { display: none; }

.cs-panel {
  position: fixed;
  z-index: 90;
  min-width: 120px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
}
.cs-option {
  padding: 9px 14px;
  font-size: 13.5px;
  color: #374151;
  white-space: nowrap;
  cursor: pointer;
}
.cs-option:hover { background: #f5f7fa; }
.cs-option.active { background: #eef4ff; color: var(--blue); font-weight: 600; }

.order-modal .cs-trigger { height: 34px; font-size: 14px; }
.field .cs-wrap { width: 100%; }

/* 日期区间清除按钮 */
.date-range { padding-right: 28px; }
.date-trigger { position: relative; padding-right: 28px; }
.range-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid #c9cdd6;
  border-radius: 50%;
  background: transparent;
  color: #9aa5b5;
  padding: 0;
}
.range-clear:hover { border-color: #8a94a6; color: #4b5563; }
.range-clear.hidden { display: none; }

/* 操作列：隔断式 + 居中 */
table.data thead th.col-actions,
table.data tbody td.col-actions {
  border-left: 1px solid #e3e9f1;
  text-align: center;
  background: #fff;
}
table.data thead th.col-actions {
  background: #e8f2fc;
}
table.data tbody tr:hover td.col-actions {
  background: #f8fbff;
}

/* 操作列固定在右侧，形成独立隔断 */
table.data thead th.col-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  box-shadow: -8px 0 10px -8px rgba(15, 23, 42, .18);
}
table.data tbody td.col-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  box-shadow: -8px 0 10px -8px rgba(15, 23, 42, .10);
}

/* 操作列：保持隔断，内容靠右 */
table.data thead th.col-actions,
table.data tbody td.col-actions { text-align: right; }
table.data thead th.col-actions { box-shadow: none; }
table.data tbody td.col-actions { box-shadow: none; }

/* 操作列：表头居中，按钮靠右并留出右侧呼吸位 */
table.data thead th.col-actions { text-align: center; }
table.data tbody td.col-actions { text-align: right; padding-right: 20px; }
table.data tbody td.col-actions .flex { gap: 16px; }

/* 操作列按内容收窄，分隔线紧跟按钮 */
table.data thead th.col-actions { width: 1%; white-space: nowrap; }
table.data tbody td.col-actions { padding-left: 18px; padding-right: 20px; }

/* 操作列：无「发货」的行用占位保持左边界一致，缩小与分隔线的距离 */
.act-spacer { display: inline-block; width: 40px; }
table.data tbody td.col-actions { padding-left: 6px; padding-right: 16px; }

/* 操作列更紧凑：缩小留白与间距 */
table.data tbody td.col-actions { padding-left: 2px; padding-right: 10px; }
table.data tbody td.col-actions .flex { gap: 10px; }
.act-spacer { width: 26px; }

/* 操作列：按参考图，分隔线与「发货」之间留约 30px */
table.data tbody td.col-actions { padding-left: 30px; padding-right: 28px; }
table.data tbody td.col-actions .flex { gap: 12px; }
.act-spacer { width: 28px; }

/* 操作列：分隔线与「发货」间距约 10px */
table.data tbody td.col-actions { padding-left: 10px; }

table.data tbody td.col-actions { padding-left: 7px; }
.act-spacer { width: 25px; }

/* 分隔线与「发货」间距约 5px */
table.data tbody td.col-actions { padding-left: 4px; }

/* 竖线到「发货」的间距 = 按钮之间的间距（12px） */
table.data tbody td.col-actions { padding-left: 11px; }

/* 搜索：下拉 + 输入 + 查询 合成一个整体 */
.search-group {
  display: flex;
  height: 32px;
  align-items: stretch;
  width: 424px;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.search-group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 115, 221, .08);
}
.search-group .cs-wrap { flex: none; width: 92px; }
.search-group .cs-trigger {
  height: 100%;
  border: 0;
  border-radius: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  box-shadow: none;
}
.search-group .cs-trigger:hover { background: #f7f9fc; border-color: var(--border); }
.search-group .cs-trigger.open { border: 0; border-right: 1px solid var(--border); box-shadow: none; }
.search-group .cs-panel { min-width: 120px; }
.search-group .search-box { flex: 1; min-width: 0; display: flex; align-items: stretch; }
.search-group .search-box > svg { left: 10px; }
.search-group .search-box input {
  flex: 1;
  width: auto;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.search-group .search-box input:focus { border: 0; box-shadow: none; background: transparent; }
.search-group .search-box .btn {
  margin-left: 0;
  height: 100%;
  border-radius: 0;
  padding: 0 16px;
}

/* 搜索：放大镜移到输入框右侧 */
.search-group .search-box > svg { left: auto; right: 9px; }
.search-group .search-box input { padding: 0 30px 0 12px; }

/* 放大镜固定在输入框右侧（不盖住查询按钮） */
.search-group .search-input { position: relative; display: flex; flex: 1; min-width: 0; align-items: center; }
.search-group .search-input > svg { position: absolute; right: 9px; left: auto; color: #9aa5b5; pointer-events: none; }
.search-group .search-input input { width: 100%; padding: 0 30px 0 12px; }

/* 操作列：竖线位置固定，按钮整体右移 */
table.data tbody td.col-actions { padding-right: 12px; }


table.data tbody td.col-actions { padding-right: 6px; }


/* 竖线再靠近「发货」：列宽收窄，按钮位置不变 */
table.data tbody td.col-actions { padding-left: 7px; }

/* 竖线与表头文字整体略向左 */
table.data tbody td.col-actions { padding-left: 20px; }

/* ===== 设备名称：可搜索多选 ===== */
.ms { position: relative; flex: 1; min-width: 0; }
.ms-control {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 3px 30px 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.ms-control.open { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.ms-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ms-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 4px 0 6px;
  border-radius: 3px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 12px;
}
.ms-tag button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 0;
  background: transparent;
  color: var(--blue);
  opacity: .65;
  padding: 0;
}
.ms-tag button:hover { opacity: 1; }
.ms-input {
  flex: 1;
  min-width: 40px;
  height: 24px;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #374151;
  padding: 0;
}
.ms-arrow { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #9aa5b5; pointer-events: none; }
.ms-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid #c9cdd6;
  border-radius: 50%;
  background: #fff;
  color: #9aa5b5;
  padding: 0;
}
.ms-clear:hover { border-color: #8a94a6; color: #4b5563; }
.ms-clear.hidden { display: none; }
.ms-control.has-value .ms-arrow { display: none; }
.ms-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
}
.ms-panel.hidden { display: none; }
.ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: #374151;
  white-space: nowrap;
  cursor: pointer;
}
.ms-option:hover { background: #f5f7fa; }
.ms-option.active { background: #eef4ff; color: var(--blue); font-weight: 500; }
.ms-option-all { border-bottom: 1px solid #f1f3f6; margin-bottom: 4px; }
.ms-tick { width: 14px; flex: none; font-size: 12px; color: var(--blue); }
.ms-empty { padding: 14px 12px; color: #b0b8c6; font-size: 12.5px; text-align: center; }

/* 多选控件保持单行高度 */
.ms-control { flex-wrap: nowrap; height: 32px; overflow: hidden; }
.ms-tags { flex-wrap: nowrap; overflow: hidden; min-width: 0; }
.ms-tag { flex: 0 0 auto; max-width: 132px; }
.ms-tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-tag-more { background: #f1f4f9; color: #6b7280; padding: 0 6px; }
.ms-input { min-width: 30px; }

/* ===== 问题订单 ===== */
.issues-hint { margin: 2px 0 14px; color: #8a94a6; font-size: 13px; }
.issues-card { padding: 0; }
.issues-table th, .issues-table td { padding-left: 16px; padding-right: 16px; }
.issues-table td { font-size: 13px; color: #374151; }
.issues-table .issue-desc { color: #4b5563; }
.issue-status { font-size: 13px; }
.issue-status.pending { color: #f59e0b; }
.issue-status.doing { color: var(--blue); }
.link.green { color: #16a34a; }
.issues-table .col-actions { width: 90px; white-space: nowrap; }

.issue-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}
.issue-card-top { display: flex; align-items: center; justify-content: space-between; }
.issue-type { font-weight: 600; color: #1f2937; font-size: 14px; }
.issue-card-desc { margin: 8px 0; color: #4b5563; font-size: 13px; }
.issue-card-meta { display: flex; flex-wrap: wrap; gap: 10px; color: #9aa5b5; font-size: 12px; margin-bottom: 8px; }

.toolbar .hidden { display: none; }

@media (max-width: 767px) {
  .issues-card { display: none; }
}

/* ===== 列设置弹窗 ===== */
.col-modal {
  display: flex;
  width: 620px;
  max-width: 92vw;
  max-height: 84vh;
  flex-direction: column;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}
.col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 8px;
}
.col-head h3 { margin: 0; font-size: 18px; font-weight: 600; color: #111827; }
.col-x {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #9aa5b5;
}
.col-x:hover { background: #f3f5f9; color: #4b5563; }
.col-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 12px;
  font-size: 13px;
  color: #6b7280;
}
.col-sub b { font-weight: 600; color: #374151; }
.col-links { display: flex; gap: 16px; }
.col-links .link { font-size: 13px; }
.col-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px;
  border-top: 1px solid #f1f3f6;
  border-bottom: 1px solid #f1f3f6;
}
.col-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 110px 52px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f4f6f9;
}
.col-row:last-child { border-bottom: 0; }
.col-check-input {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  accent-color: var(--blue);
  cursor: pointer;
}
.col-name { font-size: 14px; color: #374151; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-width {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-size: 13px;
  color: #374151;
  outline: none;
}
.col-width:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.col-move { display: flex; gap: 4px; justify-content: flex-end; }
.col-move button {
  width: 22px;
  height: 26px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  line-height: 1;
}
.col-move button:hover:not(:disabled) { background: #eef4ff; color: var(--blue); }
.col-move button:disabled { color: #d5dae3; cursor: default; }
.col-note { margin: 10px 22px 0; font-size: 12.5px; line-height: 1.7; color: #9aa5b5; }
.col-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 18px; }

/* ===== 问题订单：搜索 / 状态筛选 / 操作 ===== */
.issues-search {
  display: flex;
  width: 430px;
  max-width: 100%;
  height: 34px;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
}
.issues-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 115, 221, .08); }
.issues-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 14px;
  font-size: 13px;
  color: #374151;
}
.issues-search input::placeholder { color: #b0b8c6; }
.issues-search-icon {
  display: flex;
  width: 46px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border);
  color: #9aa5b5;
}
.issue-tabs { display: flex; gap: 10px; margin: 14px 0 16px; }
.issue-tab {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  color: #4b5563;
}
.issue-tab:hover { border-color: #b9c4d4; }
.issue-tab.active { border-color: var(--blue); color: var(--blue); }
.issue-tab b { font-weight: 400; }
.issues-table .col-actions { text-align: left; width: 220px; }
.issue-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-start; white-space: nowrap; }
.issue-actions .link { font-size: 13px; }
.issue-actions .link.danger { color: #dc2626; }
.issue-actions .link.muted { color: #9aa5b5; cursor: default; }
.issues-empty { padding: 40px 0; text-align: center; color: #b0b8c6; font-size: 13px; }

.issue-status.done { color: #16a34a; }
.issue-status.pending { color: #f59e0b; }
.issue-actions .link { color: var(--blue); }
.issue-actions .link.danger { color: #dc2626; }
.issue-actions .link.muted { color: #9aa5b5; }
.order-no { color: #374151; }
.order-no:hover { color: var(--blue); }

/* 设备列：设备名 + 编号标签 */
.dev-cell { white-space: normal; }
.dev-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  margin: 2px 4px 2px 0;
  border: 1px solid #a9cdf5;
  border-radius: 4px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12.5px;
  white-space: nowrap;
}

.dev-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dev-tag { max-width: 100%; white-space: normal; word-break: break-word; line-height: 1.3; padding: 3px 8px; height: auto; min-height: 24px; }

.dev-tag { white-space: nowrap; }
.dev-tags { align-content: flex-start; }

/* 设备列保持单行、统一行高 */
.dev-tags { flex-wrap: nowrap; overflow: hidden; }
.dev-tag { height: 22px; min-height: 0; font-size: 12px; padding: 0 7px; line-height: 20px; }
.dev-more {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  background: #f1f4f9;
  color: #6b7280;
  font-size: 12px;
  flex: none;
}

/* 平台：图标 + 文字 */
.plat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.plat-name { font-size: 13px; color: #374151; }

/* 平台图标 + 文字：覆盖旧的固定 20px 宽度 */
.plat { width: auto; min-width: 0; gap: 6px; }
.plat svg { flex: none; }

/* 收件信息：单击复制，双击修改 */
.recv-cell { cursor: pointer; user-select: none; }
.recv-cell:hover { color: var(--blue); }
.recv-cell:active { background: #eef5ff; }

/* 复制提示：悬浮在点击位置上方 */
.copy-tip {
  position: fixed;
  transform: translate(-50%, -100%);
  padding: 6px 10px;
  border-radius: 4px;
  background: #1f2937;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease, transform .16s ease;
  z-index: 300;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .22);
}
.copy-tip.show { opacity: 1; }
.copy-tip.below { transform: translate(-50%, 0); }

/* 复制提示展示完整地址 */
.copy-tip { white-space: normal; max-width: 360px; text-align: left; }

/* 复制成功提示：白色卡片 + 绿色对勾，比 tooltip 更清晰 */
.copy-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transform: translate(-50%, -100%) translateY(-2px) scale(.98);
  padding: 10px 14px 10px 12px;
  border: 1px solid #e3e9f1;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
  max-width: 360px;
}
.copy-tip.show { transform: translate(-50%, -100%) translateY(-2px) scale(1); }
.copy-tip.below { transform: translate(-50%, 0) translateY(2px) scale(.98); }
.copy-tip.below.show { transform: translate(-50%, 0) translateY(2px) scale(1); }
.copy-tip-ic {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: none;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
}
.copy-tip-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.copy-tip-body b { font-size: 13px; font-weight: 600; color: #111827; }
.copy-tip-sub {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.45;
  white-space: normal;
  word-break: break-all;
}

/* 收件信息悬停：立即显示的完整邮寄信息 */
.hover-tip {
  position: fixed;
  transform: translate(-50%, -100%) translateY(-2px);
  max-width: 380px;
  padding: 8px 12px;
  border: 1px solid #e3e9f1;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: normal;
  word-break: break-all;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .14);
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 300;
}
.hover-tip.show { opacity: 1; }

/* ===== 打印交货单 ===== */
.print-card {
  display: flex;
  width: 1040px;
  max-width: 94vw;
  max-height: 88vh;
  flex-direction: column;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}
.print-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 6px; }
.print-head h3 { margin: 0; font-size: 17px; font-weight: 600; color: #111827; }
.print-close {
  display: flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border: 0; border-radius: 4px; background: transparent; color: #9aa5b5;
}
.print-close:hover { background: #f3f5f9; color: #4b5563; }
.print-meta { padding: 0 20px 10px; font-size: 12.5px; color: #8a94a6; }
.print-meta b { color: #374151; font-weight: 600; }
.print-sheet { flex: 1; overflow: auto; padding: 0 20px; }
.p-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.p-table th, .p-table td {
  padding: 8px 10px;
  border: 1px solid #d9e0e8;
  text-align: left;
  white-space: nowrap;
}
.p-table thead th { background: #eef3f9; font-weight: 600; color: #1f2937; }
.p-table td { color: #374151; }
.print-check { text-align: center; }
.pbox { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #9aa5b5; border-radius: 3px; }
.p-sign { display: flex; gap: 40px; padding: 22px 4px 8px; font-size: 13px; color: #4b5563; }
.print-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; }
  body * { visibility: hidden !important; }
  #print-modal, #print-modal * { visibility: visible !important; }
  #print-modal {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .print-card {
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  .print-actions, .print-close { display: none !important; }
  .print-head { display: flex !important; padding: 0 0 8px !important; }
  .print-head h3 { font-size: 18px !important; }
  .print-meta { padding: 0 0 8px !important; }
  .print-sheet { overflow: visible !important; padding: 0 !important; }
  .p-table { font-size: 11px !important; }
  .p-table th, .p-table td { padding: 6px 6px !important; }
}

/* 侧栏 Logo 换成吉祥物图标 */
.brand-mark-img { background: #fff; padding: 0; overflow: hidden; }
.brand-mark-img img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* 收件信息：姓名电话 + 地址两行 */
.recv-name { font-size: 13px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recv-addr { margin-top: 2px; font-size: 12px; color: #8a94a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recv-cell { padding-top: 8px !important; padding-bottom: 8px !important; }

/* 收件信息：地址完整换行显示 */
.recv-addr {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.45;
  word-break: break-all;
}
.recv-cell { vertical-align: top; }

.recv-addr { word-break: normal; overflow-wrap: anywhere; }


/* 表格始终撑满容器宽度，列宽按可用空间等比缩放，避免出现横向滚动 */
#view-orders table.data { table-layout: fixed; width: 100%; }
#view-orders table.data thead th.col-check { width: 44px; }
#view-orders table.data thead th.col-actions { width: 152px; }
#view-orders table.data th, #view-orders table.data td { overflow: hidden; text-overflow: ellipsis; }

/* 收件地址最多两行，超出省略号 */
.recv-addr {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

/* 设备列：纯文字，多个用逗号分隔 */
.dev-text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; font-size: 13px; }

.dev-text { font-size: 12.5px; }

/* 设备列允许两行，但行高不变 */
.dev-cell { padding-top: 4px !important; padding-bottom: 4px !important; vertical-align: middle; }
.dev-text {
  font-size: 11.5px;
  line-height: 1.15;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 设备列最多三行，行高仍保持 46px */
.dev-text { -webkit-line-clamp: 3; line-height: 1.1; }

/* 设备列：每台一行，名称 + 灰色编号 */
.dev-list { display: flex; flex-direction: column; gap: 0; }
.dev-item { display: flex; align-items: baseline; gap: 5px; line-height: 1.1; font-size: 11.5px; white-space: nowrap; }
.dev-name { color: #374151; overflow: hidden; text-overflow: ellipsis; }
.dev-code { flex: none; color: #9aa5b5; font-size: 10.5px; letter-spacing: .2px; }
.dev-item-more { color: #9aa5b5; font-size: 10.5px; }

.dev-cell { padding-top: 3px !important; padding-bottom: 3px !important; }

/* 面交单：顶部可填写标题栏 */
.p-titlebar { margin-bottom: 12px; }
.p-title-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.p-title-input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  padding: 2px 0 4px;
  outline: none;
}
.p-title-input:focus { border-bottom-color: #1673dd; }
.p-date { font-size: 12.5px; color: #4b5563; white-space: nowrap; }
.p-fields { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 10px; }
.p-field { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #4b5563; }
.p-in {
  width: 130px;
  border: 0;
  border-bottom: 1px solid #c9d1dc;
  background: transparent;
  font-size: 12.5px;
  color: #111827;
  padding: 2px 2px 3px;
  outline: none;
}
.p-date-in { width: 150px; }
.p-in:focus, .p-title-input:focus { border-bottom-color: #1673dd; }
.p-in::placeholder { color: #c4cad4; }
.print-size-label { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; font-size: 12.5px; color: #6b7280; }
.print-size-label .control { width: 110px; height: 30px; }
@media print {
  .p-title-input, .p-in { border-bottom-color: #c9d1dc !important; }
  .p-title-input { font-size: 20px !important; }
}

.p-title-input:hover { border-bottom-color: #d9e0e8; }

/* 面交单：A4 竖向下压缩表格密度 */
.p-table { font-size: 12px; }
.p-table th, .p-table td { padding: 6px 7px; }
.p-fields { gap: 6px 18px; }
.p-in { width: 110px; }
.p-date-in { width: 130px; }
@media print {
  .p-table { font-size: 10.5px !important; }
  .p-table th, .p-table td { padding: 4px 5px !important; }
}

/* 面交单：备注加宽、租赁设备收窄 */
.p-table { table-layout: fixed; }
.p-table .p-dev, .p-table .p-note { white-space: normal; word-break: break-word; }

/* 面交单：标准 A4 页面 */
.print-sheet { background: #eef1f5; padding: 12px; }
.print-page {
  width: 794px;
  min-height: 1123px;
  padding: 38px 40px;
  margin: 0 auto;
  background: #fff;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
}
.p-empty td { height: 30px; }
@media print {
  @page { size: A4 portrait; margin: 0; }
  .print-sheet { background: #fff !important; padding: 0 !important; }
  .print-page {
    width: 210mm !important;
    min-height: 297mm !important;
    padding: 10mm !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}

/* 面交单日期：原生日期选择器 */
.p-date-in { width: 150px; font-size: 12.5px; color: #111827; }
.p-date-in::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
@media print { .p-date-in::-webkit-calendar-picker-indicator { display: none !important; } }

/* 面交单：序号列居中 */
.p-table th:first-child, .p-table td:first-child { text-align: center; }

/* 面交单：已领取 / 已归还 两列居中 */
.p-table th:nth-child(5), .p-table th:nth-child(6),
.p-table td.print-check, .p-table td:nth-child(5), .p-table td:nth-child(6) { text-align: center !important; }

/* 面交单：统一行高 + 数量居中 */
.p-table th:nth-child(7), .p-table td:nth-child(7) { text-align: center !important; }
.p-table tbody tr { height: 46px; }
.p-table td { padding: 4px 7px; vertical-align: middle; }
.p-table .p-dev {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.15;
  white-space: normal;
}
.p-empty td { height: auto; }

.p-table .p-dev { display: -webkit-box; }

/* 日期输入框：始终隐藏日历图标，点击输入框直接弹选择器 */
.p-date-in::-webkit-calendar-picker-indicator {
  display: none !important;
  opacity: 0;
  width: 0;
  margin: 0;
}

/* 面交单标题栏：四个字段均分整行、间距加大 */
.p-fields { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 18px 30px; }
.p-field { display: flex; flex: 1 1 0; min-width: 0; align-items: center; gap: 6px; }
.p-field .p-in { flex: 1 1 auto; width: auto; min-width: 0; }

.p-field { white-space: nowrap; }

/* 面交单日期面板：紧凑版 */
.sheet-date-panel { width: 258px; }
.sheet-date-panel .range-nav { grid-template-columns: 54px 1fr 54px; padding: 6px 4px 2px; }
.sheet-date-panel .range-nav-left, .sheet-date-panel .range-nav-right { gap: 2px; }
.sheet-date-panel .range-nav button { width: 20px; height: 20px; font-size: 12px; }
.sheet-date-panel .range-title { font-size: 13px; }
.sheet-date-panel .range-grid-wrap { grid-template-columns: 1fr; padding: 0 6px 4px; }
.sheet-date-panel .range-month { padding: 0; }
.sheet-date-panel .range-week { padding-bottom: 4px; margin-bottom: 2px; }
.sheet-date-panel .range-week span { font-size: 11px; }
.sheet-date-panel .range-days { row-gap: 1px; }
.sheet-date-panel .range-day { height: 24px; font-size: 12px; }
.sheet-date-panel .range-foot { padding: 4px 6px; }
.sheet-date-panel .range-foot .btn { height: 24px; font-size: 12px; padding: 0 10px; }
.sheet-date-panel .range-foot .link-btn { font-size: 12px; }

/* 日期栏与「电话」字段左对齐 */
.p-date { display: flex; width: 156px; align-items: center; justify-content: flex-end; gap: 4px; }
.p-date .p-date-in { flex: 1 1 auto; width: auto; min-width: 0; }

/* 设备行间距与收件信息一致（行高放大但仍保持 46px 行高） */
.dev-cell { padding-top: 2px !important; padding-bottom: 2px !important; }
.dev-item { line-height: 1.2; }
.dev-item + .dev-item { margin-top: 0; }

/* 表格整体字号加大，便于浏览 */
table.data { font-size: 14px; }
table.data thead th { font-size: 14px; }
table.data .link { font-size: 13.5px; }
table.data .badge { font-size: 12.5px; }
table.data .col-time { font-size: 13.5px; }

/* 字号加大后收窄单元格左右内边距，避免文字被截断 */
table.data th, table.data td { padding-left: 10px; padding-right: 10px; }
#view-orders table.data thead th.col-check { padding-left: 12px; }

/* 设备列字号加大但保持 46px 行高 */
.dev-cell { padding-top: 1px !important; padding-bottom: 1px !important; }
.dev-item { font-size: 13px; line-height: 1.1; }
.dev-code { font-size: 11px; }
.dev-item-more { font-size: 11px; }

/* 14px 字号下的列宽微调 */
table.data { font-size: 13.5px; }
table.data thead th { font-size: 13.5px; }
table.data th, table.data td { padding-left: 8px; padding-right: 8px; }
.dev-item { font-size: 13px; }

/* 设备行间距再放大：表格行高统一到 50px */
table.data tbody tr { height: 50px; }
.dev-item { line-height: 1.22; }

/* 设备列配色：名称蓝色、编号黑色加粗 */
.dev-cell .dev-name { color: var(--blue); }
.dev-cell .dev-code { color: #111827; font-weight: 700; }

/* 设备改为小标签框 */
table.data tbody tr { height: 58px; }
.dev-cell { padding: 4px 0 !important; }
.dev-list { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.dev-cell .dev-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid #bcd8ff;
  border-radius: 4px;
  background: #f5faff;
  font-size: 11.5px;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
}
.dev-cell .dev-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-cell .dev-code { font-size: 10.5px; }
.dev-cell .dev-item-more {
  border: 0;
  background: none;
  padding: 0;
  height: auto;
  font-size: 11px;
  color: #9aa5b5;
}

/* 设备标签内的编号与名称同色、不加粗 */
.dev-cell .dev-item .dev-code { color: inherit; font-weight: 400; font-size: inherit; }

.dev-cell .dev-item .dev-code { color: #1673dd !important; font-weight: 400 !important; }

/* 设备列恢复为纯文字列表 */
table.data tbody tr { height: 50px; }
.dev-cell { padding: 1px 0 !important; }
.dev-list { display: block; }
.dev-cell .dev-item {
  display: block;
  height: auto;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  max-width: none;
  overflow: visible;
  font-size: 13px;
  line-height: 1.22;
}
.dev-cell .dev-name { color: #374151 !important; font-weight: 400; }
.dev-cell .dev-name, .dev-cell .dev-code { white-space: nowrap; }
.dev-cell .dev-item .dev-code { color: #9aa5b5 !important; font-weight: 400 !important; font-size: 11px !important; }
.dev-cell .dev-item-more { color: #9aa5b5 !important; font-size: 11px !important; }

.dev-cell .dev-item .dev-code { margin-left: 5px; }

/* 设备行距与收件信息对齐 */
table.data tbody tr { height: 62px; }
.dev-cell .dev-item { line-height: 1.45; }
.dev-cell .dev-item + .dev-item { margin-top: 2px; }

/* 设备列：蓝色加粗 */
.dev-cell .dev-name { color: #1673dd !important; font-weight: 600 !important; }
.dev-cell .dev-item .dev-code { color: #1673dd !important; font-weight: 400 !important; }

/* 设备：取消加粗、名称与编号之间不留空隙 */
.dev-cell .dev-name { font-weight: 400 !important; }
.dev-cell .dev-item .dev-code { margin-left: 0 !important; }

/* 设备绑定弹窗 */
.dev-modal { width: 720px; }
.dev-modal .order-modal-body { max-height: 62vh; }
.dev-modal #dm-rows .dev-row { margin-bottom: 10px; }
#order-tbody .dev-cell { cursor: pointer; }
#order-tbody .dev-cell:hover .dev-list { opacity: .75; }

/* 设备绑定弹窗：头部排版 */
.dev-modal { width: 780px; }
.dev-modal .dev-head { flex-wrap: wrap; row-gap: 8px; }
.dev-modal .dev-head-left { flex-wrap: wrap; row-gap: 8px; }
.dev-modal .dev-hint { white-space: normal; font-size: 12.5px; }

.dev-modal .dev-code input { color: #111827; font-size: 13px; }
.dev-modal .dev-code input::placeholder { color: #b6bec9; }

/* 打印快递单弹窗 */
.express-modal { width: 460px; }
.ex-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ex-row:last-child { border-bottom: 0; }
.ex-label { width: 96px; flex: none; font-size: 14px; color: #4b5563; }
.ex-value { font-size: 14px; font-weight: 600; color: #111827; }
.ex-stepper { display: flex; align-items: center; gap: 8px; }
.ex-step { width: 28px; height: 28px; border: 1px solid var(--border-strong); border-radius: 4px; background: #fff; color: #4b5563; font-size: 16px; line-height: 1; }
.ex-step:hover { border-color: var(--blue); color: var(--blue); }
.ex-count { width: 72px; height: 28px; text-align: center; border: 1px solid var(--border-strong); border-radius: 4px; font-size: 14px; }
.ex-hint { font-size: 12.5px; color: #9aa5b5; }

/* 底部批量操作条 */
.sel-bar {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 20px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
}
.sel-text { font-size: 15px; color: #374151; }
.sel-text b { color: #16a34a; font-size: 16px; }
.sel-divider { width: 1px; height: 18px; background: #e5e7eb; }
.sel-all { border: 0; background: none; color: #16a34a; font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.sel-all:hover { background: #eefaf1; }
.sel-cancel { border: 0; height: 36px; padding: 0 16px; border-radius: 8px; background: #f1f3f6; color: #4b5563; font-size: 14px; }
.sel-cancel:hover { background: #e7eaef; }
.sel-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.sel-print:hover { background: #15803d; }

/* 快递单弹窗底部操作条 */
.ex-foot { gap: 12px; justify-content: flex-start; }
.ex-selected { font-size: 15px; color: #374151; }
.ex-selected b { color: #16a34a; font-size: 16px; }
.ex-line { width: 1px; height: 18px; background: #e5e7eb; }
.ex-all { border: 0; background: none; color: #16a34a; font-size: 15px; padding: 4px 6px; border-radius: 6px; }
.ex-all:hover { background: #eefaf1; }
.ex-do {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.ex-do:hover { background: #15803d; }

/* 快递单弹窗：对齐排版 */
.ex-body { padding: 6px 22px 10px; }
.ex-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.ex-row:last-child { border-bottom: 0; }
.ex-label { font-size: 14px; color: #4b5563; text-align: left; }
.ex-value { font-size: 15px; font-weight: 600; color: #111827; letter-spacing: .2px; }
.ex-ctrl { display: flex; align-items: center; gap: 14px; }
.ex-stepper { display: flex; align-items: center; gap: 8px; }
.ex-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: 16px;
  line-height: 1;
}
.ex-step:hover { border-color: var(--blue); color: var(--blue); }
.ex-count {
  width: 76px; height: 30px;
  text-align: center;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
}
.ex-hint { font-size: 12.5px; color: #9aa5b5; }
.ex-foot { align-items: center; gap: 14px; }
.ex-spacer { flex: 1; }
.ex-selected { font-size: 15px; color: #374151; white-space: nowrap; }
.ex-selected b { color: #16a34a; font-size: 16px; }
.ex-line { width: 1px; height: 18px; background: #e5e7eb; flex: none; }
.ex-all { border: 0; background: none; color: #16a34a; font-size: 15px; padding: 4px 6px; border-radius: 6px; white-space: nowrap; }
.ex-all:hover { background: #eefaf1; }
.ex-cancel { height: 36px; padding: 0 18px; border-radius: 8px; }
.ex-do {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border: 0; border-radius: 8px;
  background: #16a34a; color: #fff;
  font-size: 15px; font-weight: 600;
  white-space: nowrap;
}
.ex-do:hover { background: #15803d; }

/* 快递单弹窗：标签单行、列宽收紧 */
.ex-row { grid-template-columns: 122px 1fr; gap: 10px; }
.ex-label { white-space: nowrap; font-size: 13.5px; }

/* 快递单：日期与时段选择 */
.ex-datetime { display: flex; align-items: center; gap: 10px; }
.ex-date {
  width: 128px; height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  background: #fff;
  cursor: pointer;
}
.ex-date:focus { outline: none; border-color: var(--blue); }
.ex-slot {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  background: #fff;
}
.ex-do.is-disabled { background: #cbd5e1; cursor: not-allowed; }

/* 快递单弹窗：绿色改为主题蓝 */
.ex-selected b { color: var(--blue); }
.ex-all { color: var(--blue); }
.ex-all:hover { background: #eef5ff; }
.ex-do { background: var(--blue); }
.ex-do:hover { background: #0f62c4; }

/* 状态栏加粗 */
.status-tab { font-size: 13.5px; font-weight: 600; color: #4b5563; }
.status-tab span { font-weight: 600; }
.status-tab.active { font-weight: 700; }
.status-meta { font-size: 13.5px; font-weight: 600; color: #6b7280; }

/* 状态栏改为描边标签样式（不加粗） */
.status-list { gap: 8px; }
.status-tab {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 400;
  color: #4b5563;
}
.status-tab span { font-weight: 400; }
.status-tab:hover { border-color: #bcd8ff; color: var(--blue); }
.status-tab.active {
  border-color: var(--blue);
  background: #f5f9ff;
  color: var(--blue);
  font-weight: 400;
}
.status-meta { font-weight: 400; }

/* 结清 / 类型 / 出库图 */
.settle { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 3px; font-size: 12px; border: 1px solid; }
.settle-done { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.settle-todo { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.out-thumb {
  display: inline-block;
  width: 40px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #eef2f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E") center/18px no-repeat;
  cursor: pointer;
}
.out-thumb:hover { border-color: var(--blue); }
.out-empty { color: #c9ced8; }

.out-modal { width: 520px; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 50px rgba(15,23,42,.25); }
.out-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.out-title { font-size: 16px; font-weight: 600; color: #111827; }
.out-body { padding: 18px 20px 22px; }
.out-img {
  height: 300px;
  border-radius: 8px;
  background: #eef2f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z'/%3E%3Ccircle cx='12' cy='13' r='3'/%3E%3C/svg%3E") center/56px no-repeat;
}
.out-cap { margin-top: 12px; font-size: 13px; color: #6b7280; text-align: center; }

/* 侧边栏菜单放大排版 */
.nav { padding: 10px 0 16px; }
.nav-item {
  height: 56px;
  margin: 4px 12px;
  padding: 0 14px;
  gap: 14px;
  border-radius: 10px;
  font-size: 16px;
  color: #c3ccdb;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item:hover { background: rgba(148, 163, 184, .12); }
.nav-item.active {
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 8px 18px rgba(22, 115, 221, .35);
}

/* 侧边栏高度收紧 */
.nav-item { height: 48px; margin: 3px 12px; font-size: 15px; gap: 12px; border-radius: 9px; }
.nav-item svg { width: 20px; height: 20px; }
.nav { padding: 6px 0 12px; }

/* 品牌区放大 */
.brand { gap: 13px; padding: 20px 18px; }
.brand-mark { width: 46px; height: 46px; border-radius: 11px; }
.brand-title { font-size: 18px; letter-spacing: .3px; }
.brand-sub { margin-top: 4px; font-size: 12.5px; }

/* 表格横向滚动条：蓝色可拖动 */
.table-wrap { scrollbar-width: thin; scrollbar-color: #bcd8ff #eef2f7; }
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: #eef2f7; }
.table-wrap::-webkit-scrollbar-thumb { background: #bcd8ff; border-radius: 6px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #1673dd; }

.hsbar {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 25;
  height: 12px;
  margin: 4px 0 2px;
  background: #eef2f7;
  border-radius: 6px;
}
.hsbar.on { display: block; }
.hsbar-thumb {
  position: absolute;
  top: 2px;
  left: 0;
  height: 8px;
  width: 48px;
  border-radius: 4px;
  background: #1673dd;
  cursor: grab;
  transition: background .15s;
}
.hsbar-thumb:hover { background: #0f62c4; }
.hsbar-thumb.dragging { cursor: grabbing; background: #0f62c4; }

/* 隐藏表格自带滚动条，只保留自定义细条 */
.table-wrap { scrollbar-width: none; }
.table-wrap::-webkit-scrollbar { height: 0; width: 0; }

/* 自定义横向滚动条：更隐蔽，悬停变蓝 */
.hsbar { height: 10px; margin: 2px 0 0; background: transparent; opacity: .45; transition: opacity .18s; }
.hsbar:hover { opacity: 1; }
.hsbar-thumb { top: 2px; height: 6px; background: #c9d6e8; }
.hsbar-thumb:hover { background: #9fc0ea; }
.hsbar-thumb.dragging { background: #1673dd; }

/* 横向滚动条加高，更易拖动 */
.hsbar { height: 18px; margin: 4px 0 0; opacity: .55; }
.hsbar-thumb { top: 4px; height: 10px; border-radius: 6px; transition: height .12s, background .15s; }
.hsbar:hover .hsbar-thumb { height: 12px; top: 3px; }

/* 表头拖拽调整列宽 */
#order-thead-row th { position: relative; }
.col-resize {
  position: absolute;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
  touch-action: none;
}
.col-resize::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 3px;
  bottom: 3px;
  width: 1px;
  background: transparent;
  transition: background .12s;
}
#order-thead-row th:hover .col-resize::after { background: #bcd8ff; }
.col-resize:hover::after, .col-resize.dragging::after { background: var(--blue) !important; }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

/* 操作列：固定右侧 + 明显分隔与阴影，避免和上一列叠在一起 */
#view-orders table.data thead th.col-actions {
  width: 152px !important;
  min-width: 152px;
  position: sticky;
  right: 0;
  z-index: 6;
  background: #edf4fc;
  border-left: 1px solid #dfe7f1;
  box-shadow: -12px 0 14px -12px rgba(15, 23, 42, .28);
}
#view-orders table.data tbody td.col-actions {
  width: 152px !important;
  min-width: 152px;
  position: sticky;
  right: 0;
  z-index: 5;
  background: #fff;
  border-left: 1px solid #eef2f7;
  box-shadow: -12px 0 14px -12px rgba(15, 23, 42, .18);
}
#view-orders table.data tbody tr:hover td.col-actions { background: #f8fbff; }

/* 固定操作列：统一、柔和的阴影 */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions {
  box-shadow: -6px 0 6px -6px rgba(15, 23, 42, .12);
}

/* 固定操作列：完全去掉阴影，仅保留一条统一分隔线 */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions {
  box-shadow: none !important;
  border-left: 1px solid #e6ebf2 !important;
}

/* 固定操作列左侧：半截文字渐变淡出 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -26px;
  width: 26px;
  pointer-events: none;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 92%);
}
#view-orders table.data thead th.col-actions::before {
  background: linear-gradient(to right, rgba(237, 244, 252, 0), #edf4fc 92%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background: linear-gradient(to right, rgba(248, 251, 255, 0), #f8fbff 92%);
}

/* 固定操作列左侧：连续柔和的阴影带（非逐行阴影，无起伏） */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  width: 30px;
  left: -30px;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, .10) 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 78%);
}
#view-orders table.data thead th.col-actions::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, .08) 100%),
    linear-gradient(to right, rgba(237, 244, 252, 0) 0%, #edf4fc 78%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, .10) 100%),
    linear-gradient(to right, rgba(248, 251, 255, 0) 0%, #f8fbff 78%);
}

/* 阴影带再明显一点 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  width: 36px;
  left: -36px;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .18) 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 70%);
}
#view-orders table.data thead th.col-actions::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .14) 100%),
    linear-gradient(to right, rgba(237, 244, 252, 0) 0%, #edf4fc 70%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 30%, rgba(15, 23, 42, .16) 100%),
    linear-gradient(to right, rgba(248, 251, 255, 0) 0%, #f8fbff 70%);
}

/* 允许固定列左侧的渐变层溢出显示（避免被 overflow:hidden 裁掉） */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions { overflow: visible !important; }

/* 固定列阴影减淡（参考更轻的观感） */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  width: 18px;
  left: -18px;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .07) 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 55%);
}
#view-orders table.data thead th.col-actions::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .05) 100%),
    linear-gradient(to right, rgba(237, 244, 252, 0) 0%, #edf4fc 55%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .07) 100%),
    linear-gradient(to right, rgba(248, 251, 255, 0) 0%, #f8fbff 55%);
}

/* 固定列：极轻阴影，不遮挡左侧文字 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  width: 10px;
  left: -10px;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .05) 100%);
}
#view-orders table.data thead th.col-actions::before {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .04) 100%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .05) 100%);
}

/* 固定列：改用列内极淡内阴影，完全不遮挡左侧内容 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before { display: none !important; }
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions {
  overflow: hidden !important;
  box-shadow: inset 10px 0 10px -10px rgba(15, 23, 42, .16);
}

/* 固定列：仅用极窄白渐变柔化被切到的内容，不加阴影 */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions { box-shadow: none !important; }
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  display: block !important;
  width: 14px;
  left: -14px;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, #ffffff 88%);
}
#view-orders table.data thead th.col-actions::before {
  background-image: linear-gradient(to right, rgba(237, 244, 252, 0) 0%, #edf4fc 88%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image: linear-gradient(to right, rgba(248, 251, 255, 0) 0%, #f8fbff 88%);
}

/* 恢复可溢出，让左侧淡出层生效（无阴影） */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions { overflow: visible !important; }

/* 操作列：1:1 复刻参考图——仅一条细分割线 + 极浅底色，无阴影无渐变 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before { display: none !important; }
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions {
  overflow: hidden !important;
  box-shadow: none !important;
}
#view-orders table.data thead th.col-actions {
  background: #eef4fb;
  border-left: 1px solid #e2e8f0;
}
#view-orders table.data tbody td.col-actions {
  background: #fbfcfd;
  border-left: 1px solid #e5eaf1;
}
#view-orders table.data tbody tr:hover td.col-actions { background: #f6f9fd; }

/* 操作列：分割线左侧一道很淡的阴影 */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody td.col-actions { overflow: visible !important; }
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  display: block !important;
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -8px;
  width: 8px;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .08) 100%);
}
#view-orders table.data thead th.col-actions::before {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .06) 100%);
}

/* 表头「操作」列底色与其它表头保持一致 */
#view-orders table.data thead th.col-actions {
  background: var(--header) !important;
}

/* 分割线在悬停时也保持清晰 */
#view-orders table.data tbody tr td.col-actions { border-left: 1px solid #dde5ef !important; }
#view-orders table.data tbody tr:hover td.col-actions {
  background: #f6f9fd;
  border-left: 1px solid #d3dde9 !important;
}
#view-orders table.data thead th.col-actions { border-left: 1px solid #dbe4ef !important; }
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .08) 100%);
}

/* 操作列底色与左侧单元格完全一致 */
#view-orders table.data tbody td.col-actions { background: #ffffff; }
#view-orders table.data tbody tr:hover td.col-actions { background: #f8fbff; }

/* 分割线再浅一点 */
#view-orders table.data tbody tr td.col-actions { border-left-color: #edf1f6 !important; }
#view-orders table.data tbody tr:hover td.col-actions { border-left-color: #e8edf4 !important; }
#view-orders table.data thead th.col-actions { border-left-color: #e7edf5 !important; }

/* 分割线更浅 */
#view-orders table.data tbody tr td.col-actions { border-left-color: #f4f6f9 !important; }
#view-orders table.data tbody tr:hover td.col-actions { border-left-color: #eef2f7 !important; }
#view-orders table.data thead th.col-actions { border-left-color: #eff3f8 !important; }

/* 去掉分割线，只保留左侧淡阴影 */
#view-orders table.data thead th.col-actions,
#view-orders table.data tbody tr td.col-actions,
#view-orders table.data tbody tr:hover td.col-actions {
  border-left: 0 !important;
}

/* 阴影更浅更窄 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  width: 5px;
  left: -5px;
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .05) 100%);
}
#view-orders table.data thead th.col-actions::before {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .04) 100%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image: linear-gradient(to right, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, .05) 100%);
}

/* 阴影更浅更柔和 */
#view-orders table.data thead th.col-actions::before,
#view-orders table.data tbody td.col-actions::before {
  width: 6px;
  left: -6px;
  background-image: linear-gradient(to right,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, .008) 30%,
    rgba(15, 23, 42, .02) 70%,
    rgba(15, 23, 42, .035) 100%);
}
#view-orders table.data thead th.col-actions::before {
  background-image: linear-gradient(to right,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, .006) 30%,
    rgba(15, 23, 42, .016) 70%,
    rgba(15, 23, 42, .028) 100%);
}
#view-orders table.data tbody tr:hover td.col-actions::before {
  background-image: linear-gradient(to right,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, .008) 30%,
    rgba(15, 23, 42, .02) 70%,
    rgba(15, 23, 42, .035) 100%);
}

/* 表格左右两侧柔和分割线 */
#view-orders .table-wrap {
  border-left: 1px solid #eef2f7;
  border-right: 1px solid #eef2f7;
}

/* 表头长按拖动排序 */
#order-thead-row th { cursor: default; user-select: none; }
#import-note { }
#order-thead-row th.col-dragging { opacity: .45; }
body.col-dragging-body, body.col-dragging-body * { cursor: grabbing !important; user-select: none !important; }
.col-drop-indicator {
  display: none;
  position: fixed;
  z-index: 90;
  width: 2px;
  background: var(--blue);
  border-radius: 1px;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(22, 115, 221, .15);
}

/* 限位开关 */
.fit-toggle { gap: 6px; }
.fit-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #c9ced8; display: inline-block; transition: background .15s, box-shadow .15s;
}
.fit-toggle.on .fit-dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.15); }

/* 列设置：锁死列宽开关 */
.col-lock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px 12px;
  border-bottom: 1px solid var(--border);
}
.col-lock-text { font-size: 13px; color: #4b5563; }
.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: none;
  border: 0;
  border-radius: 999px;
  background: #d5dbe5;
  transition: background .16s;
  cursor: pointer;
}
.switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
  transition: transform .16s;
}
.switch.on { background: var(--blue); }
.switch.on i { transform: translateX(18px); }

/* 导入/同步订单弹窗 */
.sync-modal {
  width: 640px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.sync-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.sync-title { font-size: 17px; font-weight: 600; color: #111827; }
.sync-body { padding: 22px; overflow-y: auto; }
.sync-hero { text-align: center; padding: 6px 0 20px; }
.sync-hero-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; margin-bottom: 14px;
  border-radius: 50%; background: #eaf3ff; color: var(--blue);
}
.sync-hero-title { font-size: 19px; font-weight: 600; color: #111827; }
.sync-hero-sub { margin-top: 6px; font-size: 13px; color: #8a94a6; }
.sync-toolbar { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.sync-list-title { font-size: 14px; font-weight: 600; color: #374151; }
.sync-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #16a34a; }
.sync-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.sync-add { margin-left: auto; height: 32px; padding: 0 14px; border-radius: 999px; }
.sync-toolbar .btn { height: 32px; padding: 0 14px; border-radius: 999px; }

.sync-shops { display: flex; flex-direction: column; gap: 10px; }
.shop-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.shop-card:hover { border-color: #cfe0f6; }
.shop-card.active { border-color: var(--blue); box-shadow: 0 0 0 1px rgba(22,115,221,.12); }
.shop-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #eef2f7; color: #8a94a6; flex: none;
}
.shop-card.active .shop-avatar { background: var(--blue); color: #fff; }
.shop-main { flex: 1; min-width: 0; }
.shop-name { font-size: 14px; color: #111827; font-weight: 500; }
.shop-key { margin-top: 3px; font-size: 12px; color: #94a3b8; }
.shop-ops { display: flex; gap: 8px; }
.shop-icon { border: 0; background: none; color: #b6bec9; padding: 4px; border-radius: 6px; }
.shop-icon:hover { color: var(--blue); background: #eef5ff; }
.shop-empty { padding: 18px; text-align: center; font-size: 13px; color: #9aa5b5; }

.sync-form { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 2px; }
.sync-field { display: flex; flex-direction: column; gap: 6px; }
.sync-field > span { font-size: 13px; color: #4b5563; }
.sync-field input {
  height: 38px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; color: #111827; background: #fff;
}
.sync-field input:focus { outline: none; border-color: var(--blue); }
.sync-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sync-save {
  height: 44px; margin-top: 4px;
  border: 0; border-radius: 8px;
  background: #111827; color: #fff;
  font-size: 15px; font-weight: 600;
}
.sync-save:hover { background: #1f2937; }

.sync-foot { padding: 14px 22px 18px; border-top: 1px solid var(--border); }
.sync-start {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px;
  border: 0; border-radius: 8px;
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 600;
}
.sync-start:hover { background: #0f62c4; }

/* 物流：收/发货人信息 */
.logi-modal {
  width: 560px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.logi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.logi-title { font-size: 17px; font-weight: 600; color: #111827; }
.logi-sub { margin-top: 6px; font-size: 12.5px; color: #8a94a6; line-height: 1.5; }
.logi-body { padding: 16px 22px 8px; overflow-y: auto; }
.logi-note { padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
.logi-note.warn { background: #fff8e6; color: #b7791f; }
.logi-note.ok { background: #eefaf1; color: #16a34a; }
.logi-field { display: block; margin-top: 16px; }
.logi-label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 7px; }
.logi-label em { font-style: normal; color: #e5484d; }
.logi-label i { font-style: normal; color: #9aa5b5; font-size: 12px; }
.logi-field input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; color: #111827; background: #fff;
}
.logi-field input:focus { outline: none; border-color: var(--blue); }
.logi-hint { margin-top: 8px; font-size: 12.5px; color: #9aa5b5; }
.logi-hint b { color: #6b7280; font-weight: 600; }
.logi-divider { height: 1px; background: var(--border); margin: 20px 0 16px; }
.logi-section { font-size: 15px; font-weight: 600; color: #111827; }
.logi-foot { display: flex; gap: 12px; padding: 14px 22px 18px; border-top: 1px solid var(--border); }
.logi-cancel, .logi-save { flex: 1; height: 44px; border-radius: 8px; font-size: 15px; border: 0; }
.logi-cancel { background: #f1f3f6; color: #374151; }
.logi-cancel:hover { background: #e7eaef; }
.logi-save { background: #111827; color: #fff; font-weight: 600; }
.logi-save:hover { background: #1f2937; }

/* 4 列筛选下，记录时间控件更紧凑 */
.filter-grid #f-time-type { width: 78px !important; }
.filter-grid .date-range { min-width: 0; }
.filter-grid .date-range .range-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filter-grid .range-compact .range-value { font-size: 12.5px; }

/* 记录时间：下拉更窄，给日期范围更多空间 */
.filter-grid .field:has(.range-compact) .field-body { gap: 6px; }
.filter-grid .field:has(.range-compact) #f-time-type { width: 62px !important; }
.filter-grid .range-compact { padding: 0 8px; }

/* 创建免押码弹窗 */
.dep-modal {
  width: 560px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.dep-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dep-title { font-size: 16px; font-weight: 600; color: #111827; }
.dep-body { padding: 16px 20px 18px; overflow-y: auto; }
.dep-field { display: block; }
.dep-label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 7px; }
.dep-amount-row { display: flex; gap: 10px; }
.dep-input {
  flex: 1; height: 38px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; color: #111827;
}
.dep-input:focus { outline: none; border-color: var(--blue); }
.dep-gen {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 16px; flex: none;
  border: 0; border-radius: 8px;
  background: #5b21b6; color: #fff; font-size: 14px;
}
.dep-gen:hover { background: #4c1d95; }
.dep-row { display: flex; align-items: flex-end; gap: 14px; margin-top: 16px; }
.dep-field-inline { width: 150px; }
.dep-select {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 14px; color: #111827; background: #fff;
}
.dep-hint { flex: 1; font-size: 12.5px; color: #9aa5b5; padding-bottom: 8px; }
.dep-qr-wrap { display: flex; justify-content: center; padding: 26px 0 18px; }
.dep-qr {
  display: flex; align-items: center; justify-content: center;
  min-width: 220px; min-height: 200px;
  border: 1px dashed #e2e8f0; border-radius: 10px; background: #fbfcfd;
}
.dep-qr-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #b6bec9; font-size: 12.5px; }
.dep-qr-empty em { font-style: normal; font-size: 11.5px; color: #cbd5e1; }
.dep-qr-img { background: #fff; padding: 8px; border-radius: 8px; }
.dep-qr-cap { margin-top: 8px; text-align: center; font-size: 13px; color: #4b5563; }
.dep-qr-code { margin-top: 4px; text-align: center; font-size: 12px; color: #94a3b8; letter-spacing: .5px; }
.dep-qr:has(.dep-qr-img) { flex-direction: column; border-style: solid; border-color: #eef2f7; background: #fff; }

.dep-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 10px; border-top: 1px solid var(--border); }
.dep-list-title { font-size: 13.5px; color: #374151; }
.dep-list-tools { display: flex; align-items: center; gap: 8px; }
.dep-q { width: 84px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 12.5px; }
.dep-q:focus { outline: none; border-color: var(--blue); }
.dep-list { max-height: 140px; overflow-y: auto; }
.dep-empty { padding: 12px 0; font-size: 12.5px; color: #b6bec9; }
.dep-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #f1f4f8; font-size: 13px; }
.dep-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #111827; }
.dep-money { color: #111827; font-weight: 600; }
.dep-model-tag { font-size: 11.5px; color: #6d28d9; background: #f3e8ff; padding: 1px 7px; border-radius: 999px; }
.dep-time { color: #9aa5b5; font-size: 12px; margin-left: auto; }
.dep-state { font-size: 11.5px; color: #b45309; }
.dep-state.done { color: #16a34a; }
.dep-warn {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 10px 12px;
  background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px;
  font-size: 12.5px; color: #dc2626;
}
.dep-warn-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: #dc2626; color: #fff; font-size: 11px; flex: none;
}

/* 记录时间：下拉更短，日期范围更长 */
.filter-grid .field:has(.range-compact) #f-time-type { width: 56px !important; padding-left: 8px !important; padding-right: 20px !important; }
.filter-grid .field:has(.range-compact) .range-compact { flex: 1; min-width: 104px; }

/* 搜索：选择器 + 输入框为一体式，查询按钮独立 */
.search-group { width: 360px; height: 32px; }
.search-row #search-btn { height: 32px; padding: 0 18px; border-radius: 4px; }

/* 记录时间：下拉 + 日期范围一体式 */
.filter-grid .date-group {
  display: flex; align-items: stretch; gap: 0;
  height: 32px; padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.filter-grid .date-group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 115, 221, .08);
}
.filter-grid .date-group #f-time-type {
  width: 68px !important;
  height: 100% !important;
  padding: 0 4px 0 8px !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.filter-grid .date-group .range-compact {
  flex: 1; min-width: 0;
  height: 100% !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.filter-grid .date-group .range-compact:hover { background: #f7f9fc !important; }

/* 一体式容器内部不要间隙 */
.filter-grid .field .date-group { gap: 0 !important; }
.filter-grid .field .date-group #f-time-type { width: 68px !important; }
.filter-grid .field .date-group .range-compact { border-left: 0 !important; }

/* 记录时间下拉：去掉原生外观 */
.filter-grid .field .date-group #f-time-type {
  -webkit-appearance: none !important;
  appearance: none !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a94a6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 12px 12px !important;
  padding-right: 22px !important;
  box-shadow: none !important;
}

/* 记录时间一体式：自定义下拉部分 */
.filter-grid .field .date-group .cs-wrap { width: 68px !important; flex: none !important; }
.filter-grid .field .date-group .cs-trigger {
  height: 100% !important;
  border: 0 !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 20px 0 8px !important;
}
.filter-grid .field .date-group .cs-trigger:hover { background: #f7f9fc !important; }
.filter-grid .field .date-group .cs-trigger.open { border-right: 1px solid var(--border) !important; box-shadow: none !important; }
.filter-grid .field .date-group .range-compact { min-width: 0 !important; }

.filter-grid .field .date-group .cs-wrap { width: 76px !important; }
.filter-grid .field .date-group .cs-trigger { padding: 0 16px 0 8px !important; }

/* 记录时间日期范围：带日历图标，文字与图标间距收紧 */
.filter-grid .date-group .range-compact { gap: 5px !important; }
.filter-grid .date-group .range-compact > svg { flex: none; color: #9aa5b5; }
.filter-grid .date-group .range-compact .range-value { font-size: 12.5px; }

/* 记录时间：有值时给清空按钮留位，避免与省略号重叠 */
.filter-grid .date-group .range-compact { padding-right: 22px !important; }
.filter-grid .date-group .range-compact .range-value {
  padding-right: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-grid .date-group .range-compact .range-clear { right: 4px; }
.filter-grid .date-group .range-compact.has-value { padding-right: 24px !important; }

/* 出库图：查看按钮（胶囊描边） */
.out-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.out-badge:hover { background: #ffedd5; border-color: #fdba74; }

/* 出库图预览：示例图铺满 */
.out-img { padding: 0; overflow: hidden; background: #eef2f7; }
.out-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 出库图查看按钮：蓝色风格 */
.out-badge {
  border-color: #bcd8ff;
  background: #eef5ff;
  color: var(--blue);
}
.out-badge:hover { background: #e2eefd; border-color: #9cc4f8; }

/* 结清状态：已结清绿色、未结清橙色、空数据灰色 */
.settle-done { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.settle-todo { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }

/* 免押记录：收起/展开切换 */
.dep-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  height: 28px; padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: #4b5563;
  font-size: 12.5px;
}
.dep-toggle:hover { border-color: #bcd8ff; color: var(--blue); }
.dep-toggle svg { transition: transform .18s; }
.dep-toggle.collapsed svg { transform: rotate(-90deg); }

/* 免押弹窗：生成 / 记录 切换 */
.dep-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--border);
}
.dep-tab {
  position: relative;
  height: 34px;
  padding: 0 10px;
  border: 0;
  background: none;
  font-size: 14px;
  color: #6b7280;
}
.dep-tab b { font-weight: 600; color: #9aa5b5; margin-left: 2px; }
.dep-tab:hover { color: var(--blue); }
.dep-tab.active { color: var(--blue); font-weight: 600; }
.dep-tab.active b { color: var(--blue); }
.dep-tab.active::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px; border-radius: 2px;
  background: var(--blue);
}
.dep-pane-list { padding-top: 4px; }

/* 免押弹窗：切换标签时高度不变 */
.dep-body { min-height: 508px; }
.dep-copy {
  margin-left: 6px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid #bcd8ff;
  border-radius: 4px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 11.5px;
  line-height: 1;
  vertical-align: middle;
}
.dep-copy:hover { background: #e2eefd; border-color: #9cc4f8; }

/* 免押弹窗底部复制按钮 */
.dep-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}
.dep-copy-main {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 44px;
  border: 0; border-radius: 8px;
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 600;
}
.dep-copy-main:hover { background: #0f62c4; }
.dep-copy-main:disabled { background: #dbe4ef; color: #fff; cursor: not-allowed; }

/* 免押弹窗更紧凑 */
.dep-body { min-height: 420px; }
.dep-qr-wrap { padding: 16px 0 10px; }
.dep-qr { min-height: 168px; min-width: 196px; }
.dep-qr-img svg { width: 148px; height: 148px; }
.dep-qr-cap { margin-top: 6px; }
.dep-qr-code { margin-top: 2px; }
.dep-head { padding: 14px 20px; }
.dep-tabs { padding: 8px 20px 0; }

/* 更紧凑 + 二维码整数缩放（避免格线缝隙） */
.dep-body { min-height: 372px; }
.dep-qr-img svg { width: 147px; height: 147px; }
.dep-qr-img { padding: 4px; }

/* 批量操作弹窗 */
.batch-modal {
  width: 460px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.batch-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.batch-title { font-size: 16px; font-weight: 600; color: #111827; }
.batch-sub { margin-top: 5px; font-size: 12.5px; color: #8a94a6; }
.batch-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.batch-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px; border: 1px solid transparent; border-radius: 8px;
  background: #fff; text-align: left;
}
.batch-item:hover:not(:disabled) { background: #f7faff; border-color: #dbe9fb; }
.batch-item:disabled { opacity: .45; cursor: not-allowed; }
.batch-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; flex: none;
}
.batch-icon.blue { background: #eef5ff; color: var(--blue); }
.batch-icon.green { background: #eefaf1; color: #16a34a; }
.batch-icon.amber { background: #fff7ed; color: #c2410c; }
.batch-icon.slate { background: #f1f3f6; color: #4b5563; }
.batch-icon.red { background: #fef2f2; color: #dc2626; }
.batch-text { display: flex; flex-direction: column; gap: 2px; }
.batch-text b { font-size: 14px; font-weight: 500; color: #111827; }
.batch-text i { font-style: normal; font-size: 12px; color: #9aa5b5; }
.batch-item.danger .batch-text b { color: #dc2626; }

/* 批量：数量高亮 + 转单面板 */
.batch-count { color: var(--blue); font-weight: 700; font-size: 15px; }
.batch-transfer {
  display: flex; align-items: center; gap: 8px;
  margin: 2px 0 6px; padding: 10px 12px;
  background: #f7faff; border: 1px dashed #cfe0f6; border-radius: 8px;
}
.batch-select {
  flex: 1; height: 32px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 13px; color: #111827; background: #fff;
}
.batch-confirm {
  height: 32px; padding: 0 14px;
  border: 0; border-radius: 6px;
  background: var(--blue); color: #fff; font-size: 13px;
}
.batch-confirm:hover { background: #0f62c4; }

/* 扫码定位开关 */
.scan-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: #4b5563;
  font-size: 13px;
  flex: none;
}
.scan-btn:hover { border-color: #bcd8ff; color: var(--blue); }
.scan-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9ced8; transition: background .15s, box-shadow .15s; }
.scan-btn.on { border-color: var(--blue); background: #eef5ff; color: var(--blue); }
.scan-btn.on .scan-dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.15); }

/* 刷新按钮移到搜索框右侧 */
.scan-refresh { height: 32px; width: 32px; flex: none; border: 1px solid var(--border-strong); background: #fff; border-radius: 4px; }
.scan-refresh:hover { border-color: #bcd8ff; color: var(--blue); }


/* 搜索框清除按钮 */
.search-input .search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e6ebf2;
  color: #6b7280;
  line-height: 1;
}
.search-input .search-clear:hover { background: #d7dee8; color: #374151; }
.search-input.has-clear .search-icon { display: none; }
.search-input input { padding-right: 30px; }

/* 清除按钮：更小 + 隐藏规则优先 */
.search-input .search-clear {
  width: 14px;
  height: 14px;
  right: 8px;
  background: #e9edf3;
}
.search-input .search-clear svg { width: 9px; height: 9px; }
.search-input .search-clear.hidden { display: none !important; }

/* 库存预测 */
#view-forecast { padding: 16px 18px 24px; }
.fc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fc-brands { display: flex; gap: 8px; flex-wrap: wrap; }
.fc-brand {
  height: 30px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  color: #4b5563; font-size: 13px;
}
.fc-brand:hover { border-color: #bcd8ff; color: var(--blue); }
.fc-brand.active { background: #111827; border-color: #111827; color: #fff; }
.fc-actions { display: flex; gap: 8px; }
.fc-action {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 6px;
  border: 1px solid; font-size: 13px;
}
.fc-action.green { background: #eefaf1; border-color: #bbf7d0; color: #15803d; }
.fc-action.purple { background: #f3e8ff; border-color: #e9d5ff; color: #6d28d9; }
.fc-action.amber { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }

.fc-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.fc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.fc-table thead th {
  background: #f7f9fc; color: #6b7280; font-weight: 500;
  text-align: right; padding: 10px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.fc-table thead th i { display: block; font-style: normal; font-size: 11px; color: #b6bec9; margin-top: 2px; }
.fc-table thead th.fc-th-name { text-align: left; }
.fc-table tbody td { padding: 12px 14px; border-bottom: 1px solid #f1f4f8; text-align: right; }
.fc-table tbody td.fc-name-cell { text-align: left; display: flex; align-items: center; gap: 10px; }
.fc-table tbody tr:hover td { background: #f9fbff; }
.fc-thumb {
  width: 38px; height: 38px; border-radius: 8px; flex: none;
  background: #eef2f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Crect width='10' height='18' x='7' y='3' rx='2'/%3E%3C/svg%3E") center/20px no-repeat;
}
.fc-thumb.large { width: 46px; height: 46px; }
.fc-name-main { display: flex; flex-direction: column; gap: 2px; }
.fc-name-main b { font-weight: 500; color: #111827; }
.fc-name-main i { font-style: normal; font-size: 11.5px; color: #b6bec9; }
.fc-num { font-weight: 500; color: #111827; }
.fc-num.blue { color: #0f766e; }
.fc-num.purple { color: #6d28d9; }
.fc-small { color: #4b5563; }
.fc-small.red { color: #dc2626; }
.fc-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 24px; padding: 0 8px; border-radius: 4px; font-weight: 500;
}
.fc-free-green { background: #eefaf1; color: #15803d; }
.fc-free-amber { background: #fff7ed; color: #c2410c; }
.fc-free-red { background: #fef2f2; color: #dc2626; }
.fc-sum td { background: #f7f9fc; font-weight: 600; color: #374151; }
.fc-sum td:first-child { text-align: left; }
.fc-empty { text-align: center !important; color: #9aa5b5; padding: 26px !important; }

/* 设备详情弹窗 */
.fc-modal {
  width: 720px; max-width: calc(100vw - 32px); max-height: calc(100vh - 60px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.fc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.fc-modal-title { font-size: 16px; font-weight: 600; color: #111827; }
.fc-modal-body { padding: 16px 20px 20px; overflow-y: auto; }
.fc-device {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd;
}
.fc-device-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-device-main b { font-size: 15px; color: #111827; }
.fc-device-main i { font-style: normal; font-size: 12px; color: #b6bec9; }
.fc-tag { font-size: 11.5px; color: #6b7280; background: #eef2f7; padding: 1px 8px; border-radius: 999px; }
.fc-stock { margin-left: auto; font-size: 13px; color: #6b7280; }
.fc-month-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.fc-month-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: #111827; }
.fc-month-btn {
  height: 30px; padding: 0 12px; border-radius: 6px;
  border: 0; background: var(--blue); color: #fff; font-size: 13px;
}
.fc-month-btn.ghost { background: #eef2f7; color: #374151; }
.fc-month-btn:hover { filter: brightness(0.96); }
.fc-legend { display: flex; gap: 18px; font-size: 12.5px; color: #4b5563; margin-bottom: 10px; }
.fc-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.fc-legend .dot.green { background: #22c55e; }
.fc-legend .dot.amber { background: #f59e0b; }
.fc-legend .dot.red { background: #ef4444; }
.fc-week { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 12px; color: #9aa5b5; text-align: center; margin-bottom: 6px; }
.fc-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.fc-day {
  height: 48px; border-radius: 6px; border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; background: #f7f9fc; color: #374151;
}
.fc-day i { font-style: normal; font-size: 11px; color: #8a94a6; }
.fc-day b { font-weight: 600; }
.fc-day.green { background: #ecfdf3; color: #15803d; }
.fc-day.amber { background: #fff8e6; color: #c2410c; }
.fc-day.red { background: #fef2f2; color: #dc2626; }
.fc-day.sel { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(22,115,221,.15); }
.fc-day.empty { background: transparent; }
.fc-day-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.fc-day-head #fc-day-title { font-size: 14px; font-weight: 600; color: #111827; }
.fc-day-meta { font-size: 12.5px; color: #6b7280; }
.fc-day-meta b { color: #111827; }
.fc-day-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fc-day-table th { text-align: left; padding: 8px 10px; color: #9aa5b5; font-weight: 500; border-bottom: 1px solid var(--border); }
.fc-day-table td { padding: 9px 10px; border-bottom: 1px solid #f1f4f8; color: #374151; }
.fc-st-green { color: #15803d; }
.fc-st-amber { color: #c2410c; }
.fc-st-red { color: #dc2626; }

/* 库存预测：7 天档期紧凑表格 */
#view-forecast { padding: 12px 14px 20px; }
.fc-table thead th { padding: 8px 10px; font-size: 12.5px; }
.fc-table thead th.fc-th-num { text-align: right; }
.fc-th-day { text-align: center !important; width: 74px; }
.fc-th-day span { color: #6b7280; }
.fc-th-day i { font-style: normal; font-size: 11px; color: #b6bec9; margin-top: 2px; }
.fc-th-day.today span { color: var(--blue); font-weight: 600; }
.fc-table tbody td { padding: 9px 10px; }
.fc-table tbody td.fc-name-cell { padding-left: 12px; }
.fc-daycell { text-align: center !important; }
.fc-daycell.today { background: #f6faff; }
.fc-free {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 12.5px; font-weight: 500;
}
.fc-free.fc-free-green { background: #eefaf1; color: #15803d; }
.fc-free.fc-free-amber { background: #fff7ed; color: #c2410c; }
.fc-free.fc-free-red { background: #fef2f2; color: #dc2626; }
.fc-sum .fc-daycell { background: #f7f9fc; }
.fc-sum .fc-daycell.today { background: #eef5ff; }

/* 库存预测：整体排版优化 */
#view-forecast { padding: 18px 20px 24px; }
.fc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.fc-title { font-size: 20px; font-weight: 600; color: #0f172a; letter-spacing: .2px; }
.fc-sub { margin-top: 5px; font-size: 12.5px; color: #8a94a6; }
.fc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.fc-legend-inline { display: flex; gap: 16px; font-size: 12.5px; color: #6b7280; }
.fc-legend-inline .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.fc-legend-inline .dot.green { background: #22c55e; }
.fc-legend-inline .dot.amber { background: #f59e0b; }
.fc-legend-inline .dot.red { background: #ef4444; }

.fc-card { border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.fc-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f8fafc; border-bottom: 1px solid #e8eef6;
}
.fc-table tbody tr:last-child td { border-bottom: 0; }
.fc-table tbody tr { cursor: pointer; }
.fc-table tbody tr:hover td { background: #f8fbff; }
.fc-table tbody tr:hover td.fc-daycell.today { background: #eef5ff; }
.fc-name-main b { font-size: 14px; }
.fc-name-main i { font-size: 11.5px; }
.fc-thumb { background-color: #f1f5f9; }
.fc-free { min-width: 36px; height: 24px; border-radius: 6px; }

/* 库存预测：固定列宽，数字靠左，整体更像表格 */
.fc-table { table-layout: fixed; }
.fc-table thead th,
.fc-table tbody td { text-align: left; }
.fc-table thead th.fc-th-num,
.fc-table tbody td.fc-num { text-align: left; padding-left: 16px; }
.fc-table thead th.fc-th-name { text-align: left; padding-left: 16px; }
.fc-th-day { text-align: center !important; width: auto; }
.fc-table tbody td.fc-daycell { text-align: center; }
.fc-table tbody td.fc-name-cell { padding-left: 16px; overflow: hidden; }
.fc-name-main { min-width: 0; }
.fc-name-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-num { font-size: 13.5px; }

/* 库存预测：日期格子更大更直观 */
.fc-table tbody td { padding: 14px 10px; }
.fc-table thead th { padding: 12px 10px; }
.fc-table thead th.fc-th-day span { font-size: 13.5px; font-weight: 600; color: #374151; }
.fc-table thead th.fc-th-day i { font-size: 11.5px; margin-top: 3px; }
.fc-table thead th.fc-th-day.today span { color: var(--blue); }
.fc-free { min-width: 48px; height: 30px; font-size: 14px; font-weight: 600; border-radius: 7px; }
.fc-thumb { width: 42px; height: 42px; }
.fc-table th, .fc-table td { font-size: 13.5px; }

/* 库存预测：总库存/实际闲置居中 + 胶囊再放大 */
.fc-table thead th.fc-th-num,
.fc-table tbody td.fc-num { text-align: center !important; padding-left: 10px !important; padding-right: 10px !important; }
.fc-free { min-width: 56px; height: 34px; font-size: 15px; border-radius: 8px; }
.fc-table tbody td.fc-daycell { padding-top: 13px; padding-bottom: 13px; }

/* 胶囊再放大一档 */
.fc-free { min-width: 66px; height: 38px; font-size: 16px; border-radius: 9px; }
.fc-table thead th.fc-th-day span { font-size: 14px; }
.fc-table thead th.fc-th-day i { font-size: 12px; }

/* 库存预测日历：过去日期置灰 */
.fc-day.past { background: #f7f8fa !important; color: #b6bec9 !important; }
.fc-day.past i { color: #c9ced8 !important; }
.fc-day.past b { font-weight: 500; }
.fc-day.past:hover { background: #f1f3f6 !important; }
.fc-day.today { box-shadow: inset 0 0 0 2px var(--blue); }
.fc-day.today b { color: var(--blue); }

/* 过去日期不可点击 */
.fc-day.past { cursor: default; }
.fc-day.past b { color: #c9ced8 !important; font-weight: 500; }
.fc-day.past:hover { background: #f7f8fa !important; }

/* 库存预测：设备列固定 + 日期横向滚动 */
.fc-scroll { max-height: calc(100vh - 300px); overflow: auto; }
.fc-table { table-layout: fixed; width: max-content; min-width: 100%; }
.fc-table thead th { position: sticky; top: 0; z-index: 3; }
.fc-table thead th.fc-th-name,
.fc-table tbody td.fc-name-cell {
  position: sticky; left: 0; z-index: 2;
  background: #fff;
  box-shadow: 1px 0 0 #eef2f7;
}
.fc-table thead th.fc-th-name { background: #f8fafc; z-index: 4; }
.fc-table tbody tr:hover td.fc-name-cell { background: #f8fbff; }
.fc-th-day { width: 76px !important; padding: 10px 6px !important; }
.fc-table tbody td.fc-daycell { padding: 12px 6px; }
.fc-free { min-width: 52px; height: 32px; font-size: 14.5px; }
.fc-name-main i { white-space: nowrap; }

/* 订单表格：固定高度，分页常驻可见 */
#view-orders .table-card {
  display: flex; flex-direction: column;
  max-height: calc(100vh - 292px);
  overflow: hidden;
}
#view-orders .table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
#view-orders .table-footer { flex: none; padding: 10px 12px; border-top: 1px solid var(--border); background: #fff; }

/* 移动端订单卡片容器：桌面隐藏 */
.order-cards { display: none; }
@media (max-width: 767px) {
  .order-cards { display: block; }
}

/* 记录时间：窄列下不截断 */
.filter-grid .field .date-group .cs-wrap { width: 64px !important; }
.filter-grid .field .date-group .cs-trigger { padding: 0 14px 0 6px !important; font-size: 12.5px; }
.filter-grid .field .date-group .range-compact { padding: 0 6px !important; gap: 4px !important; }
.filter-grid .field .date-group .range-compact .range-value { font-size: 11.5px; }
.filter-grid .field .date-group .range-compact > svg { width: 12px; height: 12px; }

.filter-grid .field .date-group .cs-wrap { width: 72px !important; }
.filter-grid .field .date-group .cs-trigger { padding: 0 12px 0 6px !important; font-size: 12.5px !important; }

/* 订单表格恢复自然高度：分页紧跟内容 */
#view-orders .table-card { display: block; max-height: none; overflow: visible; }
#view-orders .table-wrap { max-height: calc(100vh - 360px); overflow: auto; }
#view-orders .table-footer { border-top: 1px solid var(--border); background: #fff; padding: 12px 12px; }

/* 高级筛选：设备名称等文本输入占满整格 */
.filter-grid .field-body { flex: 1; min-width: 0; }
.filter-grid .field-body .control,
.filter-grid .field-body input[type="text"] { width: 100%; }

/* 记录时间列不省略日期 */
#order-thead-row th[data-col-key="time"],
#order-tbody td[data-col-key="time"] { white-space: nowrap; }

/* 表格改为自然高度，避免半行被截断 */
#view-orders .table-card { overflow: visible; }
#view-orders .table-wrap { max-height: none; overflow-x: auto; overflow-y: visible; }

/* 设备名称多选框占满整格 */
#f-device-control { width: 100%; }
#f-device-control .control { width: 100%; }
#f-device-input { width: 100%; }
.filter-grid .field > .field-body { flex: 1 1 auto; min-width: 0; }

/* 设备名称：整格宽 */
.filter-grid .field .multi-select,
.filter-grid .field #f-device-control { display: block; width: 100% !important; }
.filter-grid .field #f-device-control .control { width: 100% !important; box-sizing: border-box; }

/* ============ 开单弹窗（按截图） ============ */
.ob-modal {
  width: min(1520px, 96vw); max-height: 96vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .22);
}
.ob-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.ob-title { font-size: 19px; font-weight: 600; color: #111827; }
.ob-close { display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; border: 0; background: none; color: #6b7280; border-radius: 4px; }
.ob-close:hover { background: #f3f5f9; color: #111827; }
#order-form { display: flex; flex-direction: column; min-height: 0; }
.ob-body { flex: 1; overflow-y: auto; padding: 6px 22px 8px; }

.ob-sec {
  display: flex; align-items: center; gap: 8px;
  margin: 14px 0 12px; font-size: 16px; font-weight: 600; color: #111827;
}
.ob-sec::before { content: ''; width: 4px; height: 17px; border-radius: 1px; background: #2563eb; }

.ob-grid { display: grid; gap: 14px 34px; }
.ob-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ob-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ob-field { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ob-label { flex: none; width: 78px; text-align: right; font-size: 15px; color: #4b5563; white-space: nowrap; }
.ob-label i { color: #ef4444; font-style: normal; margin-right: 2px; }
.ob-control {
  flex: 1; min-width: 0; height: 38px; padding: 0 11px;
  border: 1px solid #dfe4ec; border-radius: 4px;
  background: #fff; font-size: 15px; color: #111827; outline: none;
}
.ob-control::placeholder { color: #b7bfca; }
.ob-control:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
select.ob-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa5b5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.ob-static { font-size: 15px; color: #4b5563; }

.ob-date {
  flex: 1; display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 11px;
  border: 1px solid #dfe4ec; border-radius: 4px; background: #fff;
  font-size: 15px; color: #b7bfca;
}
.ob-date svg { flex: none; color: #9aa5b5; }
.ob-date.has-value { color: #111827; }
.ob-date .range-value { font-size: 15px; }

.ob-radio { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: #374151; cursor: pointer; }
.ob-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }

.ob-hint { margin: 0 0 10px; font-size: 14px; color: #6b7280; }
.ob-hint span { color: #2563eb; }
.ob-cust { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.ob-paste { position: relative; }
.ob-paste textarea {
  width: 100%; height: 168px; padding: 12px 14px 52px;
  border: 1px solid #dfe4ec; border-radius: 4px;
  font-size: 15px; line-height: 1.7; color: #111827; resize: vertical; outline: none;
}
.ob-paste textarea::placeholder { color: #b7bfca; }
.ob-paste textarea:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.ob-paste .ob-btn { position: absolute; right: 12px; bottom: 12px; }
.ob-cust-right { display: flex; flex-direction: column; gap: 14px; }

.ob-dev { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 34px; align-items: start; }
.ob-dev-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-height: 34px; }
.ob-dev-hint { font-size: 14.5px; color: #374151; }
.ob-dev-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ob-dev-search { position: relative; flex: 1; min-width: 0; }
.ob-dev-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #9aa5b5; }
.ob-dev-search input { width: 100%; padding-left: 33px; }
.ob-dev-code { position: relative; flex: 1.15; min-width: 0; }
.ob-dev-code input { width: 100%; padding-right: 34px; }
.ob-dev-code svg { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); }
.ob-minus { display: flex; width: 28px; height: 28px; flex: none; align-items: center; justify-content: center; border: 1px solid #dfe4ec; border-radius: 50%; background: #fff; color: #6b7280; }
.ob-minus:hover { border-color: #fca5a5; color: #dc2626; }
.ob-add { margin-top: 4px; padding: 0; border: 0; background: none; font-size: 15px; color: #2563eb; }
.ob-acc-row { display: flex; align-items: stretch; }
.ob-acc-row .ob-control { border-radius: 4px 0 0 4px; border-right: 0; }
.ob-add-btn { flex: none; width: 84px; border: 0; border-radius: 0 4px 4px 0; background: #2563eb; color: #fff; font-size: 15px; }
.ob-add-btn:hover { background: #1d4ed8; }

.ob-btn { height: 38px; padding: 0 20px; border: 1px solid #dfe4ec; border-radius: 4px; background: #fff; font-size: 15px; color: #374151; }
.ob-btn:hover { border-color: #c7d2e0; }
.ob-btn.primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.ob-btn.primary:hover { background: #1d4ed8; }
.ob-btn.sm { height: 32px; padding: 0 14px; font-size: 14px; }
.ob-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--border); background: #fff; }

/* 开单：交货方式选中态 */
.ob-radio input:checked + .radio-dot { border-color: #2563eb; }
.ob-radio input:checked + .radio-dot::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #2563eb;
}
.ob-radio .radio-dot { position: relative; }
.ob-radio input:checked ~ span { color: #2563eb; }

/* 开单弹窗：按参考比例收紧 */
.ob-modal { width: min(1160px, 92vw); max-height: 86vh; }
.ob-head { padding: 11px 18px; }
.ob-title { font-size: 17px; }
.ob-body { padding: 4px 18px 6px; }
.ob-sec { margin: 10px 0 9px; font-size: 15px; }
.ob-sec::before { height: 15px; }
.ob-grid { gap: 9px 26px; }
.ob-label { width: 70px; font-size: 13.5px; }
.ob-control { height: 34px; font-size: 13.5px; padding: 0 10px; }
.ob-date { height: 34px; font-size: 13.5px; }
.ob-date .range-value { font-size: 13.5px; }
.ob-hint { font-size: 13px; margin-bottom: 8px; }
.ob-paste textarea { height: 128px; font-size: 13.5px; padding: 10px 12px 46px; }
.ob-cust { gap: 26px; }
.ob-cust-right { gap: 9px; }
.ob-dev { gap: 26px; }
.ob-dev-hint { font-size: 13.5px; }
.ob-dev-row { gap: 8px; margin-bottom: 8px; }
.ob-btn { height: 34px; padding: 0 16px; font-size: 13.5px; }
.ob-btn.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.ob-radio { font-size: 13.5px; }
.radio-row { gap: 20px; }
.ob-foot { padding: 9px 18px; }
.ob-static { font-size: 13.5px; }

/* 开单：让 900 高窗口下也能完整显示 */
.ob-paste textarea { height: 112px; }
.ob-sec { margin: 8px 0 7px; }
.ob-cust { gap: 22px; }
.ob-body { padding-bottom: 4px; }

/* 开单：单日期触发器宽度撑满 */
.ob-field .date-trigger { flex: 1; min-width: 0; height: 34px; font-size: 13.5px; }
.ob-field .date-trigger .range-value { font-size: 13.5px; }

/* 开单：整体对齐与节奏 */
.ob-body { padding: 8px 26px 10px; }
.ob-sec { margin: 16px 0 10px; }
.ob-sec:first-child { margin-top: 4px; }
.ob-label { width: 76px; }
.ob-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 30px; row-gap: 12px; }
.ob-grid-2 { column-gap: 44px; row-gap: 12px; }

/* 客户信息：左右两栏顶对齐、等高 */
.ob-cust { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }
.ob-cust-left { display: flex; flex-direction: column; }
.ob-paste { flex: 1; display: flex; flex-direction: column; }
.ob-paste textarea { flex: 1; height: auto; min-height: 132px; }
.ob-cust-right { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding-top: 30px; }
.ob-cust-right .ob-field { flex: 1; }
.ob-cust-right .ob-control { height: 38px; }
.ob-hint { margin: 0 0 10px; }

/* 设备明细：左右两栏对齐 */
.ob-dev { gap: 40px; }
.ob-dev-head { margin-bottom: 10px; }
.ob-acc-row .ob-control { height: 38px; }
.ob-dev-row .ob-control { height: 38px; }

/* 开单：一屏内放下全部内容 */
.ob-sec { margin: 12px 0 8px; }
.ob-paste textarea { min-height: 104px; }
.ob-cust-right { padding-top: 26px; gap: 10px; }
.ob-cust-right .ob-control { height: 36px; }
.ob-dev-row .ob-control { height: 36px; }
.ob-acc-row .ob-control { height: 36px; }
.ob-dev-row { margin-bottom: 8px; }
.ob-body { padding-bottom: 6px; }

.ob-paste textarea { min-height: 88px; }
.ob-sec { margin: 10px 0 7px; }
.ob-cust-right { padding-top: 22px; gap: 8px; }

.ob-paste textarea { min-height: 78px; }
.ob-hint { margin-bottom: 8px; }
.ob-dev { margin-top: 2px; }

.ob-cust-right { padding-top: 18px; gap: 6px; }
.ob-cust-right .ob-control { height: 34px; }

/* 开单：所有区块统一 4 列栅格，左右边界完全对齐 */
.ob-grid-4, .ob-grid-2, .ob-cust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 30px;
  row-gap: 12px;
}
.ob-grid-2 .ob-field { grid-column: span 2; }
.ob-cust-left { grid-column: span 2; }
.ob-cust-right { grid-column: span 2; padding-top: 30px; gap: 10px; }
.ob-cust-right .ob-control { height: 36px; }
.ob-label { width: 72px; }
.ob-cust-right .ob-label { width: 72px; }
.ob-dev { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ob-dev-left, .ob-dev-right { grid-column: span 2; }

.ob-sec { margin: 8px 0 6px; }
.ob-paste textarea { min-height: 76px; }
.ob-cust-right { padding-top: 24px; gap: 9px; }
.ob-cust-right .ob-control { height: 34px; }

/* 开单：粘贴识别提示移入框内 + 整体上移 */
.ob-paste {
  display: flex; flex-direction: column;
  border: 1px solid #dfe4ec; border-radius: 4px;
  background: #fff; padding: 9px 12px 46px;
}
.ob-paste:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.ob-paste-hint { margin: 0 0 6px; font-size: 12.5px; color: #6b7280; }
.ob-paste-hint span { color: #2563eb; }
.ob-paste textarea {
  border: 0; padding: 0; min-height: 84px; resize: none;
  font-size: 13.5px; line-height: 1.7;
}
.ob-paste textarea:focus { box-shadow: none; }
.ob-paste .ob-btn { position: absolute; right: 10px; bottom: 10px; }
.ob-paste { position: relative; }

/* 整体上移 */
.ob-body { padding-top: 2px; }
.ob-sec { margin: 6px 0 6px; }
.ob-grid-4, .ob-grid-2, .ob-cust { row-gap: 10px; }
.ob-head { padding: 10px 20px; }

/* 客户信息：右侧上移，左侧框与右侧等高 */
.ob-cust { align-items: start; }
.ob-cust-right { padding-top: 0; justify-content: flex-start; gap: 9px; }
.ob-cust-right .ob-control { height: 34px; }
.ob-cust-left { height: 122px; }
.ob-paste { height: 100%; min-height: 0; padding-bottom: 42px; }
.ob-paste textarea { min-height: 0; flex: 1; }

/* 粘贴框：占位在上、说明与按钮在下 */
.ob-paste { padding: 9px 12px 10px; }
.ob-paste textarea { min-height: 46px; flex: 1; }
.ob-paste-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 4px; }
.ob-paste-hint { margin: 0; font-size: 12px; color: #6b7280; }
.ob-paste-foot .ob-btn { flex: none; }

/* 开单：更窄更高，一屏放下 */
.ob-modal { width: min(1060px, 94vw); max-height: 94vh; }
.ob-body { padding: 4px 20px 6px; }
.ob-grid-4, .ob-grid-2, .ob-cust { column-gap: 22px; row-gap: 9px; }
.ob-label { width: 66px; font-size: 13px; }
.ob-control, .ob-date { height: 33px; font-size: 13px; }
.ob-date .range-value { font-size: 13px; }
.radio-row { gap: 14px; }
.ob-radio { font-size: 13px; }
.ob-cust-right .ob-control { height: 33px; }
.ob-cust-left { height: 118px; }
.ob-sec { margin: 7px 0 5px; font-size: 14.5px; }
.ob-dev-row { gap: 7px; }
.ob-dev-hint { font-size: 13px; }

.ob-modal { width: min(1010px, 94vw); }

/* 配件下拉：锚定输入框，向上弹出时不被遮挡 */
#acc-select { position: relative; }
.acc-panel { z-index: 300 !important; }

/* 配件已选标签与清空 */
.ob-dev-right .acc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ob-dev-right .acc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 4px 0 8px;
  border: 1px solid #bcd8ff; border-radius: 4px;
  background: #eef5ff; color: #1673dd; font-size: 12.5px;
}
.ob-dev-right .acc-tag button {
  border: 0; background: none; color: #1673dd; font-size: 14px; line-height: 1; padding: 0 2px; cursor: pointer;
}
.ob-dev-right .acc-tag button:hover { color: #dc2626; }
#acc-clear {
  margin-top: 6px; padding: 0; border: 0; background: none;
  font-size: 12.5px; color: #6b7280;
}
#acc-clear:hover { color: #2563eb; }
#acc-list:empty + #acc-clear { display: none; }

.acc-foot-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.acc-foot-row .acc-tags { flex: 1; margin-top: 0; }
.acc-foot-row #acc-clear { flex: none; margin-top: 0; }
#acc-list:empty + #acc-clear { display: none !important; }

/* 配件：标签内置在输入框里 */
.ob-acc-row { display: flex; align-items: stretch; }
.ob-acc-field {
  flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 36px; padding: 3px 8px;
  border: 1px solid #dfe4ec; border-radius: 4px 0 0 4px; background: #fff;
}
.ob-acc-field:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.ob-acc-field input {
  flex: 1; min-width: 110px; height: 28px; border: 0; outline: none;
  font-size: 13.5px; color: #111827; background: transparent;
}
.ob-acc-field input::placeholder { color: #b7bfca; }
.ob-acc-field .acc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ob-acc-field .acc-tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 4px 0 8px;
  border: 1px solid #bcd8ff; border-radius: 4px;
  background: #eef5ff; color: #1673dd; font-size: 12.5px;
}
.ob-acc-field .acc-tag button { border: 0; background: none; color: #1673dd; font-size: 14px; line-height: 1; padding: 0 2px; }
.ob-acc-field .acc-tag button:hover { color: #dc2626; }
.acc-foot-row { display: none; }

#acc-clear { display: none !important; }

/* 配件：添加按钮固定高度，不被标签换行拉高 */
.ob-add-btn { align-self: flex-start; height: 36px; margin-left: -1px; }
.ob-acc-field { min-height: 38px; align-content: flex-start; }

/* 配件：单行高度，标签多时横向滚动 */
.ob-acc-field {
  height: 38px; min-height: 38px;
  flex-wrap: nowrap; align-items: center;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none;
}
.ob-acc-field::-webkit-scrollbar { height: 0; }
.ob-acc-field .acc-tags { flex: none; flex-wrap: nowrap; }
.ob-acc-field .acc-tag { flex: none; white-space: nowrap; }
.ob-acc-field input { min-width: 90px; }
.ob-add-btn { height: 38px; align-self: stretch; }

/* 配件：清空按钮与输入框严格等高 */
.ob-acc-row { align-items: stretch; }
.ob-acc-field { height: 40px; min-height: 40px; box-sizing: border-box; }
.ob-add-btn { height: 40px; align-self: stretch; box-sizing: border-box; margin-top: 0; border-radius: 0 4px 4px 0; }

/* 配件：整框输入 + 内置清除按钮 */
.ob-acc-row { display: block; }
.ob-acc-field {
  width: 100%; height: 40px; min-height: 40px;
  border-radius: 4px; padding: 0 8px 0 10px;
  display: flex; align-items: center; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
}
.ob-acc-field::-webkit-scrollbar { height: 0; }
.ob-acc-field input { flex: 1; min-width: 80px; height: 34px; border: 0; outline: none; background: transparent; font-size: 13.5px; }
.ob-acc-field .acc-tags { flex: none; display: flex; gap: 6px; }
.acc-clear-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0;
  border: 0; border-radius: 50%; background: #e9edf3; color: #6b7280;
}
.acc-clear-btn:hover { background: #d7dee8; color: #374151; }
.acc-clear-btn.hidden { display: none !important; }
#acc-clear { display: inline-flex; }

#acc-clear:not(.hidden) { display: inline-flex !important; }

#acc-clear:not(.hidden) {
  width: 18px; height: 18px; border-radius: 50%;
  background: #e9edf3; color: #6b7280;
  align-items: center; justify-content: center;
  margin-left: auto;
}
#acc-clear:not(.hidden):hover { background: #d7dee8; color: #374151; }

/* 配件：标签滚动区与清除图标分离，框宽恒定 */
.ob-acc-field { overflow: visible; align-items: center; }
.ob-acc-scroll {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.ob-acc-scroll::-webkit-scrollbar { height: 0; }
.ob-acc-scroll .acc-tags { flex: none; display: flex; gap: 6px; flex-wrap: nowrap; }
.ob-acc-scroll .acc-tag { flex: none; white-space: nowrap; }
.ob-acc-scroll input { flex: 1; min-width: 70px; }
.ob-acc-field #acc-clear:not(.hidden) { flex: none; margin-left: 4px; }

/* 配件：超出用 +N 提示 */
.acc-more {
  flex: none; height: 24px; padding: 0 8px;
  border: 1px solid #dbe4ef; border-radius: 4px;
  background: #f4f7fb; color: #4b5563; font-size: 12.5px;
}
.acc-more:hover { border-color: #bcd8ff; color: #1673dd; background: #eef5ff; }

/* 配件：输入区不吞掉剩余空间，标签尽量多显示 */
.ob-acc-scroll input { flex: 0 1 92px; min-width: 60px; }

/* 配件清除图标：更浅更轻 */
#acc-clear:not(.hidden) {
  width: 16px; height: 16px;
  background: transparent;
  color: #c3cad4;
}
#acc-clear:not(.hidden) svg { width: 10px; height: 10px; }
#acc-clear:not(.hidden):hover { background: #eef1f5; color: #8a94a6; }

/* 粘贴框：按钮缩小、靠右 */
.ob-paste-foot { justify-content: flex-end; margin-top: 2px; }
.ob-paste-btn { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 4px; }
.ob-paste { padding-bottom: 8px; }

/* 开单：标签列统一宽度，右侧控件左边界严格对齐 */
.ob-label,
.ob-cust-right .ob-label { width: 86px; flex: none; text-align: right; }
.ob-field { gap: 10px; }

/* 免押弹窗：生成前后高度保持一致 */
.dep-modal { height: min(590px, 88vh); max-height: 88vh; display: flex; flex-direction: column; }
.dep-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* 免押：关闭按钮去边框，生成按钮改蓝色 */
.dep-head .btn-icon {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #6b7280;
}
.dep-head .btn-icon:hover { background: #f3f5f9 !important; color: #111827; }
.dep-gen,
.dep-gen:hover { background: var(--blue) !important; border-color: var(--blue) !important; }
.dep-gen:hover { background: #0f62c4 !important; }

/* 物流弹窗：双栏，一屏显示 */
.logi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.logi-col .logi-note { margin: 0 0 10px; padding: 9px 12px; font-size: 13px; }
.logi-col .logi-field { margin-top: 12px; }
.logi-col .logi-field:first-of-type { margin-top: 0; }
.logi-body { padding: 14px 22px 12px; }
.logi-modal { width: 660px; }

/* 列设置：开关滑块 + 长按排序 */
.col-lock .switch i { display: block; }
.col-grip { margin-left: 6px; color: #c3cad4; font-size: 12px; letter-spacing: -2px; cursor: grab; }
.col-row { cursor: grab; }
.col-row.dragging { background: #eef5ff; box-shadow: 0 2px 8px rgba(22,115,221,.12); border-radius: 6px; }
body.col-dragging-body, body.col-dragging-body * { cursor: grabbing !important; }

/* 列设置：长按选中反馈 */
.col-row { position: relative; border-radius: 6px; transition: background .12s, box-shadow .12s; }
.col-row.pressing { background: #f7faff; }
.col-row.dragging {
  background: #eef5ff;
  box-shadow: 0 8px 22px rgba(22, 115, 221, .18);
  outline: 1px solid #bcd8ff;
}
.col-row.dragging .col-name { color: var(--blue); font-weight: 600; }
.drag-hint {
  position: absolute; right: 12px; top: -9px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: 11px;
  box-shadow: 0 2px 6px rgba(22, 115, 221, .3);
  pointer-events: none;
}

/* 拖动过程中的落点标记 */
#col-list { position: relative; }
.col-drop-line {
  display: none;
  position: absolute; left: 6px; right: 6px; height: 2px;
  background: var(--blue); border-radius: 2px;
  box-shadow: 0 0 0 3px rgba(22, 115, 221, .12);
  pointer-events: none; z-index: 2;
}
.col-row.drop-target { background: #f2f7ff; }

/* 把手：更明确的拖动区 */
.col-grip { padding: 4px 6px; border-radius: 4px; }
.col-grip:hover { background: #eef1f5; color: #8a94a6; }

/* 列设置：空白处保持默认指针，只有把手可拖 */
.col-row { cursor: default; }
.col-row .col-name { cursor: default; }
.col-row .col-grip { cursor: grab; }
.col-row.dragging, body.col-dragging-body .col-row { cursor: grabbing; }

/* 弹窗打开时页面不可滚动 */
body.modal-open { overflow: hidden; }
body.modal-open .main { overscroll-behavior: contain; }

/* 面交单：设备名与编号可换行，不再截断 */
.p-table td:nth-child(3),
.p-table td:nth-child(4) { white-space: normal !important; word-break: break-word; line-height: 1.35; }
.p-table td:nth-child(3) { font-size: 11.5px; }
.p-table td:nth-child(4) { font-size: 11.5px; letter-spacing: -0.2px; }

/* 面交单：卡片内滚动，底部不再溢出 */
.print-card { overflow: hidden; max-height: 90vh; }
.print-stage {
  flex: 1 1 auto; min-height: 0;
  overflow: auto;
  padding: 4px 20px 16px;
  background: #f3f5f8;
}
.print-stage .print-page {
  margin: 0 auto 12px;
  box-shadow: 0 1px 6px rgba(15, 23, 42, .08);
  background: #fff;
}
.print-sheet { padding: 0; }

/* 面交单底部操作条 */
.print-foot {
  flex: none;
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.print-card { height: 90vh; }

/* 面交单分页 */
.print-foot { justify-content: space-between; }
.print-pager { display: flex; align-items: center; gap: 10px; }
.print-page-info { font-size: 13px; color: #4b5563; }
.print-page-info b { color: #111827; }
.print-pager .btn-icon { width: 30px; height: 30px; padding: 0; font-size: 18px; line-height: 1; }
.print-pager .btn-icon:disabled { opacity: .4; cursor: not-allowed; }

/* 打印快递单 */
.ex-modal {
  width: 540px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.ex-title { font-size: 17px; font-weight: 600; color: #111827; }
.ex-sub { margin-top: 6px; font-size: 12.5px; color: #8a94a6; }
.ex-body { padding: 18px 22px 8px; }
.ex-field { margin-bottom: 16px; }
.ex-label { display: block; margin-bottom: 8px; font-size: 13.5px; color: #374151; }
.ex-row { display: flex; align-items: center; gap: 10px; }
.ex-date { width: 168px; height: 38px; }
.ex-time { flex: 1; height: 38px; }
.ex-stepper { display: inline-flex; align-items: center; height: 38px; border: 1px solid #dfe4ec; border-radius: 6px; overflow: hidden; }
.ex-step-btn {
  width: 34px; height: 36px; border: 0; background: #f7f9fc;
  color: #4b5563; font-size: 16px; line-height: 1;
}
.ex-step-btn:hover { background: #eef2f7; color: var(--blue); }
.ex-count {
  width: 62px; height: 36px; border: 0; border-left: 1px solid #eef2f7; border-right: 1px solid #eef2f7;
  text-align: center; font-size: 14px; color: #111827; outline: none;
}
.ex-count::-webkit-inner-spin-button, .ex-count::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ex-scope { font-size: 12.5px; color: #b7791f; }
.ex-tip {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; margin-bottom: 10px;
  border-radius: 6px; background: #f7f9fc;
  font-size: 12.5px; color: #6b7280;
}
.ex-tip svg { color: #9aa5b5; flex: none; }
.ex-all { margin-left: auto; font-size: 12.5px; }
.ex-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 22px; border-top: 1px solid var(--border); background: #fff;
}
.ex-sel { font-size: 13px; color: #4b5563; }
.ex-sel b { color: #111827; }
.ex-actions { display: flex; gap: 10px; }
#ex-do.is-disabled, #ex-do:disabled { background: #c9d6ea; border-color: #c9d6ea; color: #fff; cursor: not-allowed; }

/* 快递单：间距收紧 */
.ex-body { padding: 14px 22px 6px; }
.ex-field { margin-bottom: 12px; }
.ex-label { margin-bottom: 6px; }
.ex-tip { margin-bottom: 6px; padding: 8px 12px; }
.ex-modal { width: 520px; }
.ex-date { height: 36px; }
.ex-time { height: 36px; }
.ex-stepper { height: 36px; }
.ex-step-btn { height: 34px; width: 32px; }
.ex-count { height: 34px; }

.ex-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ex-label { margin: 0; }
.ex-body { padding-top: 16px; }

/* 订单表格：底部常驻横向滚动条 */
#view-orders .hsbar {
  display: none;
  position: relative;
  height: 14px; margin: 0;
  padding: 0 10px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
#view-orders .hsbar.on { display: block; }
#view-orders .hsbar-thumb {
  position: absolute; top: 3px; height: 8px;
  border-radius: 4px; background: #c9d6e8;
}
#view-orders .hsbar-thumb:hover { background: #9fc0ea; }
#view-orders .hsbar-thumb.dragging { background: #1673dd; }
#view-orders .table-wrap { scrollbar-width: none; }
#view-orders .table-wrap::-webkit-scrollbar { height: 0; }

/* 订单表格：使用原生横向滚动条（常驻底部） */
#view-orders .hsbar { display: none !important; }
#view-orders .table-wrap { scrollbar-width: auto; scrollbar-color: #c9d6e8 #f8fafc; }
#view-orders .table-wrap::-webkit-scrollbar { height: 12px; width: 0; }
#view-orders .table-wrap::-webkit-scrollbar-track { background: #f8fafc; border-top: 1px solid var(--border); }
#view-orders .table-wrap::-webkit-scrollbar-thumb { background: #c9d6e8; border-radius: 6px; border: 3px solid #f8fafc; }
#view-orders .table-wrap::-webkit-scrollbar-thumb:hover { background: #9fc0ea; }

/* 订单表格：固定卡片高度，横条常驻可见 */
#view-orders .table-card {
  display: flex; flex-direction: column;
  max-height: calc(100vh - 296px);
  overflow: hidden;
}
#view-orders .table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
#view-orders .table-footer { flex: none; }

/* 订单视图：占满视口，分页贴底，表格显示更多行 */
#view-orders { display: flex; flex-direction: column; height: calc(100vh - 196px); min-height: 0; }
#view-orders .table-card {
  flex: 1 1 auto; min-height: 0;
  max-height: none;
  display: flex; flex-direction: column;
}
#view-orders .table-wrap { flex: 1 1 auto; min-height: 0; }
#view-orders .table-footer { flex: none; margin-top: 0; }

/* 高度由脚本精确计算，去掉固定公式 */
#view-orders { height: auto; }
.main { padding-bottom: 10px; }

/* 横向滚动条：低干扰，悬浮才明显 */
#view-orders .table-wrap { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 184, .35) transparent; }
#view-orders .table-wrap::-webkit-scrollbar { height: 8px; }
#view-orders .table-wrap::-webkit-scrollbar-track { background: transparent; border-top: 0; }
#view-orders .table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .30);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 6px;
}
#view-orders .table-wrap:hover::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .55); background-clip: padding-box; }
#view-orders .table-wrap::-webkit-scrollbar-corner { background: transparent; }

/* 再淡一档：默认几乎不可见，悬停才浮现 */
#view-orders .table-wrap::-webkit-scrollbar { height: 6px; }
#view-orders .table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .14);
  border: 1px solid transparent;
  background-clip: padding-box;
}
#view-orders .table-wrap:hover::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .45); background-clip: padding-box; }

#view-orders .table-wrap::-webkit-scrollbar { height: 6px !important; background: transparent !important; }
#view-orders .table-wrap::-webkit-scrollbar-track { background: transparent !important; border: 0 !important; }
#view-orders .table-wrap::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .10) !important; border: 0 !important; border-radius: 3px !important; }
#view-orders .table-wrap:hover::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .50) !important; }

/* 隐藏横向滚动条，改用拖拽 */
#view-orders .table-wrap::-webkit-scrollbar { height: 0 !important; width: 0 !important; background: transparent !important; }
#view-orders .table-wrap { scrollbar-width: none; }
#view-orders .table-wrap.drag-x { cursor: grabbing; user-select: none; }

/* 设备绑定弹窗 */
#device-modal .sync-modal { width: 720px; }
#device-modal .sync-head { align-items: flex-start; padding: 18px 22px 14px; }
#device-modal .sync-body { padding: 16px 22px 8px; }
.dm-head {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 34px;
  gap: 10px; padding: 0 2px 8px;
  font-size: 12.5px; color: #8a94a6;
}
#device-modal .dev-row {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 34px;
  gap: 10px; align-items: center; margin-bottom: 10px;
}
#device-modal .dev-search,
#device-modal .dev-code {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 10px;
  border: 1px solid #dfe4ec; border-radius: 6px; background: #fff;
}
#device-modal .dev-search:focus-within,
#device-modal .dev-code:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
#device-modal .dev-search svg { color: #9aa5b5; flex: none; }
#device-modal .dev-search input,
#device-modal .dev-code input {
  flex: 1; min-width: 0; height: 36px; border: 0; outline: none;
  background: transparent; font-size: 13.5px; color: #111827;
}
#device-modal .dev-search input::placeholder,
#device-modal .dev-code input::placeholder { color: #b7bfca; }
#device-modal .dev-code .cam {
  flex: none; width: 24px; height: 24px; border: 0; background: none;
  color: var(--blue); padding: 0;
}
#device-modal .dev-remove {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid #e8edf4; background: #fff; color: #9aa5b5;
  font-size: 15px; line-height: 1;
}
#device-modal .dev-remove:hover { border-color: #fca5a5; color: #dc2626; background: #fef2f2; }
.dm-add { margin: 2px 0 6px; font-size: 13.5px; }

/* 租赁套餐下拉 */
.pkg-menu {
  position: fixed; z-index: 320; width: 300px;
  padding: 6px; border-radius: 10px; background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .22);
  border: 1px solid var(--border);
}
.pkg-item {
  display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px;
  background: none; text-align: left;
}
.pkg-item:hover { background: #f5f9ff; }
.pkg-item b { display: block; font-size: 13.5px; font-weight: 500; color: #111827; }
.pkg-item i { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: #8a94a6; }

/* 面交单底部按钮组 */
.print-foot-right { display: flex; align-items: center; gap: 10px; }

/* 同步订单弹窗优化 */
.sync-modal { width: 620px; max-height: 86vh; }
.sync-hero { padding: 2px 0 14px; }
.sync-hero-icon { width: 46px; height: 46px; margin-bottom: 10px; }
.sync-hero-title { font-size: 17px; }
.sync-hero-sub { margin-top: 5px; font-size: 12.5px; }
.sync-shops { gap: 8px; }
.shop-card {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1px solid #e8eef6; border-radius: 10px;
  background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.shop-card:hover { border-color: #cfe0f6; background: #fbfdff; }
.shop-card.active { border-color: var(--blue); background: #f7fbff; box-shadow: 0 0 0 3px rgba(22,115,221,.06); }
.shop-avatar {
  width: 38px; height: 38px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #eef2f7; color: #8a94a6;
}
.shop-card.active .shop-avatar { background: var(--blue); color: #fff; }
.shop-main { min-width: 0; }
.shop-name { font-size: 14px; font-weight: 500; color: #111827; }
.shop-key { margin-top: 2px; font-size: 11.5px; color: #9aa5b5; }
.shop-ops { margin-left: auto; display: flex; gap: 4px; opacity: .55; transition: opacity .15s; }
.shop-card:hover .shop-ops, .shop-card.active .shop-ops { opacity: 1; }
.shop-icon {
  width: 28px; height: 28px; border: 0; border-radius: 6px;
  background: none; color: #9aa5b5;
  display: inline-flex; align-items: center; justify-content: center;
}
.shop-icon:hover { background: #eef5ff; color: var(--blue); }
.shop-icon.danger:hover { background: #fef2f2; color: #dc2626; }
.sync-foot { display: flex; align-items: center; gap: 14px; padding: 12px 22px; }
.sync-foot .btn-primary { margin-left: auto; }

/* 视图切换：hidden 必须生效（覆盖 #view-orders 的 flex） */
#view-orders.hidden, #view-forecast.hidden { display: none !important; }

/* 库存预测：降噪，保留信息 */
.fc-th-day.today span { color: #374151 !important; font-weight: 600; }
.fc-th-day.today { background: transparent !important; }
.fc-table thead th { background: #fafbfd; border-bottom: 1px solid #edf1f6; }
.fc-table tbody td { border-bottom: 1px solid #f3f6fa; }
.fc-free {
  min-width: 0 !important; height: auto !important;
  padding: 0 !important; border-radius: 0 !important;
  background: transparent !important;
  font-size: 14px; font-weight: 500;
}
.fc-free.fc-free-green { color: #15803d; }
.fc-free.fc-free-amber { color: #c2410c; }
.fc-free.fc-free-red { color: #dc2626; }
.fc-daycell { padding: 10px 4px !important; }
.fc-table tbody tr:hover td { background: #fafcff; }
.fc-name-main b { font-weight: 500; }
.fc-thumb { background-color: #f6f8fb; }

/* 库存预测：列分隔竖线 */
#view-forecast .fc-table th,
#view-forecast .fc-table td { border-right: 1px solid #eef2f7; }
#view-forecast .fc-table th:last-child,
#view-forecast .fc-table td:last-child { border-right: 0; }
#view-forecast .fc-table thead th { border-bottom: 1px solid #e6ecf3; }
#view-forecast .fc-th-name,
#view-forecast .fc-name-cell { border-right: 1px solid #e6ecf3 !important; }

/* 库存预测：隐藏滚动条，长按拖动 */
#fc-scroll { scrollbar-width: none; -ms-overflow-style: none; }
#fc-scroll::-webkit-scrollbar { height: 0; width: 0; }
#fc-scroll.panning { cursor: grabbing; }
#fc-scroll.panning * { cursor: grabbing !important; user-select: none; }

/* 库存预测：分页条 */
.fc-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-top: 1px solid var(--border);
  background: #fff;
}
.fc-range { font-size: 13px; color: #6b7280; }
#view-forecast .fc-scroll { overflow: visible; }

/* 库存预测：分页条固定卡片底部，表格内部滚动 */
#view-forecast { display: flex; flex-direction: column; height: calc(100vh - 176px); min-height: 0; }
#view-forecast .fc-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#view-forecast .fc-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
#view-forecast .fc-pager { flex: none; margin-top: 0; }

/* 库存预测：改回自然高度，避免半行被截断 */
#view-forecast { height: auto; display: block; }
#view-forecast .fc-card { display: block; height: auto; }
#view-forecast .fc-scroll { max-height: none; overflow: visible; }
#view-forecast .fc-pager { margin-top: 0; border-top: 1px solid var(--border); }
#view-forecast .fc-table tbody tr:last-child td { border-bottom: 0; }

/* 库存预测：日期格按库存状态填色 */
#view-forecast .fc-daycell.cell-green { background: #eefaf1; }
#view-forecast .fc-daycell.cell-amber { background: #fff7ed; }
#view-forecast .fc-daycell.cell-red { background: #fef2f2; }
#view-forecast .fc-daycell.cell-green.today,
#view-forecast .fc-daycell.cell-amber.today,
#view-forecast .fc-daycell.cell-red.today { background: inherit; }
#view-forecast .fc-table tbody tr:hover td.fc-daycell.cell-green { background: #e6f7ec; }
#view-forecast .fc-table tbody tr:hover td.fc-daycell.cell-amber { background: #ffefdd; }
#view-forecast .fc-table tbody tr:hover td.fc-daycell.cell-red { background: #fde8e8; }
#view-forecast .fc-daycell .fc-free { background: transparent !important; }

#view-forecast .fc-daycell.cell-green.today { background: #eefaf1 !important; }
#view-forecast .fc-daycell.cell-amber.today { background: #fff7ed !important; }
#view-forecast .fc-daycell.cell-red.today { background: #fef2f2 !important; }

/* 库存预测：单元格单独悬停高亮，点击进详情 */
#view-forecast .fc-table tbody tr:hover td { background: inherit; }
#view-forecast .fc-table tbody tr:hover td.fc-name-cell { background: #fbfcfe; }
#view-forecast .fc-daycell { cursor: pointer; transition: box-shadow .12s; }
#view-forecast .fc-daycell:hover { box-shadow: inset 0 0 0 2px rgba(22, 115, 221, .45); }
#view-forecast .fc-daycell.cell-green:hover { background: #e3f7ea !important; }
#view-forecast .fc-daycell.cell-amber:hover { background: #ffeddb !important; }
#view-forecast .fc-daycell.cell-red:hover { background: #fde6e6 !important; }

/* 日历：今天用浅色标记，选中才用蓝框，避免看起来两个都选中 */
.fc-day.today { box-shadow: inset 0 0 0 1px #bcd8ff; }
.fc-day.sel { box-shadow: inset 0 0 0 2px var(--blue) !important; }

/* 行悬停时保持各自色块，只有所指格子加深 */
#view-forecast .fc-table tbody tr:hover td.fc-daycell.cell-green { background: #eefaf1; }
#view-forecast .fc-table tbody tr:hover td.fc-daycell.cell-amber { background: #fff7ed; }
#view-forecast .fc-table tbody tr:hover td.fc-daycell.cell-red { background: #fef2f2; }
#view-forecast .fc-table tbody tr:hover td.fc-name-cell { background: #fbfcfe; }
#view-forecast .fc-daycell:hover.cell-green { background: #e3f7ea !important; }
#view-forecast .fc-daycell:hover.cell-amber { background: #ffeddb !important; }
#view-forecast .fc-daycell:hover.cell-red { background: #fde6e6 !important; }

/* 库存预测：今天表头与其它日期样式一致 */
#view-forecast .fc-th-day.today span { color: inherit !important; font-weight: inherit !important; }
#view-forecast .fc-th-day.today { background: transparent !important; }

#view-forecast .fc-th-day.today span { color: #374151 !important; font-weight: 600 !important; }

/* 库存预测：最后不足 7 天时补空白列，宽度与底色统一 */
#view-forecast .fc-th-pad { background: #fafbfd; }
#view-forecast .fc-daycell.fc-pad { background: #f8fafc !important; border-right: 1px solid #eef2f7; }

/* 今天表头底色与其它列一致 */
#view-forecast .fc-th-day.today { background: #fafbfd !important; }

/* 库存预测：设备行补充统计标签 */
#view-forecast .fc-name-cell { padding: 14px 16px !important; }
#view-forecast .fc-name-main i { display: block; margin-top: 3px; }
.fc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.fc-tags b {
  font-weight: 500; font-size: 11.5px; line-height: 18px;
  padding: 0 6px; border-radius: 4px; white-space: nowrap;
}
.fc-tags .t-rent { color: #1d4ed8; background: #eef4ff; }
.fc-tags .t-wait { color: #b45309; background: #fff7ed; }
.fc-tags .t-over { color: #b91c1c; background: #fef2f2; }
.fc-tags .t-rate { color: #4b5563; background: #f3f5f9; }

.fc-tags .t-idle { color: #15803d; background: #eefaf1; }

/* 库存预测分页条：与订单列表一致的排版 */
#view-forecast .fc-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.fc-pager-right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #4b5563; }
.fc-pager-right b { color: #111827; }
.fc-pager-right .fc-size { height: 30px; }
.fc-pager-right .jump-input { width: 56px; height: 30px; text-align: center; }

/* 库存预测：行更紧凑，保证 7 行 + 分页在首屏内 */
#view-forecast .fc-name-cell { padding: 9px 14px !important; }
#view-forecast .fc-thumb { width: 34px !important; height: 42px !important; margin-right: 10px !important; }
#view-forecast .fc-name-main b { font-size: 13px; }
#view-forecast .fc-name-main i { font-size: 11px; margin-top: 1px; }
.fc-tags { margin-top: 4px; gap: 5px; }
.fc-tags b { font-size: 11px; line-height: 17px; padding: 0 5px; }
#view-forecast .fc-daycell { padding: 6px 4px !important; }
#view-forecast .fc-table td { height: 62px; }

/* 行高自适应，避免标签压到下一行 */
#view-forecast .fc-table td { height: auto !important; }
#view-forecast .fc-name-cell { padding: 10px 14px !important; }
#view-forecast .fc-thumb { width: 32px !important; height: 40px !important; }
#view-forecast .fc-name-main b { line-height: 18px; }
.fc-tags { margin-bottom: 1px; }

/* 再压缩一点，保证分页完整可见 */
#view-forecast .fc-name-cell { padding: 7px 14px !important; }
#view-forecast .fc-name-main i { margin-top: 0; }
.fc-tags { margin-top: 3px; }
#view-forecast .fc-pager { padding: 8px 16px; }

/* 库存预测分页：去掉分割线与左侧日期 */
#view-forecast .fc-pager { border-top: 0; justify-content: flex-end; padding: 6px 16px 10px; }
#view-forecast .fc-range { display: none; }

/* 库存预测：分页移出卡片，浮在卡片下方 */
#view-forecast .fc-pager { background: transparent; padding: 10px 2px 0; }

/* 库存预测：8 天铺满宽度 */
#view-forecast .fc-table { width: 100%; table-layout: fixed; }
#view-forecast .fc-scroll { overflow: visible; }
#view-forecast .fc-th-day, #view-forecast .fc-daycell { padding-left: 2px !important; padding-right: 2px !important; }

/* 拖动时只移动日期区域，设备列保持不动 */
#view-forecast .fc-daycell, #view-forecast .fc-th-day, #view-forecast .fc-th-pad { will-change: transform; }

/* 库存预测：连续横向滚动 + 设备列吸附 */
#view-forecast .fc-scroll { overflow: auto; scrollbar-width: none; }
#view-forecast .fc-scroll::-webkit-scrollbar { height: 0; width: 0; }
#view-forecast .fc-table { width: auto; table-layout: fixed; }
#view-forecast .fc-th-name,
#view-forecast .fc-name-cell {
  position: sticky; left: 0; z-index: 3;
  background: #fff;
  box-shadow: 1px 0 0 #eef2f7;
}
#view-forecast .fc-table thead .fc-th-name { background: #fafbfd; z-index: 4; }
#view-forecast .fc-daycell, #view-forecast .fc-th-day { transform: none !important; }

/* 拖动体验优化 */
body.dragging-x, body.dragging-x * { cursor: grabbing !important; user-select: none !important; }
#view-forecast .fc-scroll { cursor: grab; overscroll-behavior-x: contain; }
#view-forecast .fc-scroll.panning { cursor: grabbing; }
#view-forecast .fc-scroll { -webkit-overflow-scrolling: touch; }

/* 表格区域整体可拖动，避免选中文本打断 */
#view-forecast .fc-scroll, #view-forecast .fc-table { user-select: none; -webkit-user-select: none; touch-action: pan-y; }
#view-forecast .fc-daycell { cursor: grab; }
#view-forecast .fc-scroll.panning .fc-daycell { cursor: grabbing; }

/* 库存预测：默认普通指针，长按后变抓手 */
#view-forecast .fc-scroll,
#view-forecast .fc-table,
#view-forecast .fc-daycell,
#view-forecast .fc-th-day { cursor: default; }
#view-forecast .fc-scroll.panning,
#view-forecast .fc-scroll.panning .fc-daycell,
#view-forecast .fc-scroll.panning .fc-th-day { cursor: grabbing !important; }

/* 拖动时只移动日期区域，设备列保持不动 */
/* 表头日期区提示可拖动：悬停即显示抓手 */
#view-forecast .fc-th-day,
#view-forecast .fc-th-pad { cursor: grab; }
#view-forecast .fc-scroll.panning .fc-th-day { cursor: grabbing !important; }

/* 数字格可点击查看详情：悬停显示手型指针 */
#view-forecast .fc-daycell { cursor: pointer; }
#view-forecast .fc-scroll.panning .fc-daycell { cursor: grabbing !important; }

/* 拖动过程中不跟随鼠标高亮，避免阴影乱跳 */
#view-forecast .fc-scroll.panning .fc-daycell:hover { box-shadow: none !important; }
#view-forecast .fc-scroll.panning .fc-daycell.cell-green { background: #eefaf1 !important; }
#view-forecast .fc-scroll.panning .fc-daycell.cell-amber { background: #fff7ed !important; }
#view-forecast .fc-scroll.panning .fc-daycell.cell-red { background: #fef2f2 !important; }
#view-forecast .fc-scroll.panning .fc-daycell { cursor: grabbing !important; }

/* 设备列与日期区的分割线更细更淡 */
#view-forecast .fc-th-name,
#view-forecast .fc-name-cell {
  box-shadow: none !important;
  border-right: 1px solid #eef2f7 !important;
  border-left: 0 !important;
}

/* 库存预测：设备类型筛选（参考图1） */
.fc-types {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px; margin: 0 0 10px;
  background: #f5f7fa; border-radius: 999px;
}
.fc-type {
  height: 30px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: #4b5563; font-size: 13px;
}
.fc-type:hover { color: #111827; }
.fc-type.active { background: #0f172a; border-color: #0f172a; color: #fff; font-weight: 500; }

/* 类型筛选与品牌筛选样式一致、左对齐 */
.fc-types {
  display: flex; align-items: center; gap: 8px;
  padding: 0; margin: 0 0 10px;
  background: transparent; border-radius: 0;
}
.fc-type {
  height: 32px; padding: 0 16px;
  border: 1px solid #e5eaf2; border-radius: 999px;
  background: #fff; color: #374151; font-size: 13px;
  transition: border-color .15s, background .15s, color .15s;
}
.fc-type:hover { border-color: #cfe0f6; color: #111827; }
.fc-type.active {
  background: #0f172a; border-color: #0f172a; color: #fff; font-weight: 500;
}

/* 类型胶囊与品牌胶囊尺寸完全一致 */
.fc-type {
  height: 30px; padding: 0 14px; font-size: 13px;
  border-radius: 999px; line-height: 28px;
}

/* 库存预测：去掉标题与统计文字，仅保留右上操作 */
#view-forecast .fc-title,
#view-forecast .fc-sub { display: none; }
#view-forecast .fc-head { min-height: 0; padding-bottom: 6px; align-items: center; }
#view-forecast .fc-head-left { display: none; }

#view-forecast .fc-head { justify-content: flex-end; }

/* 库存预测：设备搜索框 */
.fc-filter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.fc-filter-row .fc-types { margin-bottom: 0; }
.fc-search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  width: 260px; height: 32px; padding: 0 10px;
  background: #fff; border: 1px solid #e5eaf2; border-radius: 999px;
  transition: border-color .15s, box-shadow .15s;
}
.fc-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.fc-search svg { color: #9aa5b5; flex: none; }
.fc-search input { flex: 1; min-width: 0; height: 30px; border: 0; outline: none; background: none; font-size: 13px; color: #111827; }
.fc-search input::placeholder { color: #b7bfca; }
.fc-q-clear { flex: none; width: 18px; height: 18px; border: 0; border-radius: 50%; background: #eef2f7; color: #7b8698; font-size: 13px; line-height: 1; }
.fc-q-clear:hover { background: #e2e8f0; color: #374151; }

/* 库存预测：类型行整合搜索与操作按钮，去掉顶部空白 */
#view-forecast { padding-top: 4px; }
#view-forecast .fc-head { display: none; }
#view-forecast .fc-filter-row { gap: 10px; margin-bottom: 10px; }
#view-forecast .fc-search { margin-left: auto; }
#view-forecast .fc-actions { display: flex; gap: 8px; }

/* 订单表格：滚动吸附到整行，避免顶部出现半行/双线 */
#view-orders .table-wrap { scroll-snap-type: y proximity; }
#view-orders .table-wrap tbody tr { scroll-snap-align: start; }
#view-orders .table-wrap tbody tr:first-child { scroll-snap-align: start; }

/* 订单表格：顶部渐隐，弱化滚动时的半行边线 */
#view-orders .table-card { position: relative; }
#view-orders .table-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px;
  background: linear-gradient(#ffffff, rgba(255,255,255,0));
  pointer-events: none; z-index: 5;
}

/* 订单表格：表头吸顶，滚动时半行被表头遮住，不再出现多余横线 */
#view-orders .table-wrap thead th {
  position: sticky; top: 0; z-index: 8;
  background: #eef3f9;
  box-shadow: inset 0 -1px 0 var(--border);
}
#view-orders .table-card::before { display: none; }

/* 取消滚动吸附，避免表格自动滚动 */
#view-orders .table-wrap { scroll-snap-type: none; }
#view-orders .table-wrap tbody tr { scroll-snap-align: none; }

/* 订单表格：阻止滚动锚定导致的自动位移；去掉底部重复线 */
#view-orders .table-wrap { overflow-anchor: none; }
#view-orders table.data tbody tr:last-child td { border-bottom: 0; }
#view-orders .table-wrap table { border-bottom: 0; }

/* 物流时效弹窗 */
.tm-modal {
  width: 620px; max-width: calc(100vw - 40px); max-height: 86vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.tm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.tm-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; color: #111827; }
.tm-title svg { color: #f59e0b; }
.tm-sub { margin-top: 6px; font-size: 12.5px; color: #8a94a6; }
.tm-bulk {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 22px; background: #f8fafc; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: #4b5563;
}
.tm-bulk label { display: inline-flex; align-items: center; gap: 4px; }
.tm-bulk input { width: 52px; height: 28px; text-align: center; }
.tm-bulk .btn { height: 28px; padding: 0 10px; font-size: 12.5px; }
.tm-list { flex: 1; min-height: 0; overflow: auto; padding: 0 22px; }
.tm-row {
  display: grid; grid-template-columns: 1fr 108px 108px; gap: 10px;
  align-items: center; padding: 8px 0; border-bottom: 1px solid #f2f5f9;
  font-size: 13.5px; color: #111827;
}
.tm-row-head { position: sticky; top: 0; background: #fff; font-size: 12.5px; color: #8a94a6; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tm-row-head span:nth-child(2), .tm-row-head span:nth-child(3) { text-align: center; }
.tm-prov { color: #374151; }
.tm-in { height: 32px; text-align: center; }
.tm-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 22px; border-top: 1px solid var(--border); }
.tm-count { font-size: 12.5px; color: #8a94a6; }
.tm-actions { display: flex; gap: 10px; }

/* 物流时效：发货地切换 */
.tm-origin {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 22px; background: #f8fafc; border-bottom: 1px solid var(--border);
  font-size: 13px; color: #374151;
}
.tm-origin-label { color: #111827; font-weight: 500; }
.tm-origin-select { width: 150px; height: 30px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.tm-bulk-inline { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #6b7280; }
.tm-bulk-inline input { width: 48px; height: 28px; text-align: center; }

/* 发货地选择不要撑满 */
.tm-origin-select { width: 200px; flex: none; }

.tm-origin .tm-origin-select { width: 220px !important; min-width: 160px; flex: none !important; }

/* 物流时效：表头与输入框居中对齐 */
.tm-row { grid-template-columns: 1fr 108px 108px; }
.tm-row > span:nth-child(2),
.tm-row > span:nth-child(3) { display: flex; justify-content: center; align-items: center; }
.tm-row-head span:nth-child(2),
.tm-row-head span:nth-child(3) { justify-content: center; text-align: center; }
.tm-in { width: 88px; text-align: center; }

/* 发货地下拉：强制可见与正常高度 */
.tm-origin .tm-origin-select {
  display: block !important;
  height: 32px !important;
  min-height: 32px !important;
  opacity: 1 !important;
  padding: 0 10px !important;
  line-height: 30px !important;
  color: #374151 !important;
  background-color: #fff !important;
}

.tm-origin .tm-origin-select { -webkit-appearance: none; appearance: none; }

/* 发货地下拉更紧凑 */
.tm-origin .tm-origin-select { width: 140px !important; min-width: 120px; }

.tm-origin .tm-origin-select {
  border: 1px solid #dfe4ec; border-radius: 6px;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa5b5' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>") no-repeat right 10px center !important;
  padding-right: 28px !important;
}

/* 类型行只留搜索框并加长，操作按钮下移到品牌行 */
#view-forecast .fc-filter-row { gap: 0; }
#view-forecast .fc-search { flex: 1; width: auto; max-width: none; margin-left: 12px; }
#view-forecast .fc-bar { display: flex; align-items: center; gap: 12px; }
#view-forecast .fc-legend-inline { margin-left: auto; }
#view-forecast .fc-bar .fc-actions { flex: none; }

/* 排版收敛：搜索框定宽，行间距统一 */
#view-forecast .fc-filter-row { gap: 10px; margin-bottom: 12px; }
#view-forecast .fc-search { flex: none; width: 340px; max-width: 340px; margin-left: 8px; }
#view-forecast .fc-bar { gap: 10px; padding-bottom: 2px; }

/* 搜索框右对齐，与下方按钮形成右侧栏 */
#view-forecast .fc-search { margin-left: auto; }

/* 保证今天这一列也按状态填色（覆盖旧的高亮清除规则） */
#view-forecast .fc-daycell.today.cell-green { background: #eefaf1 !important; }
#view-forecast .fc-daycell.today.cell-amber { background: #fff7ed !important; }
#view-forecast .fc-daycell.today.cell-red { background: #fef2f2 !important; }

/* 两行筛选左边缘严格对齐 */
#view-forecast .fc-filter-row,
#view-forecast .fc-bar { padding-left: 0 !important; margin-left: 0 !important; }
#view-forecast .fc-types,
#view-forecast .fc-brands { margin-left: 0 !important; padding-left: 0 !important; border-left: 0 !important; }

/* 抵消父级左内边距，两行左缘对齐 */
#view-forecast .fc-filter-row { margin-left: -20px !important; padding-left: 0 !important; }

/* 右侧也对齐：搜索框与按钮右缘一致 */
#view-forecast .fc-filter-row { margin-right: -20px !important; }
#view-forecast .fc-legend-inline { margin-left: auto !important; margin-right: 0 !important; }
#view-forecast .fc-actions { margin-left: 0 !important; }

/* 收紧两行之间的留白 */
#view-forecast .fc-filter-row { margin-bottom: 6px !important; }
#view-forecast .fc-bar { margin: 0 !important; padding: 0 0 6px !important; }
#view-forecast { padding-top: 2px !important; }

#view-forecast .fc-bar { margin-top: -14px !important; }

#view-forecast .fc-types, #view-forecast .fc-brands { margin: 0 !important; }
#view-forecast .fc-bar { margin: 0 !important; }

#view-forecast .fc-filter-row { padding: 0 !important; margin: 0 0 6px 0 !important; }

#view-forecast .fc-filter-row { margin-right: -12px !important; }

/* 统一内边距，去掉负边距技巧 */
#view-forecast { padding-left: 0 !important; padding-right: 0 !important; }
#view-forecast .fc-filter-row { margin: 0 0 6px 0 !important; }

/* 设备详情弹窗：去掉标题，信息卡上移，露出更多内容 */
.fc-modal-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.fc-modal-top .fc-device { flex: 1; min-width: 0; margin: 0; }
.fc-modal-top .fc-close-btn { flex: none; margin-top: 6px; }
.fc-modal-body { padding-top: 14px !important; }

/* 详情弹窗关闭按钮：低调无边框，悬停才显现 */
.fc-modal-top .fc-close-btn {
  width: 28px !important; height: 28px !important;
  border: 0 !important; background: transparent !important;
  color: #9aa5b5 !important;
  border-radius: 8px !important;
  margin-top: 4px !important;
  box-shadow: none !important;
}
.fc-modal-top .fc-close-btn:hover { background: #f1f5f9 !important; color: #334155 !important; }
.fc-modal-top .fc-close-btn svg { width: 15px; height: 15px; }

/* 关闭按钮纳入信息卡边框内 */
.fc-modal-top {
  border: 1px solid #e9eef5;
  border-radius: 10px;
  background: #fbfcfe;
  padding: 9px 10px 9px 12px;
  align-items: center;
}
.fc-modal-top .fc-device {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.fc-modal-top .fc-close-btn { margin-top: 0 !important; align-self: center; }

/* 关闭更顺手：热区加大 + 悬停反馈 */
.fc-modal-top .fc-close-btn {
  width: 34px !important; height: 34px !important;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.fc-modal-top .fc-close-btn svg { width: 16px; height: 16px; }
.fc-modal-top .fc-close-btn:hover { background: #eef2f7 !important; color: #111827 !important; }
.fc-modal-top .fc-close-btn:active { background: #e3e9f2 !important; }

/* 库存详情：仅列表区域滚动，其余固定 */
.fc-modal-body { overflow: hidden !important; display: flex; flex-direction: column; }
.fc-day-wrap {
  max-height: calc(100vh - 620px);
  min-height: 140px;
  overflow: auto;
  scrollbar-width: thin;
}
.fc-day-wrap thead th { position: sticky; top: 0; background: #fff; z-index: 2; }
.fc-day-head { flex: none; }
.fc-calendar, .fc-month-row, .fc-legend, .fc-modal-top { flex: none; }

/* 日历空白格与日期格同高 */
.fc-day.empty { height: 48px !important; min-height: 0 !important; padding: 0; background: #f7f9fc !important; border-color: transparent !important; }

/* 月份切换按钮状态更明显 */
.fc-month-btn {
  background: #f1f4f9 !important; color: #4b5563 !important;
  border: 1px solid #e8edf4 !important;
  transition: background .15s, color .15s, border-color .15s;
}
.fc-month-btn:hover { background: #e8eef7 !important; color: #111827 !important; }
.fc-month-btn.active,
.fc-month-btn#fc-now.active {
  background: var(--blue) !important; color: #fff !important; border-color: var(--blue) !important;
}
.fc-month-btn.ghost.active { background: var(--blue) !important; color: #fff !important; }

/* 设备管理 */
#view-devices { padding: 18px 0 0; }
.dv-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dv-title { font-size: 20px; font-weight: 600; color: #111827; }
.dv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dv-btn {
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #e5eaf2; background: #fff; color: #374151; font-size: 13px;
}
.dv-btn:hover { border-color: #cfe0f6; color: var(--blue); }
.dv-btn.primary { background: #22c55e; border-color: #22c55e; color: #fff; }
.dv-btn.primary:hover { background: #16a34a; border-color: #16a34a; color: #fff; }
.dv-brands { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f7f9fc; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
.dv-brand { height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: #4b5563; font-size: 13px; }
.dv-brand:hover { color: #111827; }
.dv-brand.active { background: #0f172a; color: #fff; }
.dv-list { display: flex; flex-direction: column; gap: 14px; }
.dv-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 16px;
}
.dv-thumb {
  width: 96px; height: 96px; flex: none; border-radius: 8px;
  background: #f7f9fc; color: #b7c0cd; font-size: 12px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px;
}
.dv-main { flex: 1; min-width: 0; }
.dv-name { font-size: 16px; font-weight: 600; color: #111827; }
.dv-sku { margin-top: 8px; font-size: 12.5px; color: #9aa5b5; }
.dv-side { display: flex; align-items: flex-start; gap: 28px; }
.dv-price { font-size: 14px; color: #111827; min-width: 48px; text-align: right; }
.dv-stock { font-size: 12.5px; color: #9aa5b5; text-align: right; }
.dv-stock-label { display: block; margin-bottom: 2px; }
.dv-stock b { font-size: 18px; color: #15803d; margin-right: 4px; }
.dv-stock b.none { color: #9aa5b5; }
.dv-ops { display: flex; gap: 6px; }
.dv-op { width: 28px; height: 28px; border-radius: 6px; border: 0; background: none; color: #9aa5b5; font-size: 14px; }
.dv-op:hover { background: #eef5ff; color: var(--blue); }
.dv-op.danger:hover { background: #fef2f2; color: #dc2626; }
.dv-empty { padding: 40px; text-align: center; color: #9aa5b5; background: #fff; border-radius: 12px; border: 1px solid #eef2f7; }

/* 设备管理：类型筛选行 */
.dv-types { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dv-type { height: 32px; padding: 0 16px; border-radius: 999px; border: 1px solid #e5eaf2; background: #fff; color: #374151; font-size: 13px; }
.dv-type:hover { border-color: #cfe0f6; color: #111827; }
.dv-type.active { background: #0f172a; border-color: #0f172a; color: #fff; font-weight: 500; }

/* 设备管理：顶部搜索框替代标题 */
.dv-head { align-items: center; }
.dv-search {
  display: flex; align-items: center; gap: 8px;
  width: 360px; height: 36px; padding: 0 12px;
  border: 1px solid #e5eaf2; border-radius: 8px; background: #fff;
}
.dv-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.dv-search svg { color: #9aa5b5; flex: none; }
.dv-search input { flex: 1; min-width: 0; height: 34px; border: 0; outline: none; background: none; font-size: 13.5px; color: #111827; }
.dv-search input::placeholder { color: #b7bfca; }
.dv-q-clear { flex: none; width: 18px; height: 18px; border: 0; border-radius: 50%; background: #eef2f7; color: #7b8698; font-size: 13px; line-height: 1; }
.dv-q-clear:hover { background: #e2e8f0; color: #374151; }

/* 设备管理：统一对齐，去掉品牌行灰底阴影 */
#view-devices { padding: 16px 0 0 !important; }
.dv-head { margin: 0 0 12px !important; }
.dv-types { margin: 0 0 10px !important; padding: 0 !important; }
.dv-brands {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 16px !important;
}
.dv-head, .dv-types, .dv-brands, .dv-list { width: 100%; }

/* 设备管理：品牌胶囊与类型胶囊样式一致 */
.dv-brand {
  height: 32px; padding: 0 16px;
  border: 1px solid #e5eaf2; border-radius: 999px;
  background: #fff; color: #4b5563; font-size: 13px;
}
.dv-brand:hover { border-color: #cfe0f6; color: #111827; }
.dv-brand.active { background: #0f172a; border-color: #0f172a; color: #fff; font-weight: 500; }

/* 设备管理整体上移，去掉顶部多余留白 */
#view-devices { padding-top: 0 !important; margin-top: -18px !important; }

/* 留出舒适顶部间距 */
#view-devices { margin-top: 0 !important; padding-top: 10px !important; }

/* 设备卡片更紧凑：首屏可见 6 张 */
.dv-list { gap: 10px !important; }
.dv-card { padding: 10px 14px !important; gap: 12px !important; border-radius: 10px !important; }
.dv-thumb { width: 72px !important; height: 72px !important; font-size: 11px; }
.dv-name { font-size: 15px !important; }
.dv-sku { margin-top: 4px !important; font-size: 12px !important; }
.dv-price { font-size: 13px !important; }
.dv-stock { font-size: 12px !important; }
.dv-stock b { font-size: 16px !important; }
.dv-side { gap: 22px !important; }
.dv-op { width: 26px; height: 26px; }

/* 再收一档：首屏 7 张 */
.dv-list { gap: 8px !important; }
.dv-card { padding: 8px 14px !important; }
.dv-thumb { width: 64px !important; height: 64px !important; }
.dv-name { font-size: 14.5px !important; }
.dv-sku { margin-top: 3px !important; }
.dv-stock b { font-size: 15px !important; }

/* 产品类型管理弹窗 */
.tp-modal {
  width: 520px; max-width: calc(100vw - 40px); max-height: 86vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.tp-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.tp-title { font-size: 18px; font-weight: 600; color: #111827; }
.tp-close { border: 0; background: none; color: #9aa5b5; font-size: 18px; width: 30px; height: 30px; }
.tp-body { padding: 16px 20px 10px; display: flex; flex-direction: column; min-height: 0; }
.tp-add { display: flex; gap: 10px; margin-bottom: 14px; }
.tp-input { flex: 1; height: 40px; border: 1px solid #6d5efc !important; border-radius: 10px !important; }
.tp-add-btn {
  width: 100px; height: 40px; border: 0; border-radius: 10px;
  background: #6ee7a8; color: #fff; font-size: 14px; font-weight: 500;
}
.tp-add-btn:hover { background: #4ade80; }
.tp-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.tp-row {
  display: flex; align-items: center; justify-content: space-between;
  background: #f6f8fb; border-radius: 12px; padding: 0 16px; height: 62px;
  cursor: grab; user-select: none;
}
.tp-row.dragging { opacity: .6; cursor: grabbing; background: #eef4ff; box-shadow: 0 6px 18px rgba(15,23,42,.12); }
.tp-name { font-size: 16px; color: #111827; }
.tp-ops { display: flex; align-items: center; gap: 10px; }
.tp-edit { width: 30px; height: 30px; border: 0; background: none; color: #8a94a6; font-size: 15px; }
.tp-edit:hover { color: var(--blue); }
.tp-del { height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: #ffecec; color: #ef4444; font-size: 13px; }
.tp-del:hover { background: #ffdede; }
.tp-hint { margin: 10px 0 4px; text-align: center; font-size: 12px; color: #b7bfca; }
body.dragging-y, body.dragging-y * { cursor: grabbing !important; }

/* 类型/品牌：行内编辑 */
.tp-row.editing { background: #f6f8fb; }
.tp-edit-input {
  flex: 1; height: 40px; margin-right: 12px; padding: 0 12px;
  border: 1px solid #6d5efc; border-radius: 10px;
  font-size: 16px; color: #111827; outline: none; background: #fff;
}
.tp-save { width: 32px; height: 32px; border: 0; background: none; font-size: 17px; color: #6d5efc; }
.tp-save:hover { color: #4f46e5; }
.tp-cancel { width: 32px; height: 32px; border: 0; background: none; font-size: 20px; color: #9aa5b5; }
.tp-cancel:hover { color: #ef4444; }

/* 新增设备弹窗 */
.da-modal {
  width: 460px; max-width: calc(100vw - 40px); max-height: 86vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.da-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.da-title { font-size: 18px; font-weight: 600; color: #111827; }
.da-body { padding: 18px 20px 6px; overflow: auto; }
.da-field { display: block; margin-bottom: 16px; }
.da-label { display: block; margin-bottom: 8px; font-size: 13.5px; color: #6b7280; }
.da-label i { color: #ef4444; font-style: normal; }
.da-control {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid #eef2f7; border-radius: 8px;
  background: #f8fafc; color: #111827; font-size: 14px; outline: none;
}
.da-control:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
select.da-control { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa5b5' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.da-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); }

/* 新增设备：图片上传 */
.da-upload {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 120px; border: 1px dashed #d7dee8; border-radius: 10px;
  background: #f8fafc; cursor: pointer; overflow: hidden;
}
.da-upload:hover { border-color: var(--blue); background: #f5f9ff; }
.da-upload-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #9aa5b5; font-size: 13px; }
.da-upload-icon { font-size: 22px; line-height: 1; color: #b7c0cd; }
.da-upload-preview { max-width: 100%; max-height: 100%; object-fit: contain; }
.da-upload-clear {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: rgba(15, 23, 42, .55); color: #fff; font-size: 14px; line-height: 1;
}
.dv-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }

/* 设备图片上传区：正方形 */
.da-upload {
  width: 168px; height: 168px; aspect-ratio: 1 / 1;
  flex: none; border-radius: 12px;
}
.da-upload-preview { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.da-upload-empty { font-size: 12.5px; }

/* 配件管理 */
.ac-name { display: flex; align-items: center; gap: 10px; font-size: 16px; color: #111827; }
.ac-box { font-style: normal; color: #9aa5b5; font-size: 16px; }
.ac-badge { font-style: normal; font-size: 11.5px; color: #1673dd; background: #eef4ff; border-radius: 4px; padding: 1px 6px; }
.ab-row {
  display: flex; align-items: center; gap: 10px;
  background: #f6f8fb; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px;
  cursor: pointer;
}
.ab-row input { width: 16px; height: 16px; accent-color: #1673dd; }
.ab-name { font-size: 14px; color: #111827; }
.ab-sku { margin-left: auto; font-size: 12px; color: #9aa5b5; }

/* 设备详情弹窗 */
.dd-modal {
  width: min(1180px, calc(100vw - 40px)); height: min(820px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: #f7f9fc; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.dd-topbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #f1f4f9; }
.dd-back { width: 32px; height: 32px; border: 0; background: none; font-size: 18px; color: #374151; }
.dd-topbar-title { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: #111827; }
.dd-topbar-space { width: 32px; }
.dd-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.dd-info { display: flex; align-items: center; gap: 18px; background: #fff; border-radius: 12px; padding: 16px; }
.dd-thumb {
  width: 96px; height: 96px; border-radius: 10px; background: #f7f9fc;
  display: flex; align-items: center; justify-content: center;
  color: #b7c0cd; font-size: 12px; overflow: hidden;
}
.dd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dd-name { font-size: 22px; font-weight: 700; color: #111827; }
.dd-tags { display: flex; gap: 8px; margin-top: 10px; }
.dd-tag { padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 500; }
.dd-tag.blue { background: #1673dd; color: #fff; }
.dd-tag.green { background: #16a34a; color: #fff; }
.dd-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.dd-tab { height: 36px; padding: 0 18px; border-radius: 999px; border: 1px solid #e5eaf2; background: #fff; color: #4b5563; font-size: 13px; }
.dd-tab.active { background: #eef4ff; border-color: #cfe0f6; color: #1673dd; font-weight: 500; }
.dd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.dd-toolbar-left { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #111827; }
.dd-all { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #6b7280; }
.dd-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dd-select { height: 30px; border: 1px solid #e5eaf2; border-radius: 6px; padding: 0 8px; font-size: 12.5px; color: #4b5563; background: #fff; }
.dd-search { height: 30px; width: 140px; border: 1px solid #e5eaf2; border-radius: 6px; padding: 0 10px; font-size: 12.5px; outline: none; }
.dd-btn { height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid #e5eaf2; background: #fff; font-size: 12.5px; color: #374151; }
.dd-btn.blue { background: #1673dd; border-color: #1673dd; color: #fff; }
.dd-btn.dark { background: #111827; border-color: #111827; color: #fff; }
.dd-btn.green { background: #16a34a; border-color: #16a34a; color: #fff; }
.dd-table-wrap { background: #fff; border-radius: 12px; margin-top: 14px; overflow: auto; }
.dd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dd-table th { text-align: left; padding: 12px 10px; color: #6b7280; font-weight: 500; background: #fafbfd; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.dd-table td { padding: 12px 10px; border-bottom: 1px solid #f3f6fa; color: #374151; vertical-align: middle; }
.dd-table .dd-check { width: 36px; }
.dd-state { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.dd-state.green { background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; }
.dd-state.blue { background: #eef4ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.dd-state.amber { background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }
.dd-type-chip { padding: 3px 9px; border-radius: 6px; font-size: 12px; }
.dd-type-chip.purple { background: #eef2ff; color: #4f46e5; border: 1px solid #c7d2fe; }
.dd-type-chip.gray { background: #f1f5f9; color: #6b7280; border: 1px solid #e2e8f0; }
.dd-print { padding: 2px 8px; border-radius: 4px; background: #fffbeb; color: #b45309; border: 1px solid #fde68a; font-size: 12px; }
.dd-ops { display: flex; gap: 6px; }
.dd-op { width: 26px; height: 26px; border: 1px solid #e5eaf2; border-radius: 6px; background: #fff; color: #6b7280; font-size: 12px; }
.dd-op.danger { border-color: #fecaca; color: #ef4444; }

/* 设备详情改为页面视图 */
#view-devicetab { padding: 12px 0 0; }
.dd-page {
  width: 100%; min-height: calc(100vh - 140px);
  display: flex; flex-direction: column;
  background: #f7f9fc; border-radius: 12px; overflow: hidden;
}
.dd-page .dd-scroll { flex: 1; min-height: 0; overflow: visible; padding: 16px; }
.dd-page .dd-topbar { background: #f1f4f9; }

/* 设备详情：信息并入顶栏 */
.dd-page .dd-topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid #eef2f7;
}
.dd-headinfo { display: flex; align-items: center; gap: 14px; }
.dd-page .dd-thumb { width: 48px; height: 48px; border-radius: 8px; background: #f5f7fa; font-size: 11px; }
.dd-headtext { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dd-page .dd-name { font-size: 19px; font-weight: 700; color: #111827; }
.dd-page .dd-tags { display: flex; gap: 8px; margin: 0; }
.dd-page .dd-tag { padding: 2px 9px; font-size: 12px; border-radius: 5px; }
.dd-page .dd-scroll { background: #f7f9fc; }

/* 入库新机弹窗 */
.ib-modal {
  width: 560px; max-width: calc(100vw - 40px); max-height: 88vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.ib-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 10px; }
.ib-title { font-size: 18px; font-weight: 700; color: #111827; }
.ib-body { padding: 0 20px; overflow: auto; }
.ib-field { display: block; margin-bottom: 14px; }
.ib-field.full { margin-bottom: 6px; }
.ib-label { display: block; margin-bottom: 7px; font-size: 13.5px; color: #374151; }
.ib-label i { color: #ef4444; font-style: normal; margin-right: 4px; }
.ib-control {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #e8edf4; border-radius: 8px;
  background: #fff; color: #111827; font-size: 14px; outline: none;
}
.ib-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.ib-hint { margin: 6px 0 0; font-size: 12px; color: #b7bfca; }
.ib-genrow { display: flex; justify-content: flex-end; margin: 8px 0 14px; }
.ib-gen {
  height: 32px; padding: 0 12px; border: 0; border-radius: 8px;
  background: #eef0ff; color: #5b4bdd; font-size: 13px;
}
.ib-gen:hover { background: #e3e6ff; }
.ib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ib-grid .ib-field:nth-child(7) { grid-column: span 2; }
.ib-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 16px; }
.ib-save { background: #22c55e; border-color: #22c55e; color: #fff; }
.ib-save:hover { background: #16a34a; border-color: #16a34a; }

.ib-grid .ib-field:nth-child(9) { grid-column: span 2; }

.ib-grid .ib-field:nth-child(7) { grid-column: auto; }
.ib-grid .ib-field:nth-child(9) { grid-column: span 2; }

/* 入库新机：图片（选填） */
.ib-opt { font-style: normal; color: #b7bfca; font-size: 12px; }
.ib-upload { width: 132px; height: 132px; }

/* 入库新机：排版对齐参考图 */
.ib-grid { gap: 0 18px; }
.ib-field.span2 { grid-column: span 2; }
.ib-codewrap { position: relative; }
.ib-codewrap .ib-control { padding-right: 120px; }
.ib-gen-inline {
  position: absolute; right: 5px; top: 5px; height: 30px; padding: 0 10px;
  border: 0; border-radius: 7px; background: #eef0ff; color: #5b4bdd; font-size: 12.5px;
}
.ib-gen-inline:hover { background: #e3e6ff; }
.ib-upload { width: 104px; height: 104px; }
.ib-upload .da-upload-empty { font-size: 11.5px; }
.ib-upload .da-upload-icon { font-size: 18px; }
.ib-body { padding: 0 20px 4px; }
.ib-field { margin-bottom: 12px; }

.ib-grid .ib-field:nth-child(9) { grid-column: auto; }
.ib-grid .ib-field.span2 { grid-column: span 2; }

/* 入库新机：紧凑不滚动 + 日期仅图标 */
.ib-modal { max-height: 92vh; }
.ib-body { padding: 0 20px; }
.ib-field { margin-bottom: 10px; }
.ib-control { height: 38px; }
.ib-label { margin-bottom: 6px; }
.ib-head { padding: 14px 20px 8px; }
.ib-foot { padding: 10px 20px 14px; }
.ib-upload { width: 96px; height: 96px; }

/* 空日期隐藏“年/月/日”文字，只留日历图标 */
input[type="date"].ib-control:not(.has-value)::-webkit-datetime-edit { color: transparent; }
input[type="date"].ib-control:not(.has-value) { color: transparent; }
input[type="date"].ib-control::-webkit-calendar-picker-indicator { opacity: 1; cursor: pointer; }
input[type="date"].ib-control.has-value { color: #111827; }

/* 编辑设备：顶部设备信息 */
.ib-device-info {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 12px; padding: 10px 12px;
  background: #f6f8fb; border-radius: 8px;
  font-size: 13px; color: #4b5563;
}
.ib-device-name { font-weight: 600; color: #111827; }
.ib-device-meta { color: #9aa5b5; }

/* 打印状态可点击 */
.dd-print { border: 1px solid #fde68a; cursor: pointer; }
.dd-print.done { background: #ecfdf3; color: #15803d; border-color: #bbf7d0; }
#dd-body tr { cursor: pointer; }

/* 设备历史订单 */
.hs-modal {
  width: min(980px, calc(100vw - 40px)); max-height: 86vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.hs-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 10px; }
.hs-title { font-size: 19px; font-weight: 700; color: #111827; }
.hs-sub { padding: 6px 22px 14px; font-size: 13.5px; color: #6b7280; border-bottom: 1px solid var(--border); }
.hs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 14px 22px; background: #fafbfd; border-bottom: 1px solid var(--border); }
.hs-stat { background: #fff; border: 1px solid #eef2f7; border-radius: 10px; padding: 12px 14px; min-height: 92px; }
.hs-stat span { display: block; font-size: 12.5px; color: #9aa5b5; margin-bottom: 8px; }
.hs-stat b { font-size: 18px; font-weight: 600; color: #111827; }
.hs-stat b.green { color: #16a34a; }
.hs-stat i { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: #b7bfca; }
.hs-table-wrap { flex: 1; min-height: 0; overflow: auto; }
.hs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hs-table th { text-align: left; padding: 12px 18px; color: #6b7280; font-weight: 500; background: #fafbfd; border-bottom: 1px solid #eef2f7; }
.hs-table td { padding: 14px 18px; border-bottom: 1px solid #f3f6fa; color: #374151; }
.hs-date { color: #374151; }
.hs-days { margin-left: 8px; padding: 1px 8px; border-radius: 4px; background: #f1f5f9; color: #64748b; font-size: 12px; }
.hs-rent { text-align: right; color: #111827; }
.hs-state { padding: 3px 10px; border-radius: 6px; background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; font-size: 12px; }

/* 设备码按钮 */
.dd-code { border: 0; background: none; padding: 0; color: #1673dd; font-size: 12.5px; cursor: pointer; }
.dd-code:hover { text-decoration: underline; }

/* 小弹窗（图片/二维码） */
.mini-modal {
  width: 340px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.mini-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.mini-title { font-size: 16px; font-weight: 600; color: #111827; }
.mini-body { padding: 16px 18px 18px; text-align: center; }
.devimg { max-width: 100%; max-height: 360px; border-radius: 10px; }
.devimg-empty { padding: 40px 0; color: #9aa5b5; font-size: 13px; }
.qr-canvas { width: 232px; height: 232px; }
.qr-code { margin: 10px 0 14px; font-size: 13px; color: #4b5563; word-break: break-all; }

/* 设备类型与备注列留出空间 */
.dd-table th:nth-child(10), .dd-table td:nth-child(10) { min-width: 190px; }
.dd-table th:nth-child(12), .dd-table td:nth-child(12) { min-width: 120px; }
.dd-note { color: #6b7280; }

/* 首屏恢复视图前先隐藏内容，避免闪一下订单列表 */
body[data-boot] .main { visibility: hidden; }

/* 设备卡片悬停手型指针 */
.dv-card { cursor: pointer; }
.dv-card .dv-ops { cursor: default; }
.dv-card .dv-op { cursor: pointer; }

/* 绑定设备弹窗搜索框 */
.ab-search { margin-bottom: 12px; height: 40px; border: 1px solid #6d5efc !important; }
.ab-row.hidden { display: none; }

/* 绑定设备搜索框加高 */
.ab-search { height: 48px !important; font-size: 14.5px; padding: 0 14px; border-radius: 10px; }

/* 套餐/类型输入框统一正常高度 */
.tp-add { align-items: center; }
.tp-add .tp-input { height: 40px !important; font-size: 14px; border-radius: 8px !important; }
.tp-add .tp-add-btn { height: 40px; }

/* 绑定设备弹窗按内容自适应高度 */
#pkg-bind-modal .tp-modal,
#acc-bind-modal .tp-modal { height: auto; max-height: 76vh; }
#pkg-bind-modal .tp-body,
#acc-bind-modal .tp-body { padding-bottom: 4px; }
#pkg-bind-modal .tp-list,
#acc-bind-modal .tp-list { flex: 0 1 auto; max-height: 46vh; }

/* 绑定弹窗更紧凑 */
#pkg-bind-modal .tp-list,
#acc-bind-modal .tp-list { max-height: 320px; }
#pkg-bind-modal .tp-modal,
#acc-bind-modal .tp-modal { max-height: 72vh; }

/* 绑定搜索框高度加倍 */
.ab-search { height: 72px !important; font-size: 15px; padding: 0 18px; border-radius: 12px; }

/* 搜索框加高：外层定高，内层铺满 */
.ab-search-wrap {
  height: 72px; margin-bottom: 12px;
  border: 1px solid #6d5efc; border-radius: 12px; background: #fff;
  display: flex; align-items: center; padding: 0 18px;
}
.ab-search-wrap:focus-within { box-shadow: 0 0 0 3px rgba(109, 94, 252, .12); }
.ab-search-input {
  width: 100%; height: 100%; border: 0 !important; outline: none;
  background: transparent; font-size: 15px; color: #111827;
}
.ab-search-input::placeholder { color: #b7bfca; }

.ab-search-input { line-height: 70px; }

.ab-search-input { height: 40px !important; line-height: normal; }

/* 绑定弹窗与列表弹窗区分开：更紧凑、更窄 */
#pkg-bind-modal .tp-modal,
#acc-bind-modal .tp-modal { width: 460px; }
#pkg-bind-modal .tp-list,
#acc-bind-modal .tp-list { max-height: 240px; }

/* 搜索框按参考比例：中等高度、小圆角 */
.ab-search-wrap { height: 52px; border-radius: 8px; padding: 0 14px; }
.ab-search-input { height: 36px !important; font-size: 14.5px; }

/* 绑定弹窗：与套餐管理弹窗同宽同高，搜索框同高 */
#pkg-bind-modal .tp-modal,
#acc-bind-modal .tp-modal {
  width: 520px;
  height: 453px;
  max-height: 453px;
}
#pkg-bind-modal .tp-list,
#acc-bind-modal .tp-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; }
.ab-search-wrap { height: 40px; border-radius: 8px; padding: 0 12px; margin-bottom: 12px; }
.ab-search-input { height: 36px !important; font-size: 14px; }

/* 绑定设备悬停提示 */
.bind-tip {
  position: fixed; z-index: 400; max-width: 260px;
  padding: 10px 12px; border-radius: 10px;
  background: #111827; color: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
  font-size: 12.5px; line-height: 1.7;
  pointer-events: none;
}
.bind-tip b { display: block; margin-bottom: 4px; font-size: 12px; color: #cbd5e1; font-weight: 500; }
.bind-tip span { display: block; color: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bind-tip.hidden { display: none; }

.bind-tip { pointer-events: auto; }
.ac-badge { cursor: pointer; }

/* 新增设备：图片上传区按参考比例缩小 */
#dev-add-modal .da-upload { width: 96px; height: 96px; border-radius: 8px; }
#dev-add-modal .da-upload-empty { font-size: 11px; gap: 3px; }
#dev-add-modal .da-upload-icon { font-size: 15px; }
#dev-add-modal .da-upload-clear { width: 20px; height: 20px; font-size: 12px; top: 4px; right: 4px; }

/* 设备卡片拖动排序 */
.dv-card.dragging { opacity: .6; background: #eef4ff; box-shadow: 0 8px 22px rgba(15,23,42,.14); cursor: grabbing; }

/* 拖动时禁止选中文本与残留高亮 */
body.dragging-y, body.dragging-y * { user-select: none !important; -webkit-user-select: none !important; }
.dv-card.dragging, .dv-card.dragging * { user-select: none !important; }
.dv-list { user-select: none; }

/* 管理类弹窗固定高度，列表超出滚动 */
#type-modal .tp-modal,
#brand-modal .tp-modal,
#acc-modal .tp-modal,
#pkg-modal .tp-modal { height: 520px; max-height: 520px; }
#type-modal .tp-list,
#brand-modal .tp-list,
#acc-modal .tp-list,
#pkg-modal .tp-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* 表格横向拖动时禁止选中文字 */
body.panning, body.panning * { user-select: none !important; -webkit-user-select: none !important; }
.table-wrap { user-select: none; }

/* 免押状态标记 */
.dep-flag { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: 12.5px; }
.dep-flag.ok { color: #15803d; background: #ecfdf3; border: 1px solid #bbf7d0; }
.dep-flag.danger { color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; }

/* 弹窗输入框可正常选中文字 */
.da-modal input, .da-modal select, .da-modal textarea { user-select: text; -webkit-user-select: text; }

/* 弹窗内版本标识（用于确认缓存版本） */
.da-build { margin-right: auto; font-size: 11px; color: #c3cad6; letter-spacing: .2px; }

/* 输入被拦截时的兜底入口 */
.input-fallback-chip {
  position: fixed; z-index: 99998;
  padding: 6px 12px; border-radius: 8px;
  background: #111827; color: #fff; border: 0;
  font-size: 12px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .3);
}
.input-fallback-chip:hover { background: #1f2937; }


/* 禁止横向过度滚动触发浏览器“返回上一页”手势 */
html, body { overscroll-behavior-x: none; overscroll-behavior-y: contain; }


/* 设备卡片编辑/删除按钮化，提升辨识度 */
.dv-ops { gap: 8px; }
.dv-op {
  width: 62px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border: 1px solid #e3e9f2; border-radius: 8px;
  background: #fff; color: #56637a;
  font-size: 12.5px; line-height: 1;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.dv-op::before { font-size: 13px; }
.dv-op:hover { border-color: #bcd6f6; background: #f2f7ff; color: var(--blue); }
.dv-op.danger { color: #b04a4a; border-color: #f2dede; }
.dv-op.danger:hover { background: #fef2f2; border-color: #f5c2c2; color: #dc2626; }

/* 自定义下拉（输入框下方展开） */
.selx { position: relative; }
.selx > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.selx-btn {
  width: 100%; height: 100%; min-height: 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: #fff; color: #111827; font-size: 14px; cursor: pointer;
}
.selx-btn.placeholder { color: #9aa5b5; }
.selx-btn svg { color: #9aa5b5; flex: none; }
.selx-panel {
  position: fixed; z-index: 100000;
  max-height: 280px; overflow: auto;
  background: #fff; border: 1px solid #e6ebf2; border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  padding: 6px;
}
.selx-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 12px; border: 0; border-radius: 8px; background: none;
  font-size: 13.5px; color: #374151; cursor: pointer;
}
.selx-item:hover { background: #f1f6ff; color: #1673dd; }
.selx-item.active { background: #e8f1ff; color: #1673dd; font-weight: 600; }

/* 自定义下拉按钮与输入框等高 */
.selx-btn { min-height: 42px; border-radius: 8px; }

/* 可输入的下拉框 */
.selx { position: relative; }
.selx > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.selx-box {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: #fff;
}
.selx-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.selx-box svg { color: #9aa5b5; flex: none; }
.selx-input {
  flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: none; background: transparent;
  font-size: 14px; color: #111827; padding: 0;
}
.selx-input::placeholder { color: #9aa5b5; }
.selx-item, .selx-empty { }
.selx-empty { padding: 10px 12px; color: #9aa5b5; font-size: 13px; }

/* 刷新时避免滚动条出现/消失导致的横向抖动 */
html { scrollbar-gutter: stable; }
#view-orders { transition: none !important; }

/* 设备明细：列宽稳定，不挤压换行，超出横向滚动 */
.dd-table { min-width: 1060px; }
.dd-table th, .dd-table td { white-space: nowrap; padding-left: 8px; padding-right: 8px; }
.dd-table td.dd-note { white-space: normal; min-width: 140px; }
.dd-table .dd-state, .dd-table .dd-print, .dd-table .dd-type-chip { white-space: nowrap; }

/* 库存预测：左侧设备型号栏重新排版 */
#view-forecast .fc-table tbody td.fc-name-cell {
  width: 300px; min-width: 300px;
  padding: 12px 16px !important;
  gap: 12px;
  border-right: 1px solid #eef2f7;
  background: #fff;
  align-items: flex-start;
}
#view-forecast .fc-thumb {
  width: 44px; height: 44px; border-radius: 12px;
  background-color: #f5f8fc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238fa0b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='12' height='20' x='6' y='2' rx='3'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
  background-size: 22px;
  border: 1px solid #e8eef6;
}
#view-forecast .fc-name-main { gap: 3px; min-width: 0; }
#view-forecast .fc-name-main b {
  font-size: 14px; font-weight: 600; color: #111827;
  line-height: 1.35;
}
#view-forecast .fc-name-main i {
  font-size: 10.5px; color: #9aa5b5; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#view-forecast .fc-tags { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 7px; }
#view-forecast .fc-tags b {
  flex: none; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; line-height: 1.6;
  border: 1px solid transparent;
}
#view-forecast .fc-tags .t-rent { color: #1d4ed8; background: #eff5ff; border-color: #dbe8ff; }
#view-forecast .fc-tags .t-idle { color: #15803d; background: #effaf3; border-color: #d6f2e0; }
#view-forecast .fc-tags .t-rate { color: #64748b; background: #f4f6fa; border-color: #e8edf5; }

/* 库存预测：设备栏改为浅色底，与日期格区分 */
#view-forecast .fc-table tbody td.fc-name-cell {
  background: #f1f6fc;
  border-right: 1px solid #e2eaf5;
}
#view-forecast .fc-table tbody tr:hover td.fc-name-cell { background: #e8f1ff; }
#view-forecast .fc-table thead th:first-child { background: #e9f1fb; border-right: 1px solid #e2eaf5; }

/* 设备栏缩略图与底色统一，去掉灰块 */
#view-forecast .fc-thumb {
  background-color: rgba(255, 255, 255, .72);
  border: 1px solid #dbe6f4;
}
#view-forecast .fc-table thead th:first-child { background: #e4eefb; }

/* 库存预测：表头首列与设备栏底色一致，去掉渐变 */
#view-forecast .fc-table thead th:first-child,
#view-forecast .fc-table thead th.fc-th-name {
  background: #f1f6fc !important;
  background-image: none !important;
  box-shadow: none !important;
  border-right: 1px solid #e2eaf5;
}

/* 表头首列改为与右侧其他表头一致 */
#view-forecast .fc-table thead th:first-child,
#view-forecast .fc-table thead th.fc-th-name {
  background: #f8fafc !important;
  background-image: none !important;
  border-right: 1px solid #e8eef6 !important;
}

/* 设备栏每行分隔线与右侧视觉一致 */
#view-forecast .fc-table tbody td.fc-name-cell {
  border-bottom: 1px solid #e6edf6;
}
#view-forecast .fc-table tbody tr:last-child td.fc-name-cell { border-bottom: 0; }

/* 表头首列颜色与其余表头完全一致 */
#view-forecast .fc-table thead th:first-child,
#view-forecast .fc-table thead th.fc-th-name {
  background: #fafbfd !important;
  background-color: #fafbfd !important;
  background-image: none !important;
  border-right: 1px solid #eef2f7 !important;
}

/* 库存预测：设备型号表头更饱满 */
#view-forecast .fc-table thead th.fc-th-name {
  padding: 12px 16px 11px !important;
  text-align: left;
}
#view-forecast .fc-th-main { display: flex; align-items: center; gap: 8px; }
#view-forecast .fc-th-title {
  font-size: 13.5px; font-weight: 600; color: #334155; letter-spacing: .2px;
}
#view-forecast .fc-th-badge {
  padding: 1px 8px; border-radius: 999px;
  background: #eef4ff; color: #3b6fd4; border: 1px solid #dbe7fb;
  font-size: 10.5px; font-weight: 500; line-height: 1.7;
}
#view-forecast .fc-th-sub {
  display: block; margin-top: 3px;
  font-size: 10.5px; color: #9aa5b5; letter-spacing: .1px;
}

/* 自定义下拉：彻底隐藏原生 select，避免双箭头/双框 */
.selx > select { display: none !important; }

/* 物流时效：发货地原生下拉隐藏，避免出现两个下拉框 */
.tm-origin .selx > select { display: none !important; opacity: 0 !important; }

/* 发货地下拉宽度对齐 */
.tm-origin .selx { width: 200px; flex: none; }
.tm-origin .selx-box { width: 200px; }

/* 普通未免押：灰色标记 */
.dep-flag {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-size: 12.5px; line-height: 1.6;
  color: #6b7280; background: #f3f5f9; border: 1px solid #e5eaf2;
}

/* 库存预测：设备栏改为浅灰底 */
#view-forecast .fc-table tbody td.fc-name-cell {
  background: #f7f8fa;
  border-right: 1px solid #e9edf3;
  border-bottom: 1px solid #e9edf3;
}
#view-forecast .fc-table tbody tr:hover td.fc-name-cell { background: #f1f3f6; }

/* 自定义下拉：任何情况下都隐藏被增强的原生 select */
.selx select[data-selx],
.selx-box + select[data-selx] { display: none !important; }

/* 打印快递单：排版规整 */
#express-modal .ex-body { padding: 18px 26px 8px; }
#express-modal .ex-field { margin-bottom: 16px; }
#express-modal .ex-field .ex-label {
  display: block; margin-bottom: 8px;
  font-size: 13px; color: #6b7280;
}
#express-modal .ex-field .ex-row {
  display: flex; align-items: center; gap: 12px;
  padding: 0; border: 0;
}
#express-modal #ex-date {
  width: 220px; height: 48px; flex: none;
  border-radius: 10px; font-size: 14px;
}
#express-modal .ex-field .selx { flex: 1; min-width: 0; }
#express-modal .ex-field .selx-box { height: 48px; border-radius: 10px; }
#express-modal .ex-stepper {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden;
  height: 48px;
}
#express-modal .ex-step-btn {
  width: 52px; height: 100%;
  border: 0; background: #f7f9fc; color: #4b5563;
  font-size: 17px; cursor: pointer;
}
#express-modal .ex-step-btn:hover { background: #eef5ff; color: var(--blue); }
#express-modal .ex-count {
  width: 86px; height: 100%; border: 0;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  border-radius: 0; text-align: center; font-size: 15px;
}
#express-modal .ex-tip { margin-top: 6px; padding: 12px 14px; border-radius: 10px; }
#express-modal .ex-foot { padding: 14px 26px; }
#express-modal .ex-actions .btn { height: 40px; }

/* 预约时间两个控件等宽 */
#express-modal #ex-date { flex: 1 1 0 !important; width: auto !important; min-width: 0; }
#express-modal .ex-field .selx { flex: 1 1 0; }

/* 预约时间：日期与时间段等分 */
#express-modal .ex-field .ex-row > * {
  flex: 1 1 0 !important; width: auto !important; min-width: 0;
}
#express-modal .ex-field .cs-wrap { width: auto !important; flex: 1 1 0; }
#express-modal .ex-field .cs-trigger { width: 100% !important; }

/* 预约时间等宽（固定 50%） */
#express-modal .ex-field .ex-row { display: flex !important; gap: 12px; }
#express-modal .ex-field #ex-date { flex: 0 0 calc(50% - 6px) !important; width: calc(50% - 6px) !important; }
#express-modal .ex-field .cs-wrap { flex: 0 0 calc(50% - 6px) !important; width: calc(50% - 6px) !important; }

/* 打印个数步进器：三等分 */
#express-modal .ex-field .ex-row { align-items: center; }
#express-modal .ex-stepper {
  display: grid !important;
  grid-template-columns: 52px 1fr 52px;
  width: 236px !important; height: 48px;
  align-items: stretch;
}
#express-modal .ex-count {
  width: 100% !important; height: 100% !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
}
#express-modal .ex-step-btn { width: 100% !important; height: 100% !important; }

/* 设备卡片：类型 / 品牌标签 */
.dv-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dv-tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 11px; font-weight: 500; line-height: 1;
  white-space: nowrap;
}
.dv-tag.type { color: #1673dd; background: #eaf2fd; border: 1px solid #d6e6fb; }
.dv-tag.brand { color: #6b7280; background: #f4f6fa; border: 1px solid #e8edf5; }
.dv-title .dv-name { font-size: 14.5px; font-weight: 600; color: #111827; }

/* 设备卡片：标签移到 SKU 行 */
.dv-title { display: block; }
.dv-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.dv-meta .dv-sku { font-size: 12.5px; color: #9aa5b5; margin: 0; }
.dv-meta .dv-tag { height: 18px; padding: 0 6px; font-size: 10.5px; }

/* 设备卡片：名称更靠上、字号更大 */
.dv-card .dv-main { justify-content: center; padding-top: 0; }
.dv-card .dv-title { margin: -5px 0 0; }
.dv-card .dv-title .dv-name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.dv-card .dv-meta { margin-top: 4px; }

/* 设备类型标签改为灰色 */
.dv-tag.type {
  color: #6b7280;
  background: #f4f6fa;
  border: 1px solid #e8edf5;
}

/* 通用确认弹窗 */
.cf-modal {
  width: 380px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .26);
}
.cf-head { padding: 18px 20px 0; }
.cf-title { font-size: 16px; font-weight: 600; color: #111827; }
.cf-body { padding: 10px 20px 18px; font-size: 13.5px; color: #6b7280; line-height: 1.7; }
.cf-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafbfd; }
.btn.btn-danger { background: #ef4444; border-color: #ef4444; color: #fff; }
.btn.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

/* 设备卡片：状态胶囊 */
.dv-side { display: flex; align-items: center; gap: 12px; }
.dv-status {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.dv-status.ok { color: #15803d; background: #effaf3; border-color: #d6f2e0; }
.dv-status.tight { color: #b45309; background: #fff8ec; border-color: #fbe6c4; }
.dv-status.full { color: #b91c1c; background: #fef3f2; border-color: #fbd9d5; }

/* 设备卡片：在租/总数胶囊 */
.dv-stock {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
  color: #1673dd; background: #eef5ff; border: 1px solid #dbe8ff;
}

/* 在租胶囊固定宽度，保持整齐 */
.dv-stock { min-width: 108px; justify-content: center; padding: 0 12px; }

/* 胶囊更紧凑 */
.dv-stock { min-width: 92px; padding: 0 9px; height: 22px; font-size: 11px; }
.dv-status { height: 22px; padding: 0 8px; font-size: 11px; }

/* 设备卡片：三枚库存胶囊 */
.dv-chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 22px; min-width: 78px; padding: 0 9px;
  border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
}
.dv-chip.idle.ok { color: #15803d; background: #effaf3; border-color: #d6f2e0; }
.dv-chip.idle.tight { color: #b45309; background: #fff8ec; border-color: #fbe6c4; }
.dv-chip.idle.full { color: #b91c1c; background: #fef3f2; border-color: #fbd9d5; }
.dv-chip.all { color: #4b5563; background: #f4f6fa; border-color: #e8edf5; }
.dv-chip.rent { color: #1673dd; background: #eef5ff; border-color: #dbe8ff; }
.dv-side { gap: 6px; }

/* 开单弹窗更紧凑 */
#modal .ob-modal { width: min(1000px, 92vw) !important; }
#modal .ob-body { padding-left: 22px; padding-right: 22px; }

/* 开单弹窗：整体收窄并右移，避免左侧被裁切 */
#modal .ob-modal { width: min(920px, 88vw) !important; }
#modal .ob-body {
  padding-left: 34px !important; padding-right: 34px !important;
  overflow-x: hidden !important;
}
#modal .ob-grid, #modal .ob-cust, #modal .ob-dev { min-width: 0; }
#modal .ob-grid > *, #modal .ob-cust > *, #modal .ob-dev > * { min-width: 0; }

/* 开单：佣金/结余不折行 */
#modal .ob-static { white-space: nowrap; font-size: 13px; }
#modal .ob-grid-4 { column-gap: 22px; }
#modal .ob-label { width: 66px; font-size: 13.5px; }

/* 订单详情：多台设备卡片 */
.detail-product.stack { margin-top: 8px; }
.detail-product { align-items: center; }

/* 发货配件：白底 + 蓝色描边 */
.parts-box {
  background: #fff;
  border: 1px solid #e6edf7;
}
.parts-item {
  color: #1673dd;
  background: #fff;
  border: 1px solid #bcd7fb;
}

/* 出租设备卡片压缩到一半高度 */
#detail-mid .detail-product {
  padding: 7px 12px;
  gap: 10px;
  border-radius: 8px;
}
#detail-mid .detail-product.stack { margin-top: 6px; }
#detail-mid .detail-thumb {
  width: 48px; height: 48px; border-radius: 8px;
}
#detail-mid .detail-thumb svg { width: 22px; height: 22px; }
#detail-mid .detail-product h4 { font-size: 15px; line-height: 1.3; }
#detail-mid .detail-sn { margin-top: 3px; font-size: 12px; }

/* 订单详情右侧：其他置顶，寄出/寄回预留物流记录空间 */
#detail-side .side-block { padding-top: 14px; }
#detail-side .side-logi-space {
  margin-top: 10px;
  min-height: 66px;
  border: 1px dashed #e3e9f2;
  border-radius: 8px;
  background: #fafbfd;
  display: flex; align-items: center; justify-content: center;
}
#detail-side .side-logi-space span { font-size: 12px; color: #b7bfca; }

/* 交付方式蓝色标签 */
#detail-side .side-chip {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  margin-left: 2px; border-radius: 5px;
  color: #1673dd; background: #f2f7ff; border: 1px solid #bcd7fb;
  font-size: 12px; line-height: 1;
}

/* 订单详情左栏排版整理 */
#detail-main .detail-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0;
}
#detail-main .detail-row .lbl {
  flex: none; width: 96px; text-align: left;
  color: #8b95a5; font-size: 13.5px;
}
#detail-main .detail-row .val { flex: 1; min-width: 0; color: #1f2937; font-size: 13.5px; }
#detail-main .detail-row .money { color: #ef8a1f; font-weight: 600; font-size: 14.5px; }
#detail-main .detail-row .muted { color: #9aa5b5; font-size: 12.5px; }

#detail-main .detail-handover {
  background: #f7f9fc; border: 1px solid #eef2f7; border-radius: 10px;
  padding: 12px 14px; display: block;
}
#detail-main .hd-top { display: flex; align-items: center; gap: 10px; }
#detail-main .hd-name { font-size: 14.5px; font-weight: 600; color: #1f2937; }
#detail-main .hd-phone { font-size: 13.5px; color: #4b5563; }
#detail-main .hd-top .d-head-tag { margin-left: auto; }
#detail-main .hd-addr {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e3e9f2;
}
#detail-main .hd-label { flex: none; font-size: 12.5px; color: #9aa5b5; }
#detail-main .hd-text { flex: 1; min-width: 0; font-size: 13px; color: #4b5563; line-height: 1.6; }

#detail-main .d-kv { row-gap: 8px; }
#detail-main .d-kv-item { padding: 4px 0; }

/* 详情左栏：长单号不重叠 */
#detail-main .detail-row { flex-wrap: wrap; }
#detail-main .detail-row .val { overflow-wrap: anywhere; word-break: break-all; }
#detail-main .detail-row .d-head-tag { flex: none; margin-left: 2px; }

/* 详情抽屉滚动条更细，接近原生 */
#detail-modal .detail-modal { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,.45) transparent; }
#detail-modal .detail-modal::-webkit-scrollbar { width: 8px; }
#detail-modal .detail-modal::-webkit-scrollbar-thumb { background: rgba(148,163,184,.45); border-radius: 8px; }
#detail-modal .detail-modal::-webkit-scrollbar-track { background: transparent; }

/* 详情左栏更紧凑，一屏看完 */
#detail-main .d-sec-title { margin-top: 16px !important; }
#detail-main .detail-row { padding: 5px 0; }
#detail-main .d-kv { row-gap: 6px; }
#detail-main .d-kv-item { padding: 2px 0; }
#detail-main .note-row { margin-top: 2px; }

/* 备注图片位更小，避免撑高 */
#detail-main .d-note-imgs { gap: 8px; }
#detail-main .d-note-img { width: 58px !important; height: 58px !important; border-radius: 8px; }
#detail-main .detail-note { min-height: 58px; display: flex; align-items: center; padding: 0 14px; }

/* 订单详情：压缩到一屏，无需滚动 */
#detail-modal .detail-modal {
  height: calc(100vh - 40px) !important;
  max-height: calc(100vh - 40px) !important;
  min-height: 0 !important;
}
#detail-modal .detail-modal .detail-body { padding-top: 10px !important; padding-bottom: 8px !important; }
#detail-main .d-sec-title { margin-top: 12px !important; margin-bottom: 6px !important; }
#detail-main .detail-row { padding: 4px 0 !important; }
#detail-main .d-kv { row-gap: 4px !important; }
#detail-main .d-kv-item { padding: 1px 0 !important; }
#detail-main .detail-handover { padding: 10px 12px !important; }
#detail-main .detail-note { min-height: 50px !important; }
#detail-main .d-note-img { width: 50px !important; height: 50px !important; }
#detail-mid .detail-product { padding: 6px 10px !important; }
#detail-mid .detail-thumb { width: 42px !important; height: 42px !important; }
#detail-mid .detail-sn { margin-top: 1px !important; }

/* 订单详情头部：加分割线并调整标题 */
#detail-modal .detail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 14px;
  border-bottom: 1px solid #eef2f7;
}
#detail-modal .detail-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .2px;
}
#detail-modal .detail-close { position: static; }
#detail-modal .detail-body { padding-top: 12px !important; }

/* 详情左栏上移，去除顶部空白并进一步压缩 */
#detail-modal .detail-body { padding-top: 4px !important; }
#detail-main { padding-top: 0 !important; }
#detail-main .d-sec-title:first-child { margin-top: 0 !important; }
#detail-main .detail-row { padding: 3px 0 !important; }
#detail-main .detail-note { min-height: 44px !important; }
#detail-main .d-note-img { width: 44px !important; height: 44px !important; }
#detail-main .detail-handover { padding: 8px 12px !important; }
#detail-main .hd-addr { margin-top: 6px; padding-top: 6px; }
#detail-mid .detail-product { padding: 5px 10px !important; }

/* 详情右栏上移，去掉顶部多余留白 */
#detail-side { padding-top: 0 !important; }
#detail-side .side-block:first-child { padding-top: 0 !important; }
#detail-side .side-block { padding-top: 10px !important; }
#detail-side .side-logi-space { min-height: 58px; margin-top: 8px; }

/* 详情中栏上移，去除顶部留白 */
#detail-mid { padding-top: 0 !important; }
#detail-mid > .d-sec-title:first-child { margin-top: 0 !important; }

/* 报销/财务占位页 */
.pv-head { padding: 22px 24px 10px; }
.pv-title { font-size: 19px; font-weight: 600; color: #111827; }
.pv-sub { margin-top: 6px; font-size: 13px; color: #9aa5b5; }
.pv-card {
  margin: 8px 24px 24px; background: #fff; border: 1px solid #eef2f7;
  border-radius: 12px; min-height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.pv-empty { color: #b7bfca; font-size: 13.5px; }

/* 报销管理 */
.exp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px 0; }
.exp-tabs { display: flex; gap: 22px; }
.exp-tab { border: 0; background: none; padding: 0 0 10px; font-size: 15px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; }
.exp-tab.active { color: #1673dd; font-weight: 600; border-bottom-color: #1673dd; }
.exp-apply { height: 38px; }
.exp-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 24px 14px; }
.exp-input { width: 210px; height: 38px; }
.exp-selx { width: 150px; }
.exp-table-wrap { margin: 0 24px 24px; background: #fff; border: 1px solid #eef2f7; border-radius: 12px; overflow: hidden; }
.exp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.exp-table th { text-align: left; padding: 12px 14px; color: #6b7280; font-weight: 500; background: #fafbfd; border-bottom: 1px solid #eef2f7; white-space: nowrap; }
.exp-table td { padding: 12px 14px; border-bottom: 1px solid #f3f6fa; color: #374151; vertical-align: middle; }
.exp-table tr:last-child td { border-bottom: 0; }
.exp-amount { font-weight: 600; }
.exp-amount.out { color: #ef4444; }
.exp-amount.in { color: #15803d; }
.exp-status { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; }
.exp-status.pending { color: #b45309; background: #fff8ec; border: 1px solid #fbe6c4; }
.exp-status.done { color: #15803d; background: #effaf3; border: 1px solid #d6f2e0; }
.exp-thumb { width: 40px; height: 30px; border-radius: 6px; background: #f4f6fa; border: 1px dashed #dfe5ee; display: inline-flex; align-items: center; justify-content: center; color: #b7bfca; font-size: 11px; }
.exp-op { border: 0; background: none; color: #1673dd; font-size: 12.5px; cursor: pointer; padding: 2px 4px; }
.exp-op.danger { color: #dc2626; }
.exp-empty { padding: 56px; text-align: center; color: #b7bfca; font-size: 13px; }

/* 记一笔弹窗 */
.exm-modal { width: 460px; max-width: calc(100vw - 32px); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px rgba(15,23,42,.26); }
.exm-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.exm-title { font-size: 17px; font-weight: 600; color: #111827; }
.exm-close { border: 0; background: none; font-size: 20px; color: #9aa5b5; cursor: pointer; }
.exm-body { padding: 4px 20px 8px; }
.exm-switch { display: flex; background: #f4f6fa; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.exm-sw { flex: 1; height: 38px; border: 0; border-radius: 8px; background: none; font-size: 14px; color: #6b7280; cursor: pointer; }
.exm-sw.active { background: #ef4444; color: #fff; font-weight: 600; }
.exm-switch[data-type="in"] .exm-sw.active { background: #16a34a; }
.exm-amount { display: flex; align-items: center; gap: 6px; padding: 6px 0 10px; border-bottom: 1px solid #eef2f7; }
.exm-amount span { font-size: 22px; color: #ef4444; font-weight: 600; }
.exm-amount input { flex: 1; border: 0; outline: none; font-size: 26px; font-weight: 600; color: #111827; }
.exm-label { margin: 12px 0 8px; font-size: 12.5px; color: #9aa5b5; }
.exm-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.exm-cat { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #e8edf5; background: #f6f8fb; color: #4b5563; font-size: 12.5px; cursor: pointer; }
.exm-cat.active { color: #ef4444; background: #fff5f5; border-color: #fbd5d5; font-weight: 500; }
.exm-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f3f6fa; }
.exm-row span { width: 60px; flex: none; font-size: 13px; color: #4b5563; }
.exm-row .control { flex: 1; height: 38px; }
.exm-upload { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 10px; border: 1px dashed #dfe5ee; background: #fafbfd; cursor: pointer; }
.exm-plus { font-size: 22px; color: #b7bfca; }
.exm-foot { display: flex; gap: 10px; padding: 12px 20px 18px; }
.exm-foot .btn { flex: 1; height: 42px; }

/* 报销勾选与批量 */
.exp-check { width: 15px; height: 15px; accent-color: #1673dd; cursor: pointer; }
#exp-batch:disabled { opacity: .5; cursor: not-allowed; }

/* 报销工具条排版 */
#view-expense .exp-toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 24px 16px; flex-wrap: wrap; }
#view-expense .exp-input { width: 240px; flex: none; height: 38px; }
#view-expense #exp-user { width: 180px; }
#view-expense #exp-status { width: 160px; }
#view-expense .exp-actions { margin-left: auto; display: flex; gap: 10px; }
#view-expense .exp-actions .btn { height: 38px; min-width: 84px; }
#view-expense .exp-head { padding: 18px 24px 10px; align-items: flex-end; }
#view-expense .exp-tabs { gap: 24px; }

/* 报销：申请按钮并入筛选行右侧 */
#view-expense .exp-head { padding: 16px 24px 0; align-items: center; }
#view-expense .exp-actions { gap: 10px; }
#view-expense .exp-apply { min-width: 108px; }

#view-expense .exp-toolbar #exp-status { width: 160px !important; max-width: 160px !important; }

/* 报销筛选行：所有控件统一高度 40px */
#view-expense .exp-toolbar .control,
#view-expense .exp-toolbar select,
#view-expense .exp-actions .btn,
#view-expense .exp-apply {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 8px;
  font-size: 13.5px;
}
#view-expense .exp-toolbar select { padding: 0 30px 0 12px; }
#view-expense .exp-actions .btn { display: inline-flex; align-items: center; justify-content: center; }

/* 状态下拉：去掉原生外观，视觉高度与输入框一致 */
#view-expense .exp-toolbar #exp-status {
  -webkit-appearance: none;
  appearance: none;
  height: 40px !important;
  line-height: 38px !important;
  padding: 0 34px 0 12px !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa5b5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center !important;
  font-size: 13.5px !important;
  color: #374151;
  border: 1px solid var(--border-strong) !important;
  border-radius: 8px !important;
  outline: none;
}
#view-expense .exp-toolbar #exp-status:focus { border-color: #1673dd !important; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }

/* 筛选行输入框与状态框样式完全一致 */
#view-expense .exp-toolbar .exp-input {
  height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-size: 13.5px !important;
  color: #374151;
  box-shadow: none;
}
#view-expense .exp-toolbar .exp-input:focus {
  border-color: #1673dd !important;
  box-shadow: 0 0 0 3px rgba(22,115,221,.08);
}
#view-expense .exp-toolbar .exp-input::placeholder { color: #9aa5b5; }

/* 报销状态：自定义下拉，保证与输入框等高 */
#view-expense .exp-sel { position: relative; width: 160px; flex: none; }
#view-expense .exp-sel-btn {
  width: 100%; height: 40px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 12px; background: #fff; border: 1px solid #d9e0e8; border-radius: 8px;
  font-size: 13.5px; color: #374151; cursor: pointer; box-sizing: border-box;
}
#view-expense .exp-sel-btn svg { color: #9aa5b5; flex: none; }
#view-expense .exp-sel-btn:focus { outline: none; border-color: #1673dd; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
#view-expense .exp-sel-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid #e8edf5; border-radius: 8px; padding: 4px;
  box-shadow: 0 10px 26px rgba(15,23,42,.12);
}
#view-expense .exp-sel-item { padding: 8px 10px; border-radius: 6px; font-size: 13px; color: #374151; cursor: pointer; }
#view-expense .exp-sel-item:hover { background: #f4f7fc; }
#view-expense .exp-sel-item.active { color: #1673dd; background: #eef5ff; font-weight: 500; }

/* 报销时间筛选与金额汇总 */
#view-expense .exp-date { width: 150px; }
#view-expense .exp-date-panel { width: 268px; right: auto; padding: 10px; }
#view-expense .exp-date-presets { display: flex; gap: 6px; margin-bottom: 10px; }
#view-expense .exp-preset {
  flex: 1; height: 30px; border-radius: 6px; border: 1px solid #e8edf5; background: #f7f9fc;
  font-size: 12.5px; color: #4b5563; cursor: pointer;
}
#view-expense .exp-preset.active { color: #1673dd; background: #eef5ff; border-color: #bcd7fb; font-weight: 500; }
#view-expense .exp-date-range { display: flex; align-items: center; gap: 6px; }
#view-expense .exp-date-range .control { flex: 1; min-width: 0; height: 32px; font-size: 12px; padding: 0 6px; border: 1px solid #d9e0e8; border-radius: 6px; }
#view-expense .exp-date-range span { font-size: 12px; color: #9aa5b5; }
#view-expense .exp-date-ok { width: 100%; height: 32px; margin-top: 10px; font-size: 12.5px; }
#view-expense .exp-sum { display: flex; gap: 26px; padding: 0 24px 12px; }
#view-expense .exp-sum-item { font-size: 13px; color: #6b7280; }
#view-expense .exp-sum-item b { margin-left: 8px; font-size: 14px; color: #111827; font-weight: 600; }
#view-expense .exp-sum-item b.done { color: #15803d; }
#view-expense .exp-sum-item b.pending { color: #ef4444; }

/* 筛选下拉文字改为浅灰色 */
#view-expense .exp-sel-btn { color: #8b95a5; }

/* 报销表格列宽拖拽与排序 */
.exp-table th { position: relative; user-select: none; }
.exp-table th.exp-dragging { opacity: .5; }
.exp-resizer {
  position: absolute; top: 0; right: 0; width: 8px; height: 100%;
  cursor: col-resize; z-index: 3;
}
.exp-resizer::after {
  content: ''; position: absolute; top: 25%; left: 3px; width: 1px; height: 50%;
  background: #e0e6ef;
}
.exp-table th:hover .exp-resizer::after { background: #bcd7fb; }

/* 报销表格：隐藏顶部那条分割线 */
#view-expense .exp-table-wrap {
  border-top-color: transparent;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
#view-expense .exp-table thead th { border-top: 0; }

/* 隐藏表头默认竖线分隔，仅悬停时提示可拖拽 */
#view-expense .exp-resizer::after { background: transparent; }
#view-expense .exp-table th:hover .exp-resizer::after { background: #bcd7fb; }

/* 设备明细表：列宽拖拽与排序 */
.dd-table th { position: relative; user-select: none; }
.dd-table th.col-dragging { opacity: .5; }
.col-resizer { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 3; }
.col-resizer::after { content: ''; position: absolute; top: 25%; left: 3px; width: 1px; height: 50%; background: transparent; }
.dd-table th:hover .col-resizer::after,
.exp-table th:hover .col-resizer::after { background: #bcd7fb; }

/* 财务管理（经营概括） */
#view-finance { padding: 18px 24px 30px; }
.fin-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fin-kpi { position: relative; border-radius: 12px; padding: 16px 18px; color: #fff; min-height: 84px; }
.fin-kpi span { font-size: 12.5px; opacity: .92; }
.fin-kpi b { display: block; margin-top: 10px; font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.fin-kpi i { position: absolute; right: 16px; bottom: 14px; font-style: normal; font-size: 22px; opacity: .85; }
.fin-kpi.k1 { background: linear-gradient(135deg, #8b7bf0, #6b5ce0); }
.fin-kpi.k2 { background: linear-gradient(135deg, #ff8fb1, #ef4f7f); }
.fin-kpi.k3 { background: linear-gradient(135deg, #6fd3ef, #23a8df); }
.fin-kpi.k4 { background: linear-gradient(135deg, #7ee2a8, #24c26e); }
.fin-card { margin-top: 16px; background: #fff; border-radius: 12px; padding: 16px 18px 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.fin-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fin-title { font-size: 15px; font-weight: 600; color: #1f2937; }
.fin-tabs { display: flex; gap: 14px; }
.fin-tab { border: 0; background: none; font-size: 13px; color: #6b7280; padding: 4px 0; border-bottom: 2px solid transparent; cursor: pointer; }
.fin-tab.active { color: #1673dd; font-weight: 600; border-bottom-color: #1673dd; }
.fin-legend { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12px; color: #6b7280; }
.fin-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.fin-legend .dot.purple { background: #8b7bf0; }
.fin-legend .dot.green { background: #34c38f; }
.fin-chart { height: 300px; position: relative; }
.fin-chart svg { width: 100%; height: 100%; display: block; }
.fin-select { height: 32px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 6px; font-size: 12.5px; color: #4b5563; background: #fff; }
.fin-select.small { height: 30px; }
.fin-chip { height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid #bcd7fb; background: #eef5ff; color: #1673dd; font-size: 12.5px; }
.fin-search { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.fin-search input { height: 30px; width: 170px; border: 1px solid #e3e9f2; border-radius: 6px; padding: 0 10px; font-size: 12.5px; }
.fin-search span { color: #9aa5b5; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fin-table th { text-align: left; padding: 10px 12px; background: #fafbfd; color: #6b7280; font-weight: 500; white-space: nowrap; }
.fin-table td { padding: 12px; border-bottom: 1px solid #f3f6fa; color: #1f2937; }
.fin-table tr:last-child td { border-bottom: 0; }
.fin-total { display: flex; gap: 26px; padding: 12px 12px 0; font-size: 13px; color: #4b5563; border-top: 1px solid #f3f6fa; margin-top: 4px; }
.fin-total b { color: #111827; }
.fin-total b.red { color: #ef4444; }
.fin-total b.purple { color: #8b7bf0; }
.fin-rent-list { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fin-rent-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #fffaf0; border: 1px solid #fdf0d5; min-width: 260px; }
.fin-rent-item .num { width: 22px; height: 22px; border-radius: 50%; background: #f7c948; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.fin-rent-item .info b { display: block; font-size: 13.5px; color: #1f2937; }
.fin-rent-item .info em { font-style: normal; font-size: 11.5px; color: #9aa5b5; }
.fin-rent-item .amt { margin-left: auto; text-align: right; }
.fin-rent-item .amt b { display: block; color: #15803d; font-size: 14px; }
.fin-rent-item .amt em { font-style: normal; font-size: 11px; color: #6b7280; }
.fin-bar { height: 6px; border-radius: 4px; background: #eef2f7; position: relative; overflow: hidden; min-width: 90px; }
.fin-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #8b7bf0; border-radius: 4px; }
.fin-proj { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fin-proj-card { border-radius: 12px; padding: 16px; text-align: center; }
.fin-proj-card span { font-size: 12px; color: #6b7280; }
.fin-proj-card b { display: block; margin: 8px 0 4px; font-size: 22px; font-weight: 700; }
.fin-proj-card em { font-style: normal; font-size: 11px; color: #9aa5b5; }
.fin-proj-card.p1 { background: #eef8ec; } .fin-proj-card.p1 b { color: #15803d; }
.fin-proj-card.p2 { background: #fdf3e6; } .fin-proj-card.p2 b { color: #d97706; }
.fin-proj-card.p3 { background: #e9f5fc; } .fin-proj-card.p3 b { color: #1673dd; }
.fin-proj-card.p4 { background: #eef8ec; } .fin-proj-card.p4 b { color: #15803d; }
.fin-proj-meta { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: #6b7280; }
.fin-proj-meta b { color: #111827; }
.fin-proj-meta b.red { color: #ef4444; }
.fin-ghost { height: 30px; padding: 0 14px; border-radius: 6px; border: 1px solid #e3e9f2; background: #fff; font-size: 12.5px; color: #4b5563; }
.fin-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.fin-mini { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.fin-mini h4 { font-size: 13.5px; font-weight: 600; color: #1f2937; margin-bottom: 12px; }
.fin-mini-head { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 6px; padding: 8px 10px; background: #fafbfd; border-radius: 6px; font-size: 12px; color: #6b7280; }
.fin-empty { padding: 40px 0 20px; text-align: center; color: #b7bfca; font-size: 12.5px; }

/* 营收明细：数据居中 */
#view-overview .fin-card:has(#fin-detail-body) .fin-table th,
#view-overview .fin-card:has(#fin-detail-body) .fin-table td { text-align: center; }
#view-overview .fin-month-select { min-width: 120px; }

/* 设备总收租金：搜索框靠左 */
#view-overview .fin-search { margin-left: 0; margin-right: 0; }
#view-overview .fin-search input { width: 200px; }

/* 经营概括：时间筛选下拉样式 */
#view-overview .fin-date { position: relative; width: 132px; flex: none; }
#view-overview .fin-date .exp-sel-btn {
  width: 100%; height: 30px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 10px; background: #fff; border: 1px solid #e3e9f2; border-radius: 6px;
  font-size: 12.5px; color: #8b95a5; cursor: pointer; box-sizing: border-box;
}
#view-overview .fin-date .exp-sel-btn svg { color: #9aa5b5; flex: none; }
#view-overview .fin-date .exp-sel-panel {
  position: absolute; top: calc(100% + 6px); left: 0; width: 268px; z-index: 40;
  background: #fff; border: 1px solid #e8edf5; border-radius: 8px; padding: 10px;
  box-shadow: 0 10px 26px rgba(15,23,42,.12);
}
#view-overview .exp-date-presets { display: flex; gap: 6px; margin-bottom: 10px; }
#view-overview .exp-preset { flex: 1; height: 30px; border-radius: 6px; border: 1px solid #e8edf5; background: #f7f9fc; font-size: 12.5px; color: #4b5563; cursor: pointer; }
#view-overview .exp-preset.active { color: #1673dd; background: #eef5ff; border-color: #bcd7fb; font-weight: 500; }
#view-overview .exp-date-range { display: flex; align-items: center; gap: 6px; }
#view-overview .exp-date-range .control { flex: 1; min-width: 0; height: 32px; font-size: 12px; padding: 0 6px; border: 1px solid #d9e0e8; border-radius: 6px; }
#view-overview .exp-date-range span { font-size: 12px; color: #9aa5b5; }
#view-overview .exp-date-ok { width: 100%; height: 32px; margin-top: 10px; font-size: 12.5px; background: #1673dd; color: #fff; border: 0; border-radius: 6px; cursor: pointer; }

/* 底部统计卡数据行 */
.fin-mini-body { min-height: 96px; }
.fin-mini-row { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 6px; padding: 9px 10px; font-size: 12.5px; color: #1f2937; border-bottom: 1px solid #f6f8fb; }
.fin-mini-row:last-child { border-bottom: 0; }
.fin-mini-row span:last-child { text-align: right; color: #15803d; font-weight: 500; }
.fin-mini-row span:nth-child(2) { text-align: center; color: #6b7280; }

/* 订单表：操作列不再吸边固定，避免横向滚动时文字位移 */
table.data thead th.col-actions,
table.data tbody td.col-actions {
  position: static !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* 订单表：操作列恢复右侧固定，实底避免透字 */
table.data thead th.col-actions,
table.data tbody td.col-actions {
  position: sticky !important;
  right: 0 !important;
}
table.data thead th.col-actions {
  z-index: 6 !important;
  background: #e8f2fc !important;
  box-shadow: -8px 0 10px -8px rgba(15, 23, 42, .18) !important;
}
table.data tbody td.col-actions {
  z-index: 4 !important;
  background: #fff !important;
  box-shadow: -8px 0 10px -8px rgba(15, 23, 42, .10) !important;
}
table.data tbody tr:hover td.col-actions { background: #f8fbff !important; }

/* 订单表：表头整体固定（含操作列），滚动时整列不位移 */
.table-wrap.has-sticky-head { overflow: auto; }
table.data thead th { position: sticky; top: 0; z-index: 5; }
table.data thead th.col-actions { z-index: 8 !important; }
table.data tbody td.col-actions { width: 150px; min-width: 150px; }

/* 经营概括统计卡：内容居中 + 可上下滚动 */
#view-overview .fin-mini-head span { text-align: center; }
#view-overview .fin-mini-row span,
#view-overview .fin-mini-row span:nth-child(2),
#view-overview .fin-mini-row span:last-child { text-align: center; color: inherit; }
#view-overview .fin-mini-row span:last-child { color: #15803d; font-weight: 500; }
#view-overview .fin-mini-body {
  max-height: 114px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148,163,184,.5) transparent;
}
#view-overview .fin-mini-body::-webkit-scrollbar { width: 6px; }
#view-overview .fin-mini-body::-webkit-scrollbar-thumb { background: rgba(148,163,184,.5); border-radius: 6px; }
#view-overview .fin-mini-body::-webkit-scrollbar-track { background: transparent; }
#view-overview .fin-mini-body { padding-right: 2px; }
#view-overview .fin-mini-row { border-radius: 6px; }
#view-overview .fin-mini-row:hover { background: #f7f9fc; }

/* 统计卡：首列靠左、中间居中、末列靠右 */
#view-overview .fin-mini-head span:first-child,
#view-overview .fin-mini-row span:first-child { text-align: left; }
#view-overview .fin-mini-head span:nth-child(2),
#view-overview .fin-mini-row span:nth-child(2) { text-align: center; }
#view-overview .fin-mini-head span:last-child,
#view-overview .fin-mini-row span:last-child { text-align: right; }

/* 经营概括统计卡：加描边 */
#view-overview .fin-mini {
  border: 1px solid #eef2f7;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

/* 统计卡滚动条隐藏，保留可滚动 */
#view-overview .fin-mini-body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#view-overview .fin-mini-body::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* 隐藏滚动条后，底部加渐隐提示还有内容 */
/* 三行完整展示时无需渐隐 */

/* 设备维修统计：型号单行完整显示，维修中靠右 */
#view-overview .fin-mini:has(#mini-repair) .fin-mini-head,
#view-overview .fin-mini:has(#mini-repair) .fin-mini-row {
  grid-template-columns: 1.9fr .5fr;
}
#view-overview #mini-repair .fin-mini-row span:first-child,
#view-overview .fin-mini:has(#mini-repair) .fin-mini-head span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: 12px;
}
#view-overview .fin-mini:has(#mini-repair) .fin-mini-row span:last-child,
#view-overview .fin-mini:has(#mini-repair) .fin-mini-head span:last-child {
  text-align: right;
}

/* 今日按类别统计：四列 */
#view-overview .fin-mini:has(#mini-cat) .fin-mini-head,
#view-overview .fin-mini:has(#mini-cat) .fin-mini-row {
  grid-template-columns: 1.3fr .8fr .7fr .9fr;
}
#view-overview .fin-mini:has(#mini-cat) .fin-mini-head span,
#view-overview .fin-mini:has(#mini-cat) .fin-mini-row span { text-align: center; }
#view-overview .fin-mini:has(#mini-cat) .fin-mini-head span:first-child,
#view-overview .fin-mini:has(#mini-cat) .fin-mini-row span:first-child { text-align: left; }
#view-overview .fin-mini:has(#mini-cat) .fin-mini-head span:last-child,
#view-overview .fin-mini:has(#mini-cat) .fin-mini-row span:last-child { text-align: right; }

#view-overview .fin-mini:has(#mini-cat) .fin-mini-row span:first-child,
#view-overview .fin-mini:has(#mini-cat) .fin-mini-head span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 营收明细：绑定渠道下拉 */
#view-overview .fin-ch { position: relative; display: inline-block; }
#view-overview .fin-ch-btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid #e3e9f2; background: #fff; color: #1673dd;
  height: 26px; padding: 0 9px; border-radius: 6px; font-size: 12.5px; cursor: pointer;
}
#view-overview .fin-ch-btn:hover { border-color: #bcd7fb; background: #f6faff; }
#view-overview .fin-ch-panel {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  z-index: 40; min-width: 220px; background: #fff; border: 1px solid #eef2f7;
  border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.12); padding: 8px;
  text-align: left;
}
#view-overview .fin-ch-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  padding: 8px 10px; border-radius: 6px; font-size: 12.5px; color: #1f2937;
}
#view-overview .fin-ch-row:hover { background: #f7f9fc; }
#view-overview .fin-ch-row em { font-style: normal; color: #9aa5b5; }
#view-overview .fin-ch-row b { color: #15803d; font-weight: 600; }

/* 经营概括统计卡：五列布局 */
#view-overview .fin-mini-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
#view-overview .fin-mini:has(#mini-channel) .fin-mini-head,
#view-overview .fin-mini:has(#mini-channel) .fin-mini-row { grid-template-columns: 1.2fr .8fr 1fr; }

#view-overview .fin-mini:has(#mini-cat) .fin-mini-head,
#view-overview .fin-mini:has(#mini-cat) .fin-mini-row { grid-template-columns: 1.7fr .8fr .7fr .9fr; }
#view-overview .fin-mini:has(#mini-cat) .fin-mini-row span:first-child { font-size: 11.5px; }

#view-overview .fin-mini:has(#mini-cat) .fin-mini-head span { white-space: nowrap; font-size: 11.5px; }

/* 统计卡表头：文字不换行 */
#view-overview .fin-mini-head { align-items: center; }
#view-overview .fin-mini-head span {
  white-space: nowrap;
  overflow: visible;
  font-size: 11.5px;
  letter-spacing: -.2px;
}

/* 营收明细卡片：明显描边区分 */
#view-overview .fin-card:has(#fin-detail-body) {
  border: 1px solid #dfe7f2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

/* 绑定渠道弹窗 */
.fin-ch-dialog {
  width: 420px; max-width: calc(100vw - 32px); background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15,23,42,.24); overflow: hidden;
}
.fin-ch-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.fin-ch-dialog-head h3 { font-size: 16px; font-weight: 600; color: #111827; }
.fin-ch-close { border: 0; background: none; font-size: 20px; color: #9aa5b5; cursor: pointer; }
.fin-ch-dialog-sub { padding: 0 18px 10px; font-size: 12.5px; color: #9aa5b5; }
.fin-ch-dialog-body { padding: 4px 12px 8px; max-height: 320px; overflow-y: auto; }
.fin-ch-dialog-body .fin-ch-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px;
  padding: 11px 10px; border-radius: 8px; font-size: 13px; color: #1f2937;
}
.fin-ch-dialog-body .fin-ch-row:nth-child(odd) { background: #fafbfd; }
.fin-ch-dialog-body .fin-ch-row em { font-style: normal; color: #9aa5b5; }
.fin-ch-dialog-body .fin-ch-row b { color: #15803d; font-weight: 600; }
.fin-ch-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 10px 18px 16px; }
.fin-ch-dialog-foot .btn { height: 36px; min-width: 84px; border: 1px solid #e3e9f2; background: #fff; border-radius: 8px; font-size: 13px; color: #4b5563; cursor: pointer; }

/* 营收明细：时间范围选择器 */
#view-overview .fin-range { position: relative; }
#view-overview .fin-range-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; background: #fff;
  border: 1px solid #e3e9f2; border-radius: 8px; font-size: 13px; color: #4b5563; cursor: pointer;
}
#view-overview .fin-range-btn svg { color: #9aa5b5; }
#view-overview .fin-range-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 250px;
  background: #fff; border: 1px solid #eef2f7; border-radius: 10px; padding: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,.14);
}
#view-overview .fin-range-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
#view-overview .fin-range-item {
  height: 30px; border-radius: 6px; border: 1px solid #e8edf5; background: #f7f9fc;
  font-size: 12.5px; color: #4b5563; cursor: pointer;
}
#view-overview .fin-range-item.active { color: #1673dd; background: #eef5ff; border-color: #bcd7fb; font-weight: 500; }
#view-overview .fin-range-custom { display: flex; align-items: center; gap: 6px; }
#view-overview .fin-range-custom .control { flex: 1; min-width: 0; height: 30px; font-size: 12px; padding: 0 6px; border: 1px solid #d9e0e8; border-radius: 6px; }
#view-overview .fin-range-custom span { font-size: 12px; color: #9aa5b5; }
#view-overview .fin-range-ok { width: 100%; height: 30px; margin-top: 10px; border: 0; border-radius: 6px; background: #1673dd; color: #fff; font-size: 12.5px; cursor: pointer; }

/* 营收明细：按渠道方/按渠道切换 */
#view-overview .fin-seg { display: inline-flex; background: #f4f6fa; border-radius: 8px; padding: 3px; }
#view-overview .fin-seg-btn {
  height: 28px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent;
  font-size: 12.5px; color: #6b7280; cursor: pointer;
}
#view-overview .fin-seg-btn.active { background: #fff; color: #1673dd; font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* 主设备营收：去色并放到营收明细下方 */
#view-overview .fin-model-wrap {
  margin: 14px 0 0; background: #fff; border: 1px solid #eef2f7; border-radius: 12px;
  padding: 14px 18px; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
#view-overview .fin-model-head { margin-bottom: 10px; }
#view-overview .fin-model-wrap .fin-rent-list { margin-bottom: 0; }
#view-overview .fin-model-wrap .fin-rent-item {
  background: #fafbfd; border: 1px solid #eef2f7;
}
#view-overview .fin-model-wrap .fin-rent-item .num {
  background: #cbd5e1; color: #fff;
}

/* 设备总收租金卡片：加外边框 */
#view-overview .fin-card:has(#fin-rent-body) {
  border: 1px solid #dfe7f2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
}

/* 营收趋势：悬浮提示 */
#view-overview .fin-chart { position: relative; }
#view-overview .fin-chart svg { overflow: visible; }
#view-overview .fin-tip {
  position: absolute; transform: translate(-50%, -120%);
  min-width: 132px; padding: 8px 10px; pointer-events: none;
  background: rgba(17, 24, 39, .92); color: #fff; border-radius: 8px;
  font-size: 11.5px; line-height: 1.6; white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15,23,42,.25);
}
#view-overview .fin-tip::after {
  content: ''; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px;
  background: rgba(17,24,39,.92); transform: translateX(-50%) rotate(45deg);
}
#view-overview .fin-tip-date { display: block; color: #cbd5e1; font-size: 11px; margin-bottom: 2px; }
#view-overview .fin-tip-row { display: flex; align-items: center; gap: 6px; }
#view-overview .fin-tip-row b { margin-left: auto; font-weight: 600; }
#view-overview .fin-tip .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
#view-overview .fin-tip .dot.purple { background: #a99bf5; }
#view-overview .fin-tip .dot.green { background: #34d399; }

/* 提示框贴近顶部时向下显示 */
#view-overview .fin-tip.below { transform: translate(-50%, 14px); }
#view-overview .fin-tip.below::after { bottom: auto; top: -4px; }

/* 财务管理：月度净利 */
#view-finance { padding: 18px 24px 30px; }
.fp-chart { height: 240px; }
.fp-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fp-range { display: flex; gap: 6px; margin-left: auto; }
.fp-range .fin-range-item {
  height: 28px; padding: 0 12px; border-radius: 6px; border: 1px solid #e8edf5;
  background: #f7f9fc; font-size: 12px; color: #4b5563; cursor: pointer;
}
.fp-range .fin-range-item.active { color: #1673dd; background: #eef5ff; border-color: #bcd7fb; font-weight: 500; }
.fp-table td, .fp-table th { text-align: center; }
.fp-table td:first-child, .fp-table th:first-child { text-align: left; }
.fp-profit { color: #15803d; font-weight: 600; }
.fp-loss { color: #ef4444; font-weight: 600; }

/* 订单表：底部补一条分割线 */
.table-wrap { border-bottom: 1px solid var(--border); }
table.data tbody tr:last-child td { border-bottom: 0; }

/* 订单表：最后一行下方补分割线 */
table.data { border-bottom: 1px solid var(--border); }

/* 仅保留表格自身底边线，避免容器底部重复 */
.table-wrap { border-bottom: 0; }

/* 订单表底边线（字面颜色，避免变量失效） */
table.data { border-bottom: 1px solid #eef1f5; }

table.data { border-bottom: 1px solid #eef1f5 !important; }

/* 系统设置 */
#view-settings { padding: 18px 24px 30px; }
.st-card { background: #fff; border: 1px solid #eef2f7; border-radius: 12px; padding: 8px 26px 26px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.st-tabs { display: flex; flex-wrap: wrap; gap: 2px 13px; border-bottom: 1px solid #eef2f7; margin-bottom: 18px; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab { border: 0; background: none; padding: 12px 0 11px; font-size: 12.5px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.st-tab.active { color: #111827; font-weight: 600; border-bottom-color: #111827; }
.st-field { margin-bottom: 22px; max-width: 640px; }
.st-field label { display: block; font-size: 14px; color: #1f2937; font-weight: 500; margin-bottom: 10px; }
.st-input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 8px; font-size: 14px; color: #1f2937; background: #fff; }
.st-input:focus { outline: none; border-color: #1673dd; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.st-textarea { height: 96px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.st-hint { margin-top: 8px; font-size: 12.5px; color: #9aa5b5; }
.st-logo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.st-upload { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 1px solid #e3e9f2; border-radius: 8px; font-size: 13.5px; color: #374151; cursor: pointer; background: #fff; }
.st-upload:hover { border-color: #bcd7fb; color: #1673dd; }
.st-preview { width: 92px; height: 92px; border-radius: 12px; background: #0f172a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.st-preview img { width: 76px; height: 76px; object-fit: contain; }
.st-save { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 26px; border: 0; border-radius: 8px; background: #0b1220; color: #fff; font-size: 14px; cursor: pointer; }
.st-save:hover { background: #16233a; }
.st-empty { padding: 40px 0; color: #b7bfca; font-size: 13px; }

/* 系统设置：排版收紧 */
#view-settings .st-card { padding: 6px 28px 30px; }
#view-settings .st-tabs { gap: 28px; margin-bottom: 22px; }
#view-settings .st-tab { padding: 18px 0 14px; }
#view-settings .st-field { max-width: 680px; margin-bottom: 20px; }
#view-settings .st-field label { font-size: 14px; font-weight: 500; margin-bottom: 9px; }
#view-settings .st-input { height: 46px; border-radius: 10px; font-size: 14px; }
#view-settings .st-hint { margin-top: 9px; font-size: 12.5px; line-height: 1.5; }
#view-settings .st-logo-row { margin-bottom: 12px; }
#view-settings .st-upload {
  flex-direction: row;
  flex-wrap: nowrap;
  white-space: nowrap;
  height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  gap: 8px;
}
#view-settings .st-upload svg { flex: none; }
#view-settings .st-preview { width: 88px; height: 88px; border-radius: 12px; }
#view-settings .st-preview img { width: 64px; height: 64px; }
#view-settings .st-save { height: 46px; border-radius: 10px; padding: 0 24px; margin-top: 6px; }

/* 上传按钮保持单行 */
#view-settings .st-field label.st-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  flex-wrap: nowrap;
  width: auto;
  margin-bottom: 0;
  font-weight: 400;
}

/* 上传按钮：图标与文字同一行，垂直居中 */
#view-settings .st-upload { line-height: 1; }
#view-settings .st-upload svg { display: block; }
#view-settings .st-upload span { line-height: 1; }

/* 人员管理 */
#view-personnel { padding: 26px 28px 30px; }
.pm-head { display: flex; align-items: flex-start; justify-content: space-between; }
.pm-title { font-size: 24px; font-weight: 700; color: #111827; display: flex; align-items: center; gap: 10px; }
.pm-title-icon { font-size: 22px; }
.pm-sub { margin-top: 6px; font-size: 13px; color: #9aa5b5; }
.pm-add { height: 42px; padding: 0 20px; border: 0; border-radius: 8px; background: #5b5bf5; color: #fff; font-size: 14px; cursor: pointer; }
.pm-add:hover { background: #4a4ae0; }
.pm-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 22px; }
.pm-stat { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.pm-stat-ico { width: 38px; height: 38px; border-radius: 9px; background: #f2f4fb; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.pm-stat em { display: block; font-style: normal; font-size: 12.5px; color: #6b7280; }
.pm-stat b { display: block; margin-top: 6px; font-size: 19px; color: #111827; font-weight: 600; }
.pm-stat b.blue { color: #2563eb; }
.pm-stat b.orange { color: #d97706; }
.pm-stat b.green { color: #16a34a; }
.pm-tabs { display: flex; gap: 26px; margin-top: 24px; border-bottom: 1px solid #eef2f7; }
.pm-tab { border: 0; background: none; padding: 10px 0 14px; font-size: 14.5px; color: #4b5563; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pm-tab.active { color: #111827; font-weight: 600; border-bottom-color: #5b5bf5; }
.pm-section { font-size: 17px; font-weight: 600; color: #111827; margin: 20px 0 14px; }
.pm-toolbar { display: flex; gap: 12px; margin-bottom: 16px; }
.pm-search { position: relative; flex: 0 0 460px; display: flex; align-items: center; }
.pm-search svg { position: absolute; left: 14px; color: #9aa5b5; }
.pm-search input { width: 100%; height: 44px; padding: 0 14px 0 40px; border: 1px solid #e3e9f2; border-radius: 8px; font-size: 13.5px; }
#view-personnel .pm-type { width: 180px; flex: none; }
#view-personnel .pm-type .exp-sel-btn { height: 44px; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; font-size: 13.5px; color: #374151; cursor: pointer; }
#view-personnel .pm-type .exp-sel-panel { position: absolute; top: calc(100% + 6px); left: 0; width: 100%; background: #fff; border: 1px solid #eef2f7; border-radius: 8px; box-shadow: 0 10px 26px rgba(15,23,42,.12); padding: 6px; z-index: 30; }
#view-personnel .exp-sel-item { padding: 9px 10px; border-radius: 6px; font-size: 13px; color: #374151; cursor: pointer; }
#view-personnel .exp-sel-item:hover { background: #f5f7fb; }
#view-personnel .exp-sel-item.active { color: #5b5bf5; background: #eef0ff; font-weight: 500; }
.pm-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.pm-table th { text-align: left; padding: 14px 16px; font-size: 13px; color: #6b7280; font-weight: 500; background: #fafbfd; }
.pm-table td { padding: 14px 16px; font-size: 13.5px; color: #1f2937; border-top: 1px solid #f3f6fa; }
.pm-user { display: flex; align-items: center; gap: 10px; }
.pm-avatar { width: 30px; height: 30px; border-radius: 50%; background: #eef0ff; color: #5b5bf5; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.pm-tag { display: inline-flex; height: 24px; padding: 0 10px; align-items: center; border-radius: 6px; font-size: 12px; }
.pm-tag.rent { color: #0f766e; background: #e6f7f4; }
.pm-tag.invest { color: #7c3aed; background: #f3e8ff; }
.pm-money { color: #d97706; }
.pm-money.done { color: #16a34a; }
.pm-money.frozen { color: #2563eb; }
.pm-op { border: 0; background: none; color: #2563eb; font-size: 12.5px; cursor: pointer; margin-right: 10px; }
.pm-op.danger { color: #ef4444; }
.pm-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13px; color: #6b7280; }
.pm-pager { display: flex; align-items: center; gap: 10px; }
.pm-page { height: 32px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 6px; background: #fff; font-size: 12.5px; color: #9aa5b5; }

#view-personnel .pm-op { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
#view-personnel .pm-op svg { display: block; }
#view-personnel .pm-op[data-pm-edit] { color: #2563eb; }
#view-personnel .pm-op.danger { color: #ef4444; }

/* 系统设置扩展 */
#view-settings:not(.hidden) { display: block; }
#view-settings .st-card { margin-bottom: 16px; }
#view-settings .st-h3 { font-size: 17px; font-weight: 600; color: #111827; padding: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
#view-settings .st-h4 { font-size: 14.5px; font-weight: 600; color: #1f2937; margin: 16px 0 10px; }
#view-settings .st-tabs.sub { margin-top: 10px; }
#view-settings .st-tabs.sub .st-tab { padding: 8px 0 12px; font-size: 13.5px; }
#view-settings .st-tabs.sub .st-tab.active { color: #1673dd; border-bottom-color: #1673dd; }
#view-settings .st-gauges { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 6px; }
#view-settings .st-gauge { background: #f4fbf4; border-radius: 12px; padding: 18px 12px; text-align: center; }
#view-settings .st-gauge.danger { background: #fdf0f0; }
#view-settings .st-gauge-ico { font-size: 16px; }
#view-settings .st-ring { width: 96px; height: 96px; margin: 10px auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(#22c55e calc(var(--p, 17) * 1%), #e6efe6 0); }
#view-settings .st-gauge.danger .st-ring { background: conic-gradient(#ef4444 calc(var(--p, 91) * 1%), #f1e2e2 0); }
#view-settings .st-ring b { width: 74px; height: 74px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #1f2937; }
#view-settings .st-gauge em { font-style: normal; display: block; font-size: 13px; color: #374151; }
#view-settings .st-gauge small { display: block; margin-top: 4px; font-size: 11px; color: #9aa5b5; }
#view-settings .st-io { display: flex; gap: 42px; padding: 16px 6px 6px; }
#view-settings .st-io b { display: block; font-size: 16px; color: #111827; }
#view-settings .st-io em { font-style: normal; font-size: 11.5px; color: #9aa5b5; }
#view-settings .st-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
#view-settings .st-ghost { height: 34px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; font-size: 12.5px; color: #374151; cursor: pointer; }
#view-settings .st-ghost:hover { border-color: #bcd7fb; color: #1673dd; }
#view-settings .st-blue { height: 32px; padding: 0 14px; border: 0; border-radius: 7px; background: #1673dd; color: #fff; font-size: 12.5px; cursor: pointer; }
#view-settings .st-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#view-settings .st-inline { font-size: 12.5px; color: #4b5563; }
#view-settings .st-mini { height: 32px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 7px; font-size: 12.5px; color: #374151; width: 110px; }
#view-settings .st-mini.date { width: 140px; }
#view-settings .st-switch { position: relative; display: inline-block; width: 42px; height: 24px; }
#view-settings .st-switch input { display: none; }
#view-settings .st-switch span { position: absolute; inset: 0; background: #dfe5ee; border-radius: 999px; transition: .2s; cursor: pointer; }
#view-settings .st-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: .2s; }
#view-settings .st-switch input:checked + span { background: #1673dd; }
#view-settings .st-switch input:checked + span::after { transform: translateX(18px); }
#view-settings .st-chips { display: flex; gap: 6px; }
#view-settings .st-chip { height: 30px; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 6px; background: #fff; font-size: 12px; color: #4b5563; cursor: pointer; }
#view-settings .st-chip.active { background: #1673dd; color: #fff; border-color: #1673dd; }
#view-settings .st-empty-box { padding: 44px 0; text-align: center; color: #b7bfca; font-size: 13px; background: #fbfcfe; border-radius: 8px; }
#view-settings .st-sub-head { display: flex; align-items: center; justify-content: space-between; }
#view-settings .st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#view-settings .st-table th { text-align: left; padding: 12px 14px; background: #fafbfd; color: #6b7280; font-weight: 500; }
#view-settings .st-table td { padding: 12px 14px; border-bottom: 1px solid #f3f6fa; color: #1f2937; }
#view-settings .st-empty-cell { text-align: center; color: #b7bfca; padding: 34px 0 !important; }
#view-settings .st-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; margin-right: 5px; }
#view-settings .st-tag-ok { display: inline-flex; height: 22px; padding: 0 8px; align-items: center; border-radius: 5px; background: #e9f9ef; color: #16a34a; font-size: 11.5px; }
#view-settings .st-link { border: 0; background: none; color: #1673dd; font-size: 12.5px; cursor: pointer; padding: 0 4px; }
#view-settings .st-banner { margin-top: 12px; padding: 11px 14px; border-radius: 8px; font-size: 12.5px; }
#view-settings .st-banner.ok { background: #f1faf2; color: #3f7d4f; border: 1px solid #d9f0dd; }
#view-settings .st-banner.warn { background: #fffaf0; color: #a5691a; border: 1px solid #fbe9c8; margin-bottom: 12px; }
#view-settings .st-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
#view-settings .st-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4b5563; margin-right: 18px; }
#view-settings .st-check input { width: 15px; height: 15px; accent-color: #1673dd; }

/* 新增合作方弹窗 */
.pm-dialog { width: 640px; max-width: calc(100vw - 40px); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,.24); overflow: hidden; }
.pm-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 26px 32px 6px; }
.pm-dialog-head h3 { font-size: 22px; font-weight: 600; color: #111827; }
.pm-dialog-close { border: 0; background: none; font-size: 26px; line-height: 1; color: #9aa5b5; cursor: pointer; }
.pm-dialog-body { padding: 10px 32px 4px; max-height: 68vh; overflow-y: auto; }
.pm-field { margin-bottom: 22px; }
.pm-field label { display: block; font-size: 15px; color: #1f2937; margin-bottom: 10px; }
.pm-field label i { color: #ef4444; font-style: normal; }
.pm-field input, .pm-field textarea { width: 100%; height: 54px; padding: 0 16px; border: 1px solid #e3e9f2; border-radius: 10px; font-size: 15px; color: #1f2937; background: #fff; }
.pm-field textarea { height: 96px; padding: 14px 16px; line-height: 1.6; resize: vertical; }
.pm-field input::placeholder, .pm-field textarea::placeholder { color: #b7bfca; }
.pm-field input:focus, .pm-field textarea:focus { outline: none; border-color: #5b5bf5; box-shadow: 0 0 0 3px rgba(91,91,245,.12); }
.pm-select { position: relative; }
.pm-select-btn { width: 100%; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border: 1px solid #e3e9f2; border-radius: 10px; background: #fff; font-size: 15px; color: #1f2937; cursor: pointer; }
.pm-select-btn.open { border-color: #5b5bf5; box-shadow: 0 0 0 3px rgba(91,91,245,.12); }
.pm-select-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: #fff; border: 1px solid #eef2f7; border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.12); padding: 6px; }
.pm-select-item { padding: 11px 12px; border-radius: 8px; font-size: 14px; color: #374151; cursor: pointer; }
.pm-select-item:hover { background: #f5f7fb; }
.pm-select-item.active { background: #eef0ff; color: #5b5bf5; font-weight: 500; }
.pm-dialog-foot { display: flex; gap: 16px; padding: 8px 32px 28px; }
.pm-btn { flex: 1; height: 56px; border-radius: 10px; font-size: 17px; cursor: pointer; }
.pm-btn.ghost { background: #fff; border: 1px solid #e3e9f2; color: #1f2937; }
.pm-btn.primary { background: #5b5bf5; border: 0; color: #fff; }
.pm-btn.primary:hover { background: #4a4ae0; }

/* 新增合作方弹窗：整体缩小，无需内部滚动 */
.pm-dialog { width: 520px; max-height: calc(100vh - 60px); display: flex; flex-direction: column; }
.pm-dialog-head { padding: 18px 24px 2px; }
.pm-dialog-head h3 { font-size: 18px; }
.pm-dialog-close { font-size: 22px; }
.pm-dialog-body { padding: 6px 24px 0; max-height: none; overflow: visible; }
.pm-field { margin-bottom: 14px; }
.pm-field label { font-size: 13.5px; margin-bottom: 7px; }
.pm-field input, .pm-select-btn { height: 46px; font-size: 14px; padding: 0 13px; border-radius: 9px; }
.pm-field textarea { height: 72px; padding: 11px 13px; font-size: 14px; border-radius: 9px; }
.pm-dialog-foot { padding: 4px 24px 20px; gap: 12px; }
.pm-btn { height: 46px; font-size: 15px; border-radius: 9px; }

/* 合作方类型：直接点选 */
#view-personnel .pm-chips { display: flex; align-items: center; gap: 8px; }
#view-personnel .pm-chip {
  height: 44px; padding: 0 18px; border: 1px solid #e3e9f2; border-radius: 8px;
  background: #fff; font-size: 13.5px; color: #4b5563; cursor: pointer;
}
#view-personnel .pm-chip:hover { border-color: #bcd7fb; color: #1673dd; }
#view-personnel .pm-chip.active { background: #eef0ff; border-color: #c7c9ff; color: #5b5bf5; font-weight: 500; }

/* 合作方列表：类型胶囊在上，搜索框在下 */
#view-personnel .pm-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }
#view-personnel .pm-chips { order: 1; }
#view-personnel .pm-search { order: 2; flex: 0 0 640px; max-width: 640px; }

/* 修正：搜索框在纵向布局中不要撑高 */
#view-personnel .pm-toolbar .pm-search { flex: none; width: 640px; max-width: 640px; height: 44px; }
#view-personnel .pm-toolbar .pm-search input { height: 44px; }

/* 合作方列表：去掉重复标题后整体上移 */
#view-personnel .pm-panel { margin-top: 0; }
#view-personnel .pm-toolbar { margin-top: 14px; }
#view-personnel .pm-tabs { margin-top: 18px; }

/* 合作方类型管理 */
#view-personnel .pm-head-actions { display: flex; align-items: center; gap: 12px; }
#view-personnel .pm-ghost { height: 42px; padding: 0 18px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; font-size: 14px; color: #4b5563; cursor: pointer; }
#view-personnel .pm-ghost:hover { border-color: #c7c9ff; color: #5b5bf5; }
.pm-dialog.small { width: 460px; }
.pm-type-add { display: flex; gap: 10px; margin-bottom: 16px; }
.pm-type-add input { flex: 1; height: 44px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 9px; font-size: 14px; }
.pm-btn.slim { flex: none; width: 88px; height: 44px; font-size: 14px; border-radius: 9px; }
.pm-type-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.pm-type-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; border: 1px solid #eef2f7; border-radius: 9px; font-size: 14px; color: #1f2937; }
.pm-type-row button { border: 0; background: none; color: #ef4444; font-size: 12.5px; cursor: pointer; }
.pm-type-empty { padding: 26px 0; text-align: center; color: #b7bfca; font-size: 13px; }

/* 类型管理弹窗：底部按钮靠右 */
.pm-dialog.small .pm-dialog-foot { justify-content: flex-end; padding: 10px 24px 20px; }
.pm-dialog.small .pm-btn.ghost { flex: none; width: 96px; height: 42px; font-size: 14px; }

/* 类型列表长按拖动 */
.pm-type-row { cursor: grab; transition: background .15s, opacity .15s; }
.pm-type-row.dragging { opacity: .55; background: #f5f7fb; cursor: grabbing; }
.pm-type-row:active { cursor: grabbing; }

/* 类型拖拽：禁止选中文本，避免出现复制/高亮 */
#pmt-list, #pmt-list .pm-type-row, #pmt-list .pm-type-row span {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

/* 类型行拖拽手柄 */
.pm-type-row .pm-drag { color: #c3cbd8; font-size: 14px; margin-right: 10px; cursor: grab; }
.pm-type-row .pm-type-name { flex: 1; }
.pm-type-row[data-type-name] { align-items: center; }

.pmt-tip { font-size: 12px; color: #9aa5b5; margin: 0 0 10px; }

/* 类型行：上下移动 + 保存 */
.pm-type-row .pm-move { display: inline-flex; gap: 4px; margin-right: 10px; }
.pm-type-row .pm-move button {
  width: 26px; height: 26px; border: 1px solid #e3e9f2; border-radius: 6px;
  background: #fff; color: #6b7280; font-size: 12px; line-height: 1; cursor: pointer;
}
.pm-type-row .pm-move button:hover { border-color: #c7c9ff; color: #5b5bf5; }
.pm-type-row .pm-del { border: 0; background: none; color: #ef4444; font-size: 12.5px; cursor: pointer; }
.pm-dialog.small .pm-dialog-foot { gap: 10px; }
.pm-btn.slim-wide { flex: none; width: 120px; height: 42px; font-size: 14px; }

/* 类型列表：只保留上下移动，取消拖拽手势 */
.pm-type-row { cursor: default; }
.pm-type-row .pm-drag { display: none; }

/* 类型名称行内编辑 */
.pm-type-row .pm-edit {
  width: 26px; height: 26px; border: 1px solid #e3e9f2; border-radius: 6px;
  background: #fff; color: #2563eb; font-size: 12px; line-height: 1; cursor: pointer; margin-right: 8px;
}
.pm-type-row .pm-edit:hover { border-color: #bcd7fb; background: #f6faff; }
.pm-type-input {
  flex: 1; height: 36px; padding: 0 10px; border: 1px solid #5b5bf5; border-radius: 8px;
  font-size: 14px; color: #1f2937; outline: none; box-shadow: 0 0 0 3px rgba(91,91,245,.12);
}

/* 类型下拉：限制高度并可滚动，避免被弹窗裁切 */
.pm-dialog { overflow: visible; }
.pm-dialog-head { border-radius: 16px 16px 0 0; background: #fff; }
.pm-dialog-foot { border-radius: 0 0 16px 16px; background: #fff; }
.pm-select-panel { max-height: 216px; overflow-y: auto; }

/* 系统设置顶部按钮 */
#view-settings .st-top-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 14px; }
#view-settings .st-top-btn {
  height: 36px; padding: 0 16px; border: 1px solid #e3e9f2; border-radius: 8px;
  background: #fff; font-size: 13px; color: #4b5563; cursor: pointer;
}
#view-settings .st-top-btn:hover { border-color: #bcd7fb; color: #1673dd; }

/* 系统设置：按钮浮到标签行右侧，内容整体上移 */
#view-settings .st-card { position: relative; }
#view-settings .st-top-actions { position: absolute; right: 28px; top: 12px; padding-top: 0; }
#view-settings .st-tabs { padding-top: 4px; }
#view-settings .st-tab { padding: 14px 0 12px; }

/* 渠道/平台管理弹窗：绿色添加、行内编辑、无底部按钮 */
.stl-add { flex: none; width: 96px; height: 44px; border: 0; border-radius: 9px; background: #16a34a; color: #fff; font-size: 14px; cursor: pointer; }
.stl-add:hover { background: #128a3e; }
#st-list-modal .pm-type-row { background: #fafbfd; border: 0; border-radius: 12px; padding: 14px 16px; }
#st-list-modal .pm-type-row + .pm-type-row { margin-top: 12px; }
#st-list-modal .pm-type-name { font-size: 15px; }
#st-list-modal .pm-edit {
  width: 30px; height: 30px; border: 0; background: none; color: #2563eb; font-size: 15px; margin-right: 10px;
}
#st-list-modal .pm-del {
  height: 32px; padding: 0 12px; border-radius: 8px; background: #fdecec; color: #ef4444;
  border: 0; font-size: 13px; cursor: pointer;
}
#st-list-modal .pm-del:hover { background: #fbdcdc; }

/* 渠道/平台行：排序箭头（即时保存） */
#st-list-modal .pm-move { display: inline-flex; gap: 4px; margin-right: 8px; }
#st-list-modal .pm-move button {
  width: 26px; height: 26px; border: 1px solid #e3e9f2; border-radius: 6px;
  background: #fff; color: #6b7280; font-size: 12px; line-height: 1; cursor: pointer;
}
#st-list-modal .pm-move button:hover { border-color: #c7c9ff; color: #5b5bf5; }

/* 平台/渠道弹窗：至少显示 6 行 */
#st-list-modal .pm-dialog.small { width: 620px; }
#st-list-modal .pm-type-list { max-height: 380px; min-height: 380px; overflow-y: auto; padding-right: 4px; }
#st-list-modal .pm-type-row { padding: 16px 18px; }
#st-list-modal .pm-type-name { font-size: 15.5px; }

/* 至少 6 行可见（行高 64 + 间距 12） */
#st-list-modal .pm-type-list { max-height: 444px; min-height: 444px; }

/* 平台/渠道行更紧凑 */
#st-list-modal .pm-type-list { gap: 8px; min-height: 352px; max-height: 352px; }
#st-list-modal .pm-type-row { padding: 9px 16px; min-height: 52px; }
#st-list-modal .pm-type-row + .pm-type-row { margin-top: 0; }
#st-list-modal .pm-type-name { font-size: 14.5px; }
#st-list-modal .pm-type-row .pm-move button { width: 24px; height: 24px; }
#st-list-modal .pm-type-row .pm-edit { width: 26px; height: 26px; font-size: 14px; }
#st-list-modal .pm-del { height: 28px; padding: 0 10px; font-size: 12.5px; }

/* 绑定渠道弹窗 */
.pmb-channels { display: flex; flex-wrap: wrap; gap: 8px; }
.pmb-chip {
  height: 36px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 8px;
  background: #fff; font-size: 13.5px; color: #4b5563; cursor: pointer;
}
.pmb-chip.on { background: #eef0ff; border-color: #c7c9ff; color: #5b5bf5; font-weight: 500; }
.pmb-empty { font-size: 13px; color: #b7bfca; }

/* 绑定渠道与分成 */
.pm-dialog.small.wide { width: 560px; }
.pmb-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.pmb-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid #eef2f7; border-radius: 9px; background: #fbfcfe;
}
.pmb-row.on { border-color: #c7c9ff; background: #f7f7ff; }
.pmb-row label { display: flex; align-items: center; gap: 8px; flex: 1; font-size: 14px; color: #1f2937; cursor: pointer; }
.pmb-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: #5b5bf5; }
.pmb-ratio { display: flex; align-items: center; gap: 6px; }
.pmb-ratio input {
  width: 72px; height: 34px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 7px;
  font-size: 13.5px; text-align: right; color: #1f2937;
}
.pmb-ratio input:disabled { background: #f3f5f9; color: #b7bfca; }
.pmb-ratio span { font-size: 12.5px; color: #6b7280; }
.pmb-total { margin-top: 10px; font-size: 12.5px; color: #6b7280; }
.pmb-total.warn { color: #d97706; }
.pmb-total.ok { color: #16a34a; }

/* 渠道来源：先选平台再添加店铺 */
.stl-add-row { display: flex; gap: 10px; margin-bottom: 10px; }
.stl-plat { position: relative; width: 150px; flex: none; }
.stl-plat-btn {
  width: 100%; height: 44px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 9px; background: #fff;
  font-size: 14px; color: #1f2937; cursor: pointer;
}
.stl-plat-btn.open { border-color: #16a34a; }
.stl-plat-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: #fff; border: 1px solid #eef2f7; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,.12); padding: 6px; max-height: 220px; overflow-y: auto;
}
.stl-plat-item { padding: 10px 12px; border-radius: 8px; font-size: 13.5px; color: #374151; cursor: pointer; }
.stl-plat-item:hover { background: #f5f7fb; }
.stl-plat-item.active { background: #e9f9ef; color: #16a34a; font-weight: 500; }
#st-list-modal .stl-add { width: 100%; height: 46px; border-radius: 9px; font-size: 15px; margin-bottom: 14px; }
#st-list-modal .stl-sub { display: block; margin-top: 4px; font-size: 12px; color: #9aa5b5; }
#st-list-modal .pm-type-row { align-items: center; }

/* 渠道来源弹窗：更窄更协调 */
#st-list-modal .pm-dialog.small { width: 470px; }
#st-list-modal .stl-add-row { gap: 8px; }
#st-list-modal .stl-plat { width: 118px; }
#st-list-modal .stl-plat-btn { height: 40px; font-size: 13.5px; padding: 0 10px; }
#st-list-modal .stl-add-row input { flex: 1; height: 40px; font-size: 13.5px; padding: 0 12px; border-radius: 9px; }
#st-list-modal .stl-add { height: 42px; font-size: 14px; margin-bottom: 12px; border-radius: 9px; }
#st-list-modal .pm-type-list { min-height: 288px; max-height: 288px; }
#st-list-modal .pm-type-row { padding: 8px 12px; min-height: 40px; }
#st-list-modal .pm-type-row + .pm-type-row { margin-top: 6px; }
#st-list-modal .pm-type-name { font-size: 13.5px; }
#st-list-modal .stl-sub { font-size: 11.5px; margin-top: 2px; }
#st-list-modal .pm-move button { width: 22px; height: 22px; font-size: 11px; }
#st-list-modal .pm-edit { width: 24px; height: 24px; font-size: 13px; margin-right: 6px; }
#st-list-modal .pm-del { height: 26px; padding: 0 9px; font-size: 12px; }

/* 渠道列表：条目少时不留过多空白 */
#st-list-modal .pm-type-list { min-height: 236px; max-height: 288px; }

/* 渠道弹窗再收窄，主按钮改蓝 */
#st-list-modal .pm-dialog.small { width: 410px; }
#st-list-modal .stl-plat { width: 104px; }
#st-list-modal .stl-add { background: #1673dd; }
#st-list-modal .stl-add:hover { background: #1263c2; }
#st-list-modal .stl-plat-btn.open { border-color: #1673dd; }
#st-list-modal .stl-plat-item.active { background: #e8f2ff; color: #1673dd; }

/* 渠道弹窗输入框：补上可见边框与光标 */
#st-list-modal .stl-add-row input {
  border: 1px solid #e3e9f2;
  background: #fff;
  color: #1f2937;
  caret-color: #1673dd;
}
#st-list-modal .stl-add-row input:focus {
  outline: none;
  border-color: #1673dd;
  box-shadow: 0 0 0 3px rgba(22,115,221,.12);
}
#st-list-modal .stl-add-row input::placeholder { color: #b7bfca; }

/* 平台列表高度对齐 6 行，避免半行裁切 */
#st-list-modal .pm-type-list { min-height: 318px; max-height: 318px; }

/* 平台/渠道弹窗：固定尺寸，数据多时显示滚动条 */
#st-list-modal .pm-dialog.small { width: 560px; }
#st-list-modal .pm-type-list {
  min-height: 372px; max-height: 372px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7d0dd transparent;
}
#st-list-modal .pm-type-list::-webkit-scrollbar { width: 8px; }
#st-list-modal .pm-type-list::-webkit-scrollbar-track { background: transparent; }
#st-list-modal .pm-type-list::-webkit-scrollbar-thumb {
  background: #c7d0dd; border-radius: 8px; border: 2px solid #fff;
}
#st-list-modal .pm-type-list::-webkit-scrollbar-thumb:hover { background: #aeb9c9; }

/* 绑定渠道：可搜索的合作方与渠道 */
.pm-select-input {
  width: 100%; height: 46px; padding: 0 34px 0 13px; border: 1px solid #e3e9f2;
  border-radius: 9px; font-size: 14px; color: #1f2937; background: #fff;
}
.pm-select-input:focus { outline: none; border-color: #5b5bf5; box-shadow: 0 0 0 3px rgba(91,91,245,.12); }
.pm-select-caret { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #9aa5b5; font-size: 12px; pointer-events: none; }
.pmb-search {
  width: 100%; height: 40px; padding: 0 12px; margin-bottom: 8px;
  border: 1px solid #e3e9f2; border-radius: 8px; font-size: 13.5px; color: #1f2937;
}
.pmb-search:focus { outline: none; border-color: #5b5bf5; box-shadow: 0 0 0 3px rgba(91,91,245,.12); }

/* 分成比例输入：去掉上下箭头，直接输入数字 */
.pmb-ratio input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.pmb-ratio input[type="number"]::-webkit-outer-spin-button,
.pmb-ratio input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

/* 渠道方列表 */
#view-personnel .pm-ch-list { display: flex; flex-wrap: wrap; gap: 6px; }
#view-personnel .pm-ch-chip {
  display: inline-flex; height: 24px; padding: 0 9px; align-items: center;
  border-radius: 6px; background: #eef2ff; color: #4f52c9; font-size: 12px;
}
#view-personnel .pm-ch-none { color: #b7bfca; font-size: 12.5px; }

/* 渠道方列表：可拖动列宽/列顺序 */
.pm-panel[data-pm-panel="channel"] .pm-table th { position: relative; cursor: grab; }
.pm-panel[data-pm-panel="channel"] .pm-table th.col-dragging { opacity: .6; }

/* 渠道方列表：绑定渠道数居中 */
.pm-panel[data-pm-panel="channel"] th[data-col="count"],
.pm-panel[data-pm-panel="channel"] td[data-col="count"] { text-align: center; }

/* 合作方列表：可拖动列宽/列顺序 */
.pm-panel[data-pm-panel="list"] .pm-table th { position: relative; cursor: grab; }
.pm-panel[data-pm-panel="list"] .pm-table th.col-dragging { opacity: .6; }

/* 合作方行排序按钮 */
#view-personnel .pm-ord {
  width: 24px; height: 24px; border: 1px solid #e3e9f2; border-radius: 6px;
  background: #fff; color: #6b7280; font-size: 11px; line-height: 1; margin-right: 4px;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
}
#view-personnel .pm-ord:hover { border-color: #c7c9ff; color: #5b5bf5; }

/* 合作方行：拖动排序 */
#pm-body tr[data-id] { cursor: grab; }
#pm-body tr[data-id].dragging { opacity: .55; background: #f5f7fb; }
#pm-body tr[data-id].dragging td { background: #f5f7fb; }
#pm-body, #pm-body tr[data-id] { user-select: none; -webkit-user-select: none; }
.pm-ord { display: none; }

/* 合作方行：默认普通指针，拖动时抓手 */
#pm-body tr[data-id] { cursor: default; }
#pm-body tr[data-id].dragging { cursor: grabbing; }

/* 操作列固定宽度，不参与拉伸 */
.pm-panel[data-pm-panel="list"] th[data-col="ops"],
.pm-panel[data-pm-panel="list"] td[data-col="ops"] {
  width: 190px; min-width: 190px; max-width: 190px; white-space: nowrap;
}
.pm-panel[data-pm-panel="list"] th[data-col="ops"] .col-resizer { display: none; }

/* 合作方管理：减少顶部留白，整体上移 */
#view-personnel { padding-top: 6px; }
#view-personnel .pm-head { margin-top: 0; }

/* 合作方列表：渠道数列居中 */
.pm-panel[data-pm-panel="list"] th[data-col="channels"],
.pm-panel[data-pm-panel="list"] td[data-col="channels"] { text-align: center; }

/* 合作方列表：设备数列居中 */
.pm-panel[data-pm-panel="list"] th[data-col="devices"],
.pm-panel[data-pm-panel="list"] td[data-col="devices"] { text-align: center; }

/* 默认类型标签 */
.pm-default-tag {
  height: 26px; padding: 0 10px; display: inline-flex; align-items: center;
  border-radius: 6px; background: #eef2ff; color: #5b5bf5; font-size: 12px;
}

/* 管理类型弹窗：加高列表并留出底部间距 */
#pm-type-modal .pm-dialog-body { padding-bottom: 20px; }
#pm-type-modal .pm-type-list { max-height: 420px; min-height: 300px; }

/* 设备市值统计 */
.dvv-toolbar { margin-bottom: 10px; }
.dvv-hint { font-size: 12.5px; color: #9aa5b5; }
.dvv-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dvv-table th { text-align: left; padding: 10px 12px; background: #fafbfd; color: #6b7280; font-weight: 500; white-space: nowrap; }
.dvv-table td { padding: 8px 12px; border-top: 1px solid #f3f6fa; }
.dvv-table td:first-child { max-width: 220px; }
.dvv-input {
  width: 110px; height: 36px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 7px;
  font-size: 13.5px; text-align: right; color: #1f2937;
}
.dvv-input:focus { outline: none; border-color: #1673dd; box-shadow: 0 0 0 3px rgba(22,115,221,.12); }
.dvv-num { text-align: right; white-space: nowrap; }
.dvv-total { display: flex; gap: 28px; margin-top: 14px; padding: 12px 14px; background: #f7f9fc; border-radius: 9px; font-size: 13.5px; }
.dvv-total b { color: #1673dd; font-size: 16px; margin-left: 6px; }
.dvv-total .minus b { color: #ef4444; }

/* 设备明细：购入价格 / 现市值 可输入 */
.dd-price-input {
  width: 96px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; font-size: 13px; color: #1f2937; text-align: right;
}
.dd-price-input:hover { border-color: #e3e9f2; background: #fff; }
.dd-price-input:focus { outline: none; border-color: #1673dd; background: #fff; box-shadow: 0 0 0 3px rgba(22,115,221,.12); }

/* 市值统计：去掉数字输入上下箭头 */
.dvv-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.dvv-input[type="number"]::-webkit-outer-spin-button,
.dvv-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* 设备市值统计按钮着色 */
#dv-value-btn {
  background: #e8f2ff;
  border-color: #bcd7fb;
  color: #1673dd;
  font-weight: 500;
}
#dv-value-btn:hover { background: #d8e9ff; border-color: #93c0f5; color: #1263c2; }

/* 设备市值统计：全部列居中 */
#dv-value-modal .dvv-table th,
#dv-value-modal .dvv-table td { text-align: center; }
#dv-value-modal .dvv-table td:first-child { text-align: center; }
#dv-value-modal .dvv-input { text-align: center; margin: 0 auto; display: block; }

/* 监控配置 */
#st-cam-body .st-dot { background: #22c55e; }
#st-cam-body .st-dot.off { background: #d1d5db; }
.cam-url { font-size: 12.5px; color: #4b5563; word-break: break-all; }
.cam-tip { padding: 12px 14px; border-radius: 8px; background: #fffaf0; border: 1px solid #fbe9c8; color: #a5691a; font-size: 12.5px; line-height: 1.7; }
.cam-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#cam-preview video { width: 100%; border-radius: 10px; background: #000; }

/* 双画面预览 */
.cam-dual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cam-dual-cell { background: #0b1220; border-radius: 10px; overflow: hidden; }
.cam-dual-title { padding: 8px 12px; font-size: 12.5px; color: #cbd5e1; background: #111a2c; }
#cam-dual-modal video { width: 100%; display: block; background: #000; aspect-ratio: 16/9; object-fit: contain; }
@media (max-width: 900px) { .cam-dual-grid { grid-template-columns: 1fr; } }

.cam-dual-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cam-dual-sel {
  height: 26px; padding: 0 6px; border-radius: 6px; border: 1px solid #26364f;
  background: #16233a; color: #cbd5e1; font-size: 12px;
}

/* 双画面：按视频原始比例显示，去掉左右黑边 */
#cam-dual-modal video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;      /* 固定 16:9 */
  object-fit: contain;       /* 完整显示，不裁切 */
  object-position: center top; /* 保留顶部的设备时间水印 */
  display: block;
  background: #000;
}
#cam-dual-modal .cam-dual-cell { background: #000; }

/* 监控播放模式切换 */
.cam-mode { display: inline-flex; background: #eef2f7; border-radius: 8px; padding: 3px; margin-left: auto; margin-right: 12px; }
.cam-mode button {
  border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 6px;
  font-size: 12.5px; color: #4b5563; cursor: pointer;
}
.cam-mode button.active { background: #fff; color: #1673dd; font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* 模式说明 */
.cam-mode-desc { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.cam-mode-desc > div {
  display: flex; gap: 10px; align-items: center; padding: 7px 12px; border-radius: 7px;
  background: #f7f9fc; font-size: 12.5px; color: #6b7280;
}
.cam-mode-desc b { min-width: 64px; color: #374151; font-weight: 600; }
.cam-mode-desc > div.active { background: #eef5ff; color: #1263c2; }
.cam-mode-desc > div.active b { color: #1673dd; }

/* 用户与权限 */
.stu-select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 9px; font-size: 14px; background: #fff; }
.stg-perms { display: flex; flex-wrap: wrap; gap: 8px; }
.stg-perm { height: 34px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; font-size: 13px; color: #4b5563; cursor: pointer; }
.stg-perm.on { background: #eef5ff; border-color: #bcd7fb; color: #1673dd; }
#st-user-body .st-tag-ok.off { background: #f3f4f6; color: #9aa5b5; }

/* 创建账号弹窗（对齐参考稿） */
#st-user-modal .pm-dialog.acct { width: 520px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
#st-user-modal .pm-dialog-body { overflow-y: auto; padding: 18px 24px 8px; }
.acct-field { margin-bottom: 16px; }
.acct-field > label { display: block; font-size: 15px; color: #111827; font-weight: 600; margin-bottom: 9px; }
.acct-field input, .acct-field .stu-select {
  width: 100%; height: 50px; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 0 14px; font-size: 14.5px; background: #fff; color: #111827;
}
.acct-field input::placeholder { color: #b6bec9; }
.acct-pwd { position: relative; }
.acct-pwd input { padding-right: 44px; }
.acct-pwd button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; background: transparent; color: #9aa5b5; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.acct-perm-head { display: flex; align-items: flex-start; justify-content: space-between; margin: 4px 0 10px; }
.acct-perm-head label { display: block; font-size: 15px; font-weight: 600; color: #111827; }
.acct-perm-head p { margin: 5px 0 0; font-size: 12.5px; color: #9aa5b5; }
.acct-perms { border: 1px solid #eef2f7; border-radius: 12px; padding: 6px 4px; max-height: 220px; overflow-y: auto; margin-bottom: 8px; }
.acct-perm { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 14.5px; color: #111827; cursor: pointer; }
.acct-perm:hover { background: #f7f9fc; }
.acct-perm input { width: 18px; height: 18px; accent-color: #111827; }
.acct-foot { display: flex; gap: 12px; padding: 12px 24px 20px; }
.acct-btn { flex: 1; height: 50px; border-radius: 12px; border: 0; font-size: 15.5px; font-weight: 600; cursor: pointer; }
.acct-btn.ghost { background: #f3f4f6; color: #374151; }
.acct-btn.dark { background: #111827; color: #fff; }

/* 创建账号：紧凑排版，一屏显示更多 */
#st-user-modal .pm-dialog.acct { width: 560px; }
.acct-field { margin-bottom: 11px; }
.acct-field > label { font-size: 14px; margin-bottom: 6px; }
.acct-field input, .acct-field .stu-select { height: 44px; border-radius: 10px; font-size: 14px; }
.acct-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-perm-head { margin: 2px 0 8px; }
.acct-perm-head label { font-size: 14px; }
.acct-perm-head p { margin: 3px 0 0; font-size: 12px; }
.acct-perms { max-height: 216px; padding: 4px 2px; }
.acct-perm { padding: 6px 10px; font-size: 14px; }
.acct-foot { padding: 10px 22px 16px; }
.acct-btn { height: 46px; }
#st-user-modal .pm-dialog-body { padding: 14px 22px 6px; }

/* 角色排序手柄 */
.col-sort { width: 64px; text-align: center; }
.drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; color: #9aa5b5;
  cursor: grab; user-select: none; font-size: 16px; letter-spacing: 1px;
}
.drag-handle:hover { background: #f3f6fb; color: #1673dd; }
.drag-handle:active { cursor: grabbing; }
#st-group-body tr.dragging { background: #f7f9fc; opacity: .7; }

/* 首屏防闪：尚未完成视图切换时，隐藏订单页头/列表与错误的导航高亮 */
html[data-last-view]:not([data-last-view="orders"]) #view-orders { display: none !important; }
html[data-last-view]:not([data-last-view="forecast"]) #view-forecast { display: none !important; }
html[data-last-view]:not([data-last-view="orders"]) .page-head { display: none !important; }
html[data-last-view]:not([data-last-view="orders"]) .nav-item.active {
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}
/* 启动期（body[data-boot]）先不显示订单页头与导航高亮，避免刷新闪屏 */
body[data-boot] .page-head,
body[data-boot] #view-orders { display: none !important; }
body[data-boot] .nav-item.active {
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
}

/* 启动期不再隐藏整条侧栏（避免闪白） */
body[data-boot] #sidebar { visibility: visible; }

/* 基本设置新增面板 */
.st-switch { display: inline-flex; align-items: center; cursor: pointer; }
.st-switch input { display: none; }
.st-switch span { width: 42px; height: 24px; border-radius: 999px; background: #e3e9f2; position: relative; transition: background .18s; }
.st-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.2); transition: transform .18s; }
.st-switch input:checked + span { background: #1673dd; }
.st-switch input:checked + span::after { transform: translateX(18px); }
.st-checks { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.st-checks label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: #374151; cursor: pointer; }
.st-checks input { width: 16px; height: 16px; accent-color: #1673dd; }
.st-platforms { display: flex; flex-wrap: wrap; gap: 10px; }
.st-platform { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #e3e9f2; border-radius: 9px; background: #fff; font-size: 13.5px; }
.st-platform input { width: 16px; height: 16px; accent-color: #1673dd; }
.st-platform button { border: 0; background: transparent; color: #ef4444; cursor: pointer; font-size: 12.5px; }

/* 页签全部收起时，去掉卡片底部留白 */
#st-basic.st-tabs-collapsed { padding-bottom: 2px; }
#st-basic.st-tabs-collapsed .st-tabs { margin-bottom: 0; border-bottom: 0; }
#st-basic.st-tabs-collapsed .st-top-actions { margin-bottom: 6px; }

/* 定时备份：单行控制条 */
.st-backup-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.st-backup-bar .st-blue { height: 34px; }

/* 电子签章预览 */
.st-seal-preview { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.st-seal-preview img { max-width: 220px; max-height: 140px; border: 1px dashed #e3e9f2; border-radius: 8px; padding: 6px; background: #fff; }
.st-seal-preview .st-hint { margin: 0; }

/* 版本信息 */
.st-version { text-align: center; font-size: 12px; color: #9aa5b5; padding: 4px 0 16px; }


/* 基本设置顶部按钮改为独立一行，避免遮挡页签 */
#st-basic .st-top-actions { position: static; display: flex; justify-content: flex-end; gap: 8px; margin: 2px 0 2px; }
#st-basic .st-top-btn { height: 30px; padding: 0 12px; font-size: 12.5px; }

/* 合同配置 */
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; }
.ct-field > label { display: block; font-size: 13.5px; color: #374151; font-weight: 500; margin-bottom: 8px; }
.ct-input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 10px; font-size: 14px; color: #1f2937; background: #fff; }
.ct-input:focus { outline: none; border-color: #bcd7fb; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.ct-seg { display: inline-flex; background: #f2f5fa; border-radius: 10px; padding: 4px; gap: 4px; }
.ct-seg-item { cursor: pointer; }
.ct-seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.ct-seg-item span { display: inline-flex; align-items: center; height: 34px; padding: 0 18px; border-radius: 8px; font-size: 13.5px; color: #4b5563; transition: all .15s; }
.ct-seg-item input:checked + span { background: #fff; color: #1673dd; font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.ct-seal { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.ct-seal-preview {
  width: 200px; height: 120px; border: 1px dashed #d7e0ee; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; background: #fafcff; overflow: hidden;
}
.ct-seal-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ct-seal-preview span { font-size: 12.5px; color: #9aa5b5; }
.ct-seal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 420px; }
.ct-upload { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 9px; background: #1673dd; color: #fff; font-size: 13px; cursor: pointer; }
.ct-remove { height: 38px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 9px; background: #fff; font-size: 13px; color: #6b7280; cursor: pointer; }
.ct-remove:hover { border-color: #fca5a5; color: #ef4444; }
.ct-hint { width: 100%; margin: 2px 0 0; font-size: 12px; color: #9aa5b5; }
.ct-foot { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f1f5f9; }

/* 合同配置收紧 */
.ct-seal-preview { width: 128px; height: 128px; border-radius: 14px; }
.ct-seal-preview span { font-size: 12px; }
.ct-seal-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; height: 128px; max-width: 320px; }
.ct-seal-btns { display: flex; gap: 8px; }
.ct-hint { margin: 0; line-height: 1.5; }
.ct-grid { gap: 16px; max-width: 720px; }
.ct-seg-item span { height: 32px; padding: 0 16px; font-size: 13px; }
.ct-input { height: 42px; }
.ct-foot { margin-top: 20px; padding-top: 14px; }

/* 基本设置：两列紧凑排版 */
.bs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; max-width: 820px; }
.bs-field > label { display: block; font-size: 13.5px; color: #374151; font-weight: 500; margin-bottom: 7px; }
.bs-input { width: 100%; height: 42px; padding: 0 13px; border: 1px solid #e3e9f2; border-radius: 9px; font-size: 13.5px; color: #1f2937; background: #fff; }
.bs-input:focus { outline: none; border-color: #bcd7fb; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.bs-hint { margin: 5px 0 0; font-size: 12px; color: #9aa5b5; }
.bs-logo { display: flex; align-items: center; gap: 12px; }
.bs-logo-preview { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #e8edf5; background: #0f172a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.bs-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.bs-logo-actions { display: flex; align-items: center; gap: 10px; }
.bs-upload { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #e3e9f2; background: #fff; font-size: 12.5px; color: #374151; cursor: pointer; }
.bs-upload:hover { border-color: #bcd7fb; color: #1673dd; }
.bs-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid #f1f5f9; max-width: 820px; }


/* 顶部按钮：加底色，收紧高度；页签整体上移 */
#st-basic { padding-top: 4px; }
#st-basic .st-top-actions { margin: 0 0 -8px; }
#st-basic .st-top-btn {
  height: 28px; padding: 0 12px; font-size: 12.5px;
  background: #eef2f7; border: 1px solid #e3e9f2; color: #475569; border-radius: 8px;
}
#st-basic .st-top-btn:hover { background: #e6efff; border-color: #bcd7fb; color: #1673dd; }
.st-tab { padding-top: 10px; padding-bottom: 10px; }


/* 顶部按钮绝对定位，页签行整体上移 */
#st-basic { position: relative; }
#st-basic .st-top-actions { position: absolute; top: 4px; right: 0; margin: 0; }
#st-basic .st-tabs { padding-right: 200px; }
@media (max-width: 1280px) {
  #st-basic .st-top-actions { position: static; margin: 0 0 6px; }
  #st-basic .st-tabs { padding-right: 0; }
}


/* 页签与顶部按钮同行：收紧间距 */
#view-settings #st-tabs { gap: 2px 13px; }
#view-settings #st-tabs .st-tab { padding: 12px 0 11px; font-size: 12.5px; }
#st-basic .st-tabs { padding-right: 190px; }

/* 设置页头：页签 + 按钮，弹性排列 */
#st-basic .st-head-row {
  display: flex; align-items: flex-start; gap: 20px;
  border-bottom: 1px solid #eef2f7; padding-bottom: 2px;
}
#st-basic .st-head-row .st-tabs {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 0;
  border-bottom: 0; gap: 4px 26px;
}
#st-basic .st-head-row .st-top-actions {
  position: static; flex: 0 0 auto; display: flex; gap: 8px; margin: 8px 0 0;
}
#view-settings #st-basic .st-head-row .st-tab { padding: 15px 0 14px; font-size: 13px; }
#st-basic .st-tabs { padding-right: 0; }
#st-basic .st-top-btn {
  height: 30px; padding: 0 14px; font-size: 12.5px;
  background: #eef2f7; border: 1px solid #e3e9f2; color: #475569; border-radius: 8px;
}


/* 页头与表单之间留出呼吸空间 */
#st-basic .st-head-row { padding-top: 4px; margin-bottom: 24px; }
#st-basic .st-head-row .st-tabs { align-items: center; }
#view-settings #st-basic .st-head-row .st-tab { padding: 16px 0 14px; }
#view-settings #st-basic .st-panel { padding-top: 2px; }
#view-settings #st-basic .st-panel .bs-field:first-child > label,
#view-settings #st-basic .st-panel .st-field:first-child > label { margin-top: 2px; }
#st-basic .st-head-row .st-top-actions { margin-top: 10px; }


/* 收起时只保留页签行，不留底部空隙 */
#st-basic.st-tabs-collapsed .st-head-row { margin-bottom: 0; padding-bottom: 4px; }
#st-basic.st-tabs-collapsed .st-tab { padding: 15px 0 13px; }


/* 收起状态不再显示多余分隔线 */
#st-basic.st-tabs-collapsed .st-head-row { border-bottom: 0; }
#st-basic.st-tabs-collapsed .st-tabs { border-bottom: 0; }


/* 页签更疏朗、字号更大 */
#st-basic .st-head-row .st-tabs { gap: 6px 34px; }
#view-settings #st-basic .st-head-row .st-tab { font-size: 14px; padding: 17px 0 15px; }
#st-basic.st-tabs-collapsed .st-tab { padding: 16px 0 14px; }


/* 页签间距再放大 */
#st-basic .st-head-row .st-tabs { gap: 6px 44px; }
#view-settings #st-basic .st-head-row .st-tab { font-size: 14.5px; padding: 18px 0 16px; }


/* 收起状态外框更矮，内容垂直居中 */
#st-basic.st-tabs-collapsed { padding-top: 0; padding-bottom: 0; }
#st-basic.st-tabs-collapsed .st-head-row { padding-top: 0; padding-bottom: 0; margin-bottom: 0; }
#st-basic.st-tabs-collapsed .st-head-row .st-tab { padding: 14px 0; }
#st-basic.st-tabs-collapsed .st-top-actions { margin: 0; align-self: center; }


/* 顶部按钮加大并垂直居中 */
#st-basic .st-head-row { align-items: center; }
#st-basic .st-head-row .st-top-actions { margin: 0; align-items: center; }
#st-basic .st-top-btn {
  height: 36px; padding: 0 18px; font-size: 13.5px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 监控声音开关 */
.cam-sound {
  height: 28px; padding: 0 12px; border-radius: 7px; border: 1px solid #e3e9f2;
  background: #fff; font-size: 12.5px; color: #475569; cursor: pointer; margin-right: 10px;
}
.cam-sound.on { background: #eef5ff; border-color: #bcd7fb; color: #1673dd; }

/* 录像归档 */
.cam-rec { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; flex-wrap: wrap; }
.cam-rec-path { margin-left: auto; font-size: 12px; color: #9aa5b5; }

/* 录像回看 */
.pb-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pb-cams { display: inline-flex; background: #f2f5fa; border-radius: 9px; padding: 3px; gap: 3px; }
.pb-cam { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; color: #4b5563; cursor: pointer; }
.pb-cam.active { background: #fff; color: #1673dd; font-weight: 600; box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.pb-select { height: 34px; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 8px; font-size: 13px; background: #fff; }
.pb-hint { font-size: 12.5px; color: #9aa5b5; margin-left: auto; }
.pb-main { display: grid; grid-template-columns: 250px 1fr; gap: 14px; }
.pb-list { max-height: 420px; overflow-y: auto; border: 1px solid #eef2f7; border-radius: 10px; }
.pb-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; font-size: 13px; color: #374151; cursor: pointer; border-bottom: 1px solid #f5f8fc; }
.pb-item:last-child { border-bottom: 0; }
.pb-item:hover { background: #f7f9fc; }
.pb-item.active { background: #eef5ff; color: #1673dd; }
.pb-item em { font-style: normal; font-size: 11.5px; color: #9aa5b5; }
.pb-player { position: relative; background: #000; border-radius: 10px; overflow: hidden; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.pb-player video { width: 100%; max-height: 420px; background: #000; }
.pb-empty { position: absolute; color: #94a3b8; font-size: 13px; }

/* 回看筛选 */
.pb-chips { display: inline-flex; gap: 6px; }
.pb-chip { height: 30px; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; font-size: 12.5px; color: #4b5563; cursor: pointer; }
.pb-chip.active { background: #eef5ff; border-color: #bcd7fb; color: #1673dd; }
.pb-range { display: flex; align-items: center; gap: 8px; margin: 10px 0 12px; font-size: 12.5px; color: #6b7280; }
.pb-time { height: 30px; padding: 0 8px; border: 1px solid #e3e9f2; border-radius: 7px; font-size: 12.5px; }
.pb-apply { height: 30px; padding: 0 14px; border: 0; border-radius: 7px; background: #1673dd; color: #fff; font-size: 12.5px; cursor: pointer; }
.pb-reset { height: 30px; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 7px; background: #fff; font-size: 12.5px; color: #4b5563; cursor: pointer; }
.pb-right { display: flex; flex-direction: column; gap: 10px; }
.pb-tools { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #6b7280; }
.pb-tool { height: 30px; padding: 0 12px; border: 1px solid #e3e9f2; border-radius: 7px; background: #fff; font-size: 12.5px; color: #374151; cursor: pointer; }
.pb-now { color: #1673dd; }
.pb-auto { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }


/* 回看播放器固定 16:9，避免加载前后高度跳动 */
.pb-player { aspect-ratio: 16 / 9; min-height: 0; }
.pb-player video { width: 100%; height: 100%; object-fit: contain; max-height: none; display: block; }
.pb-right { min-width: 0; }

/* 时间筛选优化 */
.pb-range-label { color: #374151; font-weight: 500; }
.pb-range-sep { color: #9aa5b5; }
.pb-time { width: 118px; height: 32px; text-align: center; font-size: 13px; }
.pb-span { margin-left: auto; color: #6b7280; }
.pb-hours { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pb-hour { height: 28px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 7px; background: #fff; font-size: 12.5px; color: #374151; cursor: pointer; }
.pb-hour em { font-style: normal; color: #1673dd; margin-left: 2px; }
.pb-hour:hover { border-color: #bcd7fb; color: #1673dd; }

/* 回看时间搜索框 */
.pb-search-wrap { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 9px; background: #fff; color: #9aa5b5; min-width: 320px; }
.pb-search-wrap:focus-within { border-color: #bcd7fb; box-shadow: 0 0 0 3px rgba(22,115,221,.08); }
.pb-search { flex: 1; border: 0; outline: none; font-size: 13px; color: #1f2937; background: transparent; }
.pb-search::placeholder { color: #b6bec9; }
.pb-clear { border: 0; background: transparent; color: #b6bec9; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.pb-clear:hover { color: #ef4444; }

/* 回看时间轴 */
.pb-timeline { position: relative; margin-top: 2px; }
.pb-track { position: relative; height: 34px; background: #f2f5fa; border-radius: 8px; cursor: pointer; overflow: hidden; }
.pb-seg { position: absolute; top: 6px; bottom: 6px; background: #34d399; border-radius: 3px; opacity: .9; }
.pb-seg:hover { opacity: 1; box-shadow: 0 0 0 1px #10b981; }
.pb-ticks { position: absolute; inset: 0; pointer-events: none; }
.pb-ticks span { position: absolute; top: 18px; transform: translateX(-50%); font-size: 10px; color: #9aa5b5; }
.pb-ticks span:first-child { transform: none; }
.pb-ticks span:last-child { transform: translateX(-100%); }
.pb-cursor { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; display: none; pointer-events: none; }
.pb-cursor::before { content: ''; position: absolute; top: -3px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.pb-tip { position: absolute; top: -24px; transform: translateX(-50%); background: #111827; color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 5px; opacity: 0; transition: opacity .12s; pointer-events: none; white-space: nowrap; }
.pb-tip.show { opacity: 1; }

.pb-track { touch-action: none; user-select: none; }
.pb-track:active { cursor: grabbing; }

.pb-tip.warn { background: #b91c1c; }
.pb-cursor.empty { background: #9aa5b5; }
.pb-cursor.empty::before { background: #9aa5b5; }

/* 拖动时间轴时禁止选中文本，避免出现灰色选区 */
.pb-timeline, .pb-track, .pb-track * {
  -webkit-user-select: none; user-select: none;
}
.pb-track ::selection { background: transparent; }
.pb-cursor.empty { display: none !important; }

/* 拖动时游标保持红色细线；空档用虚线段表示 */
.pb-cursor { transition: left .04s linear; }
.pb-cursor.on-gap { background-image: linear-gradient(#ef4444 50%, transparent 0); background-size: 2px 6px; opacity: .7; }
.pb-cursor.empty { display: block !important; }

/* 时间轴缩放 */
.pb-zoom { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: #6b7280; }
.pb-zoom input[type="range"] { flex: 1; max-width: 260px; accent-color: #1673dd; }
.pb-zoom-label { color: #374151; }
.pb-zoom-text { min-width: 62px; color: #1673dd; font-weight: 500; }
.pb-fit { height: 26px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 7px; background: #fff; font-size: 12px; color: #374151; cursor: pointer; }
.pb-fit:hover { border-color: #bcd7fb; color: #1673dd; }

/* 刻度移到轨道下方，避免压住绿色块 */
.pb-track { margin-bottom: 18px; }
.pb-ticks span { top: 38px; font-size: 10.5px; }
.pb-zoom { margin-top: 0; }

/* 刻度显示在轨道下方（轨道不再裁剪） */
.pb-track { overflow: visible; }
.pb-zoom { margin-top: 20px; }

/* 刻度独立到轨道下方 */
.pb-timeline { position: relative; }
.pb-ticks { position: relative; height: 16px; margin-top: 4px; }
.pb-ticks span { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; color: #9aa5b5; }
.pb-ticks span:first-child { transform: none; }
.pb-ticks span:last-child { transform: translateX(-100%); }
.pb-track { margin-bottom: 0; }
.pb-zoom { margin-top: 10px; }

/* 游标必须在绿色块之上 */
.pb-seg { z-index: 1; }
.pb-cursor { z-index: 6; }
.pb-ticks { z-index: 2; }

/* 游标在空档也保持红色实线 */
.pb-cursor.on-gap { background-image: none; opacity: 1; background-color: #ef4444; }

/* 连续录像合并为一整条 */
.pb-seg { border-radius: 4px; box-shadow: none; opacity: 1; background: #34d399; }
.pb-seg + .pb-seg { margin-left: 0; }

/* 时间范围选择弹窗 */
.pb-search-wrap { position: relative; min-width: 340px; }
.pb-search { cursor: pointer; }
.pb-picker { position: absolute; top: 40px; left: 0; z-index: 30; width: 520px; background: #fff; border: 1px solid #e8eef7; border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: 14px; }
.pb-picker.hidden { display: none; }
.pb-picker-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pb-picker-title { font-size: 12.5px; color: #374151; font-weight: 600; margin-bottom: 8px; }
.pb-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pb-col { height: 150px; overflow-y: auto; border: 1px solid #eef2f7; border-radius: 8px; padding: 4px; background: #fbfcfe; }
.pb-col::-webkit-scrollbar { width: 4px; }
.pb-col::-webkit-scrollbar-thumb { background: #dbe3ee; border-radius: 2px; }
.pb-col-item { display: block; width: 100%; border: 0; background: transparent; height: 28px; border-radius: 6px; font-size: 12.5px; color: #4b5563; cursor: pointer; }
.pb-col-item:hover { background: #eef5ff; color: #1673dd; }
.pb-col-item.on { background: #1673dd; color: #fff; font-weight: 600; }
.pb-picker-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f1f5f9; }
.pb-picker-btn { height: 30px; padding: 0 14px; border: 1px solid #e3e9f2; border-radius: 7px; background: #fff; font-size: 12.5px; color: #374151; cursor: pointer; }
.pb-picker-btn.primary { background: #1673dd; border-color: #1673dd; color: #fff; }

/* 回看控制区排版优化 */
.pb-timeline { margin-top: 14px; }
.pb-track { height: 38px; border-radius: 10px; background: #f3f6fb; }
.pb-seg { top: 8px; bottom: 8px; }
.pb-ticks { margin-top: 8px; height: 18px; }
.pb-ticks span { font-size: 11px; color: #98a2b3; }
.pb-zoom {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; padding: 10px 12px;
  background: #f8fafd; border: 1px solid #eef2f7; border-radius: 10px;
}
.pb-zoom-label { color: #374151; font-weight: 500; white-space: nowrap; }
.pb-zoom input[type="range"] { flex: 1 1 auto; max-width: none; margin: 0; }
.pb-zoom-text { min-width: 168px; text-align: right; color: #1673dd; font-weight: 500; white-space: nowrap; }
.pb-zoom-actions { display: flex; gap: 6px; margin-left: 4px; }
.pb-fit { height: 28px; padding: 0 12px; background: #fff; }
.pb-tools { margin-top: 12px; gap: 12px; }
.pb-tool { height: 32px; padding: 0 14px; }
.pb-now { min-width: 140px; text-align: center; font-variant-numeric: tabular-nums; }
.pb-auto { gap: 6px; }

/* 换源时用上一帧做遮罩，避免黑屏一闪 */
.pb-freeze { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: none; pointer-events: none; z-index: 3; }
.pb-freeze.show { display: block; }

/* 自定义播放控制 */
.pb-player { cursor: pointer; }
.pb-player video { cursor: pointer; }
.pb-time { font-variant-numeric: tabular-nums; color: #4b5563; font-size: 12.5px; min-width: 92px; }
.pb-play { min-width: 82px; text-align: center; }

/* 常驻播放进度条 */
.pb-player { position: relative; }
.pb-progress { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 0 4px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.pb-progress input[type="range"] { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.35); border-radius: 2px; outline: none; display: block; }
.pb-progress input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #1673dd; border: 2px solid #fff; cursor: pointer; }
.pb-progress input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #1673dd; border: 2px solid #fff; cursor: pointer; }

/* 进度条更明显 */
.pb-progress { padding: 10px 12px 8px; }
.pb-progress input[type="range"] { height: 6px; background: rgba(255,255,255,.45); }
.pb-progress input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; }

/* 播放控制条常驻：滚动时吸底 */
.pb-tools {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 8px 0 6px;
  border-top: 1px solid #f1f5f9;
  z-index: 5;
}

/* 播放器内常驻控制条（仿原生，但永不隐藏） */
.pb-overlay { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.62)); padding: 22px 12px 8px; z-index: 4; }
.pb-overlay-seek { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.4); border-radius: 2px; outline: none; display: block; margin-bottom: 6px; }
.pb-overlay-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.pb-overlay-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.pb-overlay-bar { display: flex; align-items: center; gap: 10px; }
.pb-ov-btn { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pb-ov-btn:hover { background: rgba(255,255,255,.16); }
.pb-ov-time { color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pb-ov-mute { margin-left: auto; }
@media (hover: none) { .pb-overlay { opacity: 1; } }

/* 时间轴已播放进度（与视频进度同步） */
.pb-played { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: rgba(4,120,87,.28); border-radius: 8px 0 0 8px; pointer-events: none; z-index: 2; }

/* 已播放区域更柔和，只做轻微高亮 */
.pb-played { background: rgba(255,255,255,.22); z-index: 3; }

/* 回看底部排版 */
.pb-timeline { margin-top: 10px; }
.pb-ticks { margin-top: 6px; }
.pb-zoom { margin-top: 10px; padding: 9px 12px; gap: 10px; }
.pb-tools {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px; padding: 10px 2px 6px;
  border-top: 1px solid #f1f5f9;
}
.pb-nav { display: flex; gap: 8px; flex: 0 0 auto; }
.pb-now { flex: 1 1 auto; text-align: center; color: #1673dd; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.pb-auto { margin-left: 0; flex: 0 0 auto; }
#cam-playback-modal .pm-dialog-body { padding-bottom: 6px; }
#cam-playback-modal .pm-dialog-foot { padding-top: 8px; }

/* 回看弹窗高度约束，底部控件不出界 */
#cam-playback-modal .pm-dialog {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
#cam-playback-modal .pm-dialog-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}
#cam-playback-modal .pb-player { max-height: 44vh; }
#cam-playback-modal .pm-dialog-foot { flex: 0 0 auto; }

/* 回看弹窗：按窗口高度自适应，一屏显示全部信息 */
#cam-playback-modal .pm-dialog { max-height: 96vh; }
#cam-playback-modal .pm-dialog-body { overflow: visible; }
#cam-playback-modal .pb-player {
  max-height: calc(100vh - 430px);
  min-height: 240px;
}
#cam-playback-modal .pm-dialog-head { padding-bottom: 6px; }
#cam-playback-modal .pb-list { max-height: calc(100vh - 470px); min-height: 220px; }

/* 内容已自适应一屏，取消控制条吸底以免遮挡关闭按钮 */
#cam-playback-modal .pb-tools { position: static; z-index: auto; border-top: 1px solid #f1f5f9; background: transparent; }
#cam-playback-modal .pm-dialog-foot { position: relative; z-index: 6; background: #fff; }

/* 更紧凑：保证小屏也能一屏放下全部信息 */
#cam-playback-modal .pb-player { max-height: calc(100vh - 520px); min-height: 200px; }
#cam-playback-modal .pb-list { max-height: calc(100vh - 540px); min-height: 180px; }
#cam-playback-modal .pm-dialog-body { padding-bottom: 4px; }
#cam-playback-modal .pb-timeline { margin-top: 6px; }
#cam-playback-modal .pb-zoom { margin-top: 6px; padding: 7px 10px; }
#cam-playback-modal .pb-tools { margin-top: 6px; padding: 6px 2px 2px; }
#cam-playback-modal .pm-dialog-foot { padding-top: 6px; padding-bottom: 6px; }

/* 常驻播放信息（时间/进度），不随原生控制条隐藏 */
.pb-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.55)); z-index: 4; pointer-events: none; }
.pb-info-seek { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.45); border-radius: 2px; outline: none; display: block; margin-bottom: 6px; pointer-events: auto; }
.pb-info-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.pb-info-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.pb-info-row { display: flex; align-items: center; justify-content: space-between; }
.pb-info-time { color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pb-info-full { border: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; pointer-events: auto; padding: 2px 6px; }

/* 常驻信息更清晰 */
.pb-info-time { font-size: 13.5px; font-weight: 600; letter-spacing: .2px; }
.pb-info { padding-bottom: 10px; }
.pb-info-seek { height: 5px; background: rgba(255,255,255,.5); }

/* 常驻信息条里的播放按钮 */
.pb-info-play { border: 0; background: transparent; color: #fff; font-size: 15px; cursor: pointer; pointer-events: auto; padding: 0 8px 0 2px; line-height: 1; }
.pb-info-row { justify-content: flex-start; gap: 6px; }
.pb-info-full { margin-left: auto; }

/* 加载时用黑底遮住浏览器自带的加载圈 */
#cam-playback-modal .pb-player { background: #000; }
#cam-playback-modal .pb-player.loading video { opacity: 0; }

/* 尝试隐藏 Chromium 内部加载指示器 */
#cam-playback-modal video::-webkit-media-controls-loading-panel,
#cam-playback-modal video::-internal-media-controls-loading-panel {
  display: none !important;
  opacity: 0 !important;
}

/* 回看：去掉底部关闭行，播放器取最大尺寸 */
#cam-playback-modal .pm-dialog-foot { display: none !important; }
#cam-playback-modal .pm-dialog { width: 1280px !important; max-width: 96vw !important; }
#cam-playback-modal .pb-main { grid-template-columns: 320px 1fr; gap: 14px; }
#cam-playback-modal .pb-player {
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 300px);
  width: 100%;
}
#cam-playback-modal .pb-player video { width: 100%; height: 100%; object-fit: contain; }
#cam-playback-modal .pb-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* 播放器再大一些 */
#cam-playback-modal .pm-dialog { width: 1360px !important; }
#cam-playback-modal .pb-main { grid-template-columns: 300px 1fr; gap: 16px; }
#cam-playback-modal .pb-player { max-height: calc(100vh - 260px); }
#cam-playback-modal .pb-list { max-height: calc(100vh - 320px); }

/* 播放器接近全屏宽度 */
#cam-playback-modal .pm-dialog { width: 96vw !important; max-width: 96vw !important; }
#cam-playback-modal .pb-main { grid-template-columns: 260px 1fr; }
#cam-playback-modal .pb-player { max-height: calc(100vh - 240px); }

/* 修正：确保范围滑块整行落在弹窗内 */
#cam-playback-modal .pm-dialog { max-height: 94vh !important; }
#cam-playback-modal .pb-player { max-height: calc(100vh - 380px) !important; }
#cam-playback-modal .pm-dialog-body { padding-bottom: 12px; }

/* 播放器严格 16:9，用宽度约束高度，避免左右黑边 */
#cam-playback-modal .pb-player {
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  max-width: calc((100vh - 380px) * 16 / 9) !important;
  max-height: none !important;
  margin: 0 auto;
  background: transparent;
}
#cam-playback-modal .pb-player video { width: 100%; height: 100%; object-fit: cover; }

/* 播放器铺满右侧，去掉左右空白 */
#cam-playback-modal .pm-dialog {
  width: min(96vw, calc((100vh - 380px) * 16 / 9 + 320px)) !important;
  max-width: none !important;
}
#cam-playback-modal .pb-player {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

/* 拖动预览期间保持黑底，避免闪白 */
#cam-playback-modal .pb-player { background: #000 !important; }
#cam-playback-modal .pb-freeze { background: #000 !important; }
#cam-playback-modal .pb-empty { background: #2b2f36; }

/* 隐藏的预加载视频 */
#cam-playback-modal .pb-pre { position: absolute; left: -9999px; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }

/* 常驻播放控制条（不会淡出） */
.pb-ctrl { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 10px; background: linear-gradient(transparent, rgba(0,0,0,.72)); z-index: 5; }
.pb-c-seek { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.35); border-radius: 2px; outline: none; display: block; margin-bottom: 8px; }
.pb-c-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.pb-c-row { display: flex; align-items: center; gap: 10px; }
.pb-c-btn { width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pb-c-btn:hover { background: rgba(255,255,255,.16); }
.pb-c-time { color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.pb-c-spacer { flex: 1; }

/* 时间轴轨道更矮，给视频控制条留出空间 */
#cam-playback-modal .pb-track { height: 26px !important; border-radius: 8px; }
#cam-playback-modal .pb-seg { top: 5px; bottom: 5px; }
#cam-playback-modal .pb-ticks { margin-top: 4px; height: 16px; }
#cam-playback-modal .pb-timeline { margin-top: 6px; }

/* 时间气泡改为向下显示 */
.pb-tip { top: auto !important; bottom: -28px !important; }
.pb-timeline { margin-bottom: 22px; }

/* 气泡紧贴轨道下方（覆盖刻度也不影响，仅悬停时出现） */
.pb-tip { top: 28px !important; bottom: auto !important; z-index: 30; }
.pb-timeline { margin-bottom: 0 !important; }
