/*
 * 视觉稿的构件与样式。只依赖 tokens.css，值不在此处硬编码。
 * 这是「画板」而不是页面：每屏 HTML 引用本文件 + tokens.css，画板尺寸固定 375x812。
 * 小程序实现时不复制这里的样式，只复制 tokens（见 tokens.md「TDesign 落地映射」）。
 */

/* ===== 图标：mask + currentColor，颜色跟随文字 ===== */
.i {
  display: inline-block;
  flex: none;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 28px; height: 28px; }

.i-home   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 10.6 12 4l8 6.6V20a1 1 0 0 1-1 1h-4.2v-6.2H9.2V21H5a1 1 0 0 1-1-1z'/></svg>"); }
.i-grid   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><rect x='3.5' y='3.5' width='7' height='7' rx='2'/><rect x='13.5' y='3.5' width='7' height='7' rx='2'/><rect x='3.5' y='13.5' width='7' height='7' rx='2'/><rect x='13.5' y='13.5' width='7' height='7' rx='2'/></svg>"); }
.i-order  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M6 3.5h12a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1z'/><path d='M8.5 8.5h7M8.5 12.5h7M8.5 16.5h4'/></svg>"); }
.i-user   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><circle cx='12' cy='8.5' r='3.8'/><path d='M4.5 20.5c0-3.9 3.3-6.4 7.5-6.4s7.5 2.5 7.5 6.4'/></svg>"); }
.i-back   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.5 5 8 12l6.5 7'/></svg>"); }
.i-search { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><circle cx='10.8' cy='10.8' r='6.3'/><path d='M15.6 15.6 20 20'/></svg>"); }
.i-plus   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M12 5.5v13M5.5 12h13'/></svg>"); }
/* 下面两个给 PC 端左导航用（业绩数据、推荐码），手机端不用 */
.i-chart  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'><path d='M4 20h16'/><path d='M7 20V11M12 20V4M17 20v-6'/></svg>"); }
.i-qr     { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><rect x='3.5' y='3.5' width='6.5' height='6.5' rx='1.5'/><rect x='14' y='3.5' width='6.5' height='6.5' rx='1.5'/><rect x='3.5' y='14' width='6.5' height='6.5' rx='1.5'/><path d='M14 14h3v3h-3zM19.5 19.5h1.5v1.5h-1.5z'/></svg>"); }
.i-minus  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'><path d='M5.5 12h13'/></svg>"); }
.i-chev   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9.5 5 16 12l-6.5 7'/></svg>"); }
.i-check  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5 9.5 17 19 7'/></svg>"); }
/* 定位 / 收货人卡片用 */
.i-loc { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21.4s6.8-6.2 6.8-11.1a6.8 6.8 0 1 0-13.6 0C5.2 15.2 12 21.4 12 21.4z'/><circle cx='12' cy='10.2' r='2.5'/></svg>"); }
.i-truck  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6.5h10.5v10H3z'/><path d='M13.5 10h3.6l2.9 3v3.5h-6.5z'/><circle cx='7' cy='18.5' r='1.8'/><circle cx='16.5' cy='18.5' r='1.8'/></svg>"); }
.i-star   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><path d='m12 4.2 2.4 4.9 5.4.8-3.9 3.8.9 5.4-4.8-2.6-4.8 2.6.9-5.4L4.2 9.9l5.4-.8z'/></svg>"); }
.i-shield { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><path d='M12 3.5 19 6v6c0 4-3 7-7 8.5C8 19 5 16 5 12V6z'/><path d='m9 12 2 2 4-4' stroke-linecap='round'/></svg>"); }
.i-bell   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M6.5 17V11a5.5 5.5 0 0 1 11 0v6'/><path d='M4.5 17h15M10 20.2h4'/></svg>"); }
.i-chart  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 20h16'/><path d='M7 20V11M12 20V5.5M17 20v-6'/></svg>"); }
.i-qr     { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><rect x='4' y='4' width='6' height='6' rx='1.5'/><rect x='14' y='4' width='6' height='6' rx='1.5'/><rect x='4' y='14' width='6' height='6' rx='1.5'/><path d='M14 14h2.5v2.5H14zM19.5 19.5H20M14 20h2.5' stroke-linecap='round'/></svg>"); }
.i-box    { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'><path d='M12 3.5 20 7.5v9L12 20.5 4 16.5v-9z'/><path d='M4 7.5l8 4 8-4M12 11.5v9' stroke-linecap='round'/></svg>"); }
.i-barcode { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-linecap='round'><path d='M5 5.5v13' stroke-width='1.3'/><path d='M7.8 5.5v13' stroke-width='2.3'/><path d='M11 5.5v13' stroke-width='1.1'/><path d='M13.4 5.5v13' stroke-width='2'/><path d='M16.6 5.5v13' stroke-width='1.3'/><path d='M19.4 5.5v13' stroke-width='2.1'/><path d='M3.5 21h17' stroke-width='1.6'/></svg>"); }
.i-doc    { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M7 3.5h7l4 4v13H7z'/><path d='M13.5 3.5v4.5H18M10 12.5h5M10 16h3.5'/></svg>"); }
/* 图片：内容管理用它（原先是引用了未定义的 .i-image，会渲染成实心方块） */
.i-image  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3.5' y='4.5' width='17' height='15' rx='2.5'/><circle cx='9' cy='10' r='1.8'/><path d='M4 17.5l5-5 4.5 4.5 3-3 3.5 3.5'/></svg>"); }
.i-leaf   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M20 4c-9 0-14 3.5-14 9 0 2.4 1 4.2 2.5 5.4C11 16 14.5 13 20 11.5'/><path d='M6 20c1-3 3-6 6.5-9'/></svg>"); }
.i-heart  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20.3S4.6 15.6 4.6 10.7A4.1 4.1 0 0 1 12 7.6a4.1 4.1 0 0 1 7.4 3.1c0 4.9-7.4 9.6-7.4 9.6z'/></svg>"); }
.i-pulse  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12h4l2-6 4 12 2-6h6'/></svg>"); }
/* 操作栏按钮用的图标：与全站同一套（24 视窗 / stroke 1.8 / 圆角线帽），风格与粗细一致 */
.i-edit    { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4.5 19.5l1.2-4.2L16.6 4.4a1.84 1.84 0 0 1 2.6 0l.4.4a1.84 1.84 0 0 1 0 2.6L8.7 18.3l-4.2 1.2z'/><path d='M14.8 6.2l3 3'/></svg>"); }
.i-eye     { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M2.8 12S6.2 5.8 12 5.8 21.2 12 21.2 12 17.8 18.2 12 18.2 2.8 12 2.8 12z'/><circle cx='12' cy='12' r='2.9'/></svg>"); }
.i-eye-off { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M2.8 12S6.2 5.8 12 5.8 21.2 12 21.2 12 17.8 18.2 12 18.2 2.8 12 2.8 12z'/><circle cx='12' cy='12' r='2.9'/><path d='M4.5 4.5l15 15'/></svg>"); }
/* 产品管理「上架 / 下架」操作按钮用（action-btns 传 icon: list / unlist） */
.i-list   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M2.8 12S6.2 5.8 12 5.8 21.2 12 21.2 12 17.8 18.2 12 18.2 2.8 12 2.8 12z'/><circle cx='12' cy='12' r='2.9'/></svg>"); }
.i-unlist { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M2.8 12S6.2 5.8 12 5.8 21.2 12 21.2 12 17.8 18.2 12 18.2 2.8 12 2.8 12z'/><circle cx='12' cy='12' r='2.9'/><path d='M4.5 4.5l15 15'/></svg>"); }
.i-truck   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='2.8' y='6' width='11.2' height='9' rx='1'/><path d='M14 9.5h3.6l3.1 3.1v2.4H14'/><circle cx='6.8' cy='17.4' r='1.7'/><circle cx='17.2' cy='17.4' r='1.7'/></svg>"); }
.i-trash   { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4.5 6.5h15'/><path d='M9.2 6.5V4.8a1 1 0 0 1 1-1h3.6a1 1 0 0 1 1 1v1.7'/><path d='M6.4 6.5l.9 12.7a1 1 0 0 0 1 .9h7.4a1 1 0 0 0 1-.9l.9-12.7'/><path d='M10.2 10.5v5M13.8 10.5v5'/></svg>"); }
.i-card    { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='5.5' width='18' height='13' rx='2'/><circle cx='8.7' cy='10.7' r='1.9'/><path d='M5.6 15.6c.7-1.5 1.9-2.2 3.1-2.2s2.4.7 3.1 2.2'/><path d='M14.8 10h3.6M14.8 13.4h3.6'/></svg>"); }
.i-phone  { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='6.8' y='2.6' width='10.4' height='18.8' rx='2.6'/><path d='M10.6 18.6h2.8'/></svg>"); }
.i-tel    { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>"); }
.i-tub    { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M8.2 7.5h7.6l1.1 11a1.4 1.4 0 0 1-1.4 1.5H8.5a1.4 1.4 0 0 1-1.4-1.5z'/><path d='M9.4 7.5V5.8a1 1 0 0 1 1-1h3.2a1 1 0 0 1 1 1v1.7'/><path d='M8 12.4h8'/><path d='M9.6 5.8V4h4.8v1.8'/></svg>"); }
.i-capsule{ --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='3.2' y='8.6' width='17.6' height='6.8' rx='3.4'/><path d='M12 8.6v6.8'/><path d='M17.6 10.7l1.6 1.3-1.6 1.3'/></svg>"); }
.i-bottle { --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M9.5 3h5'/><path d='M10.2 3v2.6L8.6 8a3.2 3.2 0 0 0-.8 2v6.6A3.4 3.4 0 0 0 11.2 20h1.6a3.4 3.4 0 0 0 3.4-3.4V10a3.2 3.2 0 0 0-.8-2L13.8 5.6V3'/><path d='M9.8 13h4.4'/></svg>"); }

/* ===== 画板 ===== */
* { box-sizing: border-box; }

/* 浏览器给 <button> 的默认样式是 border: 2px outset —— 自带一圈立体边框，
   即使 .fab 里没写 border 也会冒出来。全站纯平，这里统一清零。
   写在这里而不是给每个按钮类补 border: 0：全项目有 48 处 <button>，
   漏一处就多一圈立体边。只清边框/间距/字体，不清 background ——
   背景由 .btn / .fab / .add 这些类自己给，避免按钮整块变透明。 */
button { border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }

body {
  margin: 0;
  padding: 32px 0;
  background: #E7E2D8; /* 画板外的桌面色，不参与设计系统 */
  font-family: var(--font-sans);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}

.board {
  position: relative;
  width: 375px;
  height: 812px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* 纯平：手机外壳改用 1px 描边定边界，不做浮起投影 */
  border: 1px solid var(--sand-200);
}

/* 状态栏（微信内由系统绘制，稿子里示意，计入 44px 导航之上） */
.statusbar {
  flex: none;
  height: 44px;
  padding: 0 16px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--ink-900);
}
.statusbar__icons { display: flex; align-items: center; gap: 4px; }
.statusbar__bar { width: 3px; border-radius: 2px; background: var(--ink-900); }
.statusbar__bar:nth-child(1) { height: 5px; }
.statusbar__bar:nth-child(2) { height: 7px; }
.statusbar__bar:nth-child(3) { height: 9px; }
.statusbar__bar:nth-child(4) { height: 11px; }
.statusbar__bat {
  width: 22px; height: 11px; margin-left: 4px;
  border: 1px solid var(--ink-900); border-radius: 3px; position: relative;
}
.statusbar__bat::before {
  content: ""; position: absolute; inset: 1.5px; right: 6px;
  background: var(--ink-900); border-radius: 1px;
}

/* 导航栏 44px，跟随微信，不给自定义颜色 */
.nav {
  flex: none;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 0 4px 0 8px;
}
.nav__back { display: flex; align-items: center; gap: 2px; color: var(--ink-900); }
.nav__back span { font-size: var(--fs-caption); }
.nav__title {
  text-align: center;
  font-size: var(--fs-heading);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav__act { display: flex; justify-content: flex-end; color: var(--ink-600); }

/* 正文区 */
.body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.body--flush { padding: 0; gap: 0; }
.body--scroll { overflow-y: auto; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  padding: 0 20px;
  border: none;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 600;
  /* 纯平风格：只留一层上下微渐变（上亮下深），**不加内高光、不加投影**。
     内高光会在顶部形成一道亮线，看着像 border 且有体积感，与纯平冲突。
     与 .fab / .add 同一套口径；改这一处所有按钮一起变（PC 端也复用它）。 */
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: var(--ink-inverse);
  cursor: pointer;
}
.btn--block { width: 100%; }
.btn--ghost { background: linear-gradient(180deg, var(--surface), var(--brand-50)); color: var(--brand-600); }
.btn--outline {
  background: linear-gradient(180deg, var(--surface), var(--sand-100));
  color: var(--ink-900);
  box-shadow: inset 0 0 0 1px var(--sand-200);
}
.btn--text { height: auto; padding: 0; background: none; box-shadow: none; color: var(--brand-600); font-weight: 500; }
.btn--danger { background: none; box-shadow: none; color: var(--danger); }
.btn--sm { height: 34px; padding: 0 14px; font-size: var(--fs-caption); }
/* 禁用态刻意不给果冻感：它该是「按不动」的样子 */
.btn--disabled, .btn[disabled] { background: var(--sand-200); color: var(--ink-400); box-shadow: none; }

/* ===== 通用工具类 =====
   手机端与 PC 端都用得上，定义一份，单屏别再重写。
   注意：这里没有 prototype（wireframe.css）那套 .muted / .small / .row，
   两端类名体系不同，PC 稿里也别照抄原型的类名。 */
.row { display: flex; align-items: center; gap: var(--sp-3); }
.sub { font-size: var(--fs-caption); color: var(--ink-400); }

/* ===== 卡片 ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--sand-200);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: var(--sp-4);
}
.card--flat { box-shadow: none; }
.card--tint { background: var(--brand-50); border-color: var(--brand-100); box-shadow: none; }
.card__title { font-size: var(--fs-heading); font-weight: 600; margin: 0 0 var(--sp-2); }

/* 区块标题 */
.sect {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--sp-2) 0 0;
}
.sect__t { font-size: var(--fs-heading); font-weight: 600; }
.sect__more { font-size: var(--fs-caption); color: var(--ink-600); }

/* ===== 列表 ===== */
.list { background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--sand-200); box-shadow: var(--sh-1); overflow: hidden; }
.cell {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--hit-min);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.cell:last-child { border-bottom: none; }
.cell--stack { align-items: flex-start; }
.cell__ico { color: var(--brand-600); }
.cell__main { flex: 1; min-width: 0; }
.cell__t { font-size: var(--fs-body); }
.cell__d { font-size: var(--fs-caption); color: var(--ink-600); margin-top: 2px; }
.cell__v { font-size: var(--fs-body); color: var(--ink-600); }
.cell__arrow { color: var(--ink-400); }

/* ===== 标签与状态 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  /* 标签字号统一到 --fs-caption（13）：原先 11（--fs-micro）比表格正文小一号，
     在一排标签里读起来费劲；分类色标先调到 13，现在全部标签统一到这一号 */
  font-size: var(--fs-caption);
  font-weight: 500;
  background: var(--brand-100);
  color: var(--brand-700);
  white-space: nowrap;
}
.tag--warn  { background: #FBF1DC; color: #8A5F12; }
.tag--info  { background: #E3EEF6; color: #2A5B80; }
.tag--ok    { background: var(--brand-100); color: var(--brand-700); }
.tag--off   { background: var(--sand-200); color: var(--ink-400); }
.tag--danger{ background: #F7E4E1; color: #93413A; }
.tag--accent{ background: var(--accent-50); color: var(--accent-600); }
.tag--solid { background: var(--brand-600); color: #fff; }
/* 产品标签专用一组「明亮简约」的柔和色：一件产品可能挂多个标签（专家推荐 / 高蛋白 / 低脂…），
   渲染时**按顺序轮转**取用（1 → 2 → 3 → 4 → 回 1），所以同屏不会两个挨着同色。
   刻意避开其余标签的色：尤其不能与状态标签「已上架」的浅绿（= .tag 基础色）撞，
   也不用 warn/info/danger/accent 那几档（它们各有语义，留给状态与分类）。 */
.tag--soft-1 { background: #EAF2F8; color: #3C6E96; }  /* 天青 */
.tag--soft-2 { background: #F2F0F9; color: #6A5CA0; }  /* 藕紫 */
.tag--soft-3 { background: #F7EFF0; color: #97535A; }  /* 豆沙 */
.tag--soft-4 { background: #EDEFF2; color: #5A6B7C; }  /* 雾蓝灰 */
/* 推荐码分类色标：本院 = 绿、外院 = 红、其他 = 橙。
   线框风格：1px 内描边 + 同色文字、不填底色 —— 与表格的纯平描边是同一种表达，
   在密集列表里也不会因为实心色块而抢视觉。
   定义只有这一处，后台凡展示推荐码来源分类的地方都用它：订单管理（列表 + 发货抽屉）、
   推荐码、引流管理。 */
/* 推荐码分类：白底细框在表格里不够显眼 → 框内填充**比框线略浅的相近色**，
   色块感出来了，描边与文字保持深一档，边界依然清楚。 */
.tag--own  { background: var(--brand-50);  box-shadow: inset 0 0 0 1px var(--brand-300);  color: var(--brand-700); }
.tag--out  { background: #F9ECEA;          box-shadow: inset 0 0 0 1px var(--danger);     color: var(--danger); }
.tag--misc { background: var(--accent-50); box-shadow: inset 0 0 0 1px var(--accent-500); color: var(--accent-600); }
/* 字号不在这里单独设：全部标签统一用 .tag 基础类的 `--fs-caption`（13）。 */

/* ===== 操作栏按钮（表格「操作」列、详情里的操作行）=====
   这些操作以前是纯文字链接，看着不像能点。
   **与标签刻意用两套语言**：
     标签 = 浅底 / 线框 + 深色字（`.tag` 一节）；
     按钮 = **实心彩色底 + 更深一档同色描边 + 白字**，小圆角矩形。
   所以这里**不复用标签的色值**（brand-100 / #FBF1DC / #E3EEF6 / #F7E4E1 / sand-200 都是标签在用），
   按钮另取一组：底色比标签深、描边再深一档，同屏出现时不会混。
   色调按语义取：
     primary 正向（编辑 / 上架 / 发货）· info 处理（查看 / 有货）
     warn 提醒（售罄 / 待办）· danger 负向（下架）· muted 次要
   同一行出现多个按钮且语义未定时，按 OP_TONES 的顺序轮转取色
   （见 src/pc/action-btns.js），保证相邻按钮不同色。 */
.op {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-micro); font-weight: 600;
  white-space: nowrap; cursor: pointer;
  color: #fff;
}
.op .i { width: 16px; height: 16px; color: #fff; }
/* 漏配图标的兜底：降级为小号文字按钮（自动加 .op--txt），不会渲染成空块 */
.op--txt { width: auto; min-width: 28px; padding: 0 10px; }
.op:hover { filter: brightness(1.08); }
/* 一行里有多个操作时拉开间距（8px），避免 28px 的方按钮贴在一起误点 */
.op + .op { margin-left: var(--sp-2); }
/* 悬浮说明：圆角深灰底白字，出现在按钮正下方（文字就是 data-tip） */
.op::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(-2px);
  padding: 4px 10px; border-radius: var(--r-sm);
  background: #454E49; color: #fff;
  font-size: var(--fs-micro); font-weight: 400; line-height: 1.5;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 40;
}
.op:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 正向操作用项目暖橙（语义就是「行动」）：原先用绿会和标签的本院绿（`.tag--own` 线框）同色系。
   底色取暖橙的**亮档**（--accent-500），比 --accent-600 明显亮一档、更像可点的按钮；
   描边仍压深（比 accent-600 再深一点），边缘才立得住。 */
/* 描边取**与底色几乎同色、只深一档**的固定色值（不是黑、也不明显偏深）：
   看起来还是同一块彩色按钮，只是边缘多了一圈 —— 深了就会被看成「彩块描了道黑边」。
   每个色调各固定一个描边值，不随上下文变。 */
.op--primary { background: var(--accent-500);  border-color: #D07C30; color: #fff; }
/* 亮绿：审核通过这类「正向确认」用鲜绿，和暖橙的 primary（主行动）区分开 */
.op--ok      { background: #23B26D;            border-color: #1F9C60; color: #fff; }
.op--info    { background: #5B93BE;            border-color: #5386AE; color: #fff; }
.op--warn    { background: var(--warning);     border-color: #BC801B; color: #fff; }
.op--danger  { background: #CE6A60;            border-color: #C16056; color: #fff; }
.op--muted   { background: #7C8880;            border-color: #748079; color: #fff; }
.op--off     { opacity: .45; pointer-events: none; }

/* ===== 图片上传：已上传的缩略图（产品图 / 详情图文块 / 发货单图片共用）=====
   空态是虚线框或「＋」，点击即选本地图片；有图后**右上角统一带删除按钮**。
   `.pic` 只负责相对定位与图片填充，具体尺寸由各处的容器类决定（.thumb / .block__pic / .up__box）。 */
.pic { position: relative; }
.pic img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.pic-del {
  position: absolute; top: -6px; right: -6px; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink-900); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; cursor: pointer;
  box-shadow: 0 0 0 2px var(--surface);
}
.pic-del:hover { background: var(--danger); }

/* ===== 抽屉内分节（订单详情三区：抬头 / 产品明细 / 状态与物流）===== */
.drawer__sec { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--sand-200); }
.drawer__sec:last-child { border-bottom: none; }
.drawer__sec-t { margin-bottom: var(--sp-3); font-size: var(--fs-caption); font-weight: 600; color: var(--ink-600); }

/* 物流流转时间线：第一条（最新）高亮，历史节点淡化 */
.trace { display: flex; flex-direction: column; gap: var(--sp-3); }
.trace__i { display: flex; gap: var(--sp-3); }
.trace__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); margin-top: 6px; flex: none; }
.trace__i--dim .trace__dot { background: var(--sand-200); }
.trace__i--dim .trace__t { color: var(--ink-600); font-weight: 400; }
.trace__t { font-size: var(--fs-caption); font-weight: 600; color: var(--ink-900); }
.trace__time { margin-left: var(--sp-2); font-size: var(--fs-micro); font-weight: 400; color: var(--ink-400); }

/* 发货单图片点击放大 */
.img-zoom { max-width: 66vw; max-height: 66vh; object-fit: contain; border-radius: var(--r-md); display: block; }

/* ===== 日期选择（订单管理的起止日期共用）=====
   原生 <input type="date"> 的日历面板大小由浏览器决定、改不了样式，不好点；
   这里自绘：320px 面板、36px 日期格，当月高亮 / 今天描边 / 选中实底，支持一键清除。
   组件见 src/pc/datepicker.js —— 输入框只读，点击弹面板，选中即回填并触发 change。 */
.dp {
  position: fixed; z-index: 60; width: 320px; padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--sand-200); border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(28, 42, 36, .14);
}
.dp__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); }
.dp__ym { font-size: var(--fs-body); font-weight: 600; }
.dp__nav {
  width: 30px; height: 30px; border-radius: var(--r-sm); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--ink-600);
}
.dp__nav:hover { background: var(--sand-100); }
.dp__week, .dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp__week span { padding: 4px 0; text-align: center; font-size: var(--fs-micro); color: var(--ink-400); }
.dp__d {
  height: 36px; border-radius: var(--r-sm); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-caption); color: var(--ink-900); font-variant-numeric: tabular-nums;
}
.dp__d:hover { background: var(--sand-100); }
.dp__d--muted { color: var(--ink-400); }
.dp__d--today { box-shadow: inset 0 0 0 1px var(--brand-600); }
.dp__d--on { background: var(--brand-600); color: var(--ink-inverse); font-weight: 600; }
.dp__d--on:hover { background: var(--brand-600); }
.dp__ft { margin-top: var(--sp-2); display: flex; justify-content: flex-end; }
.dp__clear { padding: 4px var(--sp-2); border-radius: var(--r-sm); font-size: var(--fs-micro); color: var(--ink-400); cursor: pointer; }
.dp__clear:hover { color: var(--ink-600); background: var(--sand-100); }

/* 价格 */
.price {
  font-size: var(--fs-heading);
  font-weight: 700;
  color: var(--accent-600);
  font-variant-numeric: tabular-nums;
}
.price--lg { font-size: var(--fs-display); line-height: var(--lh-display); }
.price__cur { font-size: .62em; font-weight: 600; margin-right: 1px; }
.price__unit { font-size: var(--fs-caption); color: var(--ink-600); font-weight: 400; }
.price--old { font-size: var(--fs-caption); color: var(--ink-400); text-decoration: line-through; font-weight: 400; }

/* ===== 产品 ===== */
.goods { display: flex; gap: var(--sp-3); padding: var(--sp-3); background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--sand-200); box-shadow: var(--sh-1); }
.goods__pic {
  flex: none; width: 84px; height: 84px; border-radius: var(--r-md);
  background: linear-gradient(150deg, var(--brand-50), var(--sand-100));
  display: flex; align-items: center; justify-content: center; color: var(--brand-300);
}
.goods__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.goods__n { font-size: var(--fs-body); font-weight: 600; margin-bottom: 2px; }
.goods__m { font-size: var(--fs-caption); color: var(--ink-600); }
.goods__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.goods--off .goods__pic { filter: grayscale(1); opacity: .55; }
.goods--off .goods__n, .goods--off .price { color: var(--ink-400); }

/* 数量步进 */
.qty { display: inline-flex; align-items: center; gap: var(--sp-2); }
.qty__b {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--sand-200);
  background: var(--surface); color: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center;
}
.qty__n { min-width: 18px; text-align: center; font-size: var(--fs-body); font-variant-numeric: tabular-nums; }

/* 分类横滑 */
.chips { display: flex; gap: var(--sp-2); padding: var(--sp-3) var(--sp-4); overflow-x: auto; background: var(--surface); }
.chip {
  flex: none; height: 32px; padding: 0 14px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; font-size: var(--fs-caption);
  background: var(--sand-100); color: var(--ink-600);
}
.chip--on { background: var(--brand-600); color: #fff; font-weight: 600; }

/* ===== 输入 ===== */
.field { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--hit-min); padding: var(--sp-2) var(--sp-4); background: var(--surface); border-bottom: 1px solid var(--line); }
.field__label { flex: none; width: 76px; font-size: var(--fs-body); color: var(--ink-600); }
.field__input { flex: 1; font-size: var(--fs-body); color: var(--ink-900); }
.field__input--ph { color: var(--ink-400); }

/* ===== 顶部查询区（P17 产品管理 / P20 订单管理共用，与 app.wxss 同名同步） =====
   刻意**不做成卡片**：不描边、不圆角、不投影，改用通栏暖底色带 + 下描边，
   一眼就与下方的数据卡区分开（原先复用 .field-card，视觉上和数据卡混成一片）。
   色带上的字段也去掉白底与分隔线，压扁成一行。 */
.q-panel {
  background: var(--sand-100);
  border-bottom: 1px solid var(--sand-200);
  padding: var(--sp-2) var(--sp-4) var(--sp-3);
}
/* 标题行：整行可点，展开 ↔ 收起。默认只显示第一行（「展开」），点开后显示全部条件。 */
.q-panel__hd { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) 0; }
.q-panel__t { display: flex; align-items: center; gap: 6px; font-size: var(--fs-micro); color: var(--ink-600); }
.q-panel__dot { font-size: var(--fs-micro); color: var(--brand-600); }
.q-panel__hd-r { display: flex; align-items: center; gap: var(--sp-2); }
.q-panel__act { font-size: var(--fs-micro); color: var(--brand-600); }
.q-panel__toggle { font-size: var(--fs-micro); color: var(--ink-600); }
.q-panel__toggle-chev { transition: transform .15s ease; }
.q-panel__toggle-chev--on { transform: rotate(-90deg); }
/* 色带上的字段：去白底与分隔线，压扁成一行；左侧筛选项文案加粗（浅底上要够重才立得住） */
.q-panel .field { background: transparent; border-bottom: none; min-height: 36px; padding: var(--sp-1) 0; }
.q-panel .field__label { font-weight: 600; color: var(--ink-900); font-size: var(--fs-caption); }
/* 取值也跟着降一档，和标签同一号字（.field__input 默认 fs-body） */
.q-panel .field__input { font-size: var(--fs-caption); }

/* 查询区里的控件：下拉是 picker，模糊查询是 input。
   日期区间没有原生「区间」控件，用两个日期位拼（.q-range）；
   「重置筛选」只在有条件时出现 —— 日期与状态靠 picker 选，没有它清不掉。 */
.picker-v { font-size: var(--fs-caption); color: var(--ink-900); }
.picker-v--ph { color: var(--ink-400); }
.field__chev { flex: none; color: var(--ink-400); transform: rotate(90deg); }
.field__sep { flex: none; font-size: var(--fs-caption); color: var(--ink-400); }
.q-range { flex: 1; min-width: 0; }
.input {
  height: 46px; padding: 0 var(--sp-4); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--sand-200);
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-body); color: var(--ink-900);
}
.input--ph { color: var(--ink-400); }
/* 密码框 + 眼睛按钮（见 shared/pwd-eye.js）：按钮叠在输入框内右侧，不额外占位 */
.pwd-wrap { position: relative; display: flex; flex: 1; min-width: 0; }
.pwd-wrap > .input,
.pwd-wrap > .login-fld { flex: 1; min-width: 0; padding-right: 42px; }
.pwd-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-400); cursor: pointer;
}
.pwd-eye:hover { background: var(--sand-100); color: var(--ink-600); }
.pwd-eye.is-on { color: var(--brand-600); }
/* 眼睛图标比 i--sm(16px) 大一档，在 48px 高的输入框里更醒目 */
.pwd-eye .i { width: 20px; height: 20px; }
.search {
  height: 38px; border-radius: var(--r-pill); background: var(--surface);
  display: flex; align-items: center; gap: var(--sp-2); padding: 0 var(--sp-3);
  font-size: var(--fs-caption); color: var(--ink-400); border: 1px solid var(--sand-200);
}

/* ===== 吸底行动条 ===== */
.bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + var(--safe-b));
  background: var(--surface);
  border-top: 1px solid var(--sand-200);
  box-shadow: var(--sh-2);
}
.bar__sum { flex: 1; min-width: 0; }
.bar__lab { font-size: var(--fs-micro); color: var(--ink-600); }
.bar__btn { flex: none; }
.bar--safe { padding-bottom: calc(var(--sp-3) + 20px); } /* 稿子里代替安全区高度 */

/* ===== 标签栏 52px ===== */
.tabbar {
  flex: none;
  height: calc(var(--tab-h) + 20px);
  padding-bottom: 20px;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--sand-200);
  box-shadow: var(--sh-2);
}
.tabbar__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-400);
  font-size: var(--fs-micro);
}
.tabbar__item--on { color: var(--brand-600); font-weight: 600; }
/* 未读角标压在图标右上角：图标 24 宽且水平居中，故左边缘自中心偏移 8px */
.tabbar__badge {
  position: absolute;
  left: 50%; top: 2px;
  transform: translate(8px, 0);
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--danger); color: #fff;
  font-size: 10px; line-height: 15px; text-align: center;
}

/* ===== 进度（康复叙事的核心图形） ===== */
.steps { display: flex; align-items: center; gap: var(--sp-2); }
.steps__dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--sand-200); color: var(--ink-400); font-size: var(--fs-micro); }
.steps__dot--done { background: var(--brand-600); color: #fff; }
.steps__dot--now { background: var(--brand-600); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.steps__line { flex: 1; height: 2px; background: var(--sand-200); border-radius: 2px; }
.steps__line--done { background: var(--brand-300); }
.steps__lab { display: flex; justify-content: space-between; font-size: var(--fs-micro); color: var(--ink-600); margin-top: 6px; }

.bar-prog { height: 6px; border-radius: var(--r-pill); background: var(--sand-200); overflow: hidden; }
.bar-prog__in { height: 100%; border-radius: var(--r-pill); background: var(--brand-500); }

/* ===== 空 / 骨架 ===== */
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); color: var(--ink-600); text-align: center; padding: var(--sp-8) var(--sp-6); }
.empty__ring { width: 72px; height: 72px; border-radius: 50%; border: 2px dashed var(--sand-200); display: flex; align-items: center; justify-content: center; color: var(--brand-300); }
.sk { border-radius: var(--r-md); background: var(--sand-100); animation: sk 1200ms ease-in-out infinite; }
@keyframes sk { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ===== 弹层 ===== */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: var(--sp-5) var(--sp-4) calc(var(--sp-5) + 20px);
  /* 纯平：底部弹层用顶部描边区分层级，不做投影 */
  border-top: 1px solid var(--sand-200);
}
.sheet__grab { width: 36px; height: 4px; border-radius: 2px; background: var(--sand-200); margin: 0 auto var(--sp-4); }
.sheet__t { font-size: var(--fs-heading); font-weight: 600; text-align: center; margin-bottom: var(--sp-4); }
.scrim { position: absolute; inset: 0; background: rgba(29, 42, 37, .35); }

/* ===== 悬浮按钮（右下，落在标签栏上方）=====
   小程序 nav 右侧是固定的胶囊 / 图标区，放不下文字按钮，所以「新增」这类操作走这里。
   P17 产品管理（上架新品）、P25 推荐码（新建推荐码）共用 —— 样式只定义这一份。 */
.fab {
  position: absolute; right: var(--sp-4);
  bottom: calc(var(--tab-h) + 20px + var(--sp-3));
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  /* 纯平：只保留上下微渐变，没有内高光、没有投影、没有描边 —— 站内不出现立体元素 */
  border: 0;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: #fff;
}
/* 图标跟着按钮缩一档：i--lg 是 28，在这个尺寸里偏大 */
.fab .i { width: 22px; height: 22px; }

/* 稿面标注：只给评审看，不属于产品界面。
   刻意不与业务文案的类名共用（曾用 .note，与页面里的说明小字撞名，导致说明文字被拉到画板顶部）。 */
.board-note {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 6px 12px;
  background: rgba(20, 80, 62, .92);
  color: #fff; font-size: var(--fs-micro); line-height: 1.5;
}
.shape { border-radius: var(--r-md); background: linear-gradient(140deg, var(--brand-500), var(--brand-300)); }

/* 加购圆钮：列表里未加购时出现。直径 30，保证中老年用户可点 */
.add {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-600); color: var(--ink-inverse);
  display: inline-flex; align-items: center; justify-content: center;
  /* 纯平：与 .fab 同一套口径 —— 只保留渐变，不加高光、投影、描边 */
  border: 0;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
}

/* ===== 表单补充：选择、多行、勾选 ===== */
.select { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.select__v { color: var(--ink-900); }
.textarea {
  min-height: 88px; padding: var(--sp-3);
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--sand-200);
  font-size: var(--fs-body); line-height: 1.6;
}
.textarea--ph { color: var(--ink-400); }
.check { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-body); }
.check__box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--sand-200); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: transparent;
}
.check__box--on { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

/* 虚线边框的次级按钮（原型里的「幽灵按钮」） */
.btn--dash {
  background: linear-gradient(180deg, var(--surface), var(--sand-100));
  color: var(--ink-600);
  box-shadow: inset 0 0 0 1px var(--sand-200);
}
.btn--grow { flex: 1; }

/* ===== 筛选 Tab ===== */
.tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--sand-200); }
.tabs__i {
  flex: 1; padding: var(--sp-3) 0; text-align: center; position: relative;
  font-size: var(--fs-caption); color: var(--ink-600);
}
.tabs__i--on { color: var(--brand-700); font-weight: 600; }
.tabs__i--on::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 24px; height: 2px; border-radius: 2px;
  background: var(--brand-600); transform: translateX(-50%);
}

