/* ==========================================================================
   拼多多店铺经营看板 · 设计系统 v2.0
   --------------------------------------------------------------------------
   01 设计变量   02 基础排版   03 应用外壳（侧栏 / 顶栏）   04 页头
   05 卡片与栅格 06 指标卡     07 按钮与表单   08 标签与提示
   09 表格       10 图表       11 详情页       12 登录页
   13 业务组件     14 窄屏适配     15 轻提示
   ========================================================================== */

/* ------------------------------------------------------------ 01 设计变量 */
:root {
  --brand: #e1251b;
  --brand-2: #ff6a3d;
  --brand-ink: #be1c14;
  --brand-soft: #fff2f0;
  --brand-line: #ffd8d2;

  --ink: #101828;
  --ink-2: #344054;
  --ink-3: #475467;
  --muted: #667085;
  --muted-2: #98a2b3;

  --bg: #f2f4f8;
  --card: #ffffff;
  --card-2: #fbfcfe;
  --line: #e4e9f1;
  --line-2: #eef1f6;
  --line-3: #f5f7fb;

  --ok: #079455;      --ok-soft: #e9fbf1;      --ok-line: #c3eed9;
  --warn: #b54708;    --warn-soft: #fff7e8;    --warn-line: #fde3b8;
  --info: #2e6ff2;    --info-soft: #eef4ff;    --info-line: #d3e1ff;
  --violet: #6941c6;  --violet-soft: #f4f0ff;  --violet-line: #e2d7ff;
  --danger: #d92d20;  --danger-soft: #fef1f0;  --danger-line: #fcd6d2;

  --side-w: 250px;
  --topbar-h: 58px;
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 9px;
  --r-xs: 7px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 4px 16px -8px rgba(16, 24, 40, .16), 0 1px 2px rgba(16, 24, 40, .04);
  --sh-3: 0 20px 48px -20px rgba(16, 24, 40, .3);
  --sh-brand: 0 8px 20px -8px rgba(225, 37, 27, .5);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

/* ------------------------------------------------------------ 02 基础排版 */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
svg { display: block; }
::selection { background: var(--brand-soft); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3dae5; border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #bcc6d6; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------ 03 应用外壳 */
.layout { display: flex; min-height: 100vh; align-items: stretch; }
.col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* 侧栏 ------------------------------------------------------------------ */
.side {
  width: var(--side-w); flex: 0 0 var(--side-w);
  background: var(--card); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 16px 16px 14px; }
.brand-mark {
  width: 36px; height: 36px; flex: none; border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand) 65%);
  color: #fff; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sh-brand);
}
.brand-txt { min-width: 0; }
.brand-txt b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.2px; }
.brand-txt i {
  display: block; font-style: normal; font-size: 11px; color: var(--muted-2);
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-scroll { flex: 1 1 auto; overflow-y: auto; padding: 2px 0 10px; }

.shop-pick { padding: 4px 12px 12px; }
.shop-pick label { display: block; font-size: 11px; color: var(--muted-2); margin: 0 0 5px 3px; }
.shop-pick select { width: 100%; }

.nav-cap {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted-2);
  padding: 14px 20px 5px; text-transform: uppercase;
}
.side nav { padding: 0; display: block; }
.side nav a {
  display: flex; align-items: center; gap: 10px;
  margin: 1px 10px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--ink-3); font-size: 13.5px; font-weight: 500;
  transition: background .14s ease, color .14s ease;
}
.side nav a .ic { width: 17px; height: 17px; flex: none; color: var(--muted-2); transition: color .14s ease; }
.side nav a:hover { background: var(--line-3); color: var(--ink); }
.side nav a:hover .ic { color: var(--ink-3); }
.side nav a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.side nav a.on .ic { color: var(--brand); }
.side nav a.on::after {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand); margin-left: auto;
}
.side nav a .nav-tag {
  margin-left: auto; font-size: 10.5px; padding: 1px 7px;
  border-radius: 20px; background: var(--line-2); color: var(--muted);
}

.side-foot { border-top: 1px solid var(--line-2); padding: 10px 12px 12px; }
.side .me {
  display: flex; align-items: center; gap: 9px; padding: 8px 8px;
  border-radius: var(--r-sm); background: var(--card-2); font-size: 12.5px; color: var(--muted);
}
.side .me .avatar {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.side .me .who { min-width: 0; line-height: 1.3; }
.side .me .who b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }
.side .me .who small { color: var(--muted-2); font-size: 11px; }
.side .me a.out {
  margin-left: auto; flex: none; padding: 4px 9px; border-radius: var(--r-xs);
  color: var(--muted); font-size: 12px; border: 1px solid var(--line);
}
.side .me a.out:hover { color: var(--brand-ink); border-color: var(--brand-line); background: var(--brand-soft); }
.side .foot { padding: 9px 8px 0; font-size: 11px; color: var(--muted-2); line-height: 1.6; }

/* 顶栏 ------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); padding: 0 24px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .burger {
  display: none; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; flex: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink-2); cursor: pointer;
}
.tb-lead { min-width: 0; }
.tb-crumb {
  display: block; font-size: 11px; color: var(--muted-2); letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-title {
  display: block; font-size: 15px; font-weight: 650; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-search { position: relative; margin-left: auto; flex: 0 1 300px; min-width: 120px; }
.tb-search .ic {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-2); pointer-events: none;
}
.tb-search input {
  width: 100%; padding: 7px 11px 7px 31px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px;
}
.tb-right { display: flex; align-items: center; gap: 9px; flex: none; }
.tb-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3); white-space: nowrap;
}
.tb-pill:hover { border-color: #cfd8e6; }
.tb-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.tb-pill.ok .dot { background: var(--ok); }
.tb-pill.warn .dot { background: #f79009; }
.tb-pill.err .dot { background: var(--danger); }
.tb-pill.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.tb-pill.err { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.tb-pill.warn { color: var(--warn); border-color: var(--warn-line); background: var(--warn-soft); }
.tb-ico {
  width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card);
  color: var(--ink-3); cursor: pointer; padding: 0;
}
.tb-ico:hover { color: var(--ink); border-color: #cfd8e6; }
.tb-ico svg { width: 16px; height: 16px; }

/* 内容区 ---------------------------------------------------------------- */
.main {
  flex: 1 1 auto; min-width: 0; width: 100%;
  max-width: 1640px; margin: 0 auto; padding: 20px 24px 64px;
}
.scrim { display: none; }

/* ------------------------------------------------------------ 04 页头 */
.head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.head > div:first-child { min-width: 0; }
.head h1 {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 680; letter-spacing: -.4px; line-height: 1.3;
}
.head h1::before {
  content: ''; width: 4px; height: 18px; border-radius: 3px; flex: none;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
}
.head .sub {
  color: var(--muted); font-size: 12.5px; margin-top: 5px; line-height: 1.7;
  max-width: 132ch;
}
.head .sub a { color: var(--info); border-bottom: 1px solid var(--info-line); }
.head .sub a:hover { color: var(--brand-ink); border-color: var(--brand-line); }
.head .sub strong { color: var(--ink-2); font-weight: 600; }
.head .filters { flex: none; align-items: center; }

/* ------------------------------------------------------------ 05 卡片与栅格 */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 16px;
  box-shadow: var(--sh-1);
}
.card > h2 {
  font-size: 14px; font-weight: 650; margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  letter-spacing: -.1px;
}
.card > h2 span.more {
  font-size: 12px; color: var(--muted); font-weight: 400;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.6;
  max-width: 62%; text-align: right;
}
.card > h2 span.more a { color: var(--info); }
.card > h2 span.more a:hover { color: var(--brand-ink); }
.card > h2 + .sub, .card .sub { font-size: 12.5px; color: var(--muted); line-height: 1.7; }

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.two { grid-template-columns: 1fr 1fr; }
.three { grid-template-columns: repeat(3, 1fr); }
.grid > * { min-width: 0; }

