/* ============================================================================
   样式总表 —— 改外观先读这里
   ----------------------------------------------------------------------------
   1. 设计变量        :root（色板 / 圆角 / 阴影 / 动效时长）—— 改色只改这一块
   2. 基础层          排版、链接、表单控件
   3. 按钮层          :where(button, .file) —— 用 :where() 把优先级降到 0，
                      任何组件自己的规则都能覆盖它（避免"全局规则压过组件规则"）
   4. 组件            卡片 / KPI / 标签 / 表格 / 分段控件 / 弹窗 / 提示
   5. 商城            顶栏、分类、商品卡、步进器、底部 Tab
   6. 后台            表格、账单、图表卡片
   7. 动效            统一缓动与关键帧（末尾）

   配色原则：**以白为主**。白卡片 + 近白底 + 炭黑文字，玫瑰色只做极小面积点缀。
   交互原则：hover 只做同色系的极小变化（绝不跳色），过渡统一走 --dur-* / --ease-*。
   JS 侧的通用组件在 web/ui.js（esc/money/kpi/statusTag/toast/…），不要在页面里重写。
   ============================================================================ */
/* ==========================================================================
   设计系统：高端医美风
   原则 —— 暖调象牙底 + 深墨绿主色 + 陶土色点缀、发丝级描边、大量留白、
   大圆角、极淡的暖阴影、细线图标（不用 emoji）。
   改颜色只改这一块，其余组件都从这里取值。
   ========================================================================== */
:root {
  /* ==========================================================================
     以「白」为主：白卡片 + 近白底 + 炭黑文字，彩色只做极小面积的点缀。
     医美的高级感来自干净和留白，不是靠大面积颜色 —— 上一版大面积玫瑰会发棕。
     ========================================================================== */

  /* 底色与文字 */
  --bg: #f6f6f5;              /* 近白，带一丝暖 */
  --bg-tint: #fdfafb;         /* 极淡玫瑰（几乎看不出，只做背景呼吸） */
  --bg-tint2: #fbfaf7;
  --card: #ffffff;
  --ink: #1c1b1a;             /* 炭黑 */
  --ink-hover: #35322f;
  --ink-soft: #4f4c48;
  --muted: #94908c;
  --line: #ecebe9;            /* 发丝线 */
  --line-strong: #e0ddda;
  --line-soft: #f6f5f4;
  --hover-bg: #faf9f8;        /* 白底控件 hover：只差一点点，绝不跳色 */

  /* 主操作：炭黑。白底上最"贵"，而且 hover 落差天然很小 */
  --brand: #1f1e1d;
  --brand-hover: #35322f;
  --brand-soft: #f6f5f4;
  --brand-line: #e8e6e4;
  --brand-mid: #6f6a66;
  --brand-dark: #0f0e0d;      /* 极深炭色，仅用于渐变/深色块 */

  /* 点缀：雾玫瑰。只用在价格、关键数字、品牌标这种小面积上 */
  --accent: #b0707d;
  --accent-hover: #9c5f6c;
  --accent-soft: #fbf4f5;
  --accent-line: #f0dfe3;

  /* 状态色（同样低饱和） */
  --bad: #a85a52;
  --bad-soft: #fbf2f1;
  --bad-line: #eed9d6;
  --warn: #a3854f;
  --warn-soft: #faf6ee;
  --warn-line: #ece0cb;
  --ok: #6f8677;
  --ok-soft: #f2f6f3;
  --ok-line: #dde7e0;

  /* 阴影：中性偏暖、极淡、单层 */
  --shadow-sm: 0 1px 2px rgba(28, 27, 26, .04);
  --shadow: 0 8px 28px -16px rgba(28, 27, 26, .16);
  --shadow-lg: 0 28px 64px -28px rgba(28, 27, 26, .26);

  /* 圆角：整体调大，观感更圆润 */
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 动效 */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --dur-1: .18s;
  --dur-2: .28s;
  --dur-3: .42s;

  --track-label: 0.06em;
}
* { box-sizing: border-box; }
/* 作者样式里的 display（.modal{display:grid}、.badge{display:inline-grid} 等）会盖掉浏览器
   默认的 [hidden]{display:none}，导致 hidden 完全失效（弹窗一直盖在页面上、角标一直显示 0）。
   这里统一兜住，任何 hidden 元素都必须真的隐藏。 */
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 12% -12%, var(--bg-tint) 0%, transparent 62%),
    radial-gradient(700px 320px at 100% 0%, var(--bg-tint2) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 88px; }
