* { box-sizing: border-box; }
:root {
  --bg:#f4f5f7; --card:#fff; --text:#1c1f23; --muted:#6b7280; --line:#e6e8ec;
  --primary:#2b6ef6; --primary-dark:#1f57c9; --danger:#e5484d; --ok:#12a150; --warn:#f5a524;
}
body { margin:0; background:var(--bg); color:var(--text);
  font:14px/1.6 -apple-system,"Segoe UI","Microsoft YaHei",sans-serif; }
button { font-family:inherit; cursor:pointer; }
input,select,textarea { font-family:inherit; font-size:14px; }

.login-wrap { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { background:var(--card); padding:34px 30px; border-radius:18px; width:360px;
  box-shadow:0 12px 40px rgba(24,39,75,.1); }
.login-card h1 { font-size:19px; margin:0 0 4px; }
.login-card p { color:var(--muted); margin:0 0 22px; font-size:13px; }
.login-card input { width:100%; margin-bottom:10px; }
.login-card .btn { width:100%; }
.login-card .hint { margin-top:14px; font-size:12px; color:var(--muted); line-height:1.8; }

.shell { display:grid; grid-template-columns:200px 1fr; min-height:100vh; }
.side { background:#14161a; color:#c9ced6; padding:18px 10px; }
.brand { font-weight:700; color:#fff; font-size:15px; padding:4px 12px 16px; }
.brand small { display:block; font-weight:400; color:#6b7280; font-size:11px; }
.nav-item { padding:9px 12px; border-radius:9px; font-size:13.5px; cursor:pointer; margin-bottom:2px; }
.nav-item:hover { background:#1e2127; color:#fff; }
.nav-item.active { background:var(--primary); color:#fff; }
.side-foot { margin-top:20px; padding:12px; border-top:1px solid #23262d; font-size:12px; color:#6b7280; }
.side-foot a { color:#9aa3af; }

.main { padding:22px 26px 60px; max-width:1360px; }
.page-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:12px; flex-wrap:wrap; }
.page-head h2 { margin:0; font-size:19px; }
.page-head .sub { color:var(--muted); font-size:12.5px; }

.card { background:var(--card); border-radius:14px; padding:18px; box-shadow:0 1px 3px rgba(16,24,40,.06); }
.card + .card { margin-top:16px; }
.card h3 { margin:0 0 14px; font-size:15px; }

.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:14px; }
.stat { background:var(--card); border-radius:14px; padding:16px 18px; box-shadow:0 1px 3px rgba(16,24,40,.06); }
.stat .label { color:var(--muted); font-size:12.5px; }
.stat .value { font-size:25px; font-weight:700; margin-top:4px; }
.stat .value small { font-size:13px; font-weight:500; color:var(--muted); }

.btn { border:1px solid var(--line); background:#fff; color:var(--text);
  padding:8px 14px; border-radius:9px; font-size:13.5px; transition:.15s; }
.btn:hover { border-color:#cfd4dc; }
.btn.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
.btn.primary:hover { background:var(--primary-dark); }
.btn.danger { color:var(--danger); border-color:#f3c9ca; }
.btn.sm { padding:5px 10px; font-size:12.5px; border-radius:7px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

input,select,textarea { padding:8px 11px; border:1px solid var(--line); border-radius:9px;
  background:#fff; color:var(--text); outline:none; width:100%; }
input:focus,select:focus,textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(43,110,246,.12); }
label.field { display:block; margin-bottom:12px; }
label.field > span { display:block; font-size:12.5px; color:var(--muted); margin-bottom:5px; }
.row { display:grid; gap:12px; }
.row.c2 { grid-template-columns:1fr 1fr; }
.row.c3 { grid-template-columns:repeat(3,1fr); }
.row.c4 { grid-template-columns:repeat(4,1fr); }

table { width:100%; border-collapse:collapse; }
th,td { text-align:left; padding:10px; border-bottom:1px solid var(--line); font-size:13.5px; }
th { color:var(--muted); font-weight:500; font-size:12.5px; white-space:nowrap; }
tr:last-child td { border-bottom:none; }
tbody tr:hover { background:#fafbfc; }
td.num { font-variant-numeric:tabular-nums; }

.badge { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:500; }
.badge.in_stock { background:#e9f8ef; color:var(--ok); }
.badge.rented { background:#fff4e5; color:#b26a00; }
.badge.transit { background:#eef4ff; color:var(--primary); }
.badge.maint { background:#fdecec; color:var(--danger); }
.badge.pending { background:#f1f2f4; color:#6b7280; }
.badge.danger { background:#fdecec; color:var(--danger); }

.empty { text-align:center; color:var(--muted); padding:36px 0; font-size:13.5px; }
.toast { position:fixed; top:20px; left:50%; transform:translateX(-50%); background:#1c1f23; color:#fff;
  padding:10px 18px; border-radius:10px; font-size:13.5px; z-index:99; opacity:0; transition:.2s; pointer-events:none; }
.toast.show { opacity:1; }
.toast.err { background:var(--danger); }
.warnbar { background:#fff8e6; border:1px solid #ffe1a8; color:#8a5b00;
  padding:9px 13px; border-radius:9px; font-size:13px; margin-bottom:14px; }
.okbar { background:#e9f8ef; border:1px solid #b7e4c8; color:#0d6b36;
  padding:9px 13px; border-radius:9px; font-size:13px; margin-bottom:14px; }
.split { display:grid; grid-template-columns:1.1fr .9fr; gap:16px; align-items:start; }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
.chip { padding:4px 10px; border-radius:999px; border:1px solid var(--line); font-size:12px; cursor:pointer; user-select:none; }
.chip.on { background:var(--primary); border-color:var(--primary); color:#fff; }
.mono { font-family:ui-monospace,Consolas,monospace; }

/* 媒体缩略图 */
.thumbs { display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }
.thumb { position:relative; width:110px; height:110px; border-radius:10px; overflow:hidden;
  border:1px solid var(--line); background:#f7f8fa; }
.thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.thumb .del { position:absolute; top:4px; right:4px; width:20px; height:20px; border-radius:50%;
  background:rgba(0,0,0,.6); color:#fff; border:none; font-size:12px; line-height:20px; padding:0; }
.thumb .state { position:absolute; bottom:0; left:0; right:0; font-size:11px; text-align:center;
  background:rgba(0,0,0,.55); color:#fff; padding:2px; }

/* 甘特图 */
.gantt-wrap { overflow:auto; max-height:70vh; border:1px solid var(--line); border-radius:10px; }
.gantt { border-collapse:separate; border-spacing:0; }
.gantt th, .gantt td { padding:0; border-bottom:1px solid var(--line); }
.gantt th { position:sticky; top:0; background:#fff; z-index:2; }
.gantt .sn-col { position:sticky; left:0; background:#fff; z-index:3; padding:8px 10px;
  min-width:150px; border-right:1px solid var(--line); font-size:12.5px; }
.gantt th.sn-col { z-index:4; }
.gantt .day-head { width:28px; min-width:28px; text-align:center; font-size:10px; color:var(--muted);
  padding:4px 0; border-right:1px solid #f0f1f3; }
.gantt .cell { width:28px; min-width:28px; height:26px; border-right:1px solid #f0f1f3; }
.gantt .cell.free { background:#fff; }
.gantt .cell.busy { background:#ffd7d7; }
.gantt .cell.maintenance { background:#ddd; }
.gantt .cell.weekend { background:#fafbfc; }
.gantt .cell.busy.weekend { background:#ffc9c9; }

/* 工作台待办行 */
.mini-row { display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); }
.mini-row:last-child { border-bottom:none; }
.mini-line1 { display:flex; gap:8px; align-items:baseline; flex-wrap:wrap; }
.mini-sub { font-size:12px; color:var(--muted); }
.mini-badge { font-size:11px; padding:1px 7px; border-radius:999px; background:#eef4ff; color:var(--primary); }
.mini-badge.danger { background:#fdecec; color:var(--danger); }
.mini-sku { font-size:13.5px; font-weight:500; margin-top:3px; line-height:1.45;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mini-meta { display:flex; gap:10px; align-items:center; font-size:12px; color:var(--muted); margin-top:3px; flex-wrap:wrap; }
.mini-date { font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }
.mini-city { color:var(--primary); }
.mini-city::before { content:'·'; margin-right:6px; color:var(--muted); }

/* ---------- 平板 ---------- */
@media (max-width:980px) {
  .shell { grid-template-columns:1fr; }
  .side { display:flex; overflow-x:auto; gap:4px; padding:10px; align-items:center; }
  .brand, .side-foot { display:none; }
  .nav-item { white-space:nowrap; margin:0; }
  .split, .row.c2, .row.c3, .row.c4 { grid-template-columns:1fr; }
  .main { padding:16px; }
}

/* ---------- 手机 ---------- */
@media (max-width:820px) {
  html, body { overflow-x:hidden; }
  .main { padding:12px 10px 30px; }

  /* 顶部导航：吸顶 + 横向滑动 + 右侧渐隐提示 */
  .side {
    position:sticky; top:0; z-index:50;
    align-items:center;
    padding:8px 8px 10px;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .side::-webkit-scrollbar { display:none; }
  .nav-item { padding:8px 12px; font-size:13px; border-radius:8px; }
  .side::after {
    content:''; position:sticky; right:0;
    width:24px; flex:0 0 24px;
    background:linear-gradient(to right, transparent, #14161a);
  }

  /* 页头竖排，按钮可换行 */
  .page-head { flex-direction:column; align-items:stretch; gap:10px; margin-bottom:12px; }
  .page-head h2 { font-size:17px; }
  .page-head > div:last-child { display:flex; flex-wrap:wrap; gap:8px; }
  .page-head .btn { flex:0 0 auto; }

  .card { padding:14px; border-radius:12px; }
  .card + .card { margin-top:12px; }
  .card h3 { font-size:14px; margin-bottom:10px; }

  /* 表格：整表横向滚动，单元格不换行 */
  table {
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    white-space:nowrap;
  }
  th, td { padding:8px 10px; font-size:12.5px; }
  th { font-size:11.5px; }

  /* 表单 */
  .field input, .field select, .field textarea { font-size:16px; } /* 防 iOS 自动放大 */
  .btn { padding:9px 14px; font-size:13px; }
  .btn.sm { padding:6px 10px; font-size:12px; }

  /* 指标网格自动铺满 */
  .split { grid-template-columns:1fr !important; }
  .card div[style*="display:flex"] { flex-wrap:wrap; }

  /* 底部安全区 */
  .main { padding-bottom:calc(24px + env(safe-area-inset-bottom)); }
}


/* 扫码取景层 */
.scan-overlay {
  position:fixed; inset:0; z-index:9999;
  background:#000; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:16px;
}
.scan-overlay video { width:100%; max-width:520px; border-radius:12px; background:#000; }
.scan-tip { color:#fff; font-size:14px; }
.scan-overlay .btn { background:#fff; color:#1c1f23; border:none; padding:10px 22px; border-radius:10px; }
/* ---------- 手机卡片列表（JS 在窄屏下改用这套渲染） ---------- */
.m-list { display:flex; flex-direction:column; }
.m-card {
  padding:14px 14px 12px; border-bottom:1px solid var(--line); cursor:pointer;
}
.m-card:last-child { border-bottom:none; }
.m-card:active { background:#f7f8fa; }.m-line1 { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.m-title { font-size:15px; font-weight:700; letter-spacing:.3px; }
.m-line2 { margin-top:6px; font-size:14px; color:var(--text); }
.m-muted { margin-left:8px; font-size:12px; color:var(--muted); }
.m-line3 {
  margin-top:6px; display:flex; align-items:center; justify-content:space-between;
  font-size:12.5px; color:var(--muted);
}
.m-amount { font-size:15px; font-weight:700; color:#e5484d; }
/* ============================================================
   手机端 BUG 修复（覆盖上面的规则）
   根因：grid 的 1fr 默认 min-width:auto，宽表格会把整页撑破
   ============================================================ */
@media (max-width:820px) {
  html, body { max-width:100%; overflow-x:hidden; }
  .shell { display:block; width:100%; max-width:100%; }
  .main { width:100%; max-width:100%; min-width:0; box-sizing:border-box; overflow-x:hidden; }
  .card, .split, .page-head, .row, .stats { min-width:0; max-width:100%; box-sizing:border-box; }

  /* 表格自己滚动，绝不撑破父容器 */
  table { display:block; width:100%; max-width:100%; overflow-x:auto; }
  th, td { padding:8px 12px; white-space:nowrap; }

  /* 页头按钮：整行铺满，居中，不裁字 */
  .page-head { align-items:stretch; }
  .page-head > div { min-width:0; }
  .page-head > div:last-child { display:flex; flex-wrap:wrap; gap:8px; width:100%; }
  .page-head .btn { flex:1 1 auto; text-align:center; white-space:nowrap; }

  /* 导航：吸顶 + 横向滑动，格子不被拉伸 */
  .side { align-items:center; }
  .nav-item { flex:0 0 auto; }
}
/* 档期筛选条 */
.gantt-filter { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.gf-item { display:flex; flex-direction:column; gap:5px; font-size:12px; color:var(--muted); }
.gf-item input { padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:13px; }
.gf-grow { flex:1 1 200px; }
.gantt-cats { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.chip {
  padding:6px 14px; border-radius:999px; border:1px solid var(--line);
  background:#fff; font-size:12.5px; color:#4b5563; cursor:pointer;
}
.chip-on { background:var(--primary); border-color:var(--primary); color:#fff; }

/* 档期左列只放简称，宽度收紧 */
.gantt .sn-col, .gantt th.sn-col { width:86px; min-width:86px; max-width:86px; padding:6px 8px; }
.gantt .sn-col .mono { font-size:12.5px; }

@media (max-width:820px) {
  .gantt .sn-col, .gantt th.sn-col { width:74px; min-width:74px; max-width:74px; padding:6px; }
}
/* ================= 档期 v2 ================= */
.gantt2 { border-collapse:separate; border-spacing:0; }
.gantt2 th, .gantt2 td { border-bottom:1px solid #eef0f3; }
.gantt2 .month-bar {
  background:#f3f5f8; font-size:12px; color:#4b5563; text-align:left;
  padding:5px 8px; border-right:1px solid #e6e8ec; font-weight:600;
}
.gantt2 .day-head {
  text-align:center; font-size:11px; color:#6b7280; padding:5px 2px;
  min-width:34px; cursor:pointer; user-select:none;
}
.gantt2 .day-head.weekend { background:#fafbfc; }
.gantt2 .day-head.day-on { background:#e8f0ff; color:#1f57c9; font-weight:700; }
.gantt2 .cell { padding:3px 2px; text-align:center; min-width:34px; height:40px; }
.gantt2 .cell span { font-size:9px; line-height:1.15; display:block; overflow:hidden; }
.gantt2 .col-on { box-shadow:inset 0 0 0 9999px rgba(43,110,246,.05); }

.gantt2 .cell.free { background:#fff; }
.gantt2 .cell.maintenance { background:#ffe9a8; color:#7a5200; }
.gantt2 .cell.ship_out  { background:#2b6ef6; color:#fff; }
.gantt2 .cell.arrived   { background:#17b5c1; color:#fff; }
.gantt2 .cell.rent      { background:#f26b6b; color:#fff; font-weight:600; }
.gantt2 .cell.ship_back { background:#f5a524; color:#fff; }
.gantt2 .cell.delivered { background:#12a150; color:#fff; }
.gantt2 .cell.pickup    { background:#8b5cf6; color:#fff; }

.gantt-legend { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:10px; font-size:12px; color:#5b6270; }
.gantt-legend .lg { display:flex; align-items:center; gap:5px; }
.gantt-legend i { width:12px; height:12px; border-radius:3px; display:inline-block; }
.lg-ship_out{background:#2b6ef6} .lg-arrived{background:#17b5c1} .lg-rent{background:#f26b6b}
.lg-ship_back{background:#f5a524} .lg-delivered{background:#12a150} .lg-pickup{background:#8b5cf6}
.lg-maintenance{background:#ffe9a8}

@media (max-width:820px) {
  .gantt2 .cell { height:34px; min-width:30px; }
  .gantt2 .cell span { font-size:8px; }
  .gantt2 .day-head { min-width:30px; font-size:10px; }
  .gantt2 .sn-col, .gantt2 th.sn-col { width:70px; min-width:70px; max-width:70px; }
}
/* ========== 档期 v2 配色（用户指定）========== */
.gantt2 .cell.ship_out  { background:#7db8ff; color:#0b2e6b; }  /* 发货 浅蓝 */
.gantt2 .cell.arrived   { background:#1a56db; color:#fff; }     /* 收到 深蓝 */
.gantt2 .cell.rent      { background:#16a34a; color:#fff; font-weight:600; } /* 租期 绿 */
.gantt2 .cell.ship_back { background:#d97706; color:#fff; }     /* 寄出 深黄 */
.gantt2 .cell.returned  { background:#fde68a; color:#6b4a00; }  /* 到家 浅黄 */
.gantt2 .cell.maintenance{ background:#ef4444; color:#fff; }    /* 维修 红 */

.gantt2 .cell span.sub { font-size:8px; opacity:.9; display:block; }

/* 冻结表头两行 */
.gantt2 thead th { position:sticky; z-index:3; background:#fff; }
.gantt2 thead tr:first-child th { top:0; }
.gantt2 thead tr:nth-child(2) th { top:26px; }
.gantt2 thead tr:first-child th:first-child { z-index:5; }
.gantt2 .month-bar { border-left:2px solid #d7dbe0; }
.gantt2 .month-bar:first-child { border-left:none; }
.gantt-wrap { max-height:62vh; overflow:auto; }

/* 图例配色同步 */
.lg-ship_out{background:#7db8ff} .lg-arrived{background:#1a56db} .lg-rent{background:#16a34a}
.lg-ship_back{background:#d97706} .lg-returned,.lg-delivered{background:#fde68a}
.lg-maintenance{background:#ef4444} .lg-pickup{background:#16a34a}
/* 档期工具条 */
.gantt-bar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.gb-item { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
.gb-item input, .gb-item select { padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-size:13px; background:#fff; }
.gb-grow { flex:1 1 200px; }
.gantt-nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.gantt-range { font-size:12px; color:var(--muted); margin-right:auto; }
/* ===== 档期：彻底修冻结表头（覆盖前面所有 table 规则）===== */
.gantt-wrap {
  max-height: 58vh; overflow: auto; position: relative;
  -webkit-overflow-scrolling: touch;
}
table.gantt2 {
  display: table !important;
  border-collapse: separate !important;
  border-spacing: 0;
  width: max-content;
}
.gantt2 thead th {
  position: sticky; background: #fff; z-index: 6;
  box-shadow: inset 0 -1px 0 #e6e8ec;
}
.gantt2 thead tr:nth-child(1) th { top: 0; height: 28px; }
.gantt2 thead tr:nth-child(2) th { top: 28px; height: 26px; }
.gantt2 thead th.sn-col { z-index: 8; }
.gantt2 tbody td.sn-col { position: sticky; left: 0; background: #fff; z-index: 4; }
.gantt2 .month-bar { background: #f3f5f8 !important; }
/* 租期日历 */
.cal-mask { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:9998;
  display:flex; align-items:center; justify-content:center; padding:16px; }
.cal-box { background:#fff; border-radius:16px; padding:18px; width:100%; max-width:360px; }
.cal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.cal-title { font-weight:700; font-size:16px; }
.cal-nav { border:none; background:none; font-size:22px; padding:0 10px; color:#2b6ef6; }
.cal-week { display:grid; grid-template-columns:repeat(7,1fr); font-size:11px; color:#9aa0a6; text-align:center; margin-bottom:6px; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.cal-day { display:flex; align-items:center; justify-content:center; height:38px; border-radius:8px; font-size:14px; cursor:pointer; }
.cal-day.today { color:#2b6ef6; font-weight:700; }
.cal-day.sel { background:#e8f0ff; }
.cal-day.edge { background:#2b6ef6; color:#fff; font-weight:700; }
.cal-foot { display:flex; align-items:center; justify-content:space-between; margin-top:12px; }
.cal-hint { font-size:12px; color:#8a8f99; }
/* 左列拖动时不被内容盖住 */
.gantt2 thead th.sn-col,
.gantt2 tbody td.sn-col {
  position: sticky !important; left: 0;
  background: #fff !important;
  z-index: 9;
  box-shadow: 1px 0 0 #e6e8ec;
}
.gantt2 thead tr:nth-child(1) th.sn-col { z-index: 11; }
.gantt2 thead tr:nth-child(2) th.sn-col { z-index: 10; }
/* ============ 档期 v3 ============ */
.g-shell { border:1px solid #e6e8ec; border-radius:10px; overflow:hidden; background:#fff; }
.g-head { display:flex; background:#f7f8fa; }
.g-corner {
  flex:0 0 76px; width:76px; border-right:1px solid #e6e8ec;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:#f7f8fa; z-index:3;
}
.g-cur { font-size:13px; font-weight:700; color:#1f57c9; }
.g-corner-name { font-size:10px; color:#8a8f99; margin-top:2px; }
.g-head-view { flex:1; overflow:hidden; }
.g-head-inner { will-change:transform; }
.g-mrow { display:flex; height:22px; }
.g-mblock {
  flex:0 0 auto; font-size:11px; font-weight:600; color:#4b5563;
  border-left:2px solid #cfd4da; padding-left:6px; line-height:22px;
  box-sizing:border-box; background:#f3f5f8;
}
.g-drow { display:flex; height:24px; }
.g-dcell {
  flex:0 0 36px; width:36px; text-align:center; font-size:10.5px; color:#6b7280;
  line-height:24px; box-sizing:border-box; border-right:1px solid #f0f2f5;
}
.g-dcell.we { background:#fafbfc; }
.g-dcell.on { background:#e8f0ff; color:#1f57c9; font-weight:700; }
.g-dcell.mstart { border-left:2px solid #cfd4da; }

.g-body { max-height:56vh; overflow:auto; -webkit-overflow-scrolling:touch; }
.g-row { display:flex; height:42px; border-top:1px solid #f0f2f5; }
.g-sn {
  flex:0 0 76px; width:76px; position:sticky; left:0; background:#fff; z-index:2;
  display:flex; align-items:center; padding-left:8px; box-sizing:border-box;
  border-right:1px solid #e6e8ec; font-size:11px;
}
.g-sn .mono { font-size:11.5px; }
.g-cell {
  flex:0 0 36px; width:36px; box-sizing:border-box; border-right:1px solid #f0f2f5;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-size:9px; line-height:1.1; overflow:hidden;
}
.g-cell span { display:block; width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.g-cell .sub { font-size:8px; opacity:.85; }
.g-cell.on { box-shadow:inset 0 0 0 9999px rgba(43,110,246,.05); }

.g-cell.free { background:#fff; }
.g-cell.maintenance { background:#ef4444; color:#fff; }
.g-cell.ship_out  { background:#7db8ff; color:#0b2e6b; }
.g-cell.arrived   { background:#1a56db; color:#fff; }
.g-cell.rent      { background:#16a34a; color:#fff; font-weight:600; }
.g-cell.ship_back { background:#d97706; color:#fff; }
.g-cell.returned  { background:#fde68a; color:#6b4a00; }
.g-cell.pickup    { background:#16a34a; color:#fff; }
/* 分类行右侧的重置按钮 */
.gantt-cats { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.gantt-cats .btn.primary { background:#1f57c9; border-color:#1f57c9; color:#fff; }
/* ================= 订单列表 · 手机卡片 ================= */
/* 卡片铺满屏幕宽度：抵掉外层 .card 的内边距 */
@media (max-width:820px) {
  .card.flush { padding:0; overflow:hidden; }
  .card.flush .filter-row { padding:12px 14px 10px; margin-bottom:0 !important; }
  .card.flush .m-card { padding:13px 14px 12px; }
}
.m-who { display:flex; align-items:baseline; gap:7px; min-width:0; }
.m-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.m-city {
  flex:0 0 auto; font-size:12px; color:#1f57c9; background:#eef4ff;
  border-radius:999px; padding:1px 8px; font-weight:500;
}
.m-line1 .badge { flex:0 0 auto; }
.m-line2 { font-variant-numeric:tabular-nums; letter-spacing:.2px; }
.m-hint { color:#9aa0a6; font-size:12.5px; letter-spacing:0; }
.m-range { font-weight:600; color:#1c1f23; font-variant-numeric:tabular-nums; }
.m-no { font-size:11.5px; color:#9aa0a6; }
.m-line4 { margin-top:7px; display:flex; align-items:center; gap:8px; }
.m-sku {
  font-size:14px; font-weight:600; color:#1c1f23; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.m-line4 .badge.danger { flex:0 0 auto; }
.m-line4 .m-amount { margin-left:auto; flex:0 0 auto; }

/* 全屏看图 */
.img-mask {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.img-mask img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.img-mask .img-close {
  position: absolute; top: 12px; right: 18px; background: none; border: none;
  color: #fff; font-size: 38px; line-height: 1; cursor: pointer; padding: 0 6px;
}
.img-mask .img-tip { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #c9ced6; font-size: 12.5px; }