/* ------------------------------------------------------------ 06 指标卡 */
.kpi {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 15px 16px 14px; box-shadow: var(--sh-1);
  transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease;
}
.kpi:hover { box-shadow: var(--sh-2); transform: translateY(-1px); border-color: #d8e0ec; }
.kpi .k {
  font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px;
  font-weight: 500;
}
.kpi .v {
  font-size: 25px; font-weight: 700; letter-spacing: -.8px; margin-top: 7px;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.kpi .v small { font-size: 12.5px; font-weight: 500; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi .d { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.6; }
.kpi .d a { color: var(--info); }
.kpi-ico {
  width: 30px; height: 30px; flex: none; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--line-3); color: var(--ink-3);
}
.kpi-ico svg { width: 16px; height: 16px; }
.kpi-ico.ok { background: var(--ok-soft); color: var(--ok); }
.kpi-ico.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-ico.info { background: var(--info-soft); color: var(--info); }
.kpi-ico.violet { background: var(--violet-soft); color: var(--violet); }
.kpi-ico.brand { background: var(--brand-soft); color: var(--brand); }
.kpi.hi {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #f2453a 0%, var(--brand) 55%, #c01c13 100%);
  box-shadow: var(--sh-brand);
}
.kpi.hi::after {
  content: ''; position: absolute; right: -30px; top: -50px; width: 130px; height: 130px;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.kpi.hi .k { color: rgba(255, 255, 255, .9); }
.kpi.hi .v { color: #fff; }
.kpi.hi .v small { color: rgba(255, 255, 255, .8); }
.kpi.hi .d { color: rgba(255, 255, 255, .82); }
.kpi.hi .kpi-ico { background: rgba(255, 255, 255, .2); color: #fff; }

/* 采集状态条 */
.statusbar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 13px 18px;
}
.statusbar .sb-i { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.statusbar .sb-k { font-size: 11.5px; color: var(--muted-2); }
.statusbar .sb-v { font-size: 13px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.statusbar .sb-sp { margin-left: auto; }

/* ------------------------------------------------------------ 07 按钮与表单 */
.btn, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2); font-family: inherit; font-size: 13px;
  font-weight: 500; line-height: 1.4; cursor: pointer; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}
.btn:hover, button:hover, input[type=submit]:hover { background: var(--card-2); border-color: #cfd8e6; color: var(--ink); }
.btn svg, button svg { width: 15px; height: 15px; }
.btn.primary, button.primary, input.primary[type=submit] {
  background: linear-gradient(180deg, #ef4335, var(--brand) 60%, #cf1f16);
  border-color: var(--brand); color: #fff; font-weight: 600; box-shadow: var(--sh-brand);
}
.btn.primary:hover, button.primary:hover {
  background: linear-gradient(180deg, #e73a2c, #d21f16); border-color: var(--brand-ink); color: #fff;
}
.btn.danger, button.danger { color: var(--danger); border-color: var(--danger-line); background: var(--danger-soft); }
.btn.danger:hover { background: #fde3e0; color: #b42318; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--line-3); color: var(--ink); }
.btn.sm, button.sm { padding: 4px 10px; font-size: 12px; }
.btn.on { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
button:disabled, .btn.disabled { opacity: .55; cursor: default; box-shadow: none; }

input[type=text], input[type=search], input[type=date], input[type=time],
input[type=number], input[type=password], input[type=email], select, textarea {
  padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font-family: inherit; font-size: 13px;
  line-height: 1.4; min-width: 0; transition: border-color .14s ease, box-shadow .14s ease;
}
input:hover, select:hover, textarea:hover { border-color: #cfd8e6; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225, 37, 27, .12);
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px;
}
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 15px; height: 15px; }
input[type=date], input[type=time] { cursor: pointer; }
textarea { line-height: 1.65; resize: vertical; }
label { font-size: 13px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .grow { flex: 1 1 240px; min-width: 0; }
.filters .lbl { font-size: 12.5px; color: var(--muted); }
.filt-card { padding: 12px 14px; }
.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px;
}
.toolbar .grow { flex: 1 1 260px; min-width: 0; }
.toolbar .sp { margin-left: auto; }
.search-box { position: relative; flex: 1 1 260px; min-width: 0; }
.search-box .ic {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted-2); pointer-events: none;
}
.search-box input { width: 100%; padding-left: 33px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--line-3); border-radius: 10px; }
.seg a, .seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: var(--r-xs);
  font-size: 12.5px; color: var(--muted); font-weight: 500;
}
.seg a:hover, .seg button:hover { background: transparent; color: var(--ink); }
.seg a.on, .seg button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: var(--sh-1); }

/* ------------------------------------------------------------ 08 标签与提示 */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1.5px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: var(--line-3); color: var(--ink-3); border: 1px solid transparent;
  white-space: nowrap; line-height: 1.7;
}
.tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; flex: none; }
.tag.green { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tag.red { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-line); }
.tag.amber { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tag.blue { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.tag.gray { background: var(--line-3); color: var(--muted); border-color: var(--line-2); }
.tag.violet { background: var(--violet-soft); color: var(--violet); border-color: var(--violet-line); }
.tag.merged { background: var(--violet-soft); color: var(--violet); border-color: var(--violet-line); font-weight: 600; margin-right: 5px; }
.tag.plain::before { display: none; }
.mgsample {
  display: inline-block; padding: 0 6px; border-radius: 6px;
  background: var(--violet-soft); border: 1px solid var(--violet-line); color: var(--violet);
  font-weight: 600;
}
.pill { display: inline-block; font-size: 11.5px; padding: 1.5px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line); }
.notice {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn);
  padding: 10px 14px; border-radius: var(--r); font-size: 12.5px; margin-bottom: 14px;
  line-height: 1.7;
}
.notice b { font-weight: 600; }
.notice a { color: inherit; border-bottom: 1px solid currentColor; }
.notice.err { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok-line); color: var(--ok); }
.notice.info { background: var(--info-soft); border-color: var(--info-line); color: var(--info); }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); }
.errtxt { color: var(--danger); }
.empty {
  padding: 46px 20px; text-align: center; color: var(--muted-2); font-size: 13px;
}
.empty::before {
  content: ''; display: block; width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%; background-color: var(--line-3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 8.6 12 3.5 3.5 8.6v7.8L12 21.5l8.5-5.1z'/%3E%3Cpath d='M3.5 8.6 12 13.7l8.5-5.1M12 13.7v7.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 25px 25px;
  box-shadow: inset 0 0 0 1px var(--line);
}
code {
  background: var(--line-3); padding: 1.5px 6px; border-radius: 6px;
  font-size: 12px; font-family: var(--mono); color: var(--ink-2);
}
.steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.95; color: var(--ink-2); }
.steps li { margin-bottom: 3px; }
.steps li::marker { color: var(--brand); font-weight: 600; }
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12.5px; background: var(--card); color: var(--ink-2);
}
.pager a:hover { background: var(--card-2); border-color: #cfd8e6; color: var(--ink); }
.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .info { border: 0; background: none; color: var(--muted); }
.hr { height: 1px; background: var(--line-2); margin: 14px 0; border: 0; }
/* ------------------------------------------------------------ 09 表格 */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); }
.tablewrap.tight { overflow: visible; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th {
  position: sticky; top: 0; z-index: 3;
  background: var(--card-2); color: var(--muted); font-weight: 600; font-size: 11.5px;
  letter-spacing: .02em; white-space: nowrap;
  box-shadow: inset 0 -1px 0 var(--line);
}
td { white-space: nowrap; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #f8fafd; }
tbody tr:last-child > td { border-bottom: 0; }
td.wrap, th.wrap { white-space: normal; min-width: 180px; }
td.num, th.num, td.right, th.right { text-align: right; font-variant-numeric: tabular-nums; }
td.sep, th.sep { border-left: 1px solid var(--line); }
tr.total > td, tr.sum-row > td { background: var(--line-3); font-weight: 650; color: var(--ink); }
tr.total:hover > td, tr.sum-row:hover > td { background: #eef2f8; }
td.trace { white-space: nowrap; max-width: 340px; }
td.trace .ttime { font-size: 11px; color: var(--muted-2); margin-right: 7px; font-variant-numeric: tabular-nums; }
td.trace .tinfo {
  display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; color: var(--ink-2);
}
td .oneline { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
td .clamp2 { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td .refund { color: var(--danger); font-weight: 600; }
td .refund.pending { color: var(--muted-2); font-weight: 400; }
td .oref { color: #f79009; font-weight: 600; }
td .settle, td .profit, b.good { color: var(--ok); }
td .profit { font-weight: 600; }
td .pre { color: #0e7490; font-weight: 600; }
td .adcost { color: var(--warn); font-weight: 600; }
/* 「粗算」小标签：今天报表还没回来时，推广费是拿账户「今日花费」粗摊的 */
.adest { margin-left: 5px; padding: 1px 6px; font-size: 10.5px; vertical-align: middle; }
td .cost { color: var(--violet); font-weight: 600; }
td.afs .tag { margin: 1px 4px 1px 0; }
td.empty { text-align: center; color: var(--muted-2); padding: 30px 12px; white-space: normal; }
td.empty::before {
  content: ''; display: block; width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%; background-color: var(--line-3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 8.6 12 3.5 3.5 8.6v7.8L12 21.5l8.5-5.1z'/%3E%3Cpath d='M3.5 8.6 12 13.7l8.5-5.1M12 13.7v7.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 25px 25px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; padding: 11px 14px; border-top: 1px solid var(--line-2);
}

/* 订单列表：一行一单，1080P 一屏尽量多看几行，列名吸顶 */
table.orders-table { table-layout: fixed; font-size: 12px; }
table.orders-table th {
  font-size: 11.5px; top: 0; z-index: 3;
  background: var(--card-2); box-shadow: inset 0 -1px 0 var(--line);
}
table.orders-table th.wrap { min-width: 0; }
table.orders-table th, table.orders-table td { padding: 4px 7px; line-height: 1.45; }
table.orders-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.orders-table td.wrap { min-width: 0; }
table.orders-table td.time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
table.orders-table td.afs { white-space: normal; }
table.orders-table td.afs .tag { margin: 1px 4px 1px 0; white-space: nowrap; }
table.orders-table td .oneline { max-width: 100%; }
table.orders-table td .clamp2 { max-width: 100%; }
table.orders-table td.trace { max-width: none; }
table.orders-table td.trace .tw { display: flex; align-items: center; gap: 6px; min-width: 0; }
table.orders-table td.trace .tw > .tag { flex: 0 0 auto; }
table.orders-table td.trace .tw > .tinfo { flex: 1 1 auto; min-width: 0; max-width: none; }
table.orders-table .tag { padding: 1px 7px; }
table.orders-table tbody tr:hover { background: #f7faff; }
@media (max-width: 1900px) {
  table.orders-table th, table.orders-table td { padding: 4px 6px; }
}

/* 合单发货：一个运单号发了好几单，整行浅紫色好认 */
table.orders-table tr.mg-parcel > td { background: var(--violet-soft); }
table.orders-table tr.mg-parcel > td:first-child { box-shadow: inset 3px 0 0 var(--violet); }
table.orders-table tr.mg-parcel:hover > td { background: #ede8ff; }

/* 店铺表 */
.shop-table th, .shop-table td { padding: 8px 11px; }
.shop-table .shop-name { font-weight: 600; }
.shop-table .shop-note {
  font-weight: 400; font-size: 11.5px; color: var(--muted-2); margin-left: 8px;
  display: inline-block; max-width: 220px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.shop-table .shop-ops { white-space: nowrap; }
.shop-table .shop-ops .mp-mini { margin-right: 5px; }
.shop-table .shop-ops .mp-mini:last-child { margin-right: 0; }
.shop-table tr.shop-off > td { background: var(--card-2); color: var(--muted-2); }
.shop-table tr.shop-off:hover > td { background: #f7f9fc; }
.qrhd { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.qrhd .mp-mini { margin-left: auto; }
.shop-add-tip { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.7; }

/* 账号 / 权限小控件 */
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.chk input[type=checkbox] { width: auto; margin: 0; }
.ulegend { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 12px; }
.u-shops {
  flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px 18px;
  border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 13px; background: var(--card-2);
}
.u-edit { display: flex; flex-wrap: wrap; gap: 9px 14px; align-items: center; }
.u-edit input[name=display_name], .u-edit input[name=password], .u-edit input[name=note] { width: 168px; }
.u-btns { flex: 1 1 100%; display: flex; gap: 8px; }
.edit-cell { background: var(--card-2); }
.ev1 {
  display: inline-block; max-width: 300px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; color: var(--ink-3);
}

/* ------------------------------------------------------------ 10 图表 */
.chart { width: 100%; height: 300px; }
.chart.sm { height: 244px; }
.chart.lg { height: 360px; }

/* ------------------------------------------------------------ 11 详情页 */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 9px 16px; font-size: 13px; }
.dl .t { color: var(--muted); }
.dl > div:nth-child(even) { color: var(--ink); word-break: break-word; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line-2); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -6.5px; top: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: #cbd5e1; border: 2.5px solid var(--card);
  box-shadow: 0 0 0 1px var(--line);
}
.timeline li.first::before { background: var(--brand); box-shadow: 0 0 0 1px var(--brand-line); }
.timeline .tt { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.timeline .tx { margin-top: 2px; line-height: 1.6; color: var(--ink-2); }
pre.raw:empty::before {
  content: '这一条没有存下平台的原始返回，别的字段不受影响';
  display: block; color: #7d8ba1; font-size: 12px; font-family: inherit;
}
pre.raw:empty { padding: 14px 17px; }
pre.raw {
  background: #0d1627; color: #c9d5e6; padding: 15px 17px; border-radius: var(--r);
  font-size: 12px; line-height: 1.6; max-height: 480px; overflow: auto; margin: 0;
  font-family: var(--mono);
}

/* 日志：最新的在最上面，页面自己刷（static/loglive.js），不用手动刷新 */
.card > h2 span.more.log-tools { max-width: 78%; }
.logview {
  background: #0d1627; color: #c9d5e6; padding: 8px 6px 8px 12px;
  border-radius: var(--r); max-height: 460px; overflow: auto;
  font-family: var(--mono); font-size: 12px; line-height: 1.62;
  scrollbar-width: thin; overscroll-behavior: contain;
}
.logview .logline {
  white-space: pre-wrap; overflow-wrap: anywhere;
  padding: 1.5px 8px; border-radius: 6px;
}
.logview .logline + .logline {
  border-top: 1px solid rgba(255, 255, 255, .045); border-radius: 0;
}
.logview .logline.top {
  background: rgba(255, 255, 255, .07); color: #fff; border-radius: 6px;
}
.logview .logline.warn { color: #ffd479; }
.logview .logline.err { color: #ff9b93; }
.logview .log-empty { color: #7d8ba1; padding: 4px 8px; }
.log-tip {
  margin-top: 8px; font-size: 11.5px; line-height: 1.7; color: var(--muted-2);
  overflow-wrap: anywhere;
}
.log-tip code { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.log-meta { font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.live i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(7, 148, 85, .15);
  animation: livepulse 1.9s ease-in-out infinite;
}
.live.off i { background: var(--muted-2); box-shadow: none; animation: none; }
.live.err i { background: var(--danger); box-shadow: 0 0 0 3px rgba(217, 45, 32, .15); animation: none; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (max-width: 820px) {
  .logcard > h2 { flex-wrap: wrap; row-gap: 6px; }
  .card > h2 span.more.log-tools { max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
  .logview { max-height: 340px; font-size: 11.5px; }
}

/* ------------------------------------------------------------ 12 登录页 */
.login-wrap {
  min-height: 100vh; display: flex; align-items: stretch;
  background:
    radial-gradient(1100px 520px at 12% -10%, #ffe3dd 0%, rgba(255, 227, 221, 0) 62%),
    radial-gradient(900px 500px at 100% 100%, #dbe6ff 0%, rgba(219, 230, 255, 0) 60%),
    var(--bg);
}
.login-hero {
  flex: 1 1 46%; min-width: 0; padding: 54px 56px; display: flex; flex-direction: column;
  justify-content: center; gap: 24px;
}
.login-hero .mark {
  width: 46px; height: 46px; border-radius: 14px; color: #fff; font-size: 21px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand-2), var(--brand) 65%);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-brand);
}
.login-hero h2 { font-size: 27px; font-weight: 700; letter-spacing: -.8px; line-height: 1.4; }
.login-hero p { color: var(--muted); font-size: 13.5px; line-height: 1.9; max-width: 46ch; }
.login-hero ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.login-hero li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); }
.login-hero li i {
  width: 21px; height: 21px; flex: none; border-radius: 50%; background: var(--ok-soft);
  color: var(--ok); font-style: normal; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-side { flex: 1 1 54%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login {
  width: 100%; max-width: 384px; background: var(--card); padding: 32px 30px 26px;
  border-radius: 20px; border: 1px solid var(--line); box-shadow: var(--sh-3);
}
.login h1 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.login .login-sub { font-size: 12.5px; color: var(--muted); margin: 6px 0 20px; }
.login input { width: 100%; margin-bottom: 11px; padding: 10px 13px; }
.login button.primary { width: 100%; padding: 11px; font-size: 14px; margin-top: 4px; }
.login-tip { font-size: 12px; color: var(--muted-2); line-height: 1.85; margin-top: 16px; }
.login .notice { margin-bottom: 14px; }
/* ------------------------------------------------------------ 13 业务组件 */

/* ---- 我的商品 / 商品成本 ---------------------------------------------- */
/* 下面这几条别的页面也在用（快递成本、快递公司、采集日志、店铺、账号），别删 */
.mp-sum {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 0; overflow: hidden;
}
.mp-sum-i {
  padding: 14px 16px 15px; border-right: 1px solid var(--line-2);
  min-width: 0; transition: background .14s ease;
}
.mp-sum-i:hover { background: var(--card-2); }
.mp-sum-i:last-child { border-right: 0; }
.mp-sum-i b {
  display: block; font-size: 20px; font-weight: 680; letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-sum-i b small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.mp-sum-i span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.mp-sum-i span a { color: inherit; border-bottom: 1px dashed currentColor; }
.mp-sum-i span a:hover { color: var(--brand); border-color: var(--brand); }
.mp-sum-i.hi b { color: var(--brand); }
.mp-bar { padding: 11px 14px; margin-bottom: 12px; }
.mp-tip { font-size: 12px; color: var(--muted); }
.mp-lbl {
  flex: 0 0 auto; font-size: 12px; font-weight: 600; color: var(--ink-3);
  background: var(--line-2); border-radius: 999px; padding: 5px 11px;
}
.mp-mini {
  display: inline-block; padding: 3px 10px; font-size: 12px; line-height: 1.7;
  border: 1px solid var(--line); background: var(--card); border-radius: var(--r-xs);
  color: var(--ink-2); cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.mp-mini:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.mp-mini.danger { color: var(--danger); border-color: var(--danger-line); }
.mp-mini.danger:hover { background: var(--danger-soft); border-color: #f6bdb7; color: #b42318; }
.mp-main { padding: 0; overflow: hidden; }
.mp-hint { font-size: 12.5px; color: var(--muted); padding: 2px 0; }
.unit { font-size: 11.5px; color: var(--muted); }

/* ---- 我的商品：工作台（卡片流） ---------------------------------------- */
.mpw { display: block; }

/* 页头 */
.mpw-hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.mpw-hero-t { min-width: 0; }
.mpw-hero h1 { margin: 0 0 5px; font-size: 23px; font-weight: 720; letter-spacing: -.6px; }
.mpw-hero p { margin: 0; max-width: 780px; font-size: 12.5px; line-height: 1.75; color: var(--muted); }
.mpw-hero-o { display: flex; gap: 8px; flex-wrap: wrap; }

/* 顶部四块概览 */
.mpw-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.mpw-kpi {
  display: block; text-align: left; font-family: inherit; cursor: pointer;
  padding: 13px 15px 14px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-1);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.mpw-kpi:hover { transform: translateY(-1px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.mpw-kpi-k { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.mpw-kpi b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.mpw-kpi-s { display: block; margin-top: 5px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.mpw-kpi.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.mpw-kpi.warn b { color: var(--warn); }
.mpw-kpi.ok b { color: var(--ok); }
.mpw-kpi.hi { cursor: default; background: linear-gradient(135deg, #fff5f4, #fff); border-color: var(--brand-line); }
.mpw-kpi.hi b { color: var(--brand); }
.mpw-kpi.hi:hover { transform: none; box-shadow: var(--sh-1); }

/* 新建我的商品 */
.mpw-new {
  margin-bottom: 14px; padding: 15px 17px 16px; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--brand-line); box-shadow: var(--sh-1);
}
.mpw-new[hidden] { display: none; }
.mpw-new-h { font-size: 14.5px; font-weight: 680; margin-bottom: 11px; }
.mpw-new-g { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr); gap: 10px; }
.mpw-new-g label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.mpw-new-g input { width: 100%; }
.mpw-new-o { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 12px; }

/* 左导航 + 右内容 */
.mpw-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 14px; align-items: start; }
.mpw-nav {
  position: sticky; top: calc(var(--topbar-h) + 12px);
  display: flex; flex-direction: column; gap: 4px; padding: 7px;
  border-radius: var(--r-lg); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.mpw-tab {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 9px 11px; border: 0; border-radius: var(--r-sm);
  background: transparent; font-family: inherit; font-size: 13px; color: var(--ink-2);
  cursor: pointer; text-align: left; transition: background .14s ease, color .14s ease;
}
.mpw-tab:hover { background: var(--line-3); }
.mpw-tab.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; }
.mpw-tab i {
  font-style: normal; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding: 1px 7px; border-radius: 999px;
  background: var(--line-2); color: var(--muted);
}
.mpw-tab.on i { background: #fff; color: var(--brand); }
.mpw-body { min-width: 0; }
.mpw-pane[hidden] { display: none; }

/* 工具条 */
.mpw-tools {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 11px 13px; margin-bottom: 12px; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.mpw-tools .filters { flex: 1 1 auto; }
.mpw-tools .grow { flex: 1 1 220px; min-width: 0; }
.mpw-tools-tip { background: var(--info-soft); border-color: var(--info-line); }
.mpw-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; cursor: pointer; }
.mpw-note2 { font-size: 12.5px; color: var(--muted); padding: 9px 2px 0; line-height: 1.75; }
.mpw-sm { padding: 4px 12px; font-size: 12.5px; }

/* ---- 商品档案：卡片流 -------------------------------------------------- */
.mpw-cards { display: flex; flex-direction: column; gap: 11px; }
.mpw-card {
  border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--sh-1); overflow: hidden;
  transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease;
}
.mpw-card:hover { box-shadow: var(--sh-2); border-color: var(--line-2); transform: translateY(-1px); }
.mpw-card-h { display: flex; align-items: center; gap: 13px; padding: 13px 15px; }

/* 商品图：自己传的优先，没传就用拼多多链接的主图 */
.mpw-cover {
  position: relative; flex: none; width: 84px; height: 84px;
  border-radius: 13px; overflow: hidden; background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.mpw-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.mpw-cover-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 11px; color: var(--muted-2); letter-spacing: .3px;
  background: repeating-linear-gradient(45deg, #f7f9fc, #f7f9fc 6px, #eff2f7 6px, #eff2f7 12px);
}
.mpw-up { position: absolute; top: 5px; right: 5px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mpw-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.mpw-up-b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 0; padding: 0; border-radius: 9px; cursor: pointer;
  font-family: inherit;
  background: var(--brand); color: #fff; opacity: .9;
  font-size: 14px; line-height: 1; font-weight: 600;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .26);
  transition: opacity .14s ease, transform .14s ease;
}
.mpw-up-b:hover { opacity: 1; transform: scale(1.08); }
.mpw-up-x { background: rgba(15, 23, 42, .72); font-size: 15px; font-weight: 500; }
.mpw-cover-tag {
  position: absolute; left: 0; bottom: 0; max-width: 100%; padding: 2px 7px 3px;
  font-size: 10px; line-height: 1.45; color: #fff; letter-spacing: .2px;
  background: rgba(15, 23, 42, .62); border-top-right-radius: 9px;
}
.mpw-cover-tag.own { background: rgba(225, 37, 27, .86); }

.mpw-fold {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--card-2); color: var(--muted-2);
  cursor: pointer; font-size: 11px; line-height: 1;
  transition: transform .15s ease, background .14s ease, color .14s ease, border-color .14s ease;
}
.mpw-fold:hover { border-color: var(--line-2); color: var(--ink-3); }
.mpw-fold.on { transform: rotate(90deg); background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.mpw-card-t { min-width: 0; flex: 1 1 220px; }
.mpw-card-t h3 { margin: 0; font-size: 15.5px; font-weight: 690; letter-spacing: -.25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpw-card-t p { margin: 4px 0 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpw-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

/* 卡片下半截的数字条 */
.mpw-nums {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fbfcfe, #f5f7fb);
}
.mpw-nums > div { padding: 9px 13px 10px; border-right: 1px solid var(--line-2); min-width: 0; }
.mpw-nums > div:last-child { border-right: 0; }
.mpw-nums span { display: block; font-size: 11px; color: var(--muted); }
.mpw-nums b { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 660; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.2px; }
.mpw-nums .mpw-hi { background: linear-gradient(135deg, #fff6f5, #fffdfd); box-shadow: inset 2px 0 0 var(--brand-line); }
.mpw-nums .mpw-hi span { color: var(--brand-ink); }
.mpw-ok { color: var(--ok); }
.mpw-bad { color: var(--danger); }

.mpw-card-b { padding: 2px 15px 15px; border-top: 1px solid var(--line-2); background: var(--card); }
.mpw-sec { padding-top: 13px; }
.mpw-card-b .mpw-sec + .mpw-sec { margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line); }
.mpw-sec-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; font-size: 13px; font-weight: 650; margin-bottom: 9px; }
/* 卡片里「规格与拿货价」这一块：默认折起来，点标题摊开 */
.mpw-sec-fold {
  width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  justify-content: flex-start; text-align: left; font-family: inherit; color: inherit;
}
/* 「规格与拿货价」那一栏：每个商品一大块，也是默认折着，点标题摊开 */
.mpw-spg-fold {
  width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  justify-content: flex-start; text-align: left; font-family: inherit; color: inherit;
}
.mpw-spg-fold:hover { color: var(--brand-ink); }
.mpw-spg-fold[aria-expanded="false"] { margin-bottom: 0; }
.mpw-spg-fold.on .mpw-caret { color: var(--brand); }
.mpw-spgb[hidden] { display: none; }
.mpw-sec-fold:hover { color: var(--brand-ink); }
.mpw-sec-fold[aria-expanded="false"] { margin-bottom: 0; }
.mpw-sec-fold .mpw-tip { font-weight: 400; }
.mpw-sec-fold.on .mpw-caret { color: var(--brand); }
.mpw-secb[hidden] { display: none; }
.mpw-empty-s { font-size: 12.5px; color: var(--muted); background: var(--card-2); border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 11px 13px; }

/* 拼多多链接小表 */
.mpw-lks { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.mpw-lk-r {
  display: grid; align-items: center; gap: 10px; padding: 7px 11px;
  grid-template-columns: 132px minmax(0, 1fr) 56px 82px 78px 84px 106px;
  border-top: 1px solid var(--line-2); font-size: 12.5px;
}
.mpw-lks > .mpw-lk-r:first-child { border-top: 0; }
.mpw-lk-head { background: var(--card-2); color: var(--muted-2); font-size: 11.5px; }
.mpw-lk-r .r { text-align: right; font-variant-numeric: tabular-nums; }
.mpw-lk-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpw-lk-p {
  font-style: normal; font-size: 11px; line-height: 16px; margin-left: 6px;
  padding: 0 6px; border-radius: 999px; background: var(--line-2);
  color: var(--muted); vertical-align: 1px;
}
.mpw-lk-o { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.mpw-inline { display: inline; }
.mpw-gid {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; background: var(--line-2);
  color: var(--ink-3); padding: 2px 7px; border-radius: 7px;
  white-space: nowrap;
}
.mpw-tiny { display: block; flex: none; width: 20px; height: 20px; border-radius: 5px; object-fit: cover; background: var(--card-2); }
.mpw-lk-m { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 规格表：卡片里和「规格与拿货价」那一栏共用一个带边框的盒子 */
.mpw-tbox { border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; }

/* 卡片里的编辑 / 删除 */
.mpw-sec-edit {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin-top: 13px; padding-top: 13px; border-top: 1px dashed var(--line);
}
.mpw-sec-edit .mpw-del { margin: 0; padding: 0; border: 0; }
.mpw-edit {
  display: grid; flex: 1 1 auto; align-items: end; gap: 9px;
  grid-template-columns: minmax(150px, 1.1fr) 168px minmax(170px, 1fr) auto;
}
.mpw-edit label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); min-width: 0; }
.mpw-edit input { width: 100%; }

/* ---- 规格与拿货价 ------------------------------------------------------ */
.mpw-spg {
  margin-bottom: 12px; padding: 14px 16px 16px; border-radius: var(--r-lg);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1);
  transition: box-shadow .16s ease, border-color .16s ease;
}
.mpw-spg:hover { box-shadow: var(--sh-2); }
.mpw-spg-h { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.mpw-spg-h b { font-size: 14.5px; font-weight: 680; }
.mpw-spg-t { display: flex; align-items: flex-start; gap: 9px; flex-wrap: wrap; margin-bottom: 9px; }
.mpw-bulk { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 360px; }
.mpw-bulk input, .mpw-bulk textarea { flex: 1 1 auto; min-width: 0; }
.mpw-bulk textarea {
  height: 34px; min-height: 34px; max-height: 160px; overflow-y: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.45; padding: 7px 10px;
}
.mpw-spnew {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 11px;
  margin-bottom: 9px; border: 1px solid var(--brand-line); background: var(--brand-soft);
  border-radius: var(--r-sm);
}
.mpw-spnew[hidden] { display: none; }
.mpw-spnew .grow { flex: 1 1 240px; }
.mpw-w { width: 88px; text-align: right; font-variant-numeric: tabular-nums; }

.mpw-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mpw-table th {
  padding: 7px 9px; background: var(--card-2); color: var(--muted);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.mpw-table tbody tr:hover > td { background: var(--line-3); }
.mpw-table td { padding: 4px 8px; vertical-align: middle; }
.mpw-table .right { text-align: right; }
.mpw-table form { display: block; }
.mpw-in {
  width: 100%; padding: 5px 8px; font-size: 12.5px; border-radius: var(--r-xs);
  border: 1px solid transparent; background: transparent; color: inherit;
  font-family: inherit;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.mpw-in:hover { border-color: var(--line); background: var(--card); }
.mpw-in:focus { border-color: var(--brand-line); background: var(--card); box-shadow: 0 0 0 2px var(--brand-soft); outline: 0; }
.mpw-in.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mpw-spo { white-space: nowrap; text-align: right; }
.mpw-spo form { display: inline-block; }
.mpw-warnrow > td { background: var(--warn-soft); }
.mpw-warnrow > td:first-child { box-shadow: inset 3px 0 0 var(--warn-line); }
.mpw-deadrow > td { background: var(--card-2); color: var(--muted); }
.mpw-deadrow > td:first-child { box-shadow: inset 3px 0 0 var(--line); }
.mpw-deadrow .mpw-spec-t { color: var(--muted); }
i.mpw-dead {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  font-style: normal; font-size: 10.5px; color: var(--muted); background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap;
}
.mpw-spec-t { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpw-table select.pick { min-width: 128px; }

/* ---- SKU 对应 ---------------------------------------------------------- */
.mpw-links { display: flex; flex-direction: column; gap: 8px; }
.mpw-link {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
  box-shadow: var(--sh-1); overflow: hidden;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.mpw-link:hover { box-shadow: var(--sh-2); }
.mpw-link-h { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; padding: 11px 13px; cursor: pointer; user-select: none; }
.mpw-link-h:hover { background: var(--line-3); }
.mpw-link.on > .mpw-link-h { background: var(--brand-soft); }
.mpw-lk-img { position: relative; flex: none; display: block; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
.mpw-lk-img img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.mpw-lk-img i { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-style: normal; font-size: 10.5px; color: var(--muted-2); }
.mpw-caret { flex: none; width: 12px; font-size: 12px; color: var(--muted-2); }
.mpw-link.on .mpw-caret { color: var(--brand); }
.mpw-link-h .mpw-lk-n { flex: 1 1 240px; font-size: 13px; }
.mpw-link-b { border-top: 1px solid var(--line-2); padding: 11px 13px 13px; }
.mpw-link-b[hidden] { display: none; }

/* SKU 对应：一次把几行都选好，点一次「保存对应」才提交 */
.mpw-savebar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  position: sticky; top: calc(var(--topbar-h) + 10px); z-index: 6;
  padding: 11px 13px; margin-bottom: 10px; border-radius: var(--r-lg);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  box-shadow: var(--sh-1);
}
.mpw-savebar[hidden] { display: none; }
.mpw-savebar-n { font-size: 12.5px; font-weight: 600; color: var(--brand-ink); white-space: nowrap; }
.mpw-savebar-n b { font-family: var(--mono); font-size: 14px; }
.mpw-savebar .mpw-tip { flex: 1 1 240px; min-width: 0; }
.mpw-table tbody tr.mpw-dirty > td { background: var(--info-soft); }
.mpw-table tbody tr.mpw-dirty > td:first-child { box-shadow: inset 3px 0 0 var(--info-line); }
.mpw-dirty .mpw-spec-t { color: var(--info); font-weight: 600; }

/* SKU 对应：一个商品ID 下面，批量把「我的商品 + 规格」填上 */
.mpw-bulkbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 11px; margin-bottom: 9px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: linear-gradient(180deg, #fbfcfe, #f5f7fb);
}
.mpw-bulkbar .mp-lbl { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.mpw-bulkbar select.pick { min-width: 132px; }
.mpw-bulkbar .mpw-tip { flex: 1 1 240px; min-width: 0; }
.mpw-table .mpw-pkcol { padding-left: 9px; padding-right: 0; text-align: center; }
.mpw-table .mpw-pkcol input {
  width: 15px; height: 15px; margin: 0; vertical-align: -2px; accent-color: var(--brand);
}

/* ---- 待绑定链接 -------------------------------------------------------- */
.mpw-pick { display: inline-flex; align-items: center; margin-right: 7px; }
.mpw-ub { font-size: 12.5px; }
.mpw-ubck { width: 15px; height: 15px; margin: 0; vertical-align: -2px; accent-color: var(--brand); }
.mpw-bind { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* 存完回到这一页：把动过的那一块点亮 */
.mpw-hit { background: var(--ok-soft) !important; }
.mpw-hit > td { background: var(--ok-soft); }
.mpw-hit > td:first-child { box-shadow: inset 3px 0 0 var(--ok-line); }
.mpw-hit.mpw-link, .mpw-hit.mpw-spg, .mpw-hit.mpw-card { border-color: var(--ok-line); }
.mpw-hit.mpw-card { box-shadow: 0 0 0 3px var(--ok-soft), var(--sh-2); }

/* 我的商品：工作台小零件 */
.mpw-hero-t { min-width: 0; }
.mpw-tip { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.75; }
.mpw-del { margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ---- 快递成本（快递公司 × 省份 单价表） -------------------------------- */
.sc-page .head .sub { max-width: 980px; }
.sc-page .head { margin-bottom: 14px; }
.sc-table th, .sc-table td { padding: 6px 9px; }
.sc-table tbody tr:hover { background: var(--line-3); }
.sc-prov, .sc-firm { font-weight: 600; }
.sc-firmsum { margin-left: 7px; font-size: 11px; color: var(--muted); }
.sc-note { margin-left: 7px; font-size: 11.5px; color: var(--muted); }
.sc-rate { font-weight: 600; color: var(--ok); font-variant-numeric: tabular-nums; }
.sc-kind { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 1px; font-weight: 400; }
.sc-cost { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.sc-addhint { margin: 9px 0 0; }
.sc-radio {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--ink-2); background: var(--card-2); border: 1px solid var(--line);
  border-radius: var(--r-xs); padding: 5px 11px; cursor: pointer; white-space: nowrap;
}
.sc-radio:hover { border-color: #cfd8e6; }
.sc-radio input { margin: 0; }

.sc-firmlist { margin: 0 18px 14px; display: grid; gap: 7px; }
.sc-firmitem {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); transition: border-color .14s ease, box-shadow .14s ease;
}
.sc-firmitem:hover { border-color: #d6deea; box-shadow: var(--sh-1); }
.sc-firmname { font-weight: 600; }
.sc-firmmeta { flex: 1 1 auto; font-size: 12px; color: var(--muted); min-width: 0; }
.sc-firmtag { font-size: 11px; color: var(--muted-2); }
.sc-firmops { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.sc-firmops form { display: inline-flex; margin: 0; }

.sc-firmbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 12px 18px; margin-bottom: 12px;
}
.sc-firmbar .mp-lbl { font-size: 12px; color: var(--ink-3); }
.sc-firmbar input[name=fallback], .sc-firmbar #scFillAll { width: 96px; }
.sc-firmbar .sc-radio { margin-left: auto; }

.sc-plistwrap { overflow: visible; }
.sc-plist { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc-plist thead th {
  position: sticky; top: 0; z-index: 2; background: var(--card-2); color: var(--muted);
  font-weight: 600; font-size: 12px; text-align: left;
  padding: 9px 11px; border-bottom: 1px solid var(--line);
}
.sc-plist th.right, .sc-plist td.right { text-align: right; }
.sc-plist td { padding: 6px 11px; border-bottom: 1px solid var(--line-3); }
.sc-plist tr:last-child td { border-bottom: 0; }
.sc-plist tr.sc-set { background: #f4fbf8; }
.sc-plist tr.sc-nord { color: var(--muted-2); }
.sc-plist .sc-pname { font-weight: 600; white-space: nowrap; }
.sc-plist .sc-pname .tag { margin-left: 6px; }
.sc-plist input {
  width: 92px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--r-xs);
  font: inherit; text-align: right; color: inherit;
}
.sc-plist input:focus { outline: 2px solid var(--brand); outline-offset: -1px; background: #fff; }
.sc-plist tr.sc-set input { font-weight: 600; color: var(--ok); background: #fff; border-color: var(--ok-line); }
.sc-plist tr.sc-nord input { background: var(--card-2); }
.sc-plist .sc-peff { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sc-plist .sc-pnum { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-plist .sc-pnum small { color: var(--muted); }

.sc-gridfoot, .sc-gridtools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 18px 12px;
}
.sc-gridfoot { margin-top: 12px; }
.sc-gridwrap {
  margin: 0 18px 12px; overflow: auto; max-height: 74vh;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card);
}
.sc-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.sc-grid th, .sc-grid td {
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  padding: 0; text-align: center;
}
.sc-grid thead th {
  position: sticky; top: 0; z-index: 2; background: var(--card-2); color: var(--ink-3);
  font-weight: 600; padding: 7px 5px; white-space: nowrap; font-size: 11.5px;
}
.sc-grid thead th.sc-gridcorner {
  left: 0; z-index: 3; min-width: 124px; text-align: left; padding: 7px 10px;
  background: #eef2f7; color: var(--ink-2);
}
.sc-grid tbody th.sc-gridfirm {
  position: sticky; left: 0; z-index: 1; background: var(--card-2);
  text-align: left; padding: 5px 10px; white-space: nowrap; font-weight: 600; max-width: 180px;
}
.sc-grid tbody th.sc-gridfirm small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; }
.sc-grid td { background: var(--card); }
.sc-grid td.sc-set { background: #f0fbf7; }
.sc-grid input {
  width: 62px; border: 0; background: transparent; padding: 6px 4px;
  font: inherit; text-align: center; color: inherit;
}
.sc-grid input:focus { outline: 2px solid var(--brand); outline-offset: -2px; background: #fff; }
.sc-grid td.sc-set input { font-weight: 600; color: var(--ok); }
.sc-grid thead th.sc-griddef, .sc-grid td.sc-griddef { background: #fdf6ec; border-left: 2px solid #f0dfc5; }
.sc-grid td.sc-griddef.sc-set { background: #faefdd; }
/* ---- 退货管理 --------------------------------------------------------- */
.rt-page .head { align-items: flex-start; margin-bottom: 14px; }
.rt-page .head .sub { line-height: 1.55; margin-top: 4px; }
.rt-page .filt-card { padding: 11px 14px; }
.rt-page .table-card, .table-card { padding: 0; }
.rt-page .table-card .pager, .table-card .pager { margin: 12px 14px 14px; }
.rt-sum {
  display: grid; grid-template-columns: repeat(10, 1fr);
  padding: 0; overflow: hidden; margin-bottom: 12px;
}
.rt-sum-i {
  padding: 12px 14px 13px; border-right: 1px solid var(--line-2); min-width: 0;
  transition: background .14s ease;
}
.rt-sum-i:hover { background: var(--card-2); }
.rt-sum-i:last-child { border-right: 0; }
.rt-sum-i b {
  display: block; font-size: 19px; font-weight: 680; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rt-sum-i b small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.rt-sum-i span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.rt-sum-i.hi b { color: var(--brand); }

.rt-table td .rt-spec {
  display: inline-block; max-width: 58%; vertical-align: bottom; margin-left: 4px;
  color: var(--muted); font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rt-table td .rt-qty { margin-left: 4px; color: var(--muted); font-size: 11.5px; }
.rt-table td .rt-multi {
  display: inline-block; margin-left: 4px; padding: 0 6px 1px; border-radius: 999px;
  background: var(--warn-soft); color: var(--warn); font-size: 10.5px; font-weight: 600;
  vertical-align: middle; cursor: help; white-space: nowrap; border: 1px solid var(--warn-line);
}
.rt-table td:nth-child(4) { font-weight: 600; color: var(--danger); }
.rt-table td:nth-child(4) .muted { font-weight: 400; }
.rt-table .tag { white-space: nowrap; }
.rt-table td.afs-cell { cursor: pointer; }
.rt-table td.afs-cell:hover { box-shadow: inset 0 0 0 2px var(--warn-line); }

/* 同一订单合并了多条售后的行：整行浅琥珀 + 左边一条竖杠 */
table.orders-table tr.rt-merged > td { background: #fef7e6; }
table.orders-table tr.rt-merged > td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
table.orders-table tr.rt-merged:hover > td { background: #fdefd0; }

/* 「退回货值」那一格：点一下弹窗填货值 + 备注 */
.rt-table td.rv-cell { padding: 2px 4px; }
.rv-open {
  display: flex; align-items: center; gap: 5px; width: 100%; max-width: 100%;
  padding: 3px 7px; border: 1px dashed var(--line); border-radius: var(--r-xs); background: var(--card);
  font-size: 11.5px; color: var(--muted); cursor: pointer; text-align: left; font-family: inherit;
}
.rv-open:hover { border-style: solid; border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-ink); }
.rv-cell.any .rv-open { border-style: solid; border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.rv-cell.has .rv-open { border-style: solid; border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.rv-val { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
/* 货值填 0：退回来的货坏了、不值钱，颜色淡一点 */
.rv-val.rv-zero { font-weight: 500; opacity: .68; }
.rv-none { flex: none; }
.rv-note-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }

.rv-modal {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.rv-modal[hidden] { display: none; }
.rv-mask { position: absolute; inset: 0; background: rgba(16, 24, 40, .5); backdrop-filter: blur(2px); }
.rv-box {
  position: relative; width: 100%; max-width: 400px; background: var(--card);
  border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 18px 20px 16px; margin: 0;
}
.rv-box-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.rv-box-head b { font-size: 15.5px; font-weight: 680; flex: none; }
.rv-box-sn {
  font-size: 12px; color: var(--muted); min-width: 0; font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rv-x {
  margin-left: auto; flex: none; padding: 0 6px; border: 0; background: none;
  font-size: 20px; line-height: 1; color: var(--muted-2); cursor: pointer;
}
.rv-x:hover { background: none; color: var(--ink); }
.rv-box-body { display: block; }
.rv-field { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.rv-label { flex: 0 0 88px; font-size: 12.5px; color: var(--muted); }
.rv-field input { flex: 1 1 auto; min-width: 0; }
.rv-hint { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 2px 0 15px; }
.rv-box-foot { display: flex; gap: 8px; }
.rv-box-foot .primary { flex: 1 1 auto; }
.rv-cancel { flex: none; }
.rv-danger { flex: none; border-color: var(--danger-line); color: var(--danger); }
.rv-danger:hover { background: var(--danger-soft); }
body.rv-on { overflow: hidden; }

/* ---- 订单查询：桌面端压紧一点，一屏多看几行 --------------------------- */
@media (min-width: 821px) {
  .orders-page .head { margin-bottom: 8px; }
  .orders-page .head h1 { font-size: 17px; }
  .orders-page .head .sub { font-size: 11.5px; margin-top: 2px; line-height: 1.45; }
  .orders-page .card { margin-bottom: 8px; }
  .orders-page .filt-card { padding: 9px 12px; }
  .orders-page .filt-card .filters { gap: 6px; }
  .orders-page .filt-card input, .orders-page .filt-card select,
  .orders-page .filt-card button, .orders-page .filt-card .btn { padding: 5px 9px; font-size: 12px; }
  .orders-page .table-card { padding: 0; }
  .orders-page .table-card .pager { margin: 10px 12px 12px; }
  .orders-page table.orders-table .tag { padding: 1px 7px; }
}
/* ------------------------------------------------------------ 14 窄屏适配 */
@media (max-width: 1180px) {
  .tb-search { flex: 0 1 200px; }
  .rt-sum { grid-template-columns: repeat(5, 1fr); }
  .rt-sum-i { border-bottom: 1px solid var(--line-2); }
  .rt-sum-i:nth-child(5n) { border-right: 0; }
  .rt-sum-i:nth-last-child(-n+5) { border-bottom: 0; }
  .mp-sum { grid-template-columns: repeat(4, 1fr); }
  .mp-sum-i { border-bottom: 1px solid var(--line-2); }
  .mp-sum-i:nth-child(4n) { border-right: 0; }
  .mp-sum-i:nth-last-child(-n+4) { border-bottom: 0; }
  .mpw-shell { grid-template-columns: 1fr; }
  .mpw-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .mpw-tab { flex: 1 1 140px; width: auto; }
  .mpw-new-g { grid-template-columns: 1fr 1fr; }
  .mpw-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mpw-nums > div:nth-child(4n) { border-right: 0; }
  .mpw-lk-r { grid-template-columns: 132px minmax(0, 1fr) 48px 74px 70px 76px 96px; }
  .mpw-bulk { flex: 1 1 100%; }
  .mpw-spnew .grow { flex: 1 1 100%; }
  .sc-gridfoot, .sc-gridtools { margin-left: 12px; margin-right: 12px; }
}

@media (max-width: 980px) {
  .two, .three { grid-template-columns: 1fr; }
  .tb-crumb { display: none; }
  .sc-firmbar .sc-radio { margin-left: 0; }
}

@media (max-width: 820px) {
  body { font-size: 13.5px; }
  .main { padding: 14px 12px 44px; }
  .topbar { padding: 0 12px; gap: 9px; }
  .topbar .burger {
    display: flex; width: 34px; height: 34px; font-size: 16px;
  }
  .tb-search { display: none; }
  .tb-pill { padding: 5px 9px; font-size: 11.5px; }
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: 264px;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(16, 24, 40, .22);
  }
  body.nav-open .side { transform: translateX(0); }
  .scrim {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .head { margin-bottom: 12px; }
  .head h1 { font-size: 17.5px; }
  .head .filters { width: 100%; }
  .head .filters > .btn, .head .filters > button, .head .filters > a { flex: 1 1 auto; text-align: center; }
  .card { padding: 14px; border-radius: var(--r); }
  .filters { gap: 8px; }
  .filters > .btn, .filters > button { text-align: center; }
  input[type=text], input[type=search], input[type=date], input[type=time],
  input[type=number], input[type=password], select, textarea { font-size: 14px; }
  .pager a, .pager span { padding: 7px 12px; }
  .chart { height: 250px; }
  .chart.sm { height: 220px; }
  .chart.lg { height: 300px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .sp { display: none; }

  /* 订单 / 退货：一行一张卡 */
  table.orders-table { table-layout: auto; font-size: 13px; }
  table.orders-table colgroup { display: none; }
  table.orders-table thead { display: none; }
  table.orders-table, table.orders-table tbody, table.orders-table tr, table.orders-table td { display: block; width: auto; }
  table.orders-table tr {
    border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
    margin-bottom: 10px; padding: 10px 13px; box-shadow: var(--sh-1);
  }
  table.orders-table tr:hover { background: var(--card); }
  table.orders-table tbody tr:hover { background: var(--card); }
  table.orders-table td {
    border: 0; padding: 4px 0; white-space: normal; overflow: visible; text-overflow: clip;
    display: flex; align-items: flex-start; gap: 10px; line-height: 1.7;
  }
  table.orders-table td::before {
    content: attr(data-label); flex: 0 0 64px; color: var(--muted-2); font-size: 12px; line-height: 1.9;
  }
  table.orders-table td.wrap, table.orders-table td.trace { min-width: 0; max-width: none; }
  table.orders-table td.trace .tw { flex-wrap: wrap; }
  table.orders-table td.trace .tw > .tinfo { flex: 1 1 100%; white-space: normal; max-width: none; }
  table.orders-table td .oneline { max-width: none; white-space: normal; }
  table.orders-table td .clamp2 { max-width: none; white-space: normal; }
  table.orders-table td.right { text-align: left; }
  table.orders-table td.empty { display: block; padding: 28px 0; text-align: center; }
  table.orders-table td.empty::before {
  content: ''; display: block; width: 48px; height: 48px; margin: 0 auto 12px;
  border-radius: 50%; background-color: var(--line-3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.5 8.6 12 3.5 3.5 8.6v7.8L12 21.5l8.5-5.1z'/%3E%3Cpath d='M3.5 8.6 12 13.7l8.5-5.1M12 13.7v7.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 25px 25px;
  box-shadow: inset 0 0 0 1px var(--line);
}
  table.orders-table tr.total > td, table.orders-table tr.sum-row > td { background: transparent; }
  table.orders-table tr.rt-merged { background: #fef7e6; border-color: var(--warn-line); border-left: 3px solid #f59e0b; }
  table.orders-table tr.rt-merged > td { background: transparent; }
  table.orders-table tr.rt-merged > td:first-child { box-shadow: none; }
  table.orders-table tr.mg-parcel { background: #faf7ff; border-color: #ddd0fb; border-left: 3px solid #8b5cf6; }
  table.orders-table tr.mg-parcel > td { background: transparent; box-shadow: none; }
  .rt-page .table-card, .orders-page .table-card { background: transparent; border: 0; }
  .rt-table td:nth-child(4) { font-weight: 600; }
  .rt-table td.rv-cell { padding: 0; }
  .rt-table td.afs-cell:hover { box-shadow: none; }

  /* 店铺表：一行一店 */
  table.shop-table { font-size: 13px; }
  table.shop-table thead { display: none; }
  table.shop-table, table.shop-table tbody, table.shop-table tr, table.shop-table td { display: block; width: auto; }
  table.shop-table tr {
    border: 1px solid var(--line); border-radius: var(--r); background: var(--card);
    margin-bottom: 10px; padding: 10px 13px; box-shadow: var(--sh-1);
  }
  table.shop-table tr.shop-off { background: var(--card-2); }
  table.shop-table td {
    border: 0; padding: 4px 0; white-space: normal;
    display: flex; align-items: flex-start; gap: 10px; line-height: 1.7;
  }
  table.shop-table td::before {
    content: attr(data-label); flex: 0 0 64px; color: var(--muted-2); font-size: 12px; line-height: 1.9;
  }
  table.shop-table td.shop-name { font-size: 14px; font-weight: 600; }
  table.shop-table td.shop-ops { flex-wrap: wrap; gap: 7px; padding-top: 8px; }
  table.shop-table td.shop-ops::before { display: none; }
  table.shop-table td.shop-ops .mp-mini { margin: 0; padding: 5px 11px; }

  /* 我的商品 */
  .mp-sum { grid-template-columns: repeat(2, 1fr); }
  .mp-sum-i { padding: 12px 13px; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .mp-sum-i:nth-child(odd) { border-right: 1px solid var(--line-2); }
  .mp-sum-i:nth-child(4n) { border-right: 1px solid var(--line-2); }
  .mp-sum-i:nth-child(even) { border-right: 0; }
  .mp-sum-i:nth-last-child(-n+2) { border-bottom: 0; }
  .mp-sum-i b { font-size: 18px; }
  .mp-bar { padding: 11px 12px; }

  .mpw-hero h1 { font-size: 19px; }
  .mpw-hero p { font-size: 12px; }
  .mpw-kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mpw-kpi { padding: 11px 12px 12px; }
  .mpw-kpi b { font-size: 20px; }
  .mpw-new { padding: 13px 13px 14px; }
  .mpw-new-g { grid-template-columns: 1fr; }
  .mpw-tools { padding: 10px 12px; }
  .mpw-tools .grow { flex: 1 1 100%; }
  .mpw-card-h { flex-wrap: wrap; padding: 12px 13px 10px; }
  .mpw-cover { width: 64px; height: 64px; border-radius: 11px; }
  .mpw-up-b { width: 22px; height: 22px; border-radius: 8px; font-size: 13px; }
  .mpw-card-t { flex: 1 1 100%; }
  .mpw-tags { justify-content: flex-start; }
  .mpw-nums { grid-template-columns: 1fr 1fr; }
  .mpw-nums > div { padding: 8px 11px 9px; }
  .mpw-nums > div:nth-child(2n) { border-right: 0; }
  .mpw-card-b { padding: 2px 13px 13px; }
  .mpw-lks { border: 0; overflow: visible; }
  .mpw-lk-head { display: none; }
  .mpw-lk-r {
    grid-template-columns: 1fr 1fr; gap: 3px 10px; padding: 9px 10px;
    border: 1px solid var(--line-2); border-radius: var(--r-sm);
    margin-bottom: 8px; font-size: 12px;
  }
  .mpw-lk-r .r { text-align: left; }
  .mpw-lk-r .mpw-gid, .mpw-lk-r .mpw-lk-n, .mpw-lk-r .mpw-lk-o { grid-column: 1 / -1; }
  .mpw-lk-r .mpw-lk-n { white-space: normal; }
  .mpw-lk-r .mpw-lk-o { justify-content: flex-start; }
  .mpw-lk-r > span:nth-child(3)::before { content: '订单 '; color: var(--muted-2); }
  .mpw-lk-r > span:nth-child(4)::before { content: '净收入 '; color: var(--muted-2); }
  .mpw-lk-r > span:nth-child(5)::before { content: '成本 '; color: var(--muted-2); }
  .mpw-lk-r > span:nth-child(6)::before { content: '毛利 '; color: var(--muted-2); }
  .mpw-spg { padding: 12px 13px 14px; }
  .mpw-table { font-size: 12px; }
  .mpw-table select.pick { min-width: 104px; }
  .mpw-link-h { padding: 10px 12px; }
  .mpw-link-h .mpw-lk-n { flex: 1 1 100%; white-space: normal; }
  .mpw-link-b { padding: 10px 12px 12px; }
  .mpw-edit { display: flex; flex-wrap: wrap; }
  .mpw-edit label:first-child { flex: 1 1 100%; }
  .mpw-edit-fb { flex: 0 0 auto; }
  .mpw-edit label:nth-of-type(3) { flex: 1 1 130px; }

  /* 快递成本 */
  .sc-firmlist { margin: 0 14px 12px; }
  .sc-firmitem { flex-wrap: wrap; gap: 6px 10px; }
  .sc-firmmeta { flex: 1 1 100%; }
  .sc-firmops { flex: 1 1 100%; gap: 8px; }
  .sc-firmops .btn, .sc-firmops .mp-mini { flex: 1 1 auto; text-align: center; }
  .sc-radio { flex: 1 1 44%; }
  .sc-addhint { margin-top: 8px; }
  .sc-firmbar { padding: 12px 14px; }
  .sc-firmbar input[name=fallback], .sc-firmbar #scFillAll { width: 88px; }
  .sc-firmbar .sc-radio { flex: 1 1 100%; }
  .sc-plistwrap { overflow-x: auto; }
  .sc-plist { font-size: 12.5px; }
  .sc-plist thead th { padding: 8px 8px; }
  .sc-plist td { padding: 6px 8px; }
  .sc-plist input { width: 70px; padding: 4px 7px; }
  .sc-plist .sc-peff .tag, .sc-plist .sc-pname .tag { display: none; }
  .sc-gridfoot, .sc-gridtools { margin: 0 14px 10px; }
  .sc-gridwrap { margin: 0 14px 10px; max-height: none; }
  .sc-grid input { width: 54px; }
  .sc-grid tbody th.sc-gridfirm { max-width: 118px; white-space: normal; }

  /* 退货 */
  .rt-sum { grid-template-columns: repeat(2, 1fr); }
  .rt-sum-i { padding: 11px 13px 12px; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .rt-sum-i:nth-child(odd) { border-right: 1px solid var(--line-2); }
  .rt-sum-i:nth-child(4n), .rt-sum-i:nth-child(5n) { border-right: 0; }
  .rt-sum-i:nth-last-child(-n+2) { border-bottom: 0; }
  .rt-sum-i b { font-size: 17px; }
  .rv-modal { align-items: flex-end; padding: 0; }
  .rv-box { max-width: none; border-radius: 18px 18px 0 0; padding: 16px 18px 20px; }
  .rv-field { align-items: flex-start; flex-direction: column; gap: 5px; }
  .rv-label { flex: none; }
  .rv-field input { width: 100%; }

  /* 账号管理 */
  .u-edit input[name=display_name], .u-edit input[name=password], .u-edit input[name=note] { width: 100%; flex: 1 1 100%; }
  .u-btns { flex-wrap: wrap; }
  .u-btns .btn, .u-btns button { flex: 1 1 auto; text-align: center; }
  .ev1 { max-width: none; white-space: normal; }
}

@media (max-width: 520px) {
  .tb-txt { display: none; }
  .mp-sum { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .login-hero { display: none; }
  .login-side { flex: 1 1 100%; padding: 24px 16px; }
}
/* ---- 轻提示 ----------------------------------------------------------- */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  max-width: 340px; padding: 12px 16px; border-radius: var(--r);
  background: var(--ink); color: #fff; font-size: 13px; line-height: 1.6;
  box-shadow: var(--sh-3); animation: toast-in .18s ease;
}
.toast[hidden] { display: none; }
.toast.ok { background: #05603a; }
.toast.err { background: #912018; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 820px) {
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

/* ------------------------------------ 16 列特别多的表：左右滑、表头和订单号钉住 ---- */
@media (min-width: 821px) {
  .orders-page .tablewrap, .rt-page .tablewrap {
    overflow: auto;
    max-height: max(420px, calc(100vh - 310px));
    background:
      linear-gradient(to right, var(--card) 45%, rgba(255, 255, 255, 0)) left center / 26px 100% no-repeat local,
      linear-gradient(to left, var(--card) 45%, rgba(255, 255, 255, 0)) right center / 26px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(16, 24, 40, .18), rgba(16, 24, 40, 0)) left center / 11px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(16, 24, 40, .18), rgba(16, 24, 40, 0)) right center / 11px 100% no-repeat scroll;
  }
  .orders-page table.orders-table { min-width: 1720px; }
  .orders-page table.orders-table.has-shop { min-width: 1810px; }
  .rt-page table.orders-table { min-width: 1460px; }
  .orders-page table.orders-table th:first-child,
  .orders-page table.orders-table td:first-child,
  .rt-page table.orders-table th:first-child,
  .rt-page table.orders-table td:first-child {
    position: sticky; left: 0; z-index: 2;
    background: var(--card);
    box-shadow: inset -1px 0 0 var(--line), inset 1px 0 0 var(--card);
  }
  .orders-page table.orders-table thead th:first-child,
  .rt-page table.orders-table thead th:first-child { z-index: 5; background: var(--card-2); }
  .orders-page table.orders-table tbody tr:hover > td:first-child { background: #f7faff; }
  .orders-page table.orders-table tr.mg-parcel > td:first-child {
    background: var(--violet-soft); box-shadow: inset 3px 0 0 var(--violet), inset -1px 0 0 var(--line);
  }
  .orders-page table.orders-table tr.mg-parcel:hover > td:first-child { background: #ede8ff; }
  .rt-page table.orders-table tr.rt-merged > td:first-child { background: #fef7e6; box-shadow: inset 3px 0 0 var(--amber, #f79009), inset -1px 0 0 var(--line); }
  .rt-page table.orders-table tr.rt-merged:hover > td:first-child { background: #fdefd0; }
  .rt-page table.orders-table tbody tr:hover > td:first-child { background: #f8fafd; }
}

/* ---- 退货管理：批量填退回货值 ------------------------------------------ */
.bulk-box { max-width: 640px; }
.bulk-tip { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin: 0 0 9px; }
.bulk-tip b { color: var(--ink-2); font-weight: 600; }
.bulk-tip.second {
  margin: 10px 0 12px; padding: 8px 11px; border-radius: var(--r-sm);
  background: var(--info-soft); border: 1px solid var(--info-line); color: var(--ink-3);
}
.bulk-box textarea {
  width: 100%; height: 200px; min-height: 130px; max-height: 46vh; resize: vertical;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; padding: 9px 11px;
  white-space: pre; overflow: auto;
}

/* ---- 订单查询：筛选合计条 --------------------------------------------- */
.ord-sum { padding: 0; margin-bottom: 12px; overflow: hidden; }
.ord-sum-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 11px 15px 10px; border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--card-2), var(--card));
}
.ord-sum-title { font-size: 13px; font-weight: 650; color: var(--ink); white-space: nowrap; }
.ord-sum-title::before {
  content: ''; display: inline-block; width: 3px; height: 13px; margin-right: 7px;
  border-radius: 2px; background: var(--brand); vertical-align: -2px;
}
.ord-sum-tip { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.ord-sum-tip strong { color: var(--ink-3); font-weight: 600; }
.ord-sum-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ord-sum-i {
  padding: 11px 15px 12px; min-width: 0;
  box-shadow: inset -1px -1px 0 var(--line-2);
  transition: background .14s ease;
}
.ord-sum-i:hover { background: var(--card-2); }
.ord-sum-grid > .ord-sum-i:nth-child(5n) { box-shadow: inset 0 -1px 0 var(--line-2); }
.ord-sum-grid > .ord-sum-i:nth-child(n+6) { box-shadow: inset -1px 0 0 var(--line-2); }
.ord-sum-grid > .ord-sum-i:nth-child(n+6):nth-child(5n) { box-shadow: none; }
.ord-sum-k {
  display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ord-sum-i b {
  display: block; font-size: 19px; font-weight: 680; letter-spacing: -.6px;
  font-variant-numeric: tabular-nums; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ord-sum-i b small { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.ord-sum-d { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }
.ord-sum-i.hi b { color: var(--brand); }
.ord-sum-i.hi-bg { background: linear-gradient(180deg, var(--brand-soft), var(--card)); }
.ord-sum-i.hi-bg:hover { background: var(--brand-soft); }
.ord-est {
  display: inline-block; margin-right: 5px; padding: 0 6px 1px; border-radius: 999px;
  background: var(--violet-soft); color: var(--violet); border: 1px solid var(--violet-line);
  font-size: 10.5px; font-weight: 600; font-style: normal; letter-spacing: 0;
  vertical-align: 1px; cursor: help; white-space: nowrap;
}
@media (max-width: 980px) {
  /* 窄屏不挤：这一条自己横向滚，底下的表格照旧 */
  .ord-sum { overflow-x: auto; }
  .ord-sum-grid { grid-template-columns: repeat(5, minmax(158px, 1fr)); min-width: 790px; }
}
