/* ============================================================
   ChemDB /m/ 移动端样式 —— 复刻微信小程序 wechat/ 的视觉体系。
   750rpx 设计稿 → 375px 视口，换算 ÷2（28rpx=14px 等）；仅 /m/* 页面加载。
   组件与各页 section 一一对应小程序同名 wxss，逐阶段扩充。
   ============================================================ */

/* ---------- 设计令牌（对齐 wechat/app.wxss） ---------- */
:root {
    --m-primary: #1890ff;
    --m-primary-dark: #096dd9;
    --m-grad: linear-gradient(135deg, #1890ff 0%, #0066ff 100%);
    --m-grad-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --m-grad-success: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    --m-bg: #f8f9fa;
    --m-card: #ffffff;
    --m-ink: #333333;
    --m-ink-2: #666666;
    --m-muted: #999999;
    --m-line: #f0f0f0;
    --m-danger: #ff4d4f;
    --m-success: #52c41a;
    --m-warning: #fa8c16;
    --m-radius: 8px;
    --m-shadow: 0 1px 6px rgba(0, 0, 0, .04);
    --m-appbar-h: 44px;
    --m-tabbar-h: 50px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--m-bg);
    color: var(--m-ink);
    font-size: 14px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; border: 0; }
button, input, textarea, select { font-family: inherit; }
textarea { font-family: inherit; }
.m-hide { display: none !important; }
.m-text-primary { color: var(--m-primary); }
.m-text-success { color: var(--m-success); }
.m-text-warning { color: var(--m-warning); }
.m-text-danger { color: var(--m-danger); }
.m-text-muted { color: var(--m-muted); }
.m-link { color: var(--m-primary); font-size: 13px; }
.m-center { text-align: center; }

/* ---------- 布局 ---------- */
.m-main {
    padding: calc(var(--m-appbar-h) + env(safe-area-inset-top, 0px) + 14px) 15px 30px;
    max-width: 560px;
    margin: 0 auto;
    min-height: 60vh;
}
body.m-has-tabbar .m-main { padding-bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px) + 24px); }