.wrap.wide { max-width: 1120px; }
.topbar, .card, .table-wrap {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.brand {
  font-weight: 600; font-size: 19px; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 12px;
}
.brand span { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
.brand-logo {
  height: 26px; width: auto; flex: none; display: block;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--brand-line);
}
.nav-link:hover { text-decoration: none; background: #f7e7ea; }
h1, h2, h3 { margin: 0; }
.lede { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.card { padding: 22px; margin-bottom: 18px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand-line);
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.step h2 { font-size: 16px; margin-bottom: 4px; }
.field { margin-top: 12px; }
.field label, .field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: var(--track-label);
}
input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #fdfcfb;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: #c0b5af; }
input:hover, textarea:hover, select:hover { border-color: #e8ded8; }
/* 复选框/单选框不能被上面那条 `width: 100%` 撑开：对账单里一个 checkbox 曾经
   被拉到 352px，把整行正文挤成「一个字一行」。accent-color 让勾选颜色跟主题一致。 */
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0;
  flex: none; accent-color: var(--brand); cursor: pointer;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(154, 95, 109, .14);
}
textarea { min-height: 88px; resize: vertical; }
/* 顶部那条「用 Excel 填」的窄条：一行放下，别占太多地方 */
.card.compact { padding: 12px 16px; }
.compact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.compact-text { min-width: 0; }
.compact-text b { display: block; font-size: 14px; }
.compact-text .hint { font-size: 12px; }
.compact-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.compact-row button, .compact-row .file { padding: 8px 12px; font-size: 13px; }
.card.compact #importHint { margin: 6px 0 0; font-size: 12px; }
.card.compact #importHint:empty { display: none; }

.hint { color: var(--muted); font-size: 12.5px; line-height: 1.65; }
/* 后台商品列表里的小缩略图 */
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumb-empty { display: inline-block; width: 44px; height: 44px; line-height: 44px; text-align: center;
  border-radius: 8px; border: 1px dashed var(--line); color: var(--muted); font-size: 11px; }

/* ===== 客户侧：分类侧边栏 + 商品卡片 ===== */
.shop { display: grid; grid-template-columns: 140px 1fr; gap: 14px; margin-top: 12px; }
.shop-side { display: flex; flex-direction: column; gap: 4px; }
.shop-side button {
  background: #fff; color: var(--ink-soft); border: 1px solid var(--line);
  justify-content: flex-start; padding: 9px 12px; font-weight: 600; font-size: 14px;
}
.shop-side button:hover { background: rgba(255, 255, 255, .72); }
.shop-side button.active { background: var(--accent-soft); border-color: var(--brand-line); color: var(--accent); }
.shop-main { min-width: 0; }
.shop-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.shop-toolbar input { flex: 1; min-width: 160px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.card-product {
  border: 1px solid var(--line); border-radius: 14px; background: white;
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.card-product.picked { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--accent-soft); }
/* 商品图：用 contain + 正方形显示区，**不做裁切**。
   原来用 4:3 + cover，正方形的图会被切掉 25%、竖版照片切掉 44%，
   商品会显示不全。contain 会等比缩放到完整可见，商品本身是白底所以看不出留白。 */
.card-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
  padding: 6px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line-soft);
}
.card-img-empty { display: grid; place-items: center; font-size: 34px; font-weight: 700; color: #ddd2cd; }
.card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-name { font-size: 15px; }
.stepper { display: grid; grid-template-columns: 40px 1fr 40px; gap: 6px; align-items: center; }
.stepper button {
  padding: 0; height: 36px; font-size: 18px; line-height: 1;
  background: white; color: var(--ink); border: 1px solid var(--line);
}
.stepper button:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--brand-line); }
.stepper button:disabled { opacity: .45; cursor: not-allowed; }
.stepper .step-input { text-align: center; padding: 6px 4px; height: 36px; }
.cart-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--line-soft); }
.cart-row .linkish { margin: 0; text-align: right; }

/* ===== 驾驶舱 / 业务员 ===== */
.dash-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.dash-row { display: grid; grid-template-columns: 1fr 110px 100px 90px; gap: 8px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--line-soft); font-size: 14px; }
.dash-row b { text-align: right; }
code { background: var(--line-soft); padding: 1px 6px; border-radius: 6px; font-size: 13px; color: var(--ink-soft); }

