/* =============================================================
   元阳选品 · 设计系统
   绿色为主色调，服务三端：平台后台（PC）/ 农户端（H5）/ 主播选品端（H5）
   ============================================================= */

:root {
  /* —— 主色：元阳绿（清新版：明亮薄荷绿，减少深沉感） —— */
  --green-900: #0c5c3e;
  --green-800: #10764e;
  --green-700: #15925f;
  --green: #1fae74;          /* 主品牌色 */
  --green-500: #3cc98c;
  --green-200: #b6ecd2;
  --green-100: #dcf8ea;
  --green-50: #f0fcf6;

  /* —— 中性：暖调灰，避免冷硬的科技感 —— */
  --ink: #16241c;
  --ink-2: #33453a;
  --ink-3: #5c7064;
  --ink-1: #0b1712;
  --ink-4: #66786c;
  --line: #e3ebe6;
  --line-2: #cfdcd4;
  --surface: #ffffff;
  --surface-2: #f6faf7;
  --surface-3: #eef3ef;
  --canvas: #eff4f0;

  /* —— 辅助色（少量使用，用于状态） —— */
  --amber: #c47d10;
  --amber-50: #fdf4e3;
  --orange: #df5c27;
  --orange-50: #fdf1ea;
  --red: #cf3c3c;
  --red-50: #fcecec;
  --blue: #2a6fb0;
  --blue-50: #eaf2fa;
  --violet: #6a5acd;
  --violet-50: #f0eefc;

  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 26px;
  --shadow-1: 0 1px 2px rgba(20, 40, 28, .05), 0 1px 3px rgba(20, 40, 28, .04);
  --shadow-2: 0 6px 18px rgba(20, 40, 28, .08), 0 2px 4px rgba(20, 40, 28, .04);
  --shadow-3: 0 18px 44px rgba(10, 40, 24, .16);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  --num: "SF Mono", "DIN Alternate", "Inter", ui-monospace, monospace;
  --ease: cubic-bezier(.22, .8, .3, 1);
  --tabbar-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font: 14px/1.55 var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: var(--canvas);
}
h1, h2, h3, h4, h5, p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2.5px solid var(--green-500); outline-offset: 2px; border-radius: 5px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3d3c9; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
.tiny { font-size: 12px; }
.tiny2 { font-size: 11px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hr { height: 1px; background: var(--line); border: 0; margin: 14px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.gap8 { gap: 8px !important; } .gap12 { gap: 12px !important; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb4 { margin-bottom: 4px; } .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }

/* =============== 按钮 =============== */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h); padding: 0 16px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; flex: none;
  transition: background .16s var(--ease), box-shadow .16s, transform .1s, color .16s;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 1px 2px rgba(11, 107, 62, .3); }