/* 顶栏（小程序原生导航栏的 Web 对应） */
.m-appbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: calc(var(--m-appbar-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: #fff;
    border-bottom: 1px solid #ededed;
    display: flex; align-items: center;
}
.m-appbar__back {
    width: 44px; height: 44px; padding: 0 0 4px 12px;
    border: 0; background: transparent;
    font-size: 26px; font-weight: 300; line-height: 1; color: var(--m-ink);
    text-align: left; cursor: pointer;
}
.m-appbar__spacer { width: 44px; }
.m-appbar__title {
    flex: 1; margin: 0; padding: 0 4px;
    font-size: 17px; font-weight: 600; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-appbar__right { min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; }

/* 底部 tabbar（首页 / 化学品 / 我的） */
.m-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex; background: #fff;
    border-top: 1px solid #e5e5e5;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.m-tabbar__item {
    flex: 1; height: var(--m-tabbar-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 10px; color: var(--m-muted);
}
.m-tabbar__item img { width: 30px; height: 30px; }
.m-tabbar__item.active { color: var(--m-primary); }

/* 安装横幅（pwa-install.js 注入）与底部 tabbar 共存：抬到 tabbar 之上 */
body.m-has-tabbar .pwa-install { bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px); }

/* 「电脑版」页脚链接 */
@media (min-width: 620px) {
    .m-appbar, .m-tabbar { max-width: 560px; margin-left: auto; margin-right: auto; }
}

/* ---------- 卡片 ---------- */
.m-card {
    background: var(--m-card);
    border-radius: var(--m-radius);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--m-shadow);
}
.m-card__title { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.m-card__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-card__row .m-card__title { margin-bottom: 0; }
.m-card__tail { display: flex; align-items: center; gap: 8px; }
.m-card__desc { font-size: 13px; color: var(--m-muted); margin-bottom: 20px; display: block; }

/* ---------- 按钮 ---------- */
.m-btn {
    display: flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 20px;
    border: 0; border-radius: 22px;
    font-size: 16px; font-weight: 500;
    cursor: pointer; transition: opacity .2s, transform .2s;
}
.m-btn:active { opacity: .8; }
.m-btn--primary { background: var(--m-grad); color: #fff; }
.m-btn--secondary { background: #fff; color: var(--m-primary); border: 1px solid var(--m-primary); }
.m-btn--danger { background: var(--m-danger); color: #fff; }
.m-btn--success { background: var(--m-success); color: #fff; }
.m-btn--warning { background: var(--m-warning); color: #fff; }
.m-btn--default { background: #f5f5f5; color: var(--m-ink-2); }
.m-btn--text { background: transparent; color: var(--m-primary); height: auto; padding: 5px 10px; border-radius: 0; }
.m-btn--block { width: 100%; }
.m-btn--small { height: 30px; padding: 0 15px; font-size: 12px; border-radius: 15px; }
.m-btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 表单 ---------- */
.m-input-group { margin-bottom: 15px; }
.m-input-label { display: block; font-size: 14px; color: var(--m-ink-2); margin-bottom: 7px; }
.m-input-hint { font-size: 12px; color: var(--m-muted); }
.m-input-wrap {
    display: flex; align-items: center;
    height: 44px; padding: 0 15px;
    background: #f5f5f5; border: 1px solid transparent; border-radius: 6px;
    transition: background .2s, border-color .2s;
}
.m-input-wrap.focused { background: #fff; border-color: var(--m-primary); }
.m-input-icon { width: 18px; height: 18px; margin-right: 10px; }
.m-input { flex: 1; height: 100%; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--m-ink); outline: none; }
.m-input::placeholder { color: #bbb; }
.m-eye { padding: 5px; margin-left: 8px; cursor: pointer; }
.m-eye img { width: 18px; height: 18px; }
.m-textarea {
    width: 100%; min-height: 110px; padding: 10px 15px;
    background: #f5f5f5; border: 1px solid transparent; border-radius: 6px;
    font-size: 15px; color: var(--m-ink); line-height: 1.6; outline: none; resize: vertical;
}
.m-textarea:focus { background: #fff; border-color: var(--m-primary); }
.m-code-row { display: flex; gap: 10px; }
.m-code-row .m-input-wrap { flex: 1; }
.m-send-code {
    flex-shrink: 0; width: 100px; height: 44px; padding: 0;
    border: 0; border-radius: 6px;
    background: var(--m-grad); color: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.m-send-code[disabled] { background: #d9d9d9; color: #fff; }

/* ---------- 搜索栏 ---------- */
.m-search { display: flex; gap: 10px; margin-bottom: 10px; }
.m-search__wrap {
    flex: 1; display: flex; align-items: center; height: 44px; padding: 0 15px;
    background: #fff; border-radius: 22px; box-shadow: var(--m-shadow);
}
.m-search__icon { width: 16px; height: 16px; margin-right: 8px; }
.m-search__input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; outline: none; }
.m-search__clear { width: 16px; height: 16px; padding: 5px; margin-left: 6px; cursor: pointer; }
.m-search__refresh {
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: #fff; box-shadow: var(--m-shadow);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; transition: transform .2s;
}
.m-search__refresh:active { transform: scale(.95); }

/* ---------- 排序行 / 分段选项卡 ---------- */
.m-sort {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 10px; margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, .04);
    border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.m-sort__left { display: flex; align-items: center; gap: 4px; flex: 1; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.m-sort__left::-webkit-scrollbar { display: none; }
.m-sort__item {
    display: flex; align-items: center; gap: 2px;
    padding: 4px 7px; border-radius: 12px; white-space: nowrap; flex-shrink: 0;
    font-size: 13px; color: var(--m-ink-2); cursor: pointer;
}
.m-sort__item .arrow { font-size: 10px; opacity: .3; }
.m-sort__item.active { background: var(--m-grad); color: #fff; font-weight: 500; box-shadow: 0 2px 6px rgba(24, 144, 255, .3); }
.m-sort__item.active .arrow { opacity: 1; }
.m-sort__right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 8px; }
.m-sort__count { font-size: 12px; color: var(--m-muted); white-space: nowrap; }

.m-tabs { display: flex; gap: 10px; padding: 5px; margin-bottom: 10px; background: #fff; border-radius: 6px; box-shadow: var(--m-shadow); }
.m-tabs__item {
    flex: 1; height: 30px; display: flex; align-items: center; justify-content: center; gap: 4px;
    border-radius: 4px; font-size: 13px; color: var(--m-ink-2); cursor: pointer;
    transition: background .2s, color .2s;
}
.m-tabs__item.active { background: var(--m-grad-purple); color: #fff; font-weight: 600; }
.m-tabs__badge { background: #ff4d4f; color: #fff; font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 8px; }

/* ---------- 标签 / 徽标 ---------- */
.m-tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; margin-right: 5px; }
.m-tag--primary { background: #e6f7ff; color: var(--m-primary); }
.m-tag--success { background: #f6ffed; color: var(--m-success); }
.m-tag--warning { background: #fff7e6; color: var(--m-warning); }
.m-tag--danger { background: #fff1f0; color: var(--m-danger); }
.m-tag--default { background: #f5f5f5; color: var(--m-ink-2); }

/* ---------- 列表 ---------- */
.m-list { display: flex; flex-direction: column; }
.m-list__item { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--m-line); cursor: pointer; }
.m-list__item:last-child { border-bottom: none; }
.m-list__body { flex: 1; min-width: 0; }
.m-list__name { display: block; font-size: 15px; font-weight: 500; color: var(--m-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-list__meta { display: flex; gap: 10px; margin-top: 3px; font-size: 12px; color: var(--m-muted); }
.m-list__meta .m-text-danger { color: var(--m-danger); }
.m-list__meta .m-text-warning { color: var(--m-warning); }
.m-list__arrow { width: 12px; height: 12px; margin-left: 10px; opacity: .5; }
.m-list__item--em .m-list__name { font-size: 14px; }

/* 菜单行（我的页） */
.m-menu__item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--m-line); cursor: pointer; }
.m-menu__item:last-child { border-bottom: none; }
.m-menu__left { display: flex; align-items: center; gap: 10px; }
.m-menu__icon { width: 20px; height: 20px; }
.m-menu__emoji { font-size: 18px; line-height: 1; }
.m-menu__text { font-size: 15px; }
.m-menu__value { font-size: 13px; color: var(--m-ink-2); }
.m-menu__right { display: flex; align-items: center; gap: 6px; }

/* ---------- 复选框 / 单选 ---------- */
.m-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; }
.m-check input { accent-color: var(--m-primary); width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; }

/* ---------- 空态 / 加载 ---------- */
.m-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 0; }
.m-empty__icon { width: 100px; height: 100px; margin-bottom: 15px; opacity: .4; }
.m-empty__text { font-size: 14px; color: var(--m-muted); }
.m-spinner { width: 20px; height: 20px; border: 2px solid var(--m-line); border-top-color: var(--m-primary); border-radius: 50%; animation: m-spin 1s linear infinite; }
@keyframes m-spin { to { transform: rotate(360deg); } }
.m-loading-inline { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px 0; color: var(--m-muted); font-size: 14px; }
.m-loading-mask { position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, .18); display: flex; align-items: center; justify-content: center; }
.m-loading-box {
    display: flex; align-items: center; gap: 10px;
    background: rgba(17, 17, 17, .82); color: #fff;
    padding: 14px 20px; border-radius: 10px; font-size: 14px; max-width: 70vw;
}
.m-loading-box .m-spinner { border-color: rgba(255, 255, 255, .25); border-top-color: #fff; }

/* ---------- Toast ---------- */
.m-toast {
    position: fixed; left: 50%; bottom: 18%; transform: translateX(-50%);
    max-width: 80vw; padding: 10px 18px;
    background: rgba(17, 17, 17, .78); color: #fff;
    font-size: 14px; text-align: center; border-radius: 8px;
    z-index: 9500; opacity: 0; pointer-events: none; transition: opacity .25s;
}
.m-toast.show { opacity: 1; }
.m-toast.error { background: rgba(255, 77, 79, .92); }
.m-toast.success { background: rgba(0, 0, 0, .78); }

/* ---------- 弹窗 / 底部面板 ---------- */
.m-modal-mask { position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.m-modal { width: 100%; max-width: 310px; background: #fff; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; }
.m-modal__header { padding: 16px 18px 0; text-align: center; }
.m-modal__title { font-size: 16px; font-weight: 600; }
.m-modal__body { padding: 10px 18px 16px; font-size: 14px; color: var(--m-ink-2); text-align: center; overflow-y: auto; word-break: break-word; }
.m-modal__footer { display: flex; border-top: 1px solid var(--m-line); }
.m-modal__btn { flex: 1; height: 46px; border: 0; background: #fff; font-size: 15px; cursor: pointer; }
.m-modal__btn + .m-modal__btn { border-left: 1px solid var(--m-line); }
.m-modal__btn.cancel { color: var(--m-ink-2); }
.m-modal__btn.confirm { color: var(--m-primary); font-weight: 600; }
.m-modal__btn.confirm.danger { color: var(--m-danger); }

.m-sheet-mask { position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; }
.m-sheet {
    width: 100%; max-width: 560px; max-height: 75vh;
    background: #fff; border-radius: 15px 15px 0 0;
    display: flex; flex-direction: column;
    animation: m-slide-up .25s ease;
}
@keyframes m-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.m-sheet__header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--m-line); }
.m-sheet__title { font-size: 16px; font-weight: 600; }
.m-sheet__close { font-size: 20px; color: var(--m-muted); padding: 5px; border: 0; background: transparent; cursor: pointer; }
.m-sheet__body { flex: 1; overflow-y: auto; padding: 10px 0; }
.m-sheet__footer { display: flex; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--m-line); padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)); }
.m-sheet__footer .m-btn { flex: 1; }

/* ============================================================
   首页（wechat/pages/index）
   ============================================================ */
.m-welcome {
    position: relative; min-height: 140px; padding: 20px;
    background: var(--m-grad-purple);
    border-radius: 10px; margin-bottom: 15px;
    color: #fff; overflow: hidden;
}
.m-welcome__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.m-welcome__hint { font-size: 14px; color: rgba(255, 255, 255, .9); }
.m-welcome__web { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .95); }
.m-welcome__name { font-size: 22px; font-weight: 700; }
.m-welcome__slogan { margin: 8px 0 4px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.m-welcome__sub { margin: 0; font-size: 12px; line-height: 1.8; color: rgba(255, 255, 255, .75); }
.m-bell { position: relative; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.m-bell__icon { font-size: 20px; }
.m-bell__badge {
    position: absolute; top: -2px; right: -4px;
    min-width: 16px; height: 16px; padding: 0 3px;
    background: var(--m-danger); color: #fff;
    font-size: 10px; line-height: 16px; text-align: center; border-radius: 8px;
}

.m-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
.m-actions__item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.m-actions__item:active .m-actions__icon { transform: scale(.95); }
.m-actions__icon {
    width: 50px; height: 50px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: transform .2s;
}
.m-actions__icon img { width: 25px; height: 25px; }
.m-actions__icon .emoji { font-size: 24px; line-height: 1; }
.m-actions__text { font-size: 12px; color: var(--m-ink-2); line-height: 1.25; text-align: center; min-height: 2.6em; display: flex; align-items: center; justify-content: center; padding: 0 1px; }

.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.m-stats__item { display: flex; flex-direction: column; align-items: center; padding: 15px 0; background: #f8f9fa; border-radius: 6px; }
.m-stats__value { font-size: 20px; font-weight: 700; color: var(--m-primary); margin-bottom: 5px; }
.m-stats__label { font-size: 12px; color: var(--m-muted); }

/* ============================================================
   认证页（wechat/pages/login 的渐变全屏形态；注册/找回为白底卡片）
   ============================================================ */
body.m-auth { background: var(--m-grad-purple); }
body.m-auth .m-main { padding: 30px 30px 20px; max-width: 460px; }
.m-auth__back { display: flex; align-items: center; align-self: flex-start; padding: 5px 10px 5px 0; margin-bottom: 10px; color: rgba(255, 255, 255, .9); font-size: 15px; cursor: pointer; background: transparent; border: 0; }
.m-auth__back .chev { font-size: 24px; font-weight: 300; margin-right: 3px; }
.m-auth__logo-section { display: flex; flex-direction: column; align-items: center; margin: 30px 0 40px; }
.m-auth__logo-box {
    width: 80px; height: 80px; padding: 10px; margin-bottom: 15px;
    background: rgba(255, 255, 255, .25);
    border-radius: 20px; box-shadow: 0 2px 15px rgba(0, 0, 0, .1);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.m-auth__logo-box img { width: 100%; height: 100%; opacity: .95; }
.m-auth__name { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.m-auth__desc { font-size: 13px; color: rgba(255, 255, 255, .8); text-align: center; }
.m-auth__card { background: #fff; border-radius: 10px; padding: 25px 20px; }
.m-auth__links { display: flex; justify-content: space-between; margin-top: 15px; }
.m-auth__links a { font-size: 13px; color: var(--m-primary); }
.m-auth__agree { margin-top: 15px; padding: 0 10px; }
.m-auth__agree .m-check { color: rgba(255, 255, 255, .9); }
.m-auth__agree a { color: #fff; text-decoration: underline; }

/* 找回密码步骤条（wechat/pages/forgot-password） */
.m-steps { display: flex; align-items: center; margin-bottom: 25px; }
.m-step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 0 0 auto; }
.m-step__num {
    width: 30px; height: 30px; border-radius: 50%;
    background: #f0f0f0; color: var(--m-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; transition: all .3s;
}
.m-step__text { font-size: 12px; color: var(--m-muted); }
.m-step.on .m-step__num { background: var(--m-grad-purple); color: #fff; }
.m-step.on .m-step__text { color: #667eea; font-weight: 700; }
.m-steps__line { flex: 1; height: 1px; background: #f0f0f0; margin: 0 5px 16px; }
.m-steps__line.on { background: var(--m-grad-purple); }

.m-success { display: flex; flex-direction: column; align-items: center; padding: 30px 0; text-align: center; }
.m-success__icon { font-size: 75px; line-height: 1; margin-bottom: 20px; }
.m-success__title { font-size: 18px; font-weight: 700; color: var(--m-success); margin-bottom: 10px; }
.m-success__desc { font-size: 14px; color: var(--m-ink-2); line-height: 1.6; margin-bottom: 20px; }

/* ============================================================
   化学品列表（wechat/pages/chemicals）
   ============================================================ */

/* 列表卡片（compact） */
.m-list + .m-list { margin-top: 0; }
#mChemList, #mLocChemicals { gap: 8px; }
.m-chem-card {
    display: flex; align-items: center;
    background: #fff; border-radius: 6px;
    padding: 10px 12px;
    box-shadow: var(--m-shadow);
    border: 1px solid transparent;
    transition: transform .15s, background .15s, border-color .15s;
}
.m-chem-card:active { transform: scale(.98); }
.m-chem-card.is-selected { background: #e6f7ff; border-color: var(--m-primary); box-shadow: 0 2px 10px rgba(24, 144, 255, .3); }
.m-chem-card__body { flex: 1; min-width: 0; }
.m-chem-card__name-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.m-chem-card__name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-chem-card__name.is-low { color: var(--m-danger); }
.m-chem-card__tail { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: 5px; }
.m-remain { font-size: 12px; font-weight: 600; color: #389e0d; white-space: nowrap; }
.m-remain.is-low { color: var(--m-danger); }
.m-hazard-badge { flex-shrink: 0; color: #ff0000; font-size: 13px; font-weight: 700; }
.m-chem-card__row { display: flex; font-size: 12px; line-height: 1.5; margin-bottom: 4px; }
.m-chem-card__row--split { justify-content: space-between; gap: 10px; }
.m-chem-card__label { color: var(--m-muted); flex-shrink: 0; }
.m-chem-card__value { color: var(--m-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-chem-card__time { font-size: 11px; color: var(--m-muted); white-space: nowrap; }
.m-chem-check {
    flex-shrink: 0; width: 24px; height: 24px; margin-right: 10px;
    border-radius: 50%; border: 2px solid #d9d9d9; background: #fff;
    display: flex; align-items: center; justify-content: center;
    color: transparent; font-size: 14px; font-weight: 700;
    transition: all .2s;
}
.m-chem-check.on { border-color: var(--m-primary); background: var(--m-primary); color: #fff; box-shadow: 0 0 10px rgba(24, 144, 255, .6); }

.m-multi-btn {
    font-size: 12px; color: var(--m-primary); font-weight: 500;
    padding: 4px 10px; border: 1px solid var(--m-primary); border-radius: 12px;
    background: rgba(24, 144, 255, .05); white-space: nowrap; cursor: pointer;
}
.m-loadmore { margin: 15px 0; }

/* 批操作栏（多选时浮于 tabbar 之上） */
.m-batch-bar {
    position: fixed; left: 0; right: 0; z-index: 101;
    bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px));
    max-width: 560px; margin: 0 auto;
    background: #fff; padding: 10px 15px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, .1);
    display: flex; flex-direction: column; gap: 8px;
}
.m-batch-bar__row { display: flex; align-items: center; justify-content: space-between; }
.m-batch-bar__count { font-size: 13px; font-weight: 600; }
.m-batch-bar__links { display: flex; gap: 4px; }
.m-batch-bar__actions { display: flex; gap: 8px; }
.m-batch-bar__actions .m-btn { flex: 1; }
body.m-has-tabbar.m-batch-open .m-main { padding-bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0px) + 130px); }

/* 位置浏览 */
.m-loc-breadcrumb {
    display: flex; align-items: center; flex-wrap: wrap;
    padding: 10px; background: #fff; border-radius: 6px; margin-bottom: 10px;
    box-shadow: var(--m-shadow);
}
.m-loc-breadcrumb__item { font-size: 13px; color: var(--m-primary); padding: 4px 7px; border-radius: 3px; cursor: pointer; }
.m-loc-breadcrumb__item:active { background: #f0f0f0; }
.m-loc-breadcrumb__sep { font-size: 12px; color: var(--m-muted); margin: 0 2px; }
.m-loc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.m-loc-item {
    display: flex; align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 6px; box-shadow: var(--m-shadow);
    cursor: pointer; transition: transform .15s;
}
.m-loc-item:active { transform: scale(.98); }
.m-loc-item__icon { width: 24px; height: 24px; margin-right: 10px; flex-shrink: 0; }
.m-loc-item__name { flex: 1; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-loc-item__count { font-size: 12px; color: var(--m-muted); margin-left: 5px; flex-shrink: 0; }
.m-loc-item__menu {
    flex-shrink: 0; width: 32px; height: 32px; margin-left: 4px;
    border: 0; background: transparent; border-radius: 50%;
    color: var(--m-muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.m-loc-item__menu:active { background: #eee; }
.m-loc-item__arrow { width: 16px; height: 16px; margin-left: 2px; opacity: .5; flex-shrink: 0; }
.m-loc-title { padding: 10px 0 8px; font-size: 14px; font-weight: 600; color: var(--m-ink-2); }

/* 通用输入弹窗（M.prompt） */
.m-modal__input {
    width: 100%; height: 42px; padding: 0 12px;
    border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 16px; color: var(--m-ink); outline: none;
}
.m-modal__input:focus { border-color: var(--m-primary); }

/* 底部动作面板条目（M.sheet） */
.m-sheet__item {
    padding: 15px 20px; font-size: 15px; color: var(--m-ink);
    border-bottom: 1px solid var(--m-line); cursor: pointer;
}
.m-sheet__item:last-child { border-bottom: none; }
.m-sheet__item:active { background: #f8f8f8; }
.m-sheet__item.danger { color: var(--m-danger); }
.m-sheet__item.first { color: var(--m-primary); font-weight: 500; }

/* ============================================================
   化学品详情（wechat/pages/chemical-detail）
   ============================================================ */
.m-detail-image {
    height: 250px; background: #fff; border-radius: 8px;
    overflow: hidden; margin-bottom: 10px;
    box-shadow: var(--m-shadow);
}
.m-detail-image__img { width: 100%; height: 100%; object-fit: contain; }

/* 详情页「编辑 / 记录使用」按钮：左右各半 */
.m-edit-btns { display: flex; gap: 10px; margin: 12px 0 10px; }
.m-edit-btns .m-btn { flex: 1; height: 40px; border-radius: 8px; font-size: 14px; padding: 0 8px; }

.m-no-image {
    width: 100%; height: 100%; background: #f5f5f5;
    border: 1px dashed #d9d9d9; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--m-muted); font-size: 14px;
}
.m-section-title {
    font-size: 16px; font-weight: 600;
    padding-bottom: 7px; margin-bottom: 12px;
    border-bottom: 1px solid var(--m-line);
}
.m-info-item { display: flex; align-items: flex-start; margin-bottom: 10px; }
.m-info-item:last-child { margin-bottom: 0; }
.m-info-label { font-size: 13px; color: var(--m-muted); width: 88px; flex-shrink: 0; overflow-wrap: anywhere; }
.m-info-value { font-size: 15px; color: var(--m-ink); flex: 1; word-break: break-word; overflow-wrap: anywhere; line-height: 1.6; }
.m-remain-alert { font-size: 12px; color: var(--m-danger); font-weight: 600; margin-top: 4px; }
.m-danger-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.m-danger-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border: 1px solid #999; border-radius: 4px; background: #fff;
}
.m-danger-tag__code { font-size: 13px; font-weight: 700; line-height: 1; }
.m-danger-tag__text { font-size: 12px; line-height: 1; }
.m-structure-box {
    width: 100%; height: 180px; background: #f5f5f5;
    border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.m-structure-image { width: 100%; height: 100%; object-fit: contain; }
.m-msds-signal {
    display: inline-block; padding: 2px 12px; border-radius: 999px;
    background: #fee2e2; color: #b91c1c; font-size: 13px; font-weight: 600;
}
.m-msds-pictos { display: flex; flex-wrap: wrap; gap: 6px; }
.m-msds-picto {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff;
}
.m-msds-picto__code { color: #9ca3af; font-size: 11px; }
.m-msds-picto__name { color: #111827; font-size: 13px; }
.m-msds-h-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.m-msds-h-item { display: flex; align-items: flex-start; }
.m-msds-h__code { flex: 0 0 85px; color: #6b7280; font-size: 12px; font-family: Menlo, Consolas, monospace; }
.m-msds-h__text { flex: 1; color: #1f2937; font-size: 13px; line-height: 1.6; }
.m-msds-note {
    margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e5e7eb;
    color: #9ca3af; font-size: 11px; line-height: 1.6;
}
.m-detail-actions { display: flex; gap: 10px; margin: 15px 0 5px; }
.m-detail-actions .m-btn { flex: 1; padding: 0 8px; }
.m-qr-img { width: 220px; height: 220px; margin: 0 auto; }
.m-modal__body--left { text-align: left; }
.m-feedback-hint { margin: 0 0 10px; font-size: 13px; color: var(--m-ink-2); line-height: 1.6; }
.m-feedback-who {
    margin-top: 10px; padding: 10px; border-radius: 4px;
    background: #f0f7ff; border-left: 2px solid var(--m-primary);
    font-size: 13px; color: var(--m-ink-2);
}

/* ============================================================
   编辑化学品（wechat/pages/chemical-edit）
   ============================================================ */
.m-hint-card {
    padding: 12px; background: #fff3e0; border-radius: 6px; margin-bottom: 15px;
    font-size: 13px; color: #ff9800; line-height: 1.6;
}
.m-edit-row {
    display: flex; align-items: center; gap: 5px;
    margin-bottom: 12px; padding: 10px;
    background: #f8f9fa; border-radius: 6px;
}
.m-edit-label { width: 75px; font-size: 14px; color: var(--m-ink-2); flex-shrink: 0; }
.m-edit-input {
    flex: 1; min-width: 0; font-size: 16px; color: var(--m-ink);
    padding: 8px 10px; background: #fff;
    border: 1px solid #e0e0e0; border-radius: 4px; outline: none;
}
.m-edit-input.focused { border-color: var(--m-primary); }
.m-edit-textarea { min-height: 60px; resize: vertical; line-height: 1.6; }
.m-spec-msg {
    margin: -6px 0 9px 15px; padding: 4px 7px; border-radius: 3px;
    font-size: 12px; color: var(--m-primary); background: #e6f7ff;
    display: inline-block; align-self: flex-start;
}
.m-spec-msg--warn { color: #ad6800; background: #fffbe6; }
.m-radio-group { display: flex; gap: 20px; flex: 1; }
.m-radio { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.m-radio__dot {
    width: 18px; height: 18px; border-radius: 50%;
    border: 1px solid #d9d9d9; background: #fff; transition: all .2s;
}
.m-radio__dot.on { border-color: var(--m-primary); background: var(--m-primary); box-shadow: inset 0 0 0 3px #fff; }
.m-edit-buttons { display: flex; gap: 10px; margin-top: 20px; }
.m-edit-buttons .m-btn { flex: 1; }

/* ============================================================
   使用记录（wechat/pages/usage-log）
   ============================================================ */
.m-amount-summary { margin-bottom: 10px; padding: 9px 10px; background: #f6ffed; border-radius: 5px; }
.m-amount-summary__label { display: block; font-size: 12px; color: var(--m-ink-2); margin-bottom: 4px; }
.m-amount-summary__value { font-size: 16px; font-weight: 700; color: #389e0d; }
.m-form-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.m-form-row__label { font-size: 14px; color: var(--m-ink-2); width: 50px; flex-shrink: 0; }
.m-form-input {
    flex: 1; min-width: 0; border: 1px solid #e8e8e8; border-radius: 4px;
    padding: 7px 8px; font-size: 16px; color: var(--m-ink); outline: none;
}
.m-form-input:focus { border-color: var(--m-primary); }
.m-unit-cell { flex: 0 0 84px; }
.m-unit-select {
    width: 100%; border: 1px solid #e8e8e8; border-radius: 4px;
    padding: 7px 6px; font-size: 15px; color: var(--m-ink);
    background: #fafafa; outline: none;
}
.m-convert-hint {
    margin: -2px 0 8px 56px; padding: 4px 7px;
    font-size: 12px; color: var(--m-primary); background: #e6f7ff;
    border-radius: 3px; display: inline-block;
}
.m-log-item { padding: 8px 0; border-bottom: 1px solid var(--m-line); }
.m-log-item:last-child { border-bottom: none; }
.m-log-item__main { display: flex; justify-content: space-between; margin-bottom: 3px; }
.m-log-item__amount { font-size: 15px; font-weight: 600; color: var(--m-ink); }
.m-log-item__user { font-size: 13px; color: var(--m-primary); }
.m-log-item__sub { display: flex; justify-content: space-between; gap: 8px; }
.m-log-item__purpose { font-size: 13px; color: var(--m-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-log-item__time { font-size: 12px; color: var(--m-muted); white-space: nowrap; }
.m-log-item__actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 5px; }
.m-log-action { font-size: 12px; padding: 3px 9px; border-radius: 3px; border: 1px solid #e8e8e8; cursor: pointer; }
.m-log-action.edit { color: var(--m-primary); border-color: #b3d8ff; }
.m-log-action.delete { color: var(--m-danger); border-color: #ffa39e; }

/* ============================================================
   拍照识别（wechat/pages/photo-recognition）
   ============================================================ */
.location-hint-placeholder { display: none; }
.m-location-selector {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px; background: #f8f9fa;
    border: 1px solid #e0e0e0; border-radius: 6px; cursor: pointer;
}
.m-loc-text { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-loc-text.is-placeholder { color: var(--m-muted); }
.m-loc-arrow { width: 12px; height: 12px; margin-left: 10px; opacity: .5; }
.m-loc-hint { margin-top: 7px; font-size: 13px; color: var(--m-muted); text-align: center; }
.m-choice-btns { display: flex; gap: 10px; margin-bottom: 10px; }
.m-choice-btns .m-btn { flex: 1; height: 55px; border-radius: 8px; font-weight: 600; }
.m-hint-block { padding: 10px; background: #f8f9fa; border-radius: 6px; font-size: 14px; color: var(--m-ink-2); line-height: 1.8; text-align: center; margin-bottom: 8px; }
.m-photo-tip { padding: 10px; background: #fff7e6; border-radius: 6px; font-size: 14px; color: var(--m-warning); text-align: center; line-height: 1.8; }
.m-example { margin-top: 15px; padding: 10px; background: #f8f9fa; border-radius: 6px; }
.m-example__title { display: block; font-size: 13px; color: var(--m-ink-2); margin-bottom: 7px; }
.m-example__img { width: 100%; max-height: 200px; object-fit: contain; border-radius: 4px; }
.m-progress-section { padding: 20px 0; text-align: center; }
.m-progress-title { font-size: 15px; color: var(--m-ink); margin-bottom: 15px; }
.m-progress-text { font-size: 13px; color: var(--m-ink-2); margin-bottom: 10px; }
.m-pulse { font-size: 24px; animation: m-pulse 1.5s ease-in-out infinite; }
@keyframes m-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.1); } }
.m-bar { width: 100%; height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.m-bar__fill { height: 100%; background: var(--m-grad-purple); transition: width .3s; }
.m-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.m-results-title { font-size: 15px; font-weight: 600; }
.m-warning-msg { padding: 10px; margin-bottom: 10px; background: #fff7e6; border-radius: 6px; font-size: 13px; color: #ad6800; line-height: 1.6; }
.m-quantity-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; background: #f8f9fa; border-radius: 6px; margin: 8px 0; }
.m-quantity-label { font-size: 14px; font-weight: 600; }
.m-quantity-control { display: flex; align-items: center; gap: 7px; }
.m-qty-btn {
    width: 80px; height: 30px; border: 0; border-radius: 4px;
    background: #007AFF; color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
}
.m-qty-input { width: 50px; height: 30px; text-align: center; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 14px; }
.m-quantity-confirm {
    padding: 10px; margin-bottom: 8px; text-align: center;
    background: linear-gradient(135deg, #fff7e6 0%, #fffbe6 100%);
    border: 1px solid #ffd591; border-radius: 6px;
}
.m-confirm-text { display: block; font-size: 13px; font-weight: 600; color: var(--m-warning); margin-bottom: 7px; }
.m-supplement { margin: 10px 0 5px; padding: 10px; background: #f7faff; border: 1px solid #d6e8ff; border-radius: 6px; }
.m-supplement__missing { display: flex; flex-wrap: wrap; align-items: baseline; font-size: 13px; color: var(--m-warning); font-weight: 600; margin-bottom: 8px; }
.m-supplement__label { margin-right: 4px; }
.m-supplement__done { font-size: 13px; color: var(--m-success); margin-bottom: 8px; }
.m-supplement .m-btn { font-size: 14px; }
.m-supplement__hint { margin-top: 6px; font-size: 12px; color: var(--m-muted); line-height: 1.5; }
.m-btn-group { display: flex; gap: 10px; margin-top: 10px; }
.m-btn-group .m-btn { flex: 1; }
.m-saved-msg {
    display: flex; align-items: center; justify-content: center;
    padding: 8px; margin-top: 6px;
    background: linear-gradient(135deg, #d9f7be 0%, #f6ffed 100%);
    border: 1px solid #b7eb8f; border-radius: 6px;
    font-size: 13px; font-weight: 600; color: #389e0d;
}
.m-edit-hint { font-size: 12px; color: #FF9800; padding: 8px 10px; background: #FFF3E0; border-radius: 4px; margin-top: 8px; line-height: 1.6; }
.m-batch-stats { display: flex; gap: 10px; margin-bottom: 15px; }
.m-batch-stat { flex: 1; padding: 17px 10px; border-radius: 8px; text-align: center; color: #fff; }
.m-batch-stat.ok { background: linear-gradient(135deg, #52c41a 0%, #95de64 100%); }
.m-batch-stat.fail { background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%); }
.m-batch-stat__num { display: block; font-size: 28px; font-weight: 700; margin-bottom: 5px; }
.m-batch-stat__label { font-size: 14px; }
.m-failed-section { margin-top: 15px; }
.m-failed-item { background: #fff; border-radius: 8px; padding: 15px; margin-bottom: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.m-failed-item__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1px solid #f0f0f0; }
.m-failed-item__num { font-size: 15px; font-weight: 600; }
.m-failed-item__actions { display: flex; gap: 10px; }
.m-failed-item__img { width: 100%; height: 160px; object-fit: contain; background: #f8f9fa; border-radius: 6px; margin-bottom: 10px; }
.m-failed-item__info { background: #f8f9fa; padding: 12px; border-radius: 6px; }
.m-failed-item__info .m-info-label { width: 70px; }
.m-error-msg { margin-top: 8px; padding: 9px 10px; background: linear-gradient(135deg, #fff3e0 0%, #ffe7ba 100%); border-left: 2px solid #ff9800; border-radius: 4px; }
.m-error-text { font-size: 13px; color: #b45309; }
.m-merge-tip { font-size: 12px; color: var(--m-muted); margin-bottom: 8px; }
.m-merge-row { padding: 10px; margin-bottom: 8px; border: 1px solid #f0f0f0; border-radius: 6px; cursor: pointer; }
.m-merge-row.is-new { background: #f6ffed; border-color: #b7eb8f; }
.m-merge-row.is-conflict { background: #fffbe6; border-color: #ffe58f; }
.m-merge-row__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.m-merge-row__label { font-size: 14px; font-weight: 600; }
.m-merge-row__tag { font-size: 11px; color: #fff; padding: 1px 6px; border-radius: 10px; background: var(--m-success); }
.m-merge-row.is-conflict .m-merge-row__tag { background: #faad14; }
.m-merge-row__values { display: flex; align-items: center; font-size: 13px; }
.m-merge-old, .m-merge-new { flex: 1; word-break: break-all; }
.m-merge-arrow { padding: 0 8px; color: var(--m-muted); }
.m-merge-old.pick, .m-merge-new.pick { color: var(--m-ink); font-weight: 600; }
.m-merge-old.dim, .m-merge-new.dim { color: #bbb; text-decoration: line-through; }
.m-merge-row__choice { margin-top: 5px; font-size: 11px; color: var(--m-primary); }
.m-merge-db-note { padding: 8px 10px; background: #f0f5ff; border-radius: 6px; font-size: 12px; color: var(--m-primary); line-height: 1.5; }

/* ============================================================
   文本导入（wechat/pages/text-import）
   ============================================================ */
.m-card-title--flex { display: flex; justify-content: space-between; align-items: center; }
.m-char-count { font-size: 12px; color: var(--m-muted); font-weight: normal; }
.m-textarea-wrapper { margin-bottom: 12px; }
.m-import-textarea {
    width: 100%; min-height: 200px; padding: 12px;
    background: #f8f9fa; border: 0; border-radius: 6px;
    font-size: 14px; color: var(--m-ink); line-height: 1.8; resize: vertical;
}
.m-import-textarea:focus { outline: 2px solid rgba(24, 144, 255, .25); }
.m-action-buttons { display: flex; gap: 8px; }
.m-action-buttons .m-btn { flex: 1; }
.m-btn--default { background: #f5f5f5; color: var(--m-ink-2); border: 1px solid #e0e0e0; }
.m-btn--success { background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%); color: #fff; }

.m-result-summary { display: flex; gap: 10px; margin-bottom: 15px; }
.m-summary-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 15px 0; border-radius: 6px; }
.m-summary-item.success { background: #f6ffed; border: 1px solid #b7eb8f; }
.m-summary-item.fail { background: #fff1f0; border: 1px solid #ffa39e; }
.m-summary-item.total { background: #e6f7ff; border: 1px solid #91d5ff; }
.m-summary-value { font-size: 24px; font-weight: 700; margin-bottom: 5px; }
.m-summary-item.success .m-summary-value { color: #52c41a; }
.m-summary-item.fail .m-summary-value { color: #ff4d4f; }
.m-summary-item.total .m-summary-value { color: var(--m-primary); }
.m-summary-label { font-size: 12px; color: var(--m-ink-2); }

.m-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.m-list-title { font-size: 14px; font-weight: 600; color: var(--m-ink); }
.m-list-scroll { max-height: 200px; overflow-y: auto; }

.m-res-item { display: flex; align-items: flex-start; padding: 10px; background: #f8f9fa; border-radius: 4px; margin-bottom: 6px; }
.m-res-item:last-child { margin-bottom: 0; }
.m-res-item.success { background: #f6ffed; }
.m-res-item.fail { background: #fff1f0; }
.m-res-icon {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
    margin-right: 8px; flex-shrink: 0;
}
.m-res-item.success .m-res-icon { background: #52c41a; }
.m-res-item.fail .m-res-icon { background: #ff4d4f; }
.m-res-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-res-name { font-size: 14px; color: var(--m-ink); font-weight: 500; word-break: break-all; }
.m-res-detail { font-size: 12px; color: var(--m-ink-2); }
.m-res-detail.error { color: #ff4d4f; }

.m-help-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.m-help-card .m-card__title { color: #fff; }
.m-help-content { display: flex; flex-direction: column; gap: 12px; }
.m-help-item { display: flex; align-items: flex-start; gap: 10px; }
.m-help-number {
    width: 24px; height: 24px; background: rgba(255, 255, 255, .2); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.m-help-text { flex: 1; font-size: 13px; line-height: 1.8; opacity: .95; }

/* ============================================================
   表格导入（wechat/pages/excel-import）
   ============================================================ */
.m-page-header {
    text-align: center; padding: 20px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px; margin-bottom: 10px; color: #fff;
}
.m-header-icon {
    width: 60px; height: 60px; margin: 0 auto 10px;
    background: rgba(255, 255, 255, .2); border-radius: 30px;
    display: flex; align-items: center; justify-content: center;
}
.m-header-icon img { width: 40px; height: 40px; }
.m-page-header__title { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.m-page-header__desc { font-size: 14px; opacity: .9; }
.m-card-title--icon { display: flex; align-items: center; }
.m-title-icon { width: 18px; height: 18px; margin-right: 6px; }
.m-template-section { text-align: center; }
.m-template-desc { font-size: 14px; color: var(--m-ink-2); margin: 0 0 15px; line-height: 1.6; }
.m-template-hint { display: flex; align-items: center; justify-content: center; margin-top: 10px; padding: 10px; background: #fff3e0; border-radius: 4px; }
.m-hint-icon { font-size: 16px; margin-right: 5px; }
.m-template-hint > span:last-child { font-size: 13px; color: #ef6c00; }
.m-btn__icon { width: 16px; height: 16px; margin-right: 5px; }
.m-btn__icon-sm { width: 14px; height: 14px; margin-right: 4px; }

.m-upload-area {
    border: 1px dashed #ddd; border-radius: 6px; padding: 30px 10px;
    text-align: center; background: #fafafa; cursor: pointer;
}
.m-upload-area:active { background: #f0f0f0; }
.m-upload-icon { width: 60px; height: 60px; margin-bottom: 10px; opacity: .7; }
.m-upload-text { font-size: 15px; color: var(--m-ink); margin-bottom: 5px; }
.m-upload-hint { font-size: 12px; color: var(--m-muted); }
.m-file-selected { border: 1px solid #4caf50; border-radius: 6px; padding: 15px; background: #f1f8f4; }
.m-file-info { display: flex; align-items: center; margin-bottom: 10px; }
.m-file-icon { width: 30px; height: 30px; margin-right: 10px; flex-shrink: 0; }
.m-file-details { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.m-file-name { font-size: 14px; color: var(--m-ink); margin-bottom: 4px; word-break: break-all; }
.m-file-size { font-size: 12px; color: var(--m-ink-2); }
.m-import-button-section { text-align: center; margin-top: 10px; }
.m-import-button-section .m-btn { width: 100%; }
.m-import-button-section .m-btn:disabled { opacity: .6; }

.m-result-summary--icons { justify-content: space-around; }
.m-result-item { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 15px 5px; border-radius: 6px; margin: 0 5px; }
.m-result-item.success { background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); }
.m-result-item.fail { background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%); }
.m-result-item.total { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); }
.m-result-icon { font-size: 24px; margin-bottom: 5px; }
.m-result-content { display: flex; flex-direction: column; align-items: center; }
.m-result-label { font-size: 12px; color: var(--m-ink-2); margin-bottom: 4px; }
.m-result-value { font-size: 20px; font-weight: 600; color: var(--m-ink); }

.m-fail-details { margin-top: 15px; border-top: 1px solid #eee; padding-top: 10px; }
.m-fail-header { display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #fff3e0; border-radius: 4px; cursor: pointer; }
.m-fail-title { font-size: 14px; font-weight: 600; color: #ef6c00; }
.m-toggle-icon { width: 16px; height: 16px; transition: transform .3s; }
.m-toggle-icon.rotate { transform: rotate(180deg); }
.m-fail-archive-hint { display: flex; align-items: flex-start; margin-top: 8px; padding: 8px 10px; background: #e8f5e9; border-radius: 4px; }
.m-fail-archive-hint > span:last-child { flex: 1; font-size: 13px; color: #2e7d32; line-height: 1.5; }
.m-fail-list { margin-top: 10px; }
.m-fail-item { padding: 10px; background: #fafafa; border-radius: 4px; margin-bottom: 5px; }
.m-fail-row { display: flex; align-items: center; margin-bottom: 5px; }
.m-fail-label { font-size: 13px; font-weight: 600; color: var(--m-ink-2); }
.m-fail-message { font-size: 12px; color: var(--m-muted); line-height: 1.6; }
.m-button-group { display: flex; gap: 10px; margin-top: 15px; }
.m-button-group .m-btn { flex: 1; }

.m-records-empty { padding: 20px 0; text-align: center; font-size: 13px; color: var(--m-muted); }
.m-record-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.m-record-item:last-child { border-bottom: none; }
.m-record-main { flex: 1; display: flex; align-items: center; min-width: 0; cursor: pointer; }
.m-record-file-icon { width: 28px; height: 28px; margin-right: 10px; flex-shrink: 0; }
.m-record-body { flex: 1; min-width: 0; }
.m-record-name { font-size: 14px; color: var(--m-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-record-meta { margin-top: 3px; font-size: 11px; color: var(--m-muted); }
.m-record-stats { margin-top: 4px; display: flex; gap: 8px; }
.m-record-stat { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.m-record-stat.success { color: #52c41a; background: rgba(82, 196, 26, .1); }
.m-record-stat.fail { color: #e64340; background: rgba(230, 67, 64, .1); }
.m-record-view-icon { width: 16px; height: 16px; margin-left: 8px; flex-shrink: 0; transform: rotate(-90deg); opacity: .4; }
.m-record-delete { padding: 8px 4px 8px 12px; flex-shrink: 0; background: none; border: 0; cursor: pointer; }
.m-record-delete img { width: 16px; height: 16px; opacity: .5; }

.m-info-card { background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%); }
.m-steps { margin: 10px 0; }
.m-step-item { display: flex; align-items: flex-start; margin-bottom: 12px; }
.m-step-item:last-child { margin-bottom: 0; }
.m-step-number {
    width: 22px; height: 22px; line-height: 22px; text-align: center;
    background: #5c6bc0; color: #fff; border-radius: 50%;
    font-size: 12px; font-weight: 600; margin-right: 8px; flex-shrink: 0;
}
.m-step-text { flex: 1; font-size: 14px; color: var(--m-ink); line-height: 22px; }
.m-tips-section { margin-top: 15px; padding-top: 15px; border-top: 1px dashed rgba(92, 107, 192, .3); }
.m-tips-title { font-size: 14px; font-weight: 600; color: #ef6c00; margin-bottom: 8px; }
.m-tips-list { display: flex; flex-direction: column; }
.m-tip-item { font-size: 13px; color: #555; line-height: 1.8; margin-bottom: 4px; }

/* ============================================================
   我的（wechat/pages/profile）
   ============================================================ */
.m-user-card {
    display: flex; align-items: center; gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px; padding: 20px; margin-bottom: 15px; color: #fff;
}
.m-avatar-wrapper { position: relative; flex-shrink: 0; cursor: pointer; }
.m-user-avatar {
    width: 70px; height: 70px; border-radius: 50%; display: block;
    object-fit: cover; background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}
.m-avatar-hint {
    position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, .6); color: #fff; font-size: 10px;
    padding: 2px 6px; border-radius: 10px; white-space: nowrap;
}
.m-vip-badge {
    position: absolute; bottom: -2px; right: -2px;
    display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; font-size: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%; border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(255, 165, 0, .6);
}
.m-vip-badge img { width: 24px; height: 24px; }
.m-vip-badge.svip { background: linear-gradient(135deg, #c084fc 0%, #7c3aed 100%); box-shadow: 0 3px 8px rgba(124, 58, 237, .6); }
.m-vip-badge.business { background: linear-gradient(135deg, #60a5fa 0%, #1e40af 100%); box-shadow: 0 3px 8px rgba(30, 64, 175, .6); }
.m-user-info { flex: 1; min-width: 0; }
.m-user-name { font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.m-user-email { font-size: 12px; opacity: .8; margin-bottom: 7px; }
.m-user-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.m-badge { padding: 2px 6px; border-radius: 10px; font-size: 11px; }
.m-badge--primary { background: rgba(255, 255, 255, .3); color: #fff; }
.m-badge--vip { background: linear-gradient(135deg, #FFD700, #FFA500); color: #78350f; font-weight: 600; }
.m-badge--svip { background: linear-gradient(135deg, #c084fc, #7c3aed); color: #fff; font-weight: 600; }
.m-badge--business { background: linear-gradient(135deg, #60a5fa, #1e40af); color: #fff; font-weight: 600; }
.m-badge--default { background: rgba(255, 255, 255, .2); color: #fff; }
.m-inherited-tag {
    margin-top: 4px; display: inline-block; padding: 2px 6px;
    border-radius: 8px; background: rgba(255, 255, 255, .25);
    font-size: 10px; line-height: 1.4;
}
.m-card--tappable { cursor: pointer; }
.m-card--tappable:active { opacity: .85; }
.m-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-card__header .m-card__title { margin-bottom: 0; flex: 1; }
.m-card__hint { font-size: 12px; color: var(--m-primary); flex-shrink: 0; }
/* 标题行里的提示在 320px 窄屏放不下时自己折行，而不是把整行顶出卡片（EN「Instant activation after payment」） */
.m-card__header .m-card__hint { flex-shrink: 1; min-width: 0; text-align: right; }
.m-points-summary { display: flex; align-items: center; justify-content: space-around; padding: 5px 0; }
.m-points-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.m-points-item__value { font-size: 20px; font-weight: 700; color: var(--m-primary); line-height: 1.2; }
.m-points-item__label { font-size: 12px; color: #888; margin-top: 3px; }
.m-points-shared-hint { font-size: 10px; color: #faad14; margin-top: 2px; text-align: center; line-height: 1.3; }
.m-points-divider { width: 1px; height: 30px; background: #e8e8e8; }
.m-storage-bar { width: 100%; height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; margin-bottom: 7px; }
.m-storage-used { height: 100%; background: linear-gradient(90deg, #1890ff 0%, #36cfc9 100%); border-radius: 3px; transition: width .3s; }
.m-storage-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--m-ink); margin-bottom: 7px; }
.m-storage-desc { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.m-upgrade-link {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: #fff; font-size: 12px; font-weight: 600;
    padding: 4px 8px; border-radius: 10px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, .3);
    cursor: pointer; animation: m-pulse-soft 2s ease-in-out infinite;
}
@keyframes m-pulse-soft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.m-compress-btn {
    display: inline-flex; align-items: center; gap: 1.5px;
    padding: 4px 7px; line-height: 1.4;
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
    color: #fff; font-size: 12px; font-weight: bold;
    border: 0; border-radius: 14px;
    box-shadow: 0 1px 4px rgba(82, 196, 26, .25);
    white-space: nowrap; cursor: pointer;
}
.m-menu-list { display: flex; flex-direction: column; }
.m-menu-item { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.m-menu-item:last-child { border-bottom: none; }
.m-menu-item:active { background: #fafafa; }
.m-menu-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.m-menu-icon { width: 20px; height: 20px; }
.m-menu-emoji { font-size: 16px; line-height: 1.2; }
.m-menu-text { font-size: 15px; color: var(--m-ink); }
.m-menu-right { display: flex; align-items: center; gap: 7px; }
.m-menu-value { font-size: 13px; color: var(--m-ink-2); }
.m-menu-arrow { width: 12px; height: 12px; }
.m-logout-btn { margin-top: 20px; margin-bottom: 20px; }

/* ============================================================
   消息通知（wechat/pages/notifications）
   ============================================================ */
.m-notif-status { text-align: center; padding: 40px 0; color: var(--m-muted); font-size: 14px; }
.m-notif-item {
    display: flex; align-items: flex-start; gap: 8px;
    background: #fff; border-radius: 6px; padding: 12px; margin-bottom: 6px;
    cursor: pointer;
}
.m-notif-item.read { opacity: .6; }
.m-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m-danger); flex-shrink: 0; margin-top: 5px; }
.m-notif-body { flex: 1; min-width: 0; }
.m-notif-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.m-notif-title { font-size: 15px; font-weight: 600; color: var(--m-ink); flex: 1; min-width: 0; }
.m-notif-type { font-size: 11px; padding: 1px 6px; border-radius: 10px; flex-shrink: 0; }
.m-notif-type.system { background: #e6f7ff; color: var(--m-primary); }
.m-notif-type.expiry { background: #fff7e6; color: var(--m-warning); }
.m-notif-content { display: block; font-size: 13px; color: var(--m-ink-2); margin-bottom: 4px; word-break: break-word; }
.m-notif-time { font-size: 12px; color: var(--m-muted); }

/* ============================================================
   使用记录（wechat/pages/all-usage-logs · 化学品标签）
   ============================================================ */
.m-ul-search { margin-bottom: 8px; }
.m-ul-search-box {
    display: flex; align-items: center; height: 35px;
    background: #fff; border-radius: 18px; padding: 0 15px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
}
.m-ul-search-icon { width: 16px; height: 16px; margin-right: 8px; flex-shrink: 0; }
.m-ul-search-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 14px; color: var(--m-ink); }
.m-ul-search-input:focus { outline: none; }
.m-ul-search-clear { width: 16px; height: 16px; padding: 5px; flex-shrink: 0; opacity: .6; }
.m-ul-sort { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #fff; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.m-ul-sort-label { font-size: 13px; color: var(--m-muted); }
.m-ul-sort-btn { font-size: 13px; color: var(--m-ink-2); padding: 3px 8px; border-radius: 10px; border: 1px solid #e8e8e8; cursor: pointer; }
.m-ul-sort-btn.active { background: var(--m-primary); color: #fff; border-color: var(--m-primary); }
.m-ul-sort-dir { font-size: 14px; color: var(--m-primary); padding: 2px 6px; cursor: pointer; }
.m-ul-export { margin-left: auto; font-size: 12px; color: #52c41a; padding: 4px 8px; border: 1px solid #52c41a; border-radius: 10px; background: rgba(82, 196, 26, .05); cursor: pointer; }
.m-ul-multi { font-size: 12px; color: var(--m-primary); padding: 4px 8px; border: 1px solid var(--m-primary); border-radius: 10px; background: rgba(24, 144, 255, .05); cursor: pointer; }
.m-ul-status { text-align: center; padding: 40px 0; color: var(--m-muted); font-size: 14px; }
.m-ul-item { background: #fff; border-radius: 6px; padding: 10px 12px; margin-bottom: 6px; }
.m-ul-item.is-multi { display: flex; align-items: center; gap: 10px; }
.m-ul-item.is-selected { background: #e6f7ff; border: 1px solid var(--m-primary); }
.m-ul-item.is-orphan { background: #fafafa; }
.m-ul-item.is-orphan .m-ul-name { color: #8c8c8c; text-decoration: line-through; }
.m-ul-item.is-disabled { opacity: .55; }
.m-ul-check {
    flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid #d9d9d9; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff; box-sizing: border-box;
}
.m-ul-check.checked { background: var(--m-primary); border-color: var(--m-primary); }
.m-ul-check.disabled { background: #f5f5f5; border-color: #e8e8e8; opacity: .5; }
.m-ul-body { flex: 1; min-width: 0; }
.m-ul-main { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 5px; }
.m-ul-name { font-size: 15px; font-weight: 600; color: var(--m-ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-ul-deleted { flex-shrink: 0; font-size: 10px; color: #fff; background: #8c8c8c; padding: 1px 6px; border-radius: 999px; line-height: 1.4; }
.m-ul-amount { font-size: 15px; color: var(--m-primary); font-weight: 600; flex-shrink: 0; }
.m-ul-sub { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.m-ul-user { font-size: 12px; color: #52c41a; }
.m-ul-user.is-self { color: var(--m-primary); font-weight: 600; }
.m-ul-purpose { font-size: 12px; color: var(--m-ink-2); flex: 1; min-width: 0; word-break: break-all; }
.m-ul-time { font-size: 12px; color: var(--m-muted); }
.m-ul-more { padding: 8px 0; display: flex; justify-content: center; }
.m-ul-more-btn {
    background: #fff; color: var(--m-primary); font-size: 13px;
    border: 1px solid var(--m-primary); border-radius: 16px;
    padding: 0 30px; height: 32px; line-height: 30px; cursor: pointer;
}
.m-ul-end { text-align: center; padding: 12px 0; color: #bbb; font-size: 12px; }
.m-ul-actions {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #fff; padding: 10px 15px calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 6px rgba(0, 0, 0, .1);
    display: flex; flex-direction: column; gap: 7px;
}
body.m-ul-actions-open { padding-bottom: 130px; }
.m-ul-actions-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.m-ul-actions-row .m-btn--block { flex: 1; }
.m-ul-selected { font-size: 13px; color: var(--m-ink); font-weight: 600; }
.m-ul-actions-btns { display: flex; gap: 15px; align-items: center; flex-shrink: 0; }
.m-ul-text-btn { background: none; border: 0; font-size: 13px; color: var(--m-primary); padding: 2px 6px; cursor: pointer; }
.m-ul-text-btn.muted { color: var(--m-ink-2); }

/* ============================================================
   问题反馈（wechat/pages/feedback）
   ============================================================ */
.m-fb-subtitle { font-size: 16px; font-weight: 600; color: var(--m-ink); margin-bottom: 10px; }
.m-fb-input {
    width: 100%; box-sizing: border-box; min-height: 80px; padding: 10px;
    background: #f7f8fa; border: 0; border-radius: 6px;
    font-size: 14px; color: var(--m-ink); line-height: 1.6; resize: vertical;
}
.m-fb-input:focus { outline: 2px solid rgba(24, 144, 255, .25); }
.m-fb-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.m-fb-thumb-wrap { position: relative; width: 75px; height: 75px; display: inline-block; }
.m-fb-thumb { width: 75px; height: 75px; border-radius: 6px; object-fit: cover; background: #f0f0f0; display: block; cursor: pointer; }
.m-fb-thumb-remove {
    position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; line-height: 18px;
    text-align: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; border-radius: 50%;
    cursor: pointer;
}
.m-fb-add {
    width: 75px; height: 75px; border: 1px dashed #d9d9d9; border-radius: 6px;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fafafa; cursor: pointer;
}
.m-fb-add-icon { font-size: 28px; color: #bbb; line-height: 1; }
.m-fb-add-text { margin-top: 4px; font-size: 11px; color: #bbb; }
.m-fb-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.m-fb-count { font-size: 12px; color: var(--m-muted); }
.m-fb-submit { padding: 0 20px; height: 34px; font-size: 14px; color: #fff; background: var(--m-primary); border: 0; border-radius: 17px; cursor: pointer; }
.m-fb-submit:disabled { background: #a0cfff; }
.m-fb-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.m-fb-item:last-child { border-bottom: none; }
.m-fb-item-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.m-fb-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.m-fb-status.pending { color: #fa8c16; background: #fff7e6; border: 1px solid #ffd591; }
.m-fb-status.replied { color: #52c41a; background: #f6ffed; border: 1px solid #b7eb8f; }
.m-fb-time { font-size: 12px; color: var(--m-muted); }
.m-fb-content { font-size: 14px; color: var(--m-ink); line-height: 1.6; word-break: break-all; white-space: pre-wrap; }
.m-fb-images-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.m-fb-thumb-small { width: 60px; height: 60px; border-radius: 4px; object-fit: cover; background: #f0f0f0; cursor: pointer; }
.m-fb-reply { margin-top: 8px; padding: 10px; background: #f0f7ff; border-radius: 6px; }
.m-fb-reply-label { font-size: 13px; color: var(--m-primary); font-weight: 600; margin-bottom: 4px; }
.m-fb-reply-content { font-size: 13px; color: var(--m-ink); line-height: 1.6; word-break: break-all; white-space: pre-wrap; }
.m-fb-reply-time { margin-top: 4px; font-size: 11px; color: var(--m-muted); text-align: right; }
.m-fb-contact { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.m-fb-contact:last-child { border-bottom: none; }
.m-fb-contact__label { font-size: 14px; color: var(--m-ink); font-weight: 500; width: 70px; flex-shrink: 0; }
.m-fb-contact__value { font-size: 14px; color: var(--m-ink-2); flex: 1; }
.m-fb-para { font-size: 14px; color: var(--m-ink-2); line-height: 1.6; margin: 0 0 5px; }
.m-fb-group-hint { margin-top: 10px; padding: 10px; background: #fff7e6; border-radius: 4px; font-size: 13px; color: #fa8c16; text-align: center; border: 1px solid #ffd591; }
.m-fb-qr-wrap { display: flex; flex-direction: column; align-items: center; padding: 10px; }
.m-fb-qr { width: 200px; height: auto; border-radius: 6px; box-shadow: 0 2px 10px rgba(0, 0, 0, .1); cursor: pointer; }
.m-fb-save-tip { margin-top: 8px; font-size: 12px; color: var(--m-muted); }
.m-fb-bullet { font-size: 13px; color: var(--m-ink-2); line-height: 1.6; padding: 6px 0 6px 20px; position: relative; }
.m-fb-bullet::before { content: ''; position: absolute; left: 5px; top: 13px; width: 4px; height: 4px; background: var(--m-primary); border-radius: 50%; }

/* ============================================================
   统计面板（wechat/pages/statistics）
   ============================================================ */
.m-st-tabs {
    display: flex; background: #fff; border-bottom: 1px solid #f0f0f0;
    position: sticky; top: var(--m-appbar-h, 44px); z-index: 10;
    margin: -10px -10px 10px;
}
.m-st-tab {
    flex: 1; display: flex; justify-content: center; align-items: center; gap: 3px;
    padding: 13px 0; font-size: 12px; color: var(--m-ink-2); white-space: nowrap;
    position: relative; cursor: pointer;
}
.m-st-tab.active { color: var(--m-primary); font-weight: 600; }
.m-st-tab.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 30px; height: 2px; background: var(--m-primary); border-radius: 1px;
}
.m-st-badge { background: var(--m-danger); color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 999px; line-height: 1.4; }
.m-st-status { text-align: center; padding: 40px 0; color: var(--m-muted); font-size: 14px; }
.m-st-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.m-st-card-title { font-size: 15px; font-weight: 600; color: var(--m-ink); }
.m-st-head-right { display: flex; align-items: center; gap: 8px; }
.m-st-subtle { font-size: 12px; color: var(--m-muted); }
.m-st-export {
    font-size: 12px; color: #fff; background: var(--m-primary);
    padding: 4px 11px; border-radius: 999px; line-height: 1.4; font-weight: 500;
    cursor: pointer; white-space: nowrap;
}
.m-st-metrics { display: flex; flex-wrap: wrap; }
.m-st-metric {
    width: 25%; box-sizing: border-box; padding: 8px 4px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.m-st-metric[data-goto] { cursor: pointer; }
.m-st-metric-value { font-size: 20px; font-weight: 700; color: var(--m-ink); line-height: 1.2; }
.m-st-metric-label { font-size: 11px; color: #8c8c8c; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; justify-content: center; text-align: center; }
.m-st-metric.warn .m-st-metric-value { color: #fa8c16; }
.m-st-metric.danger .m-st-metric-value { color: var(--m-danger); }
.m-st-dist { display: flex; flex-direction: column; gap: 9px; }
.m-st-dist-row { display: flex; flex-direction: column; gap: 4px; }
.m-st-dist-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.m-st-dist-name { color: var(--m-ink); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.m-st-dist-count { color: #595959; font-weight: 600; white-space: nowrap; }
.m-st-dist-bar { width: 100%; height: 6px; background: #f0f0f0; border-radius: 3px; overflow: hidden; }
.m-st-dist-fill { height: 100%; background: linear-gradient(90deg, #69b1ff 0%, #1890ff 100%); border-radius: 3px; transition: width .4s ease; }
.m-st-search { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.m-st-search .m-ul-search-box { flex: 1; }
.m-st-multi {
    flex-shrink: 0; height: 35px; padding: 0 12px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--m-primary); font-weight: 500;
    background: #fff; border: 1px solid var(--m-primary); border-radius: 18px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06); white-space: nowrap; cursor: pointer;
}
.m-st-multi.active { background: var(--m-primary); color: #fff; }
.m-st-list-header { padding: 12px 5px; font-size: 12px; color: #8c8c8c; }
.m-st-list { display: flex; flex-direction: column; gap: 8px; }
.m-st-item { background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 4px rgba(0, 0, 0, .04); cursor: pointer; }
.m-st-item.is-multi { display: flex; align-items: center; gap: 8px; }
.m-st-item.is-multi .m-st-item-body { flex: 1; min-width: 0; }
.m-st-item.is-selected { background: #e6f7ff; border: 1px solid var(--m-primary); box-shadow: 0 2px 10px rgba(24, 144, 255, .25); }
.m-st-item.is-archived-card { background: #fafafa; opacity: .92; }
.m-st-item-body { display: flex; flex-direction: column; gap: 4px; }
.m-st-name-row { display: flex; align-items: center; gap: 6px; }
.m-st-name { font-size: 15px; font-weight: 600; color: var(--m-ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-st-name.is-danger { color: var(--m-danger); }
.m-st-name.is-muted { color: #8c8c8c; text-decoration: line-through; }
.m-st-tail { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.m-st-amount { font-size: 12px; color: #389e0d; font-weight: 600; white-space: nowrap; }
.m-st-amount.is-low { color: var(--m-danger); }
.m-st-hazard { color: #ff0000; font-size: 13px; font-weight: bold; }
.m-st-tag { flex-shrink: 0; color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 999px; line-height: 1.4; font-weight: 500; }
.m-st-tag.is-warn { background: #fa8c16; }
.m-st-tag.is-danger { background: var(--m-danger); }
.m-st-tag.is-muted { background: #8c8c8c; }
.m-st-row { display: flex; align-items: center; gap: 4px; font-size: 12px; min-width: 0; }
.m-st-row.is-between { justify-content: space-between; }
.m-st-label { color: #8c8c8c; flex-shrink: 0; }
.m-st-value { color: #595959; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-st-value.is-warning { color: #fa8c16; }
.m-st-value.is-danger { color: var(--m-danger); }
.m-st-cas, .m-st-time { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.m-st-time { flex-shrink: 0; }
.m-st-empty { padding: 40px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.m-st-empty::before {
    content: ''; width: 100px; height: 100px;
    background: url('/static/images/m/empty-data.png') center/contain no-repeat;
    opacity: .8;
}
.m-st-empty-text { color: #8c8c8c; font-size: 13px; }

/* ============================================================
   群组管理（wechat/pages/groups）
   ============================================================ */
.m-g-tabs { display: flex; background: #fff; border-radius: 6px; padding: 4px; margin-bottom: 15px; }
.m-g-tab { flex: 1; text-align: center; padding: 10px 0; border-radius: 4px; font-size: 14px; color: var(--m-ink-2); cursor: pointer; }
.m-g-tab.active { background: var(--m-primary); color: #fff; font-weight: 600; }
.m-g-status { text-align: center; padding: 40px 0; color: var(--m-muted); font-size: 14px; }
.m-g-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 0; }
.m-g-empty-icon { width: 90px; height: 90px; opacity: .8; }
.m-g-empty-text { font-size: 14px; color: var(--m-muted); }
.m-g-list { display: flex; flex-direction: column; gap: 10px; }
.m-g-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 10px; border: 1px solid rgba(102, 126, 234, .1);
    box-shadow: 0 2px 10px rgba(102, 126, 234, .12); overflow: hidden;
}
.m-g-head { padding: 15px; cursor: pointer; }
.m-g-name-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.m-g-name { font-size: 17px; font-weight: 700; color: var(--m-ink); flex: 1; min-width: 0; word-break: break-all; }
.m-g-expand { font-size: 14px; color: #667eea; margin-left: 10px; flex-shrink: 0; }
.m-g-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.m-g-stat {
    display: flex; align-items: center; gap: 3px;
    background: rgba(255, 255, 255, .8); padding: 4px 8px; border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, .15);
    font-size: 12px; color: var(--m-ink-2); font-weight: 500;
}
.m-g-detail { padding: 10px 15px 15px; border-top: 1px solid rgba(102, 126, 234, .1); }
.m-g-section { margin-bottom: 15px; }
.m-g-section:last-child { margin-bottom: 0; }
.m-g-section-title { font-size: 14px; font-weight: 700; color: var(--m-ink); margin-bottom: 10px; }
.m-g-invite { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border-radius: 8px; padding: 12px; border-left: 3px solid #3b82f6; }
.m-g-invite-card { background: #fff; border-radius: 6px; padding: 10px; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); }
.m-g-invite-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f0f0f0; }
.m-g-invite-row:last-of-type { border-bottom: none; }
.m-g-invite-label { font-size: 13px; color: var(--m-ink-2); font-weight: 500; }
.m-g-invite-value { font-size: 14px; color: #1e40af; font-weight: 700; font-family: 'Courier New', monospace; letter-spacing: 1px; }
.m-g-copy-btn {
    width: 100%; margin-top: 5px; border: 0; border-radius: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff; font-size: 13px; font-weight: 600; padding: 10px; cursor: pointer;
}
.m-g-admin-actions { display: flex; flex-direction: column; gap: 6px; }
.m-g-admin-btn {
    width: 100%; text-align: left; border: 0; border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; font-size: 13px; font-weight: 600; padding: 10px; cursor: pointer;
}
.m-g-admin-btn.is-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.m-g-admin-hint { font-size: 11px; color: #64748b; text-align: right; margin-top: 6px; }
.m-g-info-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 7px 10px; background: rgba(248, 249, 255, .6); border-radius: 6px; margin-bottom: 6px; }
.m-g-info-row:last-child { margin-bottom: 0; }
.m-g-info-label { font-size: 13px; color: var(--m-muted); min-width: 75px; }
.m-g-info-value { font-size: 13px; color: var(--m-ink); font-weight: 500; word-break: break-all; text-align: right; flex: 1; }
.m-g-members { display: flex; flex-direction: column; gap: 6px; }
.m-g-member { display: flex; align-items: center; gap: 8px; padding: 10px; background: rgba(248, 249, 255, .6); border-radius: 6px; border: 1px solid rgba(102, 126, 234, .08); }
.m-g-avatar {
    width: 35px; height: 35px; flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
}
.m-g-member-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.m-g-member-name { font-size: 13px; color: var(--m-ink); font-weight: 500; word-break: break-all; }
.m-g-member-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.m-g-tag { font-size: 10px; padding: 3px 6px; border-radius: 5px; font-weight: 600; }
.m-g-tag.is-you { color: #10b981; background: rgba(16, 185, 129, .1); }
.m-g-tag.is-owner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; }
.m-g-tag.is-admin { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #fff; }
.m-g-member-actions { display: flex; gap: 6px; flex-shrink: 0; }
.m-g-mini-btn { border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff; padding: 6px 8px; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.m-g-mini-btn.is-blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.m-g-mini-btn.is-orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.m-g-mini-btn.is-red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.m-g-desc { font-size: 13px; color: var(--m-muted); margin: 0 0 15px; line-height: 1.6; }
.m-g-field { position: relative; margin-bottom: 15px; }
.m-g-label { display: block; font-size: 13px; color: var(--m-ink-2); margin-bottom: 6px; font-weight: 500; }
.m-g-input {
    width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px;
    border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; color: var(--m-ink); background: #fff;
}
.m-g-input:focus { outline: none; border-color: var(--m-primary); }
.m-g-input:disabled { background: #f5f5f5; color: var(--m-muted); }
.m-g-textarea { height: auto; min-height: 64px; padding: 8px 12px; resize: vertical; }
.m-g-hint { display: block; font-size: 11px; color: var(--m-muted); margin-top: 4px; padding-left: 4px; }
.m-g-btn-row { display: flex; gap: 10px; margin-top: 15px; }
.m-g-btn-row .m-btn { flex: 1; }
.m-g-create-btn { margin-top: 10px; }
.m-g-notice { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border-radius: 8px; padding: 15px; margin-top: 15px; border-left: 3px solid #2563eb; }
.m-g-notice-title { font-size: 14px; font-weight: 700; color: #1e40af; margin-bottom: 8px; }
.m-g-notice-list { display: flex; flex-direction: column; gap: 4px; }
.m-g-notice-item { font-size: 12px; color: #1e3a8a; line-height: 1.6; }
.m-g-suggest {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 999;
    background: #fff; border: 1px solid #e0e0e0; border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .1); max-height: 180px; overflow-y: auto;
}
.m-g-suggest-item { display: flex; align-items: center; padding: 10px 14px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.m-g-suggest-item:last-child { border-bottom: none; }
.m-g-suggest-item:active { background: #f5f5f5; }
.m-g-suggest-icon { margin-right: 8px; font-size: 15px; }
.m-g-suggest-text { flex: 1; font-size: 14px; color: var(--m-ink); }
.m-g-suggest-extra { font-size: 12px; color: var(--m-muted); margin-left: 8px; flex-shrink: 0; }
.m-g-modal-group { margin-bottom: 12px; }
.m-g-modal-label { display: block; font-size: 14px; color: var(--m-ink); margin-bottom: 6px; font-weight: 600; }
.m-g-required { color: #ef4444; margin-left: 2px; }
.m-g-transfer-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.m-g-transfer-item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.m-g-transfer-item:last-child { border-bottom: none; }
.m-g-transfer-item:active { background: #f5f5f5; }
.m-g-transfer-name { font-size: 14px; color: var(--m-ink); }
.m-g-created-tip { font-size: 12px; color: var(--m-muted); margin: 6px 0 0; }

/* ============================================================
   布局修复（2026-11-02）：首页概览三格居中 + Tabbar 加大
   ============================================================ */
/* 首页「数据统计」三格：整列居中，标签固定两行槽位（1/2 行都不跑偏） */
.m-stats__item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.m-stats__label {
    font-size: 12px; line-height: 1.25; text-align: center;
    min-height: 2.5em; display: flex; align-items: center; justify-content: center;
    padding: 0 2px;
}
/* 底部导航：图标 30px、文字 12px、整体加高到 58px（点击区域更大） */
:root { --m-tabbar-h: 58px; }
.m-tabbar__item { font-size: 12px; gap: 3px; }
.m-tabbar__item img { width: 30px; height: 30px; }

/* ============================================================
   SPA 换页（router.js，2026-11-02）：顶部进度条 + 新页淡入 + 跨文档过渡
   ============================================================ */
.m-progress {
    position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; height: 2px; z-index: 200;
    opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.m-progress.show { opacity: 1; }
.m-progress__bar {
    height: 100%; width: 0; background: var(--m-primary, #1890ff);
    transition: width .25s ease;
}
@media (min-width: 620px) { .m-progress { max-width: 560px; margin: 0 auto; } }
.m-main.m-enter { animation: mMainIn .18s ease; }
@keyframes mMainIn { from { opacity: .35; } to { opacity: 1; } }
/* Chromium 跨文档视图过渡：登录/登出等整页跳转也平滑（Safari 忽略，无副作用） */
@view-transition { navigation: auto; }

/* ============================================================
   会员升级 / 订单与发票页（2026-11-03，账户与订单）
   ============================================================ */
.m-desc { font-size: 12px; color: var(--m-muted); line-height: 1.5; margin: 6px 0; }
.m-mt10 { margin-top: 10px; }
.m-user-id { font-size: 11px; color: var(--m-muted); opacity: .75; }
.m-user-info .m-user-email { max-width: 62vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 会员状态卡 */
.m-vip-card { border-radius: 12px; padding: 16px 16px 14px; margin: 12px 0; color: #fff;
    background: linear-gradient(135deg, #f6b73c, #e88a1a); }
.m-vip-card.svip { background: linear-gradient(135deg, #8b6cf0, #6a3fe0); }
.m-vip-card.business { background: linear-gradient(135deg, #2f6fd8, #1e4fb2); }
.m-vip-card__line { display: flex; align-items: center; gap: 6px; }
.m-vip-card__tier { font-size: 16px; font-weight: 700; }
.m-vip-card__text { font-size: 12px; opacity: .92; margin-top: 4px; }
.m-vip-card .m-inherited-tag { background: rgba(255,255,255,.18); color: #fff; margin-top: 6px; }

/* 套餐卡（三列；对照小程序 upgrade 卡片：名称/价格/原价/月数/按钮，权益明细由下方对比表承担）。
   minmax(0,1fr) + min-width:0 是必须的：1fr 默认下限是内容最小宽度，EN「$149.99」「Business」
   曾把三列整体撑到 ~500px 顶出手机屏。价格字号随视口缩，保证最长的 $149.99 在 320px 也放得下。 */
.m-plan-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.m-plan-item { border: 1px solid #eee; border-radius: 10px; padding: 12px 4px 10px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fafbfc; min-width: 0; }
.m-plan--vip { border-color: #f6d38a; background: #fffaf0; }
.m-plan--svip { border-color: #cdbcf7; background: #f8f5ff; }
.m-plan--business { border-color: #b9cff2; background: #f4f8ff; }
.m-plan-item__name { font-size: 12px; font-weight: 600; line-height: 1.3; }   /* 窄屏允许 Business 换行 */
.m-plan-item__price { font-size: clamp(16px, 5vw, 22px); font-weight: 800; color: var(--m-primary);
    line-height: 1.15; white-space: nowrap; }
.m-plan-item__price .sym { font-size: 11px; font-weight: 600; margin-right: 1px; }
.m-plan-item__origin { font-size: 10px; color: var(--m-muted); text-decoration: line-through; }
.m-plan-item__months { font-size: 10px; color: var(--m-muted); }
.m-plan-item__btn { margin-top: 8px; width: 100%; border: none; border-radius: 6px; padding: 7px 0;
    font-size: 12px; color: #fff; background: var(--m-primary); }
.m-plan-item__btn:active { opacity: .85; }
.m-buy-opts { margin-top: 10px; font-size: 12px; }
.m-buy-check { display: flex; align-items: center; gap: 5px; color: var(--m-text); }
.m-buy-check__box { color: var(--m-primary); font-size: 14px; }
.m-buy-notes { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--m-muted); }
.m-buy-orders-row { margin-top: 10px; text-align: right; }
.m-buy-orders { color: var(--m-primary); font-size: 12px; }

/* 权益对比表 */
.m-cmp { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr 1fr; gap: 1px; background: #eef0f3;
    border-radius: 8px; overflow: hidden; font-size: 11px; text-align: center; margin-top: 8px; }
.m-cmp > div { background: #fff; padding: 8px 2px; display: flex; align-items: center; justify-content: center; }
.m-cmp .lbl { justify-content: flex-start; padding-left: 8px; color: var(--m-muted); }
.m-cmp .hd { font-weight: 700; background: #f8f9fa; }
.m-cmp .hl { color: var(--m-primary); font-weight: 600; }

/* 表单 */
.m-form-row { margin: 10px 0 6px; }
.m-form-row label { display: block; font-size: 12px; color: var(--m-muted); margin-bottom: 4px; }
.m-input { width: 100%; box-sizing: border-box; border: 1px solid #e2e6ea; border-radius: 8px;
    padding: 10px 12px; font-size: 14px; background: #fff; color: var(--m-text); }
.m-input:focus { border-color: var(--m-primary); outline: none; }

/* 订单卡 */
.m-order-list { margin-top: 4px; }
.m-order-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.m-order-card__plan { font-size: 14px; font-weight: 600; }
.m-order-card__amount { font-size: 15px; font-weight: 700; color: var(--m-primary); }
.m-order-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; }
.m-order-row .lbl { color: var(--m-muted); white-space: nowrap; }
.m-order-row .val { text-align: right; word-break: break-all; }
.m-copy-tag { color: var(--m-primary); margin-left: 6px; font-size: 11px; }
.m-invoice-block { border-top: 1px dashed #eee; margin-top: 10px; padding-top: 8px; font-size: 12px; }
.m-invoice-status { font-weight: 600; }
.m-invoice-status.issued { color: #16a34a; }
.m-invoice-status.pending { color: #d97706; }
.m-invoice-status.rejected { color: #dc2626; }
.m-invoice-detail { color: var(--m-muted); margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.m-invoice-btn { margin-top: 8px; width: 100%; border: 1px solid var(--m-primary); color: var(--m-primary);
    background: #fff; border-radius: 8px; padding: 8px 0; font-size: 13px; }
.m-invoice-btn:active { background: #f0f7ff; }

/* 发票弹层类型切换 */
.m-inv-type { display: flex; gap: 8px; margin: 10px 0 2px; }
.m-inv-type > span { flex: 1; text-align: center; padding: 8px 0; border: 1px solid #e2e6ea;
    border-radius: 8px; font-size: 13px; color: var(--m-muted); }
.m-inv-type > span.active { border-color: var(--m-primary); color: var(--m-primary); background: #f0f7ff; font-weight: 600; }

/* ============================================================
   手册 / 协议 / 隐私 / 退款（2026-11-03，P2）：文档排版
   ============================================================ */
.m-doc { font-size: 13px; line-height: 1.8; color: #333; padding-bottom: 8px; }
.m-doc .agreement-title, .m-doc .policy-title { font-size: 17px; line-height: 1.5; margin: 6px 0 8px; font-weight: 700; }
.m-doc .agreement-date, .m-doc .policy-date { font-size: 12px; color: var(--m-muted); margin-bottom: 14px; }
.m-doc p { margin: 0 0 10px; }
.m-doc .agreement-text, .m-doc .policy-text { margin: 0 0 10px; }
.m-doc .agreement-intro, .m-doc .policy-important { background: #f6f8fa; border-radius: 8px; padding: 10px 12px; }
.m-doc .agreement-section, .m-doc .policy-section { margin-bottom: 14px; }
.m-doc .agreement-section-title, .m-doc .policy-section-title { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.m-doc .policy-subsection-title { display: block; font-weight: 600; margin: 8px 0 4px; }
.m-doc .agreement-contact { background: #f8f9fa; border-radius: 8px; padding: 12px; margin: 14px 0; }
.m-doc .agreement-footer, .m-doc .policy-footer { border-top: 1px solid #eee; margin-top: 16px; padding-top: 10px; color: var(--m-muted); font-size: 12px; }
.m-doc ul { margin: 0 0 12px; padding-left: 20px; }
.m-doc li { margin-bottom: 6px; }
.m-doc strong { font-weight: 700; }

/* 使用手册 */
.m-manual-hero { background: linear-gradient(135deg, #1890ff, #096dd9); color: #fff; border-radius: 12px; padding: 18px 16px; margin: 10px 0 16px; }
.m-manual-hero__kicker { font-size: 12px; opacity: .85; }
.m-manual-hero__title { font-size: 20px; font-weight: 800; margin-top: 4px; }
.m-manual-hero__sub { font-size: 12px; opacity: .92; margin-top: 6px; line-height: 1.6; }
.m-manual-section { margin-bottom: 16px; }
.m-manual-section h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.m-manual-section ul { list-style: none; padding-left: 0; margin: 0; }
.m-manual-section li { position: relative; padding-left: 16px; margin-bottom: 8px; }
.m-manual-section li:before { content: '·'; position: absolute; left: 4px; color: var(--m-primary); font-weight: 700; }

/* 推广返利页（2026-11-03，P3） */
.m-promo-hero { text-align: center; padding: 18px 16px 14px; background: linear-gradient(135deg, #e8f4ff, #f6fbff); }
.m-promo-hero__label { font-size: 12px; color: var(--m-muted); }
.m-promo-hero__code { font-size: 28px; font-weight: 800; letter-spacing: 5px; color: var(--m-primary); margin: 8px 0 12px; }
.m-promo-hero__rule { font-size: 12px; color: var(--m-muted); margin-top: 12px; line-height: 1.6; text-align: left; }

/* 管理后台（2026-11-03，P4） */
.m-st-tabs--scroll { overflow-x: auto; }
.m-st-tabs--scroll .m-st-tab { flex: 0 0 auto; padding-left: 13px; padding-right: 13px; }
.m-adm-btn-row { display: flex; gap: 8px; margin: 10px 0 4px; }
.m-adm-btn-row .m-btn { flex: 1; height: 38px; border-radius: 8px; font-size: 13px; }
.m-adm-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; font-size: 13px; }
.m-adm-sub { font-size: 11px; color: var(--m-muted); }

/* ---- 全屏看图（M.viewImage，对齐 wx.previewImage）---- */
.m-viewer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    overscroll-behavior: none;
    touch-action: none;
}
.m-viewer__img {
    max-width: 100%;
    max-height: 100%;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
}
.m-viewer__close {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
}
.m-detail-image__img { cursor: zoom-in; }

/* （套餐卡内不再渲染权益明细行：三列每列仅 ~90px，明细改由「各档位权益对比」表承担，见 upgrade.js） */