/* 导入报错是多行「第几行错了」，要保留换行 */
#importHint { white-space: pre-line; }
.parse-card {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fdfbfa;
  border: 1px dashed var(--line);
}
.parse-card.show { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.parse-card.ok { background: var(--accent-soft); border-style: solid; border-color: var(--brand-line); }
.parse-card.bad { display: block; background: var(--bad-soft); border-color: #ecd6d1; color: var(--bad); }
.parse-item { min-width: 0; }
.parse-item b { display: block; font-size: 12px; color: var(--muted); font-weight: 650; }
.parse-item span { display: block; word-break: break-all; }
.parse-item.wide { grid-column: 1 / -1; }
.line-head, .line {
  display: grid;
  grid-template-columns: 1fr 108px 72px;
  gap: 8px;
  align-items: center;
}
/* 数量那一格比别的高（输入框下面还有「件/套」提示），
   居中对齐会把下拉和按钮顶歪，这里统一改成顶部对齐。 */
.line { align-items: start; }
.line-head { color: var(--muted); font-size: 12px; font-weight: 650; margin: 8px 0 4px; }
.line { margin-bottom: 8px; }
.line-note { grid-column: 1 / -1; font-size: 12px; color: var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; }
.linkish {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  padding: 0;
  margin: 4px 0 0;
  cursor: pointer;
}
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
/* --------------------------------------------------------------------------
   按钮：基础层一律用 :where() 包起来 —— 它的优先级是 0，
   任何组件自己的规则（.menu-item / .tabs button / .shop-side button …）都能覆盖它。
   之前 button:hover:not(:disabled) 的优先级 (0,2,1) 高过 .menu-item:hover 的 (0,2,0)，
   鼠标划过菜单项会直接变成深色实心 —— 就是那个「一闪一闪」。用了 :where() 这类
   覆盖问题从此不会再出现。
   -------------------------------------------------------------------------- */
:where(button, .file) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
:where(button, .file):disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
:where(button:not(:disabled):hover) { background: var(--brand-hover); }
/* 点击时不要再位移，微微压暗即可（位移+变色叠在一起就像闪） */
:where(button:not(:disabled):active) { transform: none; filter: brightness(.97); }
:where(button.ghost, .file) {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
:where(button.ghost:not(:disabled):hover), .file:hover {
  background: var(--hover-bg);
  border-color: var(--line-strong);
}
:where(button.secondary) { background: var(--ink); }
:where(button.secondary:not(:disabled):hover) { background: var(--ink-hover); }
:where(button.danger) { background: #fff; color: var(--bad); border-color: var(--bad-line); box-shadow: var(--shadow-sm); }
:where(button.danger:not(:disabled):hover) { background: var(--bad-soft); border-color: var(--bad-line); }
:where(button.ghost, button.danger) { font-weight: 550; }
.file { margin: 0; }
button .ico, .nav-link .ico { flex: none; }
.success {
  display: none;
  text-align: center;
  padding: 28px 16px;
}
.success.show { display: block; }
.success h2 { margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(156px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 20px; border-radius: var(--radius-lg); }
.kpi b {
  display: block; font-size: 27px; line-height: 1.15; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.kpi span {
  color: var(--muted); font-size: 11.5px; font-weight: 500;
  letter-spacing: var(--track-label); margin-top: 4px; display: block;
}
.kpi-money b { color: var(--accent); }
.tabs {
  display: flex;
  gap: 4px;
  padding: 5px;
  margin-bottom: 20px;
  background: #efece8;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.tabs button {
  margin: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
}
.tabs button:hover:not(:disabled) { background: rgba(255, 255, 255, .45); color: var(--ink-soft); }
.tabs button.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 27, 26, .10);
}
.panel { display: none; }
.panel.active { display: block; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 13.5px; }
th {
  color: var(--muted); font-size: 11.5px; font-weight: 600;
  background: #fbfaf8; white-space: nowrap;
  letter-spacing: var(--track-label); text-transform: none;
}
tbody tr:hover td { background: #fdfaf9; }
/* 后台的申请表格有 8 列 + 操作列。窄屏上如果继续 width:100% 硬挤，
   表头会变成一个字一行、按钮溢出格子；改成给表格一个下限宽度，让
   .table-wrap 横向滚动。 */
@media (max-width: 1100px) {
  .table-wrap table { min-width: 880px; }
}
tr:last-child td { border-bottom: 0; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  border: 1px solid transparent; white-space: nowrap;
}
.tag.pending { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tag.exported { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tag.skipped { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.tag.settled { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tag.unsettled { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tag.cancelled { background: var(--line-soft); color: var(--muted); border-color: var(--line); }
.tag.intercept_pending { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-line); }
.tag.intercepted { background: var(--line-soft); color: var(--ink-soft); border-color: var(--line); }
.tag.notbilled { background: var(--line-soft); color: var(--muted); border-color: var(--line); }
.fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.fields .full { grid-column: 1 / -1; }
.form-title {
  font-size: 14.5px; font-weight: 600; margin-bottom: 14px;
  color: var(--ink); letter-spacing: -0.005em;
  display: flex; align-items: center; gap: 8px;
}
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 380px;
  background: #26241f;
  color: #f7f5f2;
  padding: 13px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 20;
}
.toast.show { display: block; }
.toast.bad { background: #8f4438; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint b { color: var(--ink); }
.step-body { flex: 1; min-width: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.login-wrap { min-height: 100dvh; display: grid; align-items: center; }
.login-card { max-width: 420px; margin: 0 auto; }
.login-card .brand { margin-bottom: 16px; }
.login-card .actions button { width: 100%; min-height: 44px; }
@media (max-width: 820px) {
  .wrap, .wrap.wide { padding: 16px 12px calc(24px + env(safe-area-inset-bottom)); }
  .topbar { flex-direction: column; align-items: stretch; }
  .top-actions { justify-content: flex-start; }
  /* KPI 在手机上排两列：一个一个占满整行会让页面长到没法看 */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 15px 16px; }
  .kpi b { font-size: 22px; }
  .fields, .parse-card.show, .split { grid-template-columns: 1fr; }
  .tabs { width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs button { flex: none; }
  .line-head { display: none; }
  .line { grid-template-columns: 1fr 88px; }
  .line .remove { grid-column: 2; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions button, .actions .file, .file { width: 100%; min-height: 44px; }
  input, textarea, select { font-size: 16px; }
  /* 手机上侧边栏收成顶部横向滚动的分类条 */
  .shop { grid-template-columns: 1fr; }
  .shop-side { flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .shop-side button { flex: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .cart-row { grid-template-columns: 1fr auto; font-size: 13px; }
  .stepper { grid-template-columns: 44px 1fr 44px; }
  .stepper button, .stepper .step-input { min-height: 44px; }
}

/* ============================================================
   商城（V3）：电脑端顶部导航 + 左侧分类；手机端底部 Tab
   配色与层次在这段里统一，改外观只改这里
   ============================================================ */
:root {
  /* 客户端沿用同一套色板，只补几个这里用到的别名，别再单独定义一遍颜色 */
  --price: var(--accent);
  --shadow-md: var(--shadow);
}

.shop-body {
  background:
    radial-gradient(900px 340px at 12% -10%, var(--bg-tint) 0%, transparent 60%),
    radial-gradient(720px 300px at 96% 2%, var(--bg-tint2) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100dvh;
}
.shop-shell { max-width: 1200px; margin: 0 auto; padding: 0 20px 96px; }

/* ---------- 顶栏 ---------- */
.shop-top {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 4px 16px; margin-bottom: 20px;
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 244, 241, .82);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.shop-brand {
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
/* 字标右边只放当前账号，站名不重复 */
.shop-brand-sub {
  color: var(--muted); font-size: 12.5px; font-weight: 400;
  padding-left: 12px; border-left: 1px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 商城顶栏的字标比后台大一点点（门面页给足） */
.shop-brand .brand-logo { height: 30px; }
.shop-nav { display: flex; gap: 3px; margin-left: auto; background: #efece8; padding: 4px; border-radius: var(--radius-pill); border: 1px solid var(--line); }
.shop-nav button {
  background: transparent; color: var(--muted); padding: 9px 18px;
  border-radius: var(--radius-pill); font-size: 13.5px; font-weight: 600; position: relative;
  box-shadow: none;
}
.shop-nav button:hover:not(:disabled) { background: rgba(255,255,255,.42); color: var(--ink-soft); }
.shop-nav button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28, 27, 26, .10); }
.shop-logout { flex: none; }

.badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  margin-left: 6px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.shop-panel { display: none; }
.shop-panel.active { display: block; }
#panel-goods.active { display: grid; grid-template-columns: 156px 1fr; gap: 18px; align-items: start; }
.shop-main { min-width: 0; }

/* ---------- 侧边分类 ---------- */
.shop-side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 84px; }
.shop-side button {
  background: transparent; color: var(--muted); border: 1px solid transparent;
  justify-content: flex-start; padding: 11px 15px;
  font-weight: 600; font-size: 13.5px; border-radius: var(--radius-pill); box-shadow: none;
}
/* 选中态**不能**做黑白反转：以前是「透明 -> 纯黑」，鼠标划过变白、点下去变黑，
   一次交互闪两下。现在是一条平滑的浅色梯度：透明 -> 半透明白 -> 纯白，
   再用一个小玫瑰点表示"当前选中"。 */
.shop-side button:hover:not(:disabled) { background: rgba(255, 255, 255, .7); color: var(--ink-soft); }
.shop-side button.active {
  background: #fff; color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.shop-side button.active::before {
  content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 3px;
}
.shop-side .side-excel { border: 1px dashed #e3d9d3; background: transparent; box-shadow: none; }
.shop-side .side-excel.active { border-style: solid; background: #fff; color: var(--ink); }

/* ---------- 工具条 ---------- */
.shop-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.shop-toolbar input { flex: 1; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* ---------- 商品卡 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 18px; }
.card-product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 13px; display: flex; flex-direction: column; gap: 11px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-product:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--brand-line); }
.card-product.picked { border-color: var(--brand-mid); box-shadow: 0 0 0 3px rgba(154, 95, 109, .14), var(--shadow); }
/* 商品图：contain + 正方形，不裁切；商品本身白底，看不出留白 */
.card-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: contain;
  padding: 10px; border-radius: var(--radius); background: #fdfcfb; border: 1px solid var(--line-soft);
}
.card-img-empty {
  display: grid; place-items: center;
  color: #ddd2cd; background: linear-gradient(150deg, #fdfaf9, #f7f0ee);
}
.card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-name { font-size: 14.5px; font-weight: 600; line-height: 1.4; letter-spacing: -.005em; }
.card-body .hint { font-size: 11.5px; }

/* ---------- 数量步进器 ---------- */
.stepper { display: grid; grid-template-columns: 38px 1fr 38px; gap: 6px; align-items: center; }
.stepper button {
  padding: 0; height: 38px; font-size: 17px; line-height: 1; border-radius: 10px;
  background: #f2efeb; color: var(--ink); border: 1px solid transparent; font-weight: 700;
}
.stepper button:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-line); }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper .step-input {
  text-align: center; padding: 6px 2px; height: 38px; border-radius: 10px;
  font-weight: 700; border-color: var(--line);
}

/* ---------- 购物车 ---------- */
#cartList .cart-row {
  grid-template-columns: 1fr 136px 52px; gap: 10px;
  padding: 10px 12px; border-radius: 12px; background: #fefbfa; border: 1px solid var(--line-soft);
}
#cartList .stepper { grid-template-columns: 34px 1fr 34px; }
#cartList .stepper button, #cartList .stepper .step-input { height: 32px; min-height: 32px; border-radius: 8px; }
.cart-name { font-weight: 700; }

/* ---------- 「我的」主菜单 ---------- */
.me-hero {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #fdf6f7 100%);
  border: 1px solid var(--accent-line);
  box-shadow: var(--shadow-sm);
}
.me-avatar {
  width: 54px; height: 54px; flex: none; border-radius: 18px;
  display: grid; place-items: center; font-size: 22px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.me-hero-text { min-width: 0; }
.me-hero-text b { display: block; font-size: 19px; letter-spacing: -.3px; }
.me-hero-text span { color: var(--muted); font-size: 12px; }

.menu-card { padding: 8px !important; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; text-align: left;
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.menu-item:hover { background: #fff; border-color: var(--line-strong); box-shadow: var(--shadow); }
.menu-ico {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid var(--brand-line);
}
.menu-label { flex: 1; font-size: 14.5px; font-weight: 600; }
.menu-label i { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 3px; }
.menu-arrow { color: #d3c8c3; display: inline-flex; flex: none; }
/* 每一项都是独立的圆角卡片（以前连成一片、中间项是方的，看着很生硬） */
.menu-card {
  display: flex; flex-direction: column; gap: 10px;
  background: transparent; border: 0; box-shadow: none; padding: 0;
}

.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; color: var(--brand-dark); border: 0;
  padding: 6px 0 12px; font-weight: 700; font-size: 14px;
}
.back-link:hover { background: transparent; text-decoration: underline; }

/* ---------- 账单 / 订单 ---------- */
  padding: 16px; border-radius: 14px; border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, #fefbfa, #faf3f2);
}
.order-amount { margin-left: auto; font-weight: 800; color: var(--price); }
.order-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.order-acts { padding: 0 14px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hint.warn { color: var(--warn); background: var(--warn-soft); padding: 6px 10px; border-radius: 8px; }
.logi-event { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.logi-event:last-child { border-bottom: 0; }

.tag.cancelled { background: #f2efeb; color: var(--muted); }
.tag.intercept_pending { background: var(--bad-soft); color: var(--bad); }
.tag.intercepted { background: var(--brand-soft); color: var(--brand-dark); }

/* 手机端底部 Tab（电脑端隐藏） */
.shop-tabbar { display: none; }

/* ============ 手机端 ============ */
@media (max-width: 820px) {
  .shop-shell { padding: 0 12px calc(86px + env(safe-area-inset-bottom)); }
  .shop-nav { display: none; }
  .shop-top { padding: 12px 2px 10px; margin-bottom: 12px; }
  .shop-brand { font-size: 18px; }
  .shop-logout { padding: 8px 12px; }

  #panel-goods.active { grid-template-columns: 1fr; gap: 0; }
  .shop-side {
    flex-direction: row; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 2px 0 10px; margin-bottom: 6px; gap: 8px; position: static;
  }
  .shop-side button { flex: none; padding: 9px 15px; font-size: 13px; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  /* 底部 Tab 是 fixed 的，给最后一行商品留出空间，别被压住 */
  #panel-goods .cards { padding-bottom: 12px; }
  #panel-goods.active .shop-main { padding-bottom: 8px; }
  .card-product { padding: 10px; border-radius: 14px; }
  .card-name { font-size: 13.5px; }
  .card-img { padding: 5px; }

  /* 手机端把顶栏整条去掉：底部 Tab 已经能表达"我在哪"，
     顶部那条既占地方又和「我的」重复；退出登录移到「我的 -> 账号设置」。 */
  .shop-top { display: none; }
  #panel-goods.active { padding-top: 12px; }

  .shop-tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(253, 252, 251, .94); backdrop-filter: saturate(1.5) blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 24px -14px rgba(43, 38, 32, .28);
  }
  .shop-tabbar button {
    background: transparent; color: #a9a29a; border: 0; border-radius: 0;
    flex-direction: column; gap: 4px; padding: 10px 0 9px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
    box-shadow: none; position: relative;
  }
  .shop-tabbar button:hover:not(:disabled) { background: transparent; }
  .shop-tabbar button.active { color: var(--ink); background: transparent; }
  .shop-tabbar button.active::after {
    content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
    width: 18px; height: 2px; border-radius: 2px; background: var(--accent);
  }
  .tab-ico { position: relative; display: inline-flex; }
  .tab-ico .badge { position: absolute; top: -6px; right: -11px; margin: 0; }

  .me-hero { gap: 12px; padding: 16px; }
  .me-avatar { width: 46px; height: 46px; font-size: 20px; }

  /* 窄屏：商品名独占一行（不然会被步进器挤成「印章/(0-/0.3)」这种断行），
     第二行左边步进器、右边「删除」。金额那列已经没有了。 */
  #cartList .cart-row { grid-template-columns: 1fr auto; gap: 8px; row-gap: 10px; }
  #cartList .cart-row .cart-name { grid-column: 1 / -1; }
  #cartList .cart-row .stepper { grid-column: 1; max-width: 190px; }
  #cartList .cart-row .linkish { grid-column: 2; text-align: right; align-self: center; }
}

/* ===== 重要消息 ===== */
.msg-bell { position: relative; }
.msg-bell .badge { position: absolute; top: -4px; right: -4px; margin: 0; }
.order-no {
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: #f2efeb; border-radius: 6px; padding: 1px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(46, 38, 36, .38); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
.modal-card {
  background: white; border-radius: 18px; width: min(560px, 100%);
  max-height: 76vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(74, 52, 58, .26); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft);
}
.modal-head b { font-size: 16px; }
.modal-head .linkish { margin: 0; }
.modal-head .linkish:first-of-type { margin-left: auto; }
.modal-body { padding: 10px 18px 18px; overflow-y: auto; }
/* 弹窗底部按钮：右边是主操作，左边是「再想想」，手机上竖排更好点 */
.modal-foot {
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line-soft); background: #fdfbfa;
}
.modal-body .field:first-child { margin-top: 4px; }
/* 卡片上的「取消这笔」是白底红字（次要操作），但弹窗里它是主操作，要实心红 */
.modal-foot .danger {
  background: var(--bad); color: white; border-color: var(--bad);
}
.modal-foot .danger:hover:not(:disabled) { background: #9d4d43; border-color: #9d4d43; }
@media (max-width: 560px) {
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot button { width: 100%; }
}
.msg-item {
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 4px;
}
.msg-item:last-child { border-bottom: 0; }
.msg-item.unread { background: var(--brand-soft); margin: 0 -18px; padding: 12px 18px; }
.msg-item b { font-size: 14px; }
.msg-item .hint { font-size: 12px; }
/* 消息里唯一要人去做的事就是「去处理」，做成一个小胶囊按钮，别抢标题的视觉 */
.msg-go {
  align-self: flex-start; margin-top: 4px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px;
}
/* 从重要消息跳过来时，把那条单闪一下，让人一眼看到是哪一笔 */
@keyframes flash-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(154, 95, 109, 0); }
  25%      { box-shadow: 0 0 0 5px rgba(154, 95, 109, .30); }
}
.order-card.flash {
  animation: flash-ring 1.3s ease-in-out 3;
  border-color: var(--brand);
  scroll-margin-top: 90px;
}
.msg-kind {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; background: #f2efeb; color: var(--muted);
}
.msg-kind.intercept { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 820px) {
  .modal { padding: 12px; }
  .modal-card { max-height: 84vh; }
}

/* ===== 可视化图表（web/charts.js 生成的 SVG 用这些样式）===== */
.chart-wrap { margin-top: 6px; }
.chart { width: 100%; height: auto; display: block; }
.chart-legend {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin-top: 6px; font-size: 12px; color: var(--muted);
}
.chart-legend i, .donut-legend i, .bar-list i {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  margin-right: 6px; vertical-align: middle;
}
.donut-wrap {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.donut { width: 190px; height: 190px; flex: none; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; }
.donut-legend li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--line-soft);
}
.donut-legend li:last-child { border-bottom: 0; }
.donut-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }

.bar-list { list-style: none; margin: 10px 0 0; padding: 0; }
.bar-list li { padding: 7px 0; }
.bar-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.bar-name {
  font-size: 13px; font-weight: 600; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.bar-value {
  margin-left: auto; font-size: 13px; font-variant-numeric: tabular-nums;
  color: var(--price);
}
.bar-track {
  height: 8px; border-radius: 999px; background: #f2efeb; overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
.bar-hint { font-size: 11px; color: var(--muted); }

/* 图表卡片网格：宽屏并排，窄屏堆叠 */
.chart-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.chart-grid .card.wide { grid-column: 1 / -1; }

/* ===== 账单页 ===== */
.bill-filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
}
.bill-filters .field { margin-top: 0; min-width: 130px; }
.bill-total-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bill-total-row .spacer { margin-left: auto; }
.bill-customer { font-weight: 650; }
.bill-debt { color: var(--bad); font-weight: 700; font-variant-numeric: tabular-nums; }
.bill-ok { color: var(--brand); font-variant-numeric: tabular-nums; }
.bill-num { font-variant-numeric: tabular-nums; }
.bill-detail-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}
.bill-detail-list { margin-top: 8px; }
.bill-line {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft); font-size: 13px;
}
.bill-line:last-child { border-bottom: 0; }
.bill-line .grow { flex: 1; min-width: 0; }
.bill-line .tag { flex: none; }
.strike { text-decoration: line-through; color: var(--muted); }

/* ===== 订单卡里的物流块（历史订单和物流状态合并后）===== */
.logi-block {
  margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  background: var(--line-soft); border: 1px dashed var(--line);
}
details.logi-block summary {
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; font-size: 13px; list-style: none;
}
details.logi-block summary::-webkit-details-marker { display: none; }
details.logi-block summary::before { content: "▸"; color: var(--muted); }
details.logi-block[open] summary::before { content: "▾"; }
.logi-title {
  font-size: 11px; font-weight: 700; color: var(--brand-dark);
  background: var(--brand-soft); border-radius: 999px; padding: 1px 8px;
}
.logi-events { margin-top: 6px; padding-left: 4px; }


/* ===== 细线图标（web/icons.js）===== */
.ico { display: block; flex: none; }
.ico-wrap { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
button .ico-wrap, .tab-ico, .menu-arrow, .nav-link .ico-wrap { pointer-events: none; }
.hint.warn { color: var(--warn); display: inline-flex; align-items: center; gap: 5px; }
.tag .ico-wrap { margin-right: 2px; }

/* ==========================================================================
   动效：目标是"丝滑"，不是"花哨"。
   规则 —— 只过渡颜色/阴影/位移，时长 180~420ms，统一缓动；
   hover 只做很小的变化（见上面各 hover 规则），避免鼠标划过时"一闪一闪"。
   ========================================================================== */
button, .file, .nav-link, a, .tag, .tabs button, .shop-nav button,
.shop-side button, .menu-item, .card-product, .order-card, .kpi, .bar-fill {
  transition:
    background-color var(--dur-2) var(--ease-soft),
    border-color var(--dur-2) var(--ease-soft),
    color var(--dur-2) var(--ease-soft),
    box-shadow var(--dur-2) var(--ease-soft),
    opacity var(--dur-1) var(--ease-soft);
}
.card-product, .menu-item { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease-soft), border-color var(--dur-2) var(--ease-soft); }
.bar-fill { transition: width var(--dur-3) var(--ease); }

/* 面板/Tab 切换：淡入 + 极小的上浮，不做左右滑动（横扫更容易晕） */
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.panel.active, .shop-panel.active { animation: panel-in var(--dur-3) var(--ease); }

/* 子页（我的 -> 订单/账单…）切换 */
.shop-panel.sub-panel.active { animation: panel-in var(--dur-3) var(--ease); }

/* 弹窗：遮罩淡入 + 内容轻微放大，不要从 0 弹出（太夸张） */
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.modal:not([hidden]) { animation: overlay-in var(--dur-2) var(--ease-soft); }
.modal:not([hidden]) .modal-card { animation: card-in var(--dur-3) var(--ease); }

/* toast：从下往上滑一小段 */
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.toast.show { animation: toast-in var(--dur-2) var(--ease); }

/* 折叠块（物流轨迹）展开也顺一点 */
details.logi-block > *:not(summary) { animation: overlay-in var(--dur-2) var(--ease-soft); }

/* 键盘可达性：焦点环跟随新主色 */
:focus-visible { outline: 2px solid var(--brand-mid); outline-offset: 2px; border-radius: 6px; }

/* 尊重系统的"减少动态效果" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card-product:hover { transform: none; }
}

/* ===== 加载骨架：切换 Tab/刷新时不要"白一下"，用很淡的呼吸占位 ===== */
@keyframes shimmer {
  0%, 100% { opacity: .55; }
  50%      { opacity: .95; }
}
.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--line-soft), #f3ebe9, var(--line-soft));
  animation: shimmer 1.5s var(--ease-soft) infinite;
}
.skeleton-row { height: 14px; margin: 10px 0; }
.skeleton-card { height: 96px; border-radius: var(--radius-lg); }
.skeleton-block { height: 190px; border-radius: var(--radius-lg); }
.skeleton-list { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; opacity: .8; }
}

/* 字标比较宽，窄屏上让品牌区竖排，别把说明文字挤成两行 */
@media (max-width: 560px) {
  .login-card .brand { flex-direction: column; align-items: flex-start; gap: 10px; }
  .brand-logo { height: 24px; }
}

/* ===== 登录 / 注册：换行分隔 + 整宽次按钮 ===== */
.login-split {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 14px; color: var(--muted); font-size: 12px;
  letter-spacing: var(--track-label);
}
.login-split::before, .login-split::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.btn-block {
  display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: var(--radius-pill);
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 14px; font-weight: 600;
  transition: background-color var(--dur-2) var(--ease-soft), border-color var(--dur-2) var(--ease-soft);
}
.btn-block:hover { text-decoration: none; background: var(--hover-bg); border-color: var(--line-strong); }
.login-card .hint { margin-top: 12px; }

/* ===== 购物车底部：合计 + 去结算 ===== */
.cart-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.cart-foot-total { margin-right: auto; display: flex; align-items: baseline; gap: 8px; }
.cart-foot-total span { color: var(--muted); font-size: 12.5px; }
.cart-foot-total b {
  font-size: 21px; color: var(--accent); letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

/* ===== 地址管理 / 收货地址选择 ===== */
.addr-list, .addr-pick { display: flex; flex-direction: column; gap: 10px; }
.addr-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}
.addr-card.is-default { border-color: var(--accent-line); background: #fffdfd; }
.addr-main { flex: 1; min-width: 0; }
.addr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.addr-top b { font-size: 14.5px; font-weight: 600; }
.addr-acts { display: flex; gap: 8px; flex: none; }
.addr-acts button { padding: 7px 13px; font-size: 12.5px; }

.addr-option {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
  transition: border-color var(--dur-2) var(--ease-soft), background-color var(--dur-2) var(--ease-soft);
}
.addr-option:hover { border-color: var(--line-strong); }
.addr-option.picked { border-color: var(--accent-line); background: #fffdfd; }
.addr-option input { margin-top: 3px; }
.addr-option-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.addr-option-body b { font-size: 14.5px; font-weight: 600; }
.addr-option-line { flex-basis: 100%; }

.check-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-soft); cursor: pointer;
}

/* ===== Excel 识别结果确认 ===== */
.review-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.review-list { display: flex; flex-direction: column; gap: 10px; }
/* 全选那一行：和卡片同宽，轻轻压在列表上方 */
.review-tools {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 9px 13px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
}
.review-tools .check-line { margin: 0; font-size: 13.5px; }
/* 模板过期：一次性提示，压在第一条受影响的单子上方 */
.review-banner {
  border: 1px solid var(--warn-line); border-radius: var(--radius);
  background: #fffdf8; padding: 12px 15px; font-size: 13px; line-height: 1.7;
}
.review-banner > b { color: var(--warn); }
.review-banner p { margin: 5px 0 0; color: var(--ink-soft); }
.review-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; background: #fff;
  transition: border-color var(--dur-2) var(--ease-soft), opacity var(--dur-2) var(--ease-soft);
}
.review-card.level-error { border-color: var(--bad-line); background: #fffcfc; }
.review-card.level-warn { border-color: var(--warn-line); background: #fffdfa; }
.review-card.unpicked { opacity: .5; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-head b { font-size: 14.5px; font-weight: 600; }
.review-amount { margin-left: auto; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.review-addr { margin-top: 5px; }
.review-issues { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; }
.review-issues li { margin: 3px 0; }
.review-issues li.error { color: var(--bad); }
.review-issues li.warn { color: var(--warn); }
.review-issues li.ok { color: var(--ink-soft); }
.review-issues li code { font-size: 12px; color: var(--ink); }
/* 吉客云物流表导入结果 */
.logi-report { margin-top: 12px; }
.logi-report .review-issues { margin-top: 6px; max-height: 260px; overflow: auto; }
.review-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.review-items { margin-top: 8px; }
.review-item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 5px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line-soft);
}
.review-item:last-child { border-bottom: 0; }
.review-item.bad { color: var(--bad); }
.review-item-price { margin-left: auto; font-variant-numeric: tabular-nums; }

/* 启动失败提示：宁可难看，也不能白屏 */
.boot-notice {
  max-width: 900px; margin: 18px auto; padding: 14px 18px;
  border: 1px solid var(--warn-line, #e2c9a0); border-radius: 14px;
  background: #fffdf6; color: var(--ink, #1c1b1a); font-size: 13.5px; line-height: 1.8;
}
.boot-notice b { display: block; margin-bottom: 6px; }
.boot-notice .hint { color: var(--muted, #94908c); word-break: break-all; }
.boot-notice-bad { border-color: var(--bad-line, #e5b3ad); background: #fff8f7; }