/* ===== 时间线（物流轨迹） ===== */
.tl { position: relative; padding-left: 22px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1.5px; background: var(--sand-200); }
.tl__it { position: relative; padding-bottom: var(--sp-5); }
.tl__it:last-child { padding-bottom: 0; }
.tl__dot { position: absolute; left: -22px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--sand-200); box-shadow: 0 0 0 3px var(--bg); }
.tl__dot--on { background: var(--brand-600); }
.tl__t { font-size: var(--fs-body); }
.tl__d { font-size: var(--fs-caption); color: var(--ink-600); margin-top: 3px; }

/* ===== 统计格 ===== */
.stats { display: flex; gap: var(--sp-3); }
.stat {
  flex: 1; background: var(--surface); border: 1px solid var(--sand-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--sp-3) var(--sp-4);
}
.stat__l { font-size: var(--fs-micro); color: var(--ink-600); }
.stat__v { font-size: var(--fs-title); font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ===== 待办宫格 ===== */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.tile {
  position: relative; min-height: 112px; padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--sand-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1);
  display: flex; flex-direction: column; justify-content: flex-start;
}
/* 图标底 → 名字留 12px，高度按「48 图标 + 12 间距 + 18 文字 + 上下各 16 内边距」留足。
   这里刻意用 flex-start + 固定上间距，不用 space-between：
   那样格子一高，多出来的空间会全加到这段间距上（高度不够时又会被挤到贴住，两头都不受控）。 */