.btn-primary:hover { background: var(--green-700); box-shadow: 0 4px 12px rgba(20, 147, 79, .28); }
.btn-secondary { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn-soft { background: var(--green-50); color: var(--green-700); }
.btn-soft:hover { background: var(--green-100); }
.btn-ghost { background: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: rgba(20, 40, 28, .05); color: var(--ink); }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-danger:hover { background: #f9dcdc; }
.btn-dark { background: var(--green-800); color: #fff; }
.btn-dark:hover { background: var(--green-900); }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { --h: 46px; font-size: 15px; border-radius: 12px; padding: 0 22px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .42; pointer-events: none; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center;
  color: var(--ink-3); transition: .15s; flex: none; position: relative;
}
.icon-btn:hover { background: rgba(20, 40, 28, .06); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

/* =============== 卡片 =============== */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.card-head .spacer { flex: 1; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin: 0 0 10px; }

/* =============== 标签 =============== */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.no-dot::before { display: none; }
.t-green { background: var(--green-50); color: var(--green-700); }
.t-amber { background: var(--amber-50); color: #93600c; }
.t-red { background: var(--red-50); color: #b02c2c; }
.t-blue { background: var(--blue-50); color: #1f5a91; }
.t-violet { background: var(--violet-50); color: #5041ad; }
.t-gray { background: #f0f3f1; color: var(--ink-3); }
.t-dark { background: var(--green-800); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer;
  transition: .15s; white-space: nowrap; flex: none;
}
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--green-200); }
.chip.is-on { background: var(--green); color: #fff; box-shadow: none; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; display: inline-block; }
.dot.red { background: var(--red); }
.dot.amber { background: var(--amber); }
.dot.gray { background: var(--ink-4); }

.badge-count {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--num); flex: none;
}

/* =============== 表单 =============== */
.field { margin-bottom: 15px; }
.field > label, .label { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .opt { font-size: 10.5px; font-weight: 500; color: var(--ink-4); background: #f0f3f1; border-radius: 5px; padding: 1px 6px; }
.field .hint { margin-top: 6px; font-size: 11.5px; color: var(--ink-4); line-height: 1.6; }
.req { color: var(--red); font-weight: 700; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: #fff; font-size: 13.5px; transition: .15s;
}
.input:hover, .select:hover, .textarea:hover { border-color: #b9cdc1; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 147, 79, .13); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c7064' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center; }
.search { position: relative; flex: 1; min-width: 140px; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: #fff; font-size: 13px; }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 147, 79, .12); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-4); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #c9d7ce; transition: .2s; flex: none; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }

/* =============== 表格 =============== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .14s; }
.table tbody tr:hover { background: #fafcfb; }
.table-wrap { overflow-x: auto; }
.cell-2line { display: flex; flex-direction: column; gap: 2px; }
.cell-2line small { color: var(--ink-4); font-size: 11.5px; }

/* =============== 头像 / 图片 =============== */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #56dda6, #15925f);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }
.avatar.green { background: linear-gradient(135deg, #56dda6, #15925f); }
.avatar.blue { background: linear-gradient(135deg, #4a9ad6, #2a6fb0); }
.avatar.amber { background: linear-gradient(135deg, #e0a943, #a5701a); }
.avatar.violet { background: linear-gradient(135deg, #8b7ce0, #5041ad); }

/* 商品 / 基地配图（渐变 + 品类符号，本地绘制） */
.pic {
  position: relative; border-radius: var(--r-sm); overflow: hidden; flex: none;
  display: grid; place-items: center; background: var(--green-50); color: var(--green-700);
  box-shadow: inset 0 0 0 1px rgba(20, 40, 28, .05);
}
.pic svg { width: 45%; height: 45%; opacity: .9; }
.pic::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.5), transparent 62%); }
.pic.lg { width: 64px; height: 64px; border-radius: 12px; }
.pic.md { width: 48px; height: 48px; border-radius: 10px; }
.pic.sm { width: 34px; height: 34px; border-radius: 8px; }
.pic.hero { width: 100%; height: 150px; border-radius: 0; }

/* =============== 浮层 =============== */
/* =============== 浮层（全部限制在手机屏幕内） =============== */
/* 关键：用 absolute 而不是 fixed，定位基准为 .phone-screen（position:relative），
   这样在桌面预览时弹窗/面板/遮罩都不会超出手机边界 */
.scrim { position: absolute; inset: 0; background: rgba(10, 30, 20, .45); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.scrim.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; z-index: 62; left: 50%; bottom: 0; width: 100%;
  transform: translate(-50%, 100%); background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(10, 30, 20, .22); transition: transform .28s var(--ease);
  max-height: 88%; display: flex; flex-direction: column;
}
.sheet.is-open { transform: translate(-50%, 0); }
.sheet-grab { width: 36px; height: 4px; background: var(--line-2); border-radius: 9px; margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 9px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head h3 { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; }
.sheet-body { overflow-y: auto; padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }

/* 确认弹窗（U.confirm / U.openModal）：以手机屏宽为上限 */
.modal {
  position: absolute; z-index: 62; left: 50%; top: 50%; width: calc(100% - 32px); max-width: 358px;
  transform: translate(-50%, -46%) scale(.98); opacity: 0; pointer-events: none;
  background: #fff; border-radius: var(--r-lg); box-shadow: 0 18px 44px rgba(10, 30, 20, .28);
  max-height: 80%; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .22s var(--ease), opacity .18s;
}
.modal.is-open { transform: translate(-50%, -50%) scale(1); opacity: 1; pointer-events: auto; }
.modal-head { padding: 20px 22px 6px; flex: none; }
.modal-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.modal-body { padding: 12px 22px 4px; overflow: auto; }
.modal-foot { padding: 16px 22px 18px; display: flex; gap: 10px; flex: none; }
.modal-foot .btn { flex: 1; }

/* Toast 也限制在手机框内（顶部居中，宽度自适应但不超出） */
.toast-wrap {
  position: absolute; left: 50%; top: 62px; transform: translateX(-50%); z-index: 90;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
  width: calc(100% - 32px);
}
.toast {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 11px;
  background: rgba(11, 42, 26, .95); color: #fff; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-2); animation: tin .28s var(--ease); white-space: nowrap; max-width: 92vw;
}
.toast .ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; background: var(--green-500); }
.toast.warn .ic { background: var(--amber); }
.toast.err .ic { background: var(--red); }
.toast.out { animation: tout .22s forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
@keyframes tout { to { opacity: 0; transform: translateY(-6px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }

/* =============== 空态 =============== */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-4); }
.empty .em { width: 56px; height: 56px; border-radius: 18px; background: var(--green-50); color: var(--green-200); display: grid; place-items: center; margin: 0 auto 12px; }
.empty .em svg { width: 26px; height: 26px; }
.empty h4 { font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.empty p { font-size: 12.5px; line-height: 1.6; }

/* =============== 手机外框 =============== */
.stage-wrap {
  min-height: 100vh; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 16px 20px; overflow: hidden;
  background:
    radial-gradient(900px 520px at 18% 4%, rgba(60, 201, 140, .18), transparent 62%),
    radial-gradient(760px 460px at 88% 96%, rgba(143, 224, 179, .22), transparent 60%),
    linear-gradient(180deg, #f4fcf8, #eaf8f1);
}
/* 固定为 iPhone 14 Pro 逻辑尺寸 390 × 844，不随浏览器视口缩放；
   浏览器窗口不够高时整体等比缩小，保证比例与内部布局完全一致 */
.phone {
  --pw: 390px; --ph: 844px;
  position: relative; width: var(--pw); height: var(--ph); flex: none;
  border-radius: 52px; padding: 10px; background: linear-gradient(160deg, #e8f5ee, #d2e7db 42%, #dfeee5); box-shadow: inset 0 1px 0 #fff, 0 24px 60px -30px rgba(16, 80, 52, .45);
  box-shadow: 0 36px 80px -22px rgba(12, 34, 22, .6), inset 0 0 0 1px rgba(255,255,255,.08);
  transform-origin: center center;
}
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 43px; overflow: hidden;
  background: var(--surface-2); display: flex; flex-direction: column;
  /* 浮层（底部面板 / 弹窗 / 遮罩 / toast）的定位与裁剪基准 */
  contain: paint;
}
.phone-notch { position: absolute; top: 21px; left: 50%; transform: translateX(-50%); width: 124px; height: 36px; border-radius: 999px; background: #0b1410; z-index: 40; }
.phone-status { height: 48px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 30px; font-size: 13px; font-weight: 600; font-family: var(--num); position: relative; z-index: 35; }
.phone-status .icons { display: flex; align-items: center; gap: 5px; }
.phone-status svg { width: 16px; height: 16px; }
.stage-note { color: var(--ink-3); font-size: 12.5px; text-align: center; max-width: 430px; line-height: 1.7; flex: none; }
.stage-note b { color: var(--ink); }
.stage-links { position: fixed; left: 0; right: 0; bottom: 14px; z-index: 8; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; justify-content: center; pointer-events: none; }
.stage-links > * { pointer-events: auto; }
.stage-links a { display: inline-flex; align-items: center; justify-content: center; height: 33px; padding: 0 14px; border-radius: 999px; font-size: 12px; line-height: 1; white-space: nowrap; color: var(--ink-2); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); transition: .15s; }
.stage-links a:hover { color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-200); }
.stage-links a.on { background: var(--green); color: #fff; box-shadow: none; }

/* 端切换条：客户端后面的三个端用括号归组（所有页面共用，保证布局与间隔一致） */
.stage-links .link-group { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 6px; height: 33px; }
.stage-links .link-group em { font-style: normal; color: var(--ink-4); font-size: 12px; line-height: 1; }

/* 演示外壳（手机上方的说明与底部的端切换条）不属于任何业务主题：
   农户端 / 顾客端换肤后，这里仍保持与其他页面一致的清新绿，避免出现金色或米黄的入口 */
.stage-note { color: #6b7a72; }
.stage-note b { color: #22362c; }
.stage-links a { color: #5d6b63; background: #fff; box-shadow: inset 0 0 0 1px #e3ebe6; }
.stage-links a:hover { color: #15925f; box-shadow: inset 0 0 0 1px #b7e6d0; }
.stage-links a.on { background: #1fae74; color: #fff; box-shadow: none; }
.stage-links .link-group em { color: #9aa8a0; }
@media (max-width: 520px) {
  .stage-links { gap: 6px; }
  .stage-links a { height: 31px; padding: 0 12px; font-size: 11.5px; }
  .stage-links .link-group { height: 31px; gap: 4px; }
  .stage-links .link-group em { font-size: 11.5px; }
}

/* 窗口不够高/不够宽时，整体等比缩放手机壳，内部仍是 390×844 逻辑尺寸（不重排）。
   --phone-scale 由 icons.js 的 fitPhone() 计算；负外边距抵消缩放后的布局占位，
   保证 flex 居中时上下左右都不被裁切。 */
.phone {
  transform: scale(var(--phone-scale, 1));
  transform-origin: 50% 50%;
  margin: calc((var(--phone-scale, 1) - 1) * 423px) calc((var(--phone-scale, 1) - 1) * 195px);
}
@media (max-height: 1240px) { .stage-wrap { gap: 12px; } }
/* 极矮窗口（< 520px）：宁可滚动也不裁切 */
@media (max-height: 520px) {
  .stage-wrap { overflow-y: auto; align-items: flex-start; justify-content: flex-start; padding-top: 10px; }
  .phone { margin-left: auto; margin-right: auto; }
}


/* 真机 / 窄屏：去掉外框，直接全屏 */
@media (max-width: 480px) {
  .stage-wrap { padding: 0; display: block; height: 100vh; background: #fff; }
  .phone { width: 100vw !important; height: 100vh !important; border-radius: 0; padding: 0; box-shadow: none; background: #fff; transform: none !important; margin: 0 !important; }
  .phone-screen { border-radius: 0; }
  .phone-notch, .stage-note, .stage-links, .phone-status { display: none !important; }
}

/* =============== 移动端通用 =============== */
.m-app { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; background: var(--surface-2); overflow: hidden; }
.m-page { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
.m-page.no-tab { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.m-page > .m-pad, .m-pad { padding: 0 16px; }
.m-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.m-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); position: relative; }
.m-tabbar button svg { width: 21px; height: 21px; stroke-width: 1.8; }
.m-tabbar button.on { color: var(--green); }
.m-tabbar .tab-badge { position: absolute; top: 8px; right: calc(50% - 16px); }
.m-navbar { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 8px 0 6px; flex: none; position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.m-navbar .back { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-2); border-radius: 9px; }
.m-navbar .back:hover { background: rgba(20,40,28,.05); }
.m-navbar h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.m-navbar .right { margin-left: auto; display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.m-hero { padding: 6px 16px 20px; }
.m-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--green-700); text-transform: uppercase; }
.m-title { font-size: 23px; font-weight: 800; letter-spacing: -.035em; line-height: 1.22; margin-top: 5px; }
.m-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-top: 6px; }
.m-foot-bar { flex: none; display: flex; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); align-items: center; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.status-bar-fill { width: 7px; height: 7px; border-radius: 50%; }

/* =============== 后台 PC 通用 =============== */
.admin-body { height: 100vh; overflow: hidden; background: var(--surface-2); }
.admin-shell { display: flex; height: 100vh; }
.side {
  width: 224px; flex: none; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #f1fbf6);
  border-right: 1px solid var(--line);
  color: var(--ink-2); position: relative; z-index: 20;
}
.side-head { height: 64px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; background: linear-gradient(140deg, #6fe0b0, #25c084); color: #0c5c3e; box-shadow: 0 4px 12px -4px rgba(31,174,116,.55); }
.logo-mark svg { width: 18px; height: 18px; }
.logo-text { min-width: 0; line-height: 1.2; }
.logo-text b { display: block; color: var(--ink); font-size: 14.5px; letter-spacing: .01em; }
.logo-text span { font-size: 9.5px; color: var(--ink-4); letter-spacing: .1em; font-weight: 600; white-space: nowrap; }
.side-scroll { flex: 1; overflow-y: auto; padding: 12px 10px; }
.side-scroll::-webkit-scrollbar-thumb { background: rgba(20, 60, 40, .16); }
.nav-group-title { padding: 12px 12px 7px; font-size: 10px; font-weight: 700; color: var(--ink-4); letter-spacing: .12em; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 11px;
  border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: .15s;
  position: relative; margin-bottom: 2px; text-align: left;
}
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .9; }
.nav-item:hover { background: var(--green-50); color: var(--green-800); }
.nav-item.on { background: var(--green-100); color: var(--green-800); font-weight: 600; }
.nav-item.on::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); }
.nav-item .count { margin-left: auto; min-width: 19px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; font-family: var(--num); }

/* 侧栏层级：父级功能 + 缩进子功能，用连接线表达隶属关系 */
.nav-group-body { position: relative; }
.nav-item.parent { font-weight: 600; }
.nav-item.child { height: 34px; padding-left: 33px; font-size: 12.5px; color: var(--ink-3); }
.nav-item.child svg { width: 15px; height: 15px; opacity: .75; }
.nav-item.child::after { content: ""; position: absolute; left: 19px; top: 50%; width: 8px; height: 1px; background: var(--line-2); }
.nav-item.child.on::after { background: var(--green-200); }

/* 运营工作台 · 功能地图 */
.func-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 4px 18px 18px; }
.fm-group { font-size: 10.5px; font-weight: 700; color: var(--ink-4); letter-spacing: .12em; padding: 6px 6px 8px; }
.fm-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 11px; text-align: left; transition: .15s; }
.fm-row:hover { background: var(--green-50); }
.fm-row.child { margin-left: 16px; background: var(--canvas); }
.fm-row.child:hover { background: var(--green-50); }
.fm-ico { width: 26px; height: 26px; border-radius: 8px; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; flex: none; }
.fm-ico svg { width: 14px; height: 14px; }
.fm-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fm-txt b { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.fm-txt small { font-size: 10.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-count { margin-left: auto; min-width: 18px; height: 17px; padding: 0 6px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; font-family: var(--num); }
.fm-go { display: flex; color: var(--ink-4); }
@media (max-width: 1180px) { .func-map { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .func-map { grid-template-columns: 1fr; } }
.side-foot { flex: none; padding: 12px; border-top: 1px solid var(--line); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.side-user .u { min-width: 0; flex: 1; line-height: 1.25; }
.side-user .u b { display: block; color: var(--ink); font-size: 12.5px; }
.side-user .u span { display: block; font-size: 10.5px; color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.topbar { height: 64px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 24px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); position: relative; z-index: 15; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-4); white-space: nowrap; }
.crumb b { color: var(--ink); font-weight: 650; font-size: 13px; }
.crumb svg { width: 12px; height: 12px; opacity: .55; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-right .divider { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.view { flex: 1; overflow-y: auto; padding: 22px 24px 40px; }
.view-inner { max-width: 1500px; margin: 0 auto; animation: fadeUp .26s var(--ease); }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; font-weight: 750; letter-spacing: -.025em; }
.page-head p { margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.metric { padding: 16px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.metric .lbl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.metric .lbl svg { width: 15px; height: 15px; }
.metric .val { margin-top: 8px; font-size: 26px; font-weight: 750; font-family: var(--num); letter-spacing: -.03em; line-height: 1.15; }
.metric .foot { margin-top: 6px; font-size: 12px; color: var(--ink-4); display: flex; align-items: center; gap: 6px; }
.metric.accent { background: linear-gradient(140deg, #2ec78c, #12875c); border-color: transparent; color: #fff; box-shadow: 0 12px 28px -12px rgba(24, 150, 100, .55); }
.metric.accent .lbl, .metric.accent .foot { color: rgba(255,255,255,.78); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--green); }
.seg { display: inline-flex; padding: 3px; background: #eef2ef; border-radius: 10px; gap: 2px; }
.seg button { height: 30px; padding: 0 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); transition: .15s; white-space: nowrap; }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }

@media (max-width: 1280px) { .grid-side { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 1080px) {
  .side { width: 64px; }
  .side-head { justify-content: center; padding: 0; }
  .logo-text, .nav-group-title, .nav-item span, .side-user .u { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .nav-item .count { display: none; }
  .crumb .brand-fallback { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =============== 落地页浮层修正 ===============
   手机端浮层挂在 .phone-screen（position:relative）内，落地页没有该容器，
   浮层会定位到文档原点，于是弹窗跑到视口外。这里对 body 直属浮层改为 fixed。 */
body > .scrim, body > .modal, body > .toast-wrap { position: fixed; }
body > .modal { max-height: calc(100vh - 40px); }

/* =============== 商品档案键值列表 =============== */
.detail-list { display: flex; flex-direction: column; }
.detail-list > div { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list span { flex: 0 0 auto; min-width: 74px; font-size: 12px; color: var(--ink-3); }
.detail-list b { flex: 1; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ink); word-break: break-word; }

/* =============== 缺失的工具类 =============== */
.mt6 { margin-top: 6px; }
.mt10 { margin-top: 10px; }
.notice-blue { background: #eaf3fb; color: #1f5a91; }
.m-navbar .nav-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }

/* =============== 浮层层级：弹窗高于底部面板 =============== */
.modal { z-index: 72; }
/* =============== 待办 / 售后（第 17 轮） =============== */
.btn-xs { height: 26px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; gap: 4px; }
.btn-xs svg { width: 12px; height: 12px; }
.todo-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; margin-right: 10px; }
.todo-ico svg { width: 15px; height: 15px; }
.todo-ico.amber { background: #fdf4e3; color: #8a5a0a; }
.todo-ico.blue { background: #eaf2fa; color: #22557f; }
.todo-ico.red { background: #fcecec; color: #9c2b2b; }
.list-row .btn + .num, .list-row .num { flex: none; }

.sec-title svg { width: 15px; height: 15px; flex: none; }
