:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #e6e8ec;
  --ink: #1f2430;
  --muted: #8a909d;
  --primary: #063b99;
  --primary-light: #f3f6fc;
  --accent: #d85a30;
  --ok: #1d9e75;
  --warn: #ba7517;
  --danger: #c0392b;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
.login-screen { position: fixed; inset: 0; z-index: 9999; background: linear-gradient(135deg, #202638, #2f5597); display: flex; align-items: center; justify-content: center; }
.login-screen.hidden { display: none; }
.login-box { width: 360px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand img { max-width: 180px; max-height: 64px; object-fit: contain; }
.login-brand h2 { font-size: 16px; margin-top: 10px; }
.login-brand p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.login-box .input { width: 100%; margin-bottom: 10px; }
.login-init p { font-size: 12px; }
.hidden { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.5;
}
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 208px; flex-shrink: 0; background: #202638; color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 18px 18px; border-bottom: 1px solid #31384c; }
.brand-mark { background: transparent; color: #fff; padding: 0; }
.brand-mark img { display: block; width: 100%; max-width: 172px; height: auto; }
.brand-name { font-size: 15px; font-weight: 600; }
.brand-sub { font-size: 10px; color: #9aa3b8; margin-top: 2px; }
.nav { padding: 12px 10px; flex: 1; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: transparent; border: 0; color: #b9c0d0; font-size: 13px; cursor: pointer;
  border-radius: 7px; text-align: left; margin-bottom: 3px; font-family: inherit;
}
.nav-item:hover { background: #2b3348; color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; }
.ico { width: 16px; text-align: center; font-size: 14px; opacity: .9; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid #31384c; }
.save-status { color: #6fd4a8; font-size: 11px; }
.save-hint { color: #7b849a; font-size: 10px; margin-top: 4px; }

.main { flex: 1; padding: 26px 30px 60px; min-width: 0; }
.tab { display: none; }
.tab.active { display: block; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; gap: 16px; }
.page-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -.3px; }
.sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

.search, .input, .select {
  border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; font-size: 12px;
  background: #fff; color: var(--ink); font-family: inherit; outline: none;
}
.search:focus, .input:focus, .select:focus { border-color: var(--primary); }
.select { min-width: 130px; }
.wide { flex: 1; min-width: 0; }
.badge { background: var(--primary-light); color: var(--primary); padding: 7px 12px; border-radius: 20px; font-size: 11px; }

.btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 15px;
  border-radius: 7px; font-size: 12px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: #bcc4d0; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #26447c; }
.btn.ghost { background: #fff; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; padding: 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card-title { font-size: 13px; font-weight: 600; margin-bottom: 14px; color: #2a3040; }
.muted { color: var(--muted); font-weight: 400; font-size: 11px; }
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row label { font-size: 12px; color: var(--muted); min-width: 62px; }
.note-row { margin-top: 14px; }

.stat-row { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; min-width: 150px; }
.stat-label { font-size: 11px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 600; margin-top: 3px; }
.stat-value small { font-size: 12px; font-weight: 400; color: var(--muted); }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { background: #fafbfc; text-align: left; padding: 11px 14px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.table .num { text-align: right; }
.sku-cell { max-width: 320px; }
.sku-name { font-weight: 500; }
.sku-factory { color: var(--muted); font-size: 11px; margin-top: 2px; }
.stock-num { font-weight: 600; }
.stock-low { color: var(--danger); }
.stock-zero { color: var(--accent); }
.tag { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 10px; background: #f0f2f5; color: #667; }
.tag.ok { background: #e3f5ee; color: #0f7a56; }
.tag.warn { background: #fff3e0; color: #a35c00; }
.tag.info { background: var(--primary-light); color: var(--primary); }
.row-btn { border: 0; background: none; color: var(--primary); cursor: pointer; font-size: 11px; padding: 2px 5px; }
.row-btn.danger { color: var(--danger); }
.row-btn:disabled { color: var(--muted); opacity: .5; cursor: not-allowed; }

.order-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.customer-info, .sku-hint { font-size: 11px; color: var(--muted); margin-top: 6px; padding: 8px 10px; background: #fafbfc; border-radius: 6px; display: none; }
.customer-info.show, .sku-hint.show { display: block; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 12px; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; font-size: 15px; }
.summary-line.total b { color: var(--accent); font-size: 20px; }
.summary-card .btn { margin-top: 14px; }
.msg { font-size: 11px; margin-top: 10px; min-height: 16px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--danger); }
.discount-tags { display: flex; gap: 6px; margin: 8px 0; }
.discount-tags span { background: var(--primary-light); color: var(--primary); padding: 3px 9px; border-radius: 5px; font-size: 11px; }
.tips p { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.qty-input { width: 70px; }
.date-input { width: 125px; }
.disc-select { width: 72px; }

.calendar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: #fafbfc; }
.cal-head div { padding: 10px; text-align: center; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px; overflow: hidden; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: #fcfcfd; }
.cal-cell.today { background: #fffdf5; }
.cal-day { font-size: 11px; color: var(--muted); margin-bottom: 5px; display: flex; justify-content: space-between; }
.cal-day.today-num { color: var(--accent); font-weight: 600; }
.cal-entry { background: var(--primary-light); border-left: 2px solid var(--primary); border-radius: 3px; padding: 4px 6px; margin-bottom: 3px; font-size: 10px; line-height: 1.4; }
.cal-entry.shipped { background: #e3f5ee; border-left-color: var(--ok); }
.cal-entry .cust { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-entry .detail { color: #667; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-check { display: flex; align-items: center; gap: 3px; margin-top: 2px; cursor: pointer; font-size: 9px; }
.ship-check input[type=checkbox] { margin: 0; cursor: pointer; }
/* 出货日历：客户+工厂 聚合卡片 */
.cal-cell { min-height: 132px; }
.cal-group { background: var(--primary-light); border: 1px solid #cfdcf0; border-left: 3px solid var(--primary); border-radius: 5px; padding: 5px 6px; margin-bottom: 6px; }
.cal-group.shipped { background: #e3f5ee; border-color: #a8dcc6; border-left-color: var(--ok); }
.cal-group-head { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px dashed #c9d5e8; }
.cal-group.shipped .cal-group-head { border-bottom-color: #a8dcc6; }
.cal-group-cust { font-size: 10px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cal-group-fac { font-size: 9px; color: var(--primary); background: #fff; border-radius: 3px; padding: 0 4px; }
.cal-group.shipped .cal-group-fac { color: var(--ok); }
.cal-group-cnt { font-size: 9px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.cal-group-items { display: flex; flex-direction: column; gap: 4px; }
.cal-sku { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 5px; font-size: 10px; }
.cal-sku-name { flex: 1 1 100%; color: #445; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.cal-sku.shipped .cal-sku-name { color: #668; text-decoration: line-through; text-decoration-color: #9c9; }
.cal-sku .ship-check { margin: 0; }
.cal-sku .photo-btn { margin-left: auto; }
.cal-sku-no { font-size: 9px; color: var(--muted); flex: 1 1 100%; }
.cal-sku .photo-thumbs { flex: 1 1 100%; }
.cal-title { font-size: 14px; font-weight: 600; min-width: 210px; text-align: center; white-space: nowrap; }
/* 出货日历：日/周/月/区间 查看工具 */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.cal-mode-tabs { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.cal-mode-tab { border: 0; border-right: 1px solid var(--line); background: #fff; color: var(--muted); padding: 7px 15px; font-size: 12px; font-family: inherit; cursor: pointer; }
.cal-mode-tab:last-child { border-right: 0; }
.cal-mode-tab:hover { background: #f4f6fa; }
.cal-mode-tab.active { background: var(--primary); color: #fff; }
.cal-ship-filter { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.cal-filter-tab { border: 0; border-right: 1px solid var(--line); background: #fff; color: var(--muted); padding: 7px 12px; font-size: 11px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.cal-filter-tab:last-child { border-right: 0; }
.cal-filter-tab:hover { background: #f4f6fa; }
.cal-filter-tab small { font-size: 10px; color: #a3a9b5; margin-left: 3px; }
.cal-filter-tab.active { background: var(--primary); color: #fff; }
.cal-filter-tab.active small { color: #d9e4f7; }
.cal-filter, .cal-quick { display: flex; align-items: center; gap: 6px; }
.cal-filter label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cal-filter .input { padding: 6px 8px; font-size: 11px; }
.cal-tilde { color: var(--muted); font-size: 12px; }
.cal-quick { margin-left: auto; }
.cal-quick .btn { padding: 6px 10px; font-size: 11px; }
.cancel-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.cancel-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-size: 12px; }
.cancel-item:hover { background: #fafbfc; }
.cancel-item small { margin-left: auto; color: var(--muted); }
.cal-empty { font-size: 10px; color: #b0b6c2; padding: 5px 2px; }
.cal-week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-week-grid .cal-cell { min-height: 260px; }
.cal-week-grid .cal-cell:nth-child(7n) { border-right: 0; }
.cal-single-head { padding: 9px 12px; font-size: 12px; color: var(--muted); background: #fafbfc; border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.cal-day-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-content: start; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.cal-day-groups .cal-group { margin-bottom: 0; }
.cal-range-day { margin-bottom: 14px; }
.range-day-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12px; color: var(--muted); background: #fafbfc; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
.range-day-head b { color: var(--ink); }
.range-day-head .cal-group-cnt { margin-left: auto; }

.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ip-manage-list { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ip-manage-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fafbfc; }
.ip-manage-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ip-manage-head b { font-size: 13px; }
.ip-manage-head .row-btn { margin-left: auto; }
.file-list, .backup-list { margin-top: 12px; }
.file-item, .backup-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #fafbfc; border-radius: 6px; margin-bottom: 6px; font-size: 11px; }
.map-status { font-size: 11px; color: var(--muted); }
.filter-card { padding: 14px 20px; }
code { background: #f0f2f5; padding: 2px 5px; border-radius: 3px; font-size: 11px; }

.modal { position: fixed; inset: 0; background: rgba(20,25,40,.4); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal.hidden { display: none; }
.modal-box { background: #fff; border-radius: 12px; width: 560px; max-width: 94vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0,0,0,.15); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; flex-shrink: 0; }
.modal-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--muted); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; scrollbar-width: thin; }
.modal-body .form-row { margin-bottom: 14px; }
.modal-body label { min-width: 80px; }
/* 长表单里的可折叠分组：默认收起，点标题展开，减少弹窗长度 */
.detail-fold { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; background: var(--bg); }
.detail-fold > summary { cursor: pointer; padding: 10px 12px; font-weight: 600; color: var(--primary); user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; }
.detail-fold > summary::-webkit-details-marker { display: none; }
.detail-fold > summary::before { content: '▸'; font-size: 12px; }
.detail-fold[open] > summary::before { content: '▾'; }
.detail-fold > summary:hover { background: var(--primary-light); border-radius: 7px 7px 0 0; }
.detail-fold .fold-body { padding: 4px 12px 12px; }
.product-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.product-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.product-meta span { font-size: 10px; color: var(--muted); }
.product-meta b { font-size: 12px; font-weight: 500; word-break: break-all; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); flex-shrink: 0; }

.src-tag { display: inline-block; font-size: 9px; line-height: 1.4; padding: 0 4px; margin-right: 4px; border-radius: 3px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); vertical-align: middle; }

/* 照片 */
.photo-btn { font-size: 10px; color: var(--primary); }
.photo-thumbs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.photo-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid var(--line); }
.photo-drop { border: 2px dashed var(--line); border-radius: 8px; padding: 20px; text-align: center; color: var(--muted); cursor: pointer; font-size: 12px; }
.photo-drop:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.photo-card img { width: 100%; height: 100px; object-fit: cover; display: block; cursor: pointer; }
.photo-card .meta { padding: 7px 9px; font-size: 10px; color: var(--muted); }
.photo-card .meta b { display: block; color: var(--ink); font-size: 11px; font-weight: 500; }
.photo-viewer { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 200; cursor: zoom-out; }
.photo-viewer img { max-width: 92vw; max-height: 92vh; border-radius: 6px; }
.photo-viewer .close { position: absolute; top: 18px; right: 26px; color: #fff; font-size: 28px; cursor: pointer; }
.compress-note { font-size: 10px; color: var(--muted); margin-top: 8px; }

/* IP 独立货盘切换 */
.ip-board-bar { display: flex; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
.ip-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 160px; padding: 11px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; text-align: left; transition: all .15s; }
.ip-tab:hover { border-color: #b9c8e2; background: #fbfcfe; }
.ip-tab.active { border-color: var(--primary); background: var(--primary-light); box-shadow: 0 2px 10px rgba(47,85,151,.1); }
.ip-tab-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.ip-tab.active .ip-tab-name { color: var(--primary); }
.ip-tab-meta { font-size: 11px; color: var(--muted); }
.ip-tab.active .ip-tab-meta { color: #5b74a6; }
.ip-chip { display: inline-block; padding: 1px 7px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-size: 10px; font-weight: 600; }

/* 新建订单：按 IP 货盘开单 */
.ip-order-bar { display: flex; gap: 10px; margin: 0 0 16px; flex-wrap: wrap; }
.ip-order-tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; cursor: pointer; transition: all .15s; }
.ip-order-tab:hover { border-color: #b9c8e2; }
.ip-order-tab.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.ip-order-tab small { font-weight: 400; opacity: .7; font-size: 11px; }
.ip-order-check { display: inline-block; width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 50%; font-size: 10px; background: transparent; }
.ip-order-tab.active .ip-order-check { background: rgba(255,255,255,.25); }

/* 工厂分组库存看板 */
.board-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.factory-board { display: flex; flex-direction: column; gap: 10px; }
.factory-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.factory-card.open { border-color: #c3d2ea; box-shadow: 0 2px 10px rgba(47,85,151,.06); }
.factory-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 13px 16px; cursor: pointer; user-select: none; background: #fbfcfe; }
.factory-head:hover { background: var(--primary-light); }
.factory-title { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.factory-title .caret { color: var(--primary); font-size: 12px; width: 12px; }
.factory-metrics { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.factory-metrics b { color: var(--ink); font-size: 12px; margin-left: 3px; }
.factory-metrics .hl, .hl { color: var(--primary); font-weight: 700; }
.factory-body { padding: 12px; border-top: 1px solid var(--line); background: #f9fafb; }
.sku-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 10px; }
.sku-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.sku-card:hover { border-color: #c3d2ea; }
.sku-card-head { min-width: 0; }
.sku-title { font-size: 13px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sku-sub { font-size: 10px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sku-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--bg); border-radius: 6px; padding: 8px; }
.sku-numbers > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sku-numbers span { font-size: 10px; color: var(--muted); }
.sku-numbers b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sku-next-date { font-size: 10px; color: var(--muted); margin-top: 6px; }
.sku-next-date b { color: var(--ink); font-weight: 600; }
.preorder-box { font-size: 11px; }
.preorder-line { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--muted); }
.preorder-line b { color: var(--ink); font-weight: 600; }
.preorder-line .hl { color: var(--primary); }
.progress { height: 5px; background: #e8ecf3; border-radius: 3px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--primary); border-radius: 3px; }
.sku-photos { display: flex; align-items: center; gap: 5px; min-height: 38px; }
.sku-photo-thumb { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); cursor: pointer; }
.photo-add { border: 1px dashed #b8c6dd; background: #f7faff; color: var(--primary); border-radius: 5px; padding: 6px 9px; font-size: 11px; cursor: pointer; font-family: inherit; }
.photo-add:hover { background: var(--primary-light); border-color: var(--primary); }
.sku-card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
/* 后台爆品标记 */
.sku-card.hot { border-color: #f0b27a; background: #fffdfa; }
.hot-badge { display: inline-block; background: linear-gradient(135deg, #ff7a18, #e23e2e); color: #fff; border-radius: 4px; padding: 1px 6px; font-size: 10px; font-weight: 700; margin-right: 5px; vertical-align: 1px; }
.row-btn.hot-toggle { color: #d9501f; border-color: #f2c3ad; }
.row-btn.hot-toggle:hover { background: #fff3ec; }
.hot-manager-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hot-manager-tools .input { max-width: 280px; }
.hot-manager-list { max-height: 58vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--bg); }
.hot-manager-group + .hot-manager-group { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.hot-manager-group-title { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.hot-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 7px; }
.hot-manager-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 9px; cursor: pointer; min-width: 0; }
.hot-manager-row:hover { border-color: #f0b27a; }
.hot-manager-row input { cursor: pointer; flex-shrink: 0; }
.hot-manager-row span { display: flex; flex-direction: column; min-width: 0; }
.hot-manager-row b { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-manager-row small { font-size: 10px; color: var(--muted); margin-top: 2px; }
.form-divider { font-size: 11px; font-weight: 600; color: var(--primary); border-top: 1px solid var(--line); padding-top: 12px; margin: 16px 0 10px; }
/* 备货批次展示 */
.batch-list { display: flex; flex-direction: column; gap: 4px; border-top: 1px dashed var(--line); padding-top: 7px; }
.batch-row-display { display: flex; align-items: center; gap: 6px; font-size: 10px; background: var(--bg); border-radius: 4px; padding: 4px 7px; }
.batch-row-display .batch-name { color: var(--primary); font-weight: 600; flex: 0 0 auto; }
.batch-row-display .batch-qty { color: var(--ink); font-weight: 600; }
.batch-row-display .batch-date { margin-left: auto; color: var(--muted); }
.batch-empty { font-size: 10px; color: var(--muted); padding: 3px 0; }
/* 备货批次编辑 */
.batch-row { border: 1px solid var(--line); border-radius: 6px; padding: 8px; margin-bottom: 8px; background: var(--bg); }
.batch-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.batch-row-head b { font-size: 11px; color: var(--primary); }
.batch-del { border: none; background: transparent; color: var(--danger); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 3px; }
.batch-row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.batch-row-fields label { font-size: 10px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.batch-row-fields .input { font-size: 12px; padding: 6px 8px; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* 客户列表 */
.detail-stats { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 11px; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 10px 12px; margin: 12px 0; }
.detail-stats b { color: var(--ink); font-size: 13px; margin-left: 4px; }
.detail-section { margin-top: 18px; }
.detail-section h3 { font-size: 12px; margin: 0 0 10px; color: var(--primary); font-weight: 600; }
.order-card { border: 1px solid var(--line); border-radius: 7px; padding: 10px; margin-bottom: 12px; background: #fff; }
.order-card-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.order-card-head b { color: var(--ink); font-size: 12px; }
.order-card-head .num { margin-left: auto; font-weight: 600; color: var(--ink); }
.order-card-foot { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.table.mini { font-size: 11px; }
.table.mini th, .table.mini td { padding: 6px 8px; }
/* 订单记录：点击行展开详情 */
.order-row { cursor: pointer; }
.order-row:hover { background: #f5f8ff; }
.order-caret { display: inline-block; width: 14px; color: var(--primary); font-size: 11px; }
.order-detail-row > td { padding: 0 14px 14px; background: #f8faff; border-bottom: 1px solid var(--line); }
.order-detail-row:hover { background: #f8faff; }
.od-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 0 8px; font-size: 11px; color: var(--muted); }
.od-meta b { color: var(--ink); }
.od-table { margin-bottom: 4px; }
.od-note { font-size: 11px; color: #a35c00; padding: 4px 0 0; }
.table.mini .od-table, .od-table.table.mini { font-size: 11px; }
.legacy-group { border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; margin-bottom: 8px; font-size: 11px; background: #fff; }

/* 出货规划：按月折叠 */
.inline-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.plan-factory-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.plan-fac { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 18px; padding: 6px 12px; font-size: 12px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.plan-fac:hover { border-color: var(--primary); color: var(--primary); }
.plan-fac.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.plan-fac span { font-size: 10px; opacity: .75; }
.plan-tools { display: flex; gap: 8px; margin: 12px 0; }
.plan-groups { display: flex; flex-direction: column; gap: 10px; }
.plan-group { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.plan-group-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; background: var(--bg); border: 0; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--ink); text-align: left; }
.plan-group-head:hover { background: var(--primary-light); }
.plan-caret { color: var(--primary); font-size: 14px; width: 12px; }
.plan-group-head b { font-size: 14px; }
.plan-sum { margin-left: auto; font-size: 11px; color: var(--muted); }
.plan-group-body { padding: 10px 12px; }

/* 操作人选择 */
.operator-box { padding: 12px 14px; border-top: 1px solid #31384c; background: #262d40; }
.operator-label { font-size: 10px; color: #9aa3b8; margin-bottom: 5px; }
.operator-box .select { width: 100%; background: #1b2132; color: #fff; border: 1px solid #3b445c; }
/* 审计日志 */
.verify-bar { font-size: 12px; padding: 9px 12px; border-radius: 6px; font-weight: 600; }
.verify-bar.ok { background: #eaf7ef; color: #1e7a45; border: 1px solid #b9e2c9; }
.verify-bar.bad { background: #fdecec; color: #b3261e; border: 1px solid #f3b8b4; }
.head-actions { display: flex; gap: 8px; }

/* 每日出库记录 / 待收款提醒 */
.detail-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--muted); margin: 10px 0 14px; }
.detail-stats b { color: var(--text, #1f2430); font-size: 14px; margin-left: 4px; }
.receivable-list { display: flex; flex-direction: column; gap: 10px; }
.due-customer { border: 1px solid var(--line, #dfe3eb); border-radius: 8px; background: var(--panel, #fff); overflow: hidden; }
.due-customer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; user-select: none; }
.due-customer-head:hover { background: #f7f9fc; }
.due-customer-name { font-weight: 600; font-size: 13px; }
.due-customer-meta { font-size: 11px; color: var(--muted); }
.due-customer-amount { margin-left: auto; font-weight: 700; color: var(--danger, #c00000); }
.due-customer-body { border-top: 1px solid var(--line, #eee); padding: 4px 14px 12px; }
.due-order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-bottom: 1px dashed var(--line, #eee); font-size: 11px; }
.due-order-row:last-child { border-bottom: 0; }
.due-order-no { font-weight: 600; min-width: 150px; }
.due-order-due { color: var(--danger, #c00000); font-weight: 700; }
.tag.danger { background: #fdecec; color: #b3261e; }
.preview-box { white-space: pre-wrap; word-break: break-all; font-size: 11px; line-height: 1.6; max-height: 260px; overflow: auto; background: #f7f9fc; border: 1px solid var(--line, #e3e7ef); border-radius: 6px; padding: 10px 12px; margin-top: 8px; }
.flash-row { animation: flashRow 2.2s ease-out; }
@keyframes flashRow { 0%, 40% { background: #fff3c4; } 100% { background: transparent; } }

/* ============ 客户自助下单页 ============ */
.cust-body { background: #f4f6fa; }
.cust-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #063b99, #0a52c4); }
.cust-login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 32px 30px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.cust-brand { text-align: center; margin-bottom: 18px; }
.cust-brand img { max-width: 190px; max-height: 68px; object-fit: contain; }
.cust-login-card h1 { font-size: 19px; text-align: center; color: var(--primary); margin: 6px 0 2px; }
.cust-login-card > p.muted { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 22px; }
.cust-login-card .input { width: 100%; margin-bottom: 12px; padding: 11px 12px; }
.cust-login-card .btn { width: 100%; padding: 12px; }
.cust-tip { text-align: center; font-size: 11px; color: #aab2c0; margin-top: 14px; }

.cust-app { max-width: 960px; margin: 0 auto; padding-bottom: 90px; }
.cust-header { display: flex; align-items: center; gap: 12px; background: var(--primary); color: #fff; padding: 12px 18px; }
.cust-header-logo { height: 34px; filter: brightness(0) invert(1); object-fit: contain; }
.cust-header-title { font-size: 15px; font-weight: 600; }
.cust-header-user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; }
.cust-header-user .btn { color: #fff; border-color: rgba(255,255,255,.5); }
.cust-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--line); }
.cust-tab { flex: 1; padding: 13px; border: none; background: none; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.cust-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.cust-section { display: none; padding: 16px; }
.cust-section.active { display: block; }
.cust-toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
.cust-toolbar .select, .cust-toolbar .input { padding: 10px 12px; }
.cust-toolbar .select { width: 160px; }
.cust-toolbar .input { flex: 1; }
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cust-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; }
.cust-photo { height: 120px; display: flex; align-items: center; justify-content: center; background: #f7f9fc; border-radius: 7px; margin-bottom: 10px; overflow: hidden; }
.cust-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cust-ph-ph { color: #c4ccd8; font-size: 22px; }
.cust-card-name { font-size: 13px; font-weight: 600; line-height: 1.35; min-height: 36px; }
.cust-card-meta { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; font-size: 12px; }
.cust-ip { color: var(--muted); background: #eef2fa; padding: 2px 7px; border-radius: 10px; font-size: 11px; }
.cust-price { color: var(--primary); font-weight: 700; }
.cust-card-foot { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.cust-step { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 16px; cursor: pointer; color: var(--primary); }
.cust-qty { flex: 1; width: 100%; min-width: 0; text-align: center; padding: 5px; border: 1px solid var(--line); border-radius: 6px; }
.cust-empty { text-align: center; color: var(--muted); padding: 40px 10px; grid-column: 1/-1; }
.cust-cart-bar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 960px; margin: 0 auto; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0,0,0,.06); padding: 12px 16px; display: flex; align-items: center; gap: 10px; z-index: 50; }
.cust-cart-info { font-size: 13px; margin-right: auto; }
.cust-cart-info b { color: var(--primary); }
.btn.sm { padding: 8px 14px; font-size: 12px; }
.cust-cart { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 12px; }
.cust-cart-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.cust-cart-item:last-child { border-bottom: none; }
.cust-cart-item span { flex: 1; }
.cust-cart-item b { color: var(--primary); }
.cust-del { border: none; background: none; color: var(--danger); cursor: pointer; font-size: 12px; }
.cust-note { margin-top: 16px; }
.cust-note label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.cust-note .input { width: 100%; padding: 10px 12px; resize: vertical; }
.cust-mine { display: flex; flex-direction: column; gap: 12px; }
.cust-order { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.cust-order-head { display: flex; justify-content: space-between; align-items: center; }
.cust-order-no { font-weight: 600; color: var(--primary); }
.cust-status { font-size: 11px; padding: 3px 9px; border-radius: 10px; }
.st-pending { background: #fff4dc; color: #a86b00; }
.st-approved { background: #e6f6ef; color: #0f7a55; }
.st-rejected { background: #fdecec; color: #b3261e; }
.cust-order-date { font-size: 11px; color: var(--muted); margin: 5px 0 10px; }
.cust-order-items { font-size: 13px; line-height: 1.8; }
.cust-order-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.cust-order-ok { font-size: 12px; color: #0f7a55; margin-top: 8px; font-weight: 600; }
@media (max-width: 600px) {
  .cust-header-title { font-size: 13px; }
  .cust-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 客户待审单 ============ */
.nav-badge { background: #d85a30; color: #fff; font-size: 10px; border-radius: 9px; padding: 1px 6px; margin-left: 6px; }
.req-list { display: flex; flex-direction: column; gap: 12px; }
.req-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.req-head { display: flex; justify-content: space-between; align-items: center; }
.req-no { font-weight: 600; color: var(--primary); font-size: 14px; }
.req-meta { font-size: 12px; color: var(--muted); margin: 6px 0 10px; }
.req-items { font-size: 13px; line-height: 1.8; }
.req-items b { color: var(--primary); }
.req-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.req-review { font-size: 12px; color: #0f7a55; margin-top: 8px; }
.req-actions { margin-top: 12px; display: flex; gap: 8px; }

/* ============ 折扣 / 物流查询 / 全局搜索 ============ */
.cust-discount-hint { background: #f3f6fc; border: 1px solid #dbe5f8; color: #063b99; border-radius: 8px; padding: 8px 12px; font-size: 12px; margin-bottom: 12px; }
.cust-price { color: var(--primary); font-weight: 700; }
.cust-retail { color: #a9afba; font-size: 11px; margin-left: 6px; }
.cust-cart-price { color: var(--muted); font-size: 11px; margin-top: 2px; }
.cust-withdraw { margin-top: 10px; border: 1px solid #e6b8b3; background: #fff; color: #c0392b; border-radius: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.cust-withdraw:hover { background: #fff3f1; }
.st-withdrawn { background: #eef0f3; color: #6b7280; }
.logistics-list, .search-results { display: flex; flex-direction: column; gap: 12px; }
.logistics-card, .search-group { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.logistics-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.logistics-head > b { color: var(--primary); font-size: 15px; }
.logistics-meta { color: var(--muted); font-size: 12px; margin-left: auto; }
.logistics-qty { color: var(--ink); font-weight: 600; font-size: 12px; }
.search-group-head { font-weight: 600; color: var(--ink); margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.search-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 9px 4px; border-bottom: 1px solid #f0f1f4; cursor: pointer; }
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #f7f9fc; }
.search-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.search-item-main b { color: var(--ink); font-size: 13px; }
.search-item-main span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-item-meta { color: var(--muted); font-size: 11px; text-align: right; max-width: 42%; }

/* ============ 侧边栏分组导航 ============ */
.nav { overflow-y: auto; }
.nav-search { background: rgba(99,130,230,.16); color: #e8eeff; border: 1px solid rgba(99,130,230,.34); margin-bottom: 12px; }
.nav-search:hover { background: rgba(99,130,230,.28); color: #fff; }
.nav-search.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.nav-group { margin-bottom: 8px; }
.nav-group-title { font-size: 10px; letter-spacing: .6px; color: #7a849b; padding: 6px 12px 4px; }
.nav-group .nav-item { padding: 8px 12px; font-size: 12.5px; margin-bottom: 2px; }
.search-item-main b .ico { color: var(--primary); margin-right: 6px; }

/* ============ 客户下单平台 · TOYLEAD 统一视觉 ============ */
.cust-body { background: #f5f7fb; color: #1f2733; }
.cust-login {
  background: radial-gradient(circle at 15% 15%, rgba(255,255,255,.14), transparent 42%),
              linear-gradient(135deg, #052c73 0%, #063b99 55%, #0a52c4 100%);
  position: relative;
}
.cust-login::after {
  content: ""; position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 60px rgba(255,255,255,.04), 0 0 0 120px rgba(255,255,255,.03);
}
.cust-login-card {
  width: 400px; max-width: 92vw; border-radius: 18px; padding: 34px 34px 28px;
  box-shadow: 0 30px 80px rgba(2,20,60,.35); border: 1px solid rgba(255,255,255,.6);
  position: relative; z-index: 1;
}
.cust-brand img { max-width: 210px; max-height: 76px; }
.cust-login-card h1 { font-size: 20px; letter-spacing: .5px; margin-top: 12px; }
.cust-login-card > p.muted { margin-bottom: 24px; }
.cust-login-card .input { border: 1px solid #dbe2ee; background: #fbfcff; }

.cust-app { max-width: 1040px; }
.cust-header { background: #fff; color: #063b99; border-bottom: 1px solid #e3e9f4; padding: 12px 22px; position: sticky; top: 0; z-index: 60; }
.cust-header-logo { height: 38px; filter: none; }
.cust-header-title { font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.cust-header-user { color: #5b667a; }
.cust-header-user .btn { color: #063b99; border-color: #d5dfef; }
.cust-tabs { position: sticky; top: 63px; z-index: 59; }
.cust-tab.active { color: #063b99; border-bottom-color: #063b99; }

.cust-ip-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.cust-ip-card {
  display: flex; align-items: center; gap: 11px; padding: 14px 15px; text-align: left;
  background: #fff; border: 1px solid #e2e8f3; border-radius: 12px; cursor: pointer;
  font-family: inherit; transition: .18s ease; min-width: 0;
}
.cust-ip-card:hover { border-color: #9db8ec; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(6,59,153,.08); }
.cust-ip-card.active { border-color: #063b99; background: #eef3ff; box-shadow: 0 6px 20px rgba(6,59,153,.12); }
.cust-ip-logo {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; color: #fff; font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, #063b99, #2a6fe0);
}
.cust-ip-info { display: flex; flex-direction: column; min-width: 0; }
.cust-ip-info b { font-size: 14px; color: #1f2733; }
.cust-ip-info small { font-size: 11px; color: #8b95a7; margin-top: 2px; }
.cust-ip-arrow { margin-left: auto; color: #b8c2d4; font-size: 20px; }

/* 客户页爆品专区：一眼看到后台推荐的热销商品 */
.cust-hot-section { margin: -4px 0 18px; padding: 14px; border: 1px solid #ffd5b5; border-radius: 14px; background: linear-gradient(135deg, #fff8ef, #fff1f2); box-shadow: 0 6px 22px rgba(226, 62, 46, .07); }
.cust-hot-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.cust-hot-head h2 { margin: 0; font-size: 15px; color: #c2410c; }
.cust-hot-head span { font-size: 11px; color: #9a5b3d; }
.cust-hot-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.cust-hot-card {
  flex: 0 0 218px; display: flex; align-items: center; gap: 9px; text-align: left;
  background: #fff; border: 1px solid #f6d4bd; border-radius: 10px; padding: 9px 10px;
  font-family: inherit; cursor: pointer; transition: .18s;
}
.cust-hot-card:hover { border-color: #ff7a18; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255, 122, 24, .16); }
.cust-hot-photo { width: 58px; height: 58px; flex-shrink: 0; border-radius: 8px; background: #f8faff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cust-hot-photo img { width: 100%; height: 100%; object-fit: contain; }
.cust-hot-ph { color: #c4ccd8; font-size: 18px; }
.cust-hot-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cust-hot-info b { font-size: 12px; color: #202838; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cust-hot-ip, .cust-hot-stock { font-size: 10px; color: #9a5b3d; }
.cust-hot-price { color: #d4381b; font-size: 13px; font-weight: 700; margin-top: 2px; }
.cust-hot-price s { color: #a0a7b3; font-size: 10px; font-weight: 400; margin-left: 5px; }
.cust-hot-go { margin-left: auto; color: #d9501f; font-size: 11px; white-space: nowrap; }
.cust-photo { position: relative; }
.cust-photo .hot-badge { position: absolute; top: 6px; left: 6px; z-index: 2; }
.cust-card.hot { border-color: #f0b27a; box-shadow: 0 6px 20px rgba(255, 122, 24, .10); }
.cust-card.focus-flash { outline: 3px solid #ff7a18; outline-offset: 2px; }

.cust-filter-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cust-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.cust-cat {
  padding: 7px 15px; border-radius: 20px; border: 1px solid #dce4f1; background: #fff;
  color: #556176; font-size: 12px; font-family: inherit; cursor: pointer; transition: .15s;
}
.cust-cat:hover { border-color: #9db8ec; color: #063b99; }
.cust-cat.active { background: #063b99; border-color: #063b99; color: #fff; font-weight: 600; }
.cust-filter-bar .input { max-width: 260px; margin-left: auto; padding: 9px 12px; border: 1px solid #dce4f1; }

.cust-grid { gap: 14px; }
.cust-card { border: 1px solid #e4eaf4; border-radius: 12px; padding: 14px; transition: .18s; }
.cust-card:hover { border-color: #b9ccef; box-shadow: 0 10px 26px rgba(6,59,153,.09); transform: translateY(-2px); }
.cust-photo { height: 140px; background: linear-gradient(180deg, #f8faff, #f1f5fc); border-radius: 9px; }
.cust-card-name { font-size: 13px; min-height: 38px; color: #202838; }
.cust-card-meta { margin: 10px 0; }
.cust-cat-tag { color: #063b99; background: #eef3ff; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.cust-step { border-color: #dce4f1; color: #063b99; }
.cust-step:hover { background: #eef3ff; }
.cust-qty { border-color: #dce4f1; }
.cust-cart-bar { max-width: 1040px; padding: 13px 20px; border-top: 1px solid #e3e9f4; }
.cust-cart-bar .btn.primary { background: #063b99; border-color: #063b99; padding: 10px 22px; }
.cust-order { border-color: #e4eaf4; border-radius: 12px; }

@media (max-width: 720px) {
  .cust-ip-bar { grid-template-columns: 1fr; gap: 8px; }
  .cust-ip-card { padding: 11px 13px; }
  .cust-hot-card { flex-basis: 196px; }
  .cust-filter-bar { flex-direction: column; align-items: stretch; }
  .cust-filter-bar .input { max-width: none; margin-left: 0; }
  .cust-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cust-photo { height: 110px; }
}

/* 客户页：与库存实时同步的现货 / 预库存 / 合计 */
.cust-stock-row { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #7a8598; background: #f7f9fd; border-radius: 6px; padding: 6px 8px; margin-bottom: 8px; }
.cust-stock-row b { color: #33405a; font-weight: 600; }
.cust-stock-row b.zero { color: #d85a30; }
.cust-stock-row b.low { color: #d85a30; font-weight: 700; }
.cust-next-date { font-size: 11px; color: #063b99; margin-bottom: 8px; }
/* 客户页：预售预计到货日期 */
.cust-preorder-eta { font-size: 11px; color: #c2410c; background: #fff7ed; border: 1px solid #ffd9b8; border-radius: 6px; padding: 5px 8px; margin-bottom: 8px; }
.cust-preorder-eta b { color: #b33212; font-weight: 700; }
.cust-hot-eta { color: #c2410c; font-weight: 600; }
.cust-cart-pre { color: #c2410c; font-size: 11px; margin-top: 2px; }
.cust-order-eta { display: block; color: #c2410c; font-size: 11px; line-height: 1.4; }

/* 账号功能授权勾选网格 */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 10px; margin: 6px 0 2px; }
.perm-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text); cursor: pointer; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.perm-item:hover { background: rgba(6,59,153,0.06); }
.perm-item input { accent-color: var(--primary); }

/* 客户页：物流追踪 */
.cust-link { border: none; background: none; color: var(--primary); font-size: 12px; cursor: pointer; margin-left: 10px; padding: 0; }
.cust-link:hover { text-decoration: underline; }
.cust-log-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.cust-log-stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; }
.cust-log-stat b { display: block; font-size: 20px; color: var(--primary); line-height: 1.2; }
.cust-log-stat span { font-size: 11px; color: var(--muted); }
.cust-log-stat.st-done b { color: #0f7a55; }
.cust-log-stat.st-part b { color: #a86b00; }
.cust-log-stat.st-wait b { color: #b3261e; }
.cust-status.st-done { background: #e6f6ef; color: #0f7a55; }
.cust-status.st-part { background: #fff4dc; color: #a86b00; }
.cust-status.st-wait { background: #fdecec; color: #b3261e; }
.cust-order.log-highlight { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(6,59,153,0.12); }
.cust-log-items { display: flex; flex-direction: column; gap: 6px; }
.cust-log-item { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 13px; padding: 7px 9px; border-radius: 7px; }
.cust-log-item.done { background: #f2fbf7; }
.cust-log-item.wait { background: #f8f9fb; }
.cust-log-flag { font-size: 11px; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }
.cust-log-flag.ok { background: #d9f2e6; color: #0f7a55; font-weight: 600; }
.cust-log-flag.wait { background: #eceff4; color: #7a8598; }
.cust-log-sku { color: var(--text); flex: 1 1 auto; min-width: 120px; }
.cust-track { color: var(--primary); font-size: 12px; cursor: pointer; border-bottom: 1px dashed var(--primary); white-space: nowrap; }
.cust-track b { font-size: 10px; opacity: 0.7; }
.cust-track-none { color: #a86b00; font-size: 12px; }
.cust-log-date, .cust-log-eta { font-size: 11px; color: var(--muted); width: 100%; }
.cust-log-eta { color: #c2410c; }
@media (max-width: 600px) {
  .cust-log-summary { grid-template-columns: repeat(2, 1fr); }
}

/* 客户页：订单/SKU 取消提示 */
.cust-log-stat.st-cancel b { color: #b3261e; }
.cust-status.st-cancel { background: #fdecec; color: #b3261e; }
.cust-order-cancel { font-size: 12px; color: #b3261e; margin-top: 8px; font-weight: 600; }
.cust-log-item.cancel { background: #fdf1f0; }
.cust-log-flag.cancel { background: #f8d7d4; color: #b3261e; font-weight: 600; }
.cust-log-cancel { font-size: 11px; color: #b3261e; width: 100%; }
@media (max-width: 600px) {
  .cust-log-summary { grid-template-columns: repeat(3, 1fr); }
}

/* 销售额统计 */
.sales-block { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.sales-block-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sales-block-head h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.sales-block-head .muted { font-size: 11px; }
.sales-block .table-wrap { max-height: 420px; }
.sales-block tbody tr { cursor: pointer; }
.sales-block tbody tr:hover { background: var(--primary-light); }
.sales-block .row-total { font-weight: 700; background: var(--bg); position: sticky; bottom: 0; cursor: default; }
.sales-block .row-total:hover { background: var(--bg); }
.sales-detail { margin-top: 12px; }
.sales-detail-row { display: flex; gap: 14px; align-items: baseline; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; flex-wrap: wrap; }
.sales-detail-row .d-month { font-weight: 700; min-width: 64px; }
.sales-detail-row .d-num { color: var(--muted); }
.sales-detail-row .d-num b { color: var(--ink); }
.chart-box { width: 100%; overflow-x: auto; }
.chart-box svg { display: block; width: 100%; min-width: 640px; height: auto; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px; }
.chart-legend button { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 10px; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.chart-legend button.off { opacity: .4; text-decoration: line-through; }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { stroke: var(--muted); stroke-width: 1; }
.chart-label { font-size: 10px; fill: var(--muted); }
.chart-line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { stroke: #fff; stroke-width: 1.5; }