.tile__l { margin-top: var(--sp-3); font-size: var(--fs-caption); color: var(--ink-600); }
.tile__badge {
  position: absolute; right: 12px; top: 12px;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--danger); color: #fff; font-size: var(--fs-micro);
  line-height: 20px; text-align: center;
}
/* 格子图标：彩色圆角块 + 放大的图标（与 app.wxss 的 .tile__ico 同名同步）。
   格子不放黑色大数字：待办量只在右上角角标里出现一次；产品管理是存量，两者都不显示。
   四色取自现有 token（info / warn 两档沿用 .tag--info / .tag--warn 的同款色值）。 */
.tile__ico {
  flex: none; width: 48px; height: 48px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.tile__ico .i { width: 28px; height: 28px; }
.tile__ico--order { background: var(--brand-50); color: var(--brand-600); }
.tile__ico--fb    { background: var(--accent-50); color: var(--accent-600); }
.tile__ico--goods { background: #E3EEF6; color: #2A5B80; }
.tile__ico--msg   { background: #FBF1DC; color: #8A5F12; }

/* ===== 消息卡：未读用左侧竖条，不整卡变色 ===== */
.msg {
  background: var(--surface); border: 1px solid var(--sand-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--sp-4);
}
/* ===== 待处理标记：左侧 3px 竖条 =====
   同一套视觉语义，三处共用（样式只在这里定义，单屏不得重写，否则三处会漂移）：
     消息中心 → 未读；反馈处理 → 未处理；订单管理 → 待发货。
   用 inset 内阴影而不是 border-left，是为了不改变卡片的盒模型宽度，去掉时不会跳位。 */
.todo { box-shadow: inset 3px 0 0 var(--brand-600), var(--sh-1); border-left-color: var(--brand-100); }
.msg__hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.msg__t { font-size: var(--fs-body); font-weight: 600; }
.msg__time { font-size: var(--fs-micro); color: var(--ink-400); }
.msg__b { font-size: var(--fs-caption); color: var(--ink-600); line-height: 1.6; }
.msg__type { margin-top: 6px; font-size: var(--fs-micro); color: var(--ink-400); }

/* 反馈处理：评分行 + 补充文案 + 操作行 */
.fb-hd { display: flex; align-items: baseline; justify-content: space-between; }
.fb-score { font-size: var(--fs-caption); color: var(--ink-600); }
.fb-score b { font-size: var(--fs-title); font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.fb-text { margin: var(--sp-2) 0; font-size: var(--fs-body); line-height: var(--lh-body); }
.fb-acts { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }

/* ===== 反馈回复 =====
   管理人端（P22 写回复）与患者端（P12 看回复）共用同一套，
   样式只在这里定义，单屏不重写 —— 两侧视觉必须一致，否则同一句话在两处长得不一样。 */
.fb-meta { font-size: var(--fs-micro); color: var(--ink-400); }
.fb-meta__link { color: var(--brand-600); }
.fb-reply {
  margin-top: var(--sp-3); padding: var(--sp-3);
  background: var(--brand-50); border-radius: var(--r-md);
  border-left: 3px solid var(--brand-300);
}
.fb-reply__who { font-size: var(--fs-micro); color: var(--brand-700); margin-bottom: 4px; }
.fb-reply__text { margin: 0; font-size: var(--fs-caption); line-height: 1.6; color: var(--ink-900); }
.fb-reply--none {
  background: var(--sand-100); border-left-color: var(--sand-200);
  color: var(--ink-400); font-size: var(--fs-caption); line-height: 1.6;
}

/* ===== 小程序码占位 ===== */
.qr {
  width: 140px; height: 140px; margin: var(--sp-3) auto;
  border-radius: var(--r-md); background: var(--sand-100);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: var(--fs-micro); color: var(--ink-400);
}
.qr__grid {
  width: 64px; height: 64px; border-radius: 4px;
  background: repeating-conic-gradient(var(--brand-300) 0% 25%, transparent 0% 50%) 50% / 14px 14px;
}
/* 小程序码放大（推荐码页点击缩略码弹出）：大图 + 下载动作 */
.qr-lg {
  width: 180px; height: 180px; margin: 0 auto;
  border-radius: var(--r-md); background: var(--sand-100);
  display: flex; align-items: center; justify-content: center;
}
.qr-lg .qr__grid { width: 132px; height: 132px; }

/* ===== 星级：1–5 数字，不用五角星（中老年用户更好读） ===== */
.stars { display: flex; gap: var(--sp-3); }
.star {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--sand-200);
  font-size: var(--fs-body); color: var(--ink-600);
  font-variant-numeric: tabular-nums;
}
.star--on { background: var(--brand-600); border-color: var(--brand-600); color: var(--ink-inverse); font-weight: 600; }

/* ===== 地址卡 ===== */
.addr { position: relative; padding-left: 52px; }
.addr__ico { position: absolute; left: var(--sp-4); top: var(--sp-4); color: var(--brand-600); }
.addr__lab { font-size: var(--fs-micro); color: var(--ink-400); }
.addr__who { font-size: var(--fs-body); font-weight: 600; margin-top: 2px; }
.addr__line { font-size: var(--fs-caption); color: var(--ink-600); margin-top: 2px; }

/* ===== 争议块：斜纹表示「这是微信侧，不是我们画的后台」 ===== */
.stripe {
  border: 1.5px dashed var(--sand-200); border-radius: var(--r-lg); padding: var(--sp-4);
  background-image: repeating-linear-gradient(45deg, rgba(30, 60, 48, .05) 0 6px, transparent 6px 12px);
}

/* ===== 缩略占位 ===== */
.pict {
  border-radius: var(--r-md); flex: none;
  background: linear-gradient(150deg, var(--brand-50), var(--sand-100));
  display: flex; align-items: center; justify-content: center; color: var(--brand-300);
}
.pict--32 { width: 24px; height: 24px; }
.pict--56 { width: 56px; height: 56px; }
.pict--44 { width: 44px; height: 44px; }
.pict--72 { width: 72px; height: 72px; }

/* ===== 凭证占位 ===== */
.voucher {
  height: 104px; border-radius: var(--r-md);
  border: 1.5px dashed var(--sand-200); background: var(--sand-100);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-micro); color: var(--ink-400);
}

/* 虚线分隔 */
.hr--dash { border: none; border-top: 1px dashed var(--line); margin: var(--sp-3) 0; }

/* ===== 表单容器：把若干 .field 包成一张卡（地址、产品编辑、发货都用同一形态） ===== */
.field-card {
  background: var(--surface); border: 1px solid var(--sand-200);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden;
}

/* ===== 区块小标题（管理人端多处复用） ===== */
.scope { font-size: var(--fs-micro); color: var(--ink-400); }

/* ===== 说明小字（跟在主内容后的解释，比 cell__d 更弱） ===== */
.hint { font-size: var(--fs-micro); color: var(--ink-400); line-height: 1.7; }

/* 窄视口（等于画板宽度时）去掉桌面装饰，便于对画板截图 */
@media (max-width: 500px) {
  body { padding: 0; background: var(--bg); }
  .board { box-shadow: none; }
}
