/* ============================================================
   销售专家 · 移动端样式
   暖白护眼 · 低对比
   ------------------------------------------------------------
   设计原则：
   1. 底色用暖浅灰（不刺眼的纸感），卡片是暖白，层次靠 1px 细线 + 留白 + 字重
   2. 文字最深只到 #24272c（不用纯黑），长时间阅读不刺眼；灰阶整体偏暖
   3. 主色为深石板灰（按钮 / 选中 / 进度），全站只保留一个柔和的蓝做强调
   4. 无渐变、无重投影；数字统一等宽，方便纵向对比
   5. 所有类名与 CSS 变量名保持不变，页面结构与内联 style 零改动
   ============================================================ */

:root {
  /* ---- 文字层级（同一墨色按明度分四档） ---- */
  --text: #24272c;
  --text-2: #4f555f;
  --text-3: #787e88;
  --text-4: #a6abb4;

  /* ---- 线与面 ---- */
  --line: #e7e4dd;
  --line-strong: #dcd8d0;
  /* 兼容旧变量名（多处内联 style 直接引用） */
  --border: #e7e4dd;
  --border-strong: #dcd8d0;
  --bg: #f4f3ee;
  --paper-2: #efeee8;
  --card: #fffefb;

  /* ---- 主色：近墨黑；强调色：单一蓝 ---- */
  --primary: #2a2d34;
  --primary-dark: #1b1e23;
  --primary-soft: #f0efea;
  --accent: #2f6fd0;
  --accent-soft: #eaf1fb;

  /* ---- 语义色（降饱和，避免抢主视觉） ---- */
  --success: #1a7f4b;
  --success-soft: #e8f3ec;
  --warning: #96620a;
  --warning-soft: #f9f1e0;
  --danger: #c53b3b;
  --danger-soft: #fbeceb;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(35, 38, 43, 0.05);
  --shadow-lg: 0 -12px 48px rgba(35, 38, 43, 0.16);
  --tabbar-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #e9e7e0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  position: relative;
  box-shadow: 0 0 0 1px rgba(35, 38, 43, 0.05);
}

/* 所有数字等宽，列表里上下对齐 */
.stat__num, .list__val, .qty-ctrl__val, .tk-total .input, .tk-qty {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---------- 启动闪屏 ---------- */
.boot-splash {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; background: var(--bg); z-index: 999;
}
.boot-logo {
  width: 68px; height: 68px; border-radius: 20px;
  background: var(--primary);
  color: #fff; font-size: 30px; font-weight: 650;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}
.boot-text { color: var(--text-3); font-size: 13px; letter-spacing: 3px; }
.boot-spinner {
  width: 20px; height: 20px; margin-top: 4px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 页面骨架 ---------- */
.page {
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  animation: fadeUp 0.22s ease;
}
.page--plain { padding-bottom: 24px; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  height: 54px; padding: var(--safe-top) 18px 0;
  box-sizing: content-box;
  background: rgba(255, 254, 251, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__title {
  font-size: 18px; font-weight: 700; flex: 1;
  letter-spacing: -0.3px;
}
.topbar__back {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: var(--text); cursor: pointer;
  background: transparent; border: none; margin-left: -8px;
}
.topbar__back:active { background: var(--paper-2); }
.topbar__action {
  font-size: 13.5px; color: var(--text-2); font-weight: 600;
  background: transparent; border: none; padding: 6px 2px; cursor: pointer;
  font-family: inherit;
}
.topbar__action:active { color: var(--text); }

.content { padding: 16px 16px 20px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 30;
  display: flex; align-items: stretch;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 254, 251, 0.97);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--text-3); font-size: 10px; font-weight: 500;
  letter-spacing: 0.2px;
  padding: 0; transition: color 0.15s;
  font-family: inherit;
}
.tabbar__item .ico { font-size: 19px; line-height: 1; }
.tabbar__item.active { color: var(--text); font-weight: 650; }
/* 中间「报量」：唯一允许的实心块，克制的黑色胶囊 */
.tabbar__item--scan .tabbar__ico {
  width: 46px; height: 31px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-top: -10px;
}
.tabbar__item--scan .tabbar__ico .ico {
  width: 17px !important; height: 17px !important;
  background: none !important; border-radius: 0 !important;
  padding: 0 !important; box-shadow: none !important;
}
.tabbar__item--scan { color: var(--text-3); }

/* ---------- 卡片 / 区块 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.card--flush { padding: 0; overflow: hidden; }
.card__title {
  font-size: 15px; font-weight: 650; color: var(--text);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; letter-spacing: -0.2px;
}
.card__title .more {
  font-size: 12.5px; color: var(--text-3); font-weight: 500; cursor: pointer;
}

.section-label {
  font-size: 11.5px; color: var(--text-3); font-weight: 600;
  margin: 6px 2px 10px; letter-spacing: 0.8px;
}

/* ---------- 统计小卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.stat-grid--3 { grid-template-columns: repeat(3, 1fr); }
.stat {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 14px;
}
.stat__num {
  font-size: 26px; font-weight: 700; letter-spacing: -0.9px;
  color: var(--text); line-height: 1.1;
}
.stat__lbl { font-size: 12px; color: var(--text-3); margin-top: 5px; letter-spacing: 0.2px; }

/* ---------- 快捷入口网格 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 2px; border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer; color: var(--text);
  font-family: inherit;
}
.quick:active { background: var(--paper-2); }
.quick__ico {
  width: 48px; height: 48px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--paper-2); color: var(--text);
  transition: background 0.15s, color 0.15s;
}
/* 极简口径：所有入口统一灰底墨色图标，不再用多色区分 */
.quick__ico.g, .quick__ico.o, .quick__ico.p {
  background: var(--paper-2); color: var(--text);
}
.quick:active .quick__ico { background: var(--primary); color: #fff; }
.quick__txt { font-size: 11.5px; color: var(--text-2); font-weight: 500; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field__label {
  font-size: 12.5px; color: var(--text-3); font-weight: 600;
  margin-bottom: 8px; display: block; letter-spacing: 0.3px;
}
.input, .select, .textarea {
  width: 100%; padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px; background: var(--card);
  font-size: 15.5px; color: var(--text);
  font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none; appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(35, 38, 43, 0.06);
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.textarea { min-height: 78px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e7684' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row .input { flex: 1; }
/* 与输入框同排的按钮跟输入框等高，避免「显示 / 搜索」比输入框矮一截 */
.input-row .btn { align-self: stretch; padding-top: 0; padding-bottom: 0; }
.field__err { color: var(--danger); font-size: 12.5px; margin-top: 6px; min-height: 16px; }
.field__hint { color: var(--text-3); font-size: 12px; margin-top: 7px; line-height: 1.6; }

/* ---------- 按钮 ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 14px; border-radius: 12px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  border: none; cursor: pointer; transition: transform 0.08s, opacity 0.15s, background 0.15s;
  letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:active { background: #000; }
.btn--ghost { background: var(--paper-2); color: var(--text); }
.btn--line { background: var(--card); color: var(--text); border: 1px solid var(--line-strong); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--sm { padding: 9px 13px; font-size: 13px; width: auto; border-radius: 9px; }
.btn--block { width: 100%; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list__item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left; font-family: inherit; cursor: pointer;
}
.list__item:last-child { border-bottom: none; }
.list__item:active { background: #f7f6f1; }
.list__main { flex: 1; min-width: 0; }
.list__title {
  font-size: 15px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.1px;
}
.list__sub {
  font-size: 12.5px; color: var(--text-3); margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 销售价格卡片的价格行：官网价 · 优惠 · 成交价（成交价用唯一强调色） */
.list__price { color: var(--text-2); margin-top: 4px; font-size: 13px; }
.list__price b { color: var(--accent); font-weight: 700; }
.list__right { text-align: right; flex-shrink: 0; }
.list__val { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; }
.list__arrow { color: var(--text-4); font-size: 17px; flex-shrink: 0; }
/* 商品编码列表右侧的导入日期（今年只到「月-日」，跨年带年份） */
.list__date {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums; margin-left: 2px;
}

/* ---------- 任务 ---------- */
.task-dot {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--text);
}
.task-dot--urgent { background: var(--danger-soft); color: var(--danger); }
.task-dot--done { background: var(--success-soft); color: var(--success); }
.task-note {
  background: var(--paper-2); border-radius: 11px; padding: 13px 14px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.65;
  white-space: pre-wrap; word-break: break-word; margin-bottom: 14px;
}
/* 台数任务进度条 */
.task-progress {
  height: 4px; border-radius: 2px; background: #e7e4dd;
  margin-top: 8px; overflow: hidden;
}
.task-progress i {
  display: block; height: 100%; border-radius: 2px;
  background: var(--primary); transition: width 0.2s ease;
}
.task-progress--done i { background: var(--success); }
.task-progress--lg { height: 6px; border-radius: 3px; }
.task-progress--lg i { border-radius: 3px; }
/* 任务管理：按负责人分组的小标题 */
.tk-group {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 16px 7px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.tk-group__name { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tk-group__meta { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
/* 派发任务：人员多选 */
.pick-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 190px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px;
}
.pick-chip {
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card);
  font-size: 13px; color: var(--text-2); font-family: inherit;
  cursor: pointer; line-height: 1.3;
  transition: 0.15s;
}
.pick-chip.on {
  background: var(--primary); border-color: var(--text);
  color: #fff; font-weight: 600;
}
/* 派发任务：多型号清单 */
.tk-total {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 9px;
  background: var(--paper-2); border-radius: 10px;
}
.tk-total__lbl { flex: 1; font-size: 13px; color: var(--text-2); }
.tk-total .input { flex: 0 0 88px; text-align: center; background: var(--card); }
.tk-trow { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.tk-trow:last-of-type { margin-bottom: 0; }
.tk-trow .tk-qty { flex: 0 0 76px; text-align: center; }
.tk-del {
  flex: 0 0 30px; width: 30px; height: 30px; border: none; border-radius: 8px;
  background: var(--paper-2); color: var(--text-3);
  font-size: 12px; line-height: 1; font-family: inherit; cursor: pointer;
}
.tk-del:active { background: var(--danger-soft); color: var(--danger); }
.list__title .badge { font-size: 10.5px; padding: 1px 6px; vertical-align: 1px; }

/* ---------- 批量选择（商品编码库） ---------- */
.selbox {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--line-strong); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; color: #fff;
}
.selbox.on { background: var(--primary); border-color: var(--text); }
.list__item.is-selected { background: #f5f3ee; }
.batchbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 520px; z-index: 40;
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px calc(var(--safe-bottom) + 10px);
  background: rgba(255, 254, 251, 0.97);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.page.is-selecting .batchbar { display: flex; }
.page.is-selecting .content { padding-bottom: 84px; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7;
  letter-spacing: 0.2px;
}
.badge--blue { background: var(--accent-soft); color: var(--accent); }
.badge--green { background: var(--success-soft); color: var(--success); }
.badge--orange { background: var(--warning-soft); color: var(--warning); }
.badge--gray { background: var(--paper-2); color: var(--text-2); }
.badge--red { background: var(--danger-soft); color: var(--danger); }

/* ---------- 头像 ---------- */
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: #ecebe5; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 650; flex-shrink: 0;
  letter-spacing: 0.5px;
}
.avatar--sm { width: 34px; height: 34px; font-size: 12.5px; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 52px 20px; color: var(--text-3);
}
.empty__ico { font-size: 34px; opacity: 0.42; margin-bottom: 12px; line-height: 1; }
.empty__txt { font-size: 13px; }

/* ---------- 登录页 ---------- */
.login {
  min-height: 100vh; padding: 0 24px;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.login__hero { padding: calc(var(--safe-top) + 78px) 0 34px; text-align: center; }
.login__logo {
  width: 64px; height: 64px; border-radius: 19px; margin: 0 auto 20px;
  background: var(--primary);
  color: #fff; font-size: 28px; font-weight: 650;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}
.login__title { font-size: 27px; font-weight: 700; letter-spacing: -0.6px; }
.login__sub { font-size: 13.5px; color: var(--text-3); margin-top: 8px; }
.login__card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 18px;
}
.login__tabs {
  display: flex; gap: 3px; background: var(--paper-2);
  padding: 4px; border-radius: 11px; margin-bottom: 20px;
}
.login__tab {
  flex: 1; padding: 9px; border: none; background: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-3);
  font-family: inherit; cursor: pointer; transition: 0.15s;
}
.login__tab.active {
  background: var(--card); color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 17, 21, 0.08);
}
.login__tabs--3 .login__tab { font-size: 13px; padding: 9px 4px; letter-spacing: -0.2px; }
.login__foot {
  text-align: center; font-size: 11.5px; color: var(--text-4);
  padding: 26px 0 calc(var(--safe-bottom) + 20px); margin-top: auto;
  letter-spacing: 0.2px;
}

/* ---------- 报量页 ---------- */
.kv {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--line);
  font-size: 14px; gap: 14px;
}
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--text-3); flex-shrink: 0; }
.kv__v { font-weight: 600; text-align: right; max-width: 64%; word-break: break-all; }

.qty-ctrl { display: flex; align-items: center; gap: 14px; justify-content: center; margin: 8px 0; }
.qty-ctrl__btn {
  width: 44px; height: 44px; border-radius: 12px; border: none;
  background: var(--paper-2); color: var(--text);
  font-size: 20px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.qty-ctrl__btn:active { background: #eceef1; }
.qty-ctrl__val {
  font-size: 28px; font-weight: 700; min-width: 68px; text-align: center;
  letter-spacing: -1px;
}

/* ---------- 记录筛选条 ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; -webkit-overflow-scrolling: touch; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-strong);
  font-size: 13px; color: var(--text-2); font-weight: 500;
  font-family: inherit; cursor: pointer; transition: 0.15s;
}
.chip.active { background: var(--primary); border-color: var(--text); color: #fff; font-weight: 600; }
/* 紧急优先级选中：用红色，避免和普通筛选混淆 */
.chip--danger.active { background: var(--danger); border-color: var(--danger); }

/* ---------- 图表 ---------- */
.chart-wrap { position: relative; height: 210px; width: 100%; }

/* ---------- 我的页面 ---------- */
.profile-head {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 16px;
  display: flex; align-items: center; gap: 14px; color: var(--text);
  margin-bottom: 12px;
}
.profile-head .avatar { background: var(--primary); color: #fff; width: 48px; height: 48px; font-size: 17px; }
.profile-head__name { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -0.3px; }
.profile-head__meta { font-size: 12.5px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }

/* ---------- Toast ---------- */
#toast-root {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 2000; width: 100%; max-width: 520px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: calc(var(--safe-top) + 12px) 16px 0; pointer-events: none;
}
.toast {
  background: rgba(42, 45, 52, 0.93); color: #fff;
  padding: 11px 17px; border-radius: 11px; font-size: 13.5px;
  max-width: 100%; box-shadow: 0 8px 24px rgba(35, 38, 43, 0.16);
  animation: toastIn 0.22s ease; display: flex; align-items: center; gap: 8px;
  letter-spacing: 0.2px;
}
.toast--ok { background: rgba(18, 138, 74, 0.96); }
.toast--err { background: rgba(208, 43, 43, 0.96); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ---------- Modal / Sheet ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(42, 45, 52, 0.34);
  display: flex; align-items: flex-end; justify-content: center;
  animation: maskIn 0.18s ease;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 520px; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(var(--safe-bottom) + 20px);
  max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
  animation: sheetUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-lg);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.modal__title { font-size: 18px; font-weight: 700; margin-bottom: 5px; flex: 0 0 auto; padding-right: 26px; letter-spacing: -0.3px; }
.modal__sub { font-size: 13px; color: var(--text-3); margin-bottom: 18px; flex: 0 0 auto; }
.modal__head { position: relative; flex: 0 0 auto; }
.modal__bar { width: 36px; height: 4px; border-radius: 2px; background: #e4e1da; margin: 0 auto 16px; }
/* 右上角关闭：内容很长时也一眼可见、不用找底部按钮 */
.modal__x {
  position: absolute; right: -9px; top: -10px; width: 32px; height: 32px;
  border: none; background: none; color: var(--text-4);
  font-size: 15px; line-height: 1; padding: 0; cursor: pointer;
}
.modal__x:active { color: var(--text); }
/* 只有正文滚动，标题与底部按钮固定 —— 长内容时「关闭」不会被顶出屏幕 */
.modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal__actions { display: flex; gap: 10px; margin-top: 10px; flex: 0 0 auto; }
/* 弹层打开时锁住背景滚动，避免「滑弹层把后面页面也带着滚」 */
body.modal-open { overflow: hidden; }

/* ---------- 加载遮罩 ---------- */
.loading-mask {
  position: fixed; inset: 0; z-index: 1800;
  background: rgba(255, 254, 251, 0.72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.loading-spin {
  width: 30px; height: 30px; border: 2.5px solid var(--line-strong);
  border-top-color: var(--text); border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.loading-txt { font-size: 12.5px; color: var(--text-3); }

/* ---------- 杂项 ---------- */
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; }
.text-c { text-align: center; }
.text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.fs12 { font-size: 12px; } .fs13 { font-size: 13px; } .fs14 { font-size: 14px; }
.bold { font-weight: 700; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.3px; }

.progress {
  height: 6px; border-radius: 3px; background: #e9e6df; overflow: hidden;
}
.progress__bar {
  height: 100%; background: var(--primary); border-radius: 3px;
  transition: width 0.25s;
}

.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; background: #faf9f5; cursor: pointer;
}
.dropzone__ico { font-size: 30px; opacity: 0.6; }
.dropzone__t { font-size: 14px; font-weight: 600; margin-top: 10px; }
.dropzone__s { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* ---------- 图标容器 ---------- */
.ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico svg { width: 100%; height: 100%; display: block; }
.tabbar__ico { display: flex; align-items: center; justify-content: center; }
.tabbar__lbl { line-height: 1.2; }

.list__item .ico { color: var(--text-3); }

/* ============================================================
   消息中心
   ============================================================ */

/* 顶栏右侧多个动作（首页：铃铛 + 刷新） */
.topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.topbar__icon {
  position: relative; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text-2); cursor: pointer;
}
.topbar__icon:active { background: var(--primary-soft); }
.bell-badge {
  position: absolute; top: 0; right: -2px;
  min-width: 15px; height: 15px; padding: 0 4px;
  border-radius: 8px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 15px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 首页消息卡 */
.h-msgs__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 10px;
}
.h-msgs__head .text-3 { padding: 3px 0 3px 10px; }

/* 分组标题（今天 / 昨天 / 10月12日） */
.msg-group__label {
  font-size: 12px; color: var(--text-3); font-weight: 600;
  letter-spacing: 0.4px; margin: 4px 2px 9px;
}
.msg-group + .msg-group { margin-top: 18px; }

/* 消息条目 */
.msg-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.msg-item:active { background: #f7f6f1; }
.msg-item__ico { width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px; }
.msg-item__main { flex: 1; min-width: 0; }
.msg-item__top { display: flex; align-items: baseline; gap: 8px; }
.msg-item__title {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-item.is-unread .msg-item__title { font-weight: 700; }
.msg-item__time {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.msg-item__sub {
  margin-top: 4px; font-size: 12.5px; color: var(--text-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.msg-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex: 0 0 7px; margin: 6px 1px 0 0;
}
.chip__n { margin-left: 4px; opacity: 0.62; font-variant-numeric: tabular-nums; }
/* 「我发布的」里面的数字只是条数，不抢未读的注意力 */
.chip__n--mute { opacity: 0.38; }

/* 「我发布的」小徽章：标在标题前，和别人的公告区分开 */
.msg-tag {
  display: inline-block; vertical-align: 1px;
  margin-right: 6px; padding: 1px 5px;
  border: 1px solid var(--line-strong); border-radius: 5px;
  background: var(--bg);
  font-size: 10.5px; font-weight: 600; line-height: 1.5; letter-spacing: 0.02em;
  color: var(--text-3);
}

/* 公告剩余有效期：平时灰字，已过期转红提醒 */
.msg-exp {
  flex: 0 0 auto; padding: 0 4px;
  border: 1px solid var(--line); border-radius: 4px;
  font-size: 10.5px; line-height: 1.6; color: var(--text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.msg-exp--over { color: var(--danger); border-color: var(--danger-soft); background: var(--danger-soft); }

/* 公告详情正文（保留换行） */
.msg-detail {
  font-size: 14px; color: var(--text-2); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; padding-bottom: 4px;
}

/* ---------- 公告附件：发布时选择 ---------- */
.field__opt {
  margin-left: 6px; font-weight: 500; font-size: 11.5px; color: var(--text-4);
}
.att-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.att-list:empty { display: none; }
.att-list:not(:empty) { margin-bottom: 8px; }

.att-item {
  position: relative; width: 72px; height: 72px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); overflow: hidden;
}
.att-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 上传中 / 文件行：整行展示 */
.att-item--up, .att-item--file {
  width: 100%; height: auto; min-height: 56px;
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
}
.att-thumb--up, .att-thumb--file {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--text-3);
}
.att-spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--text-3);
  animation: attspin 0.8s linear infinite;
}
@keyframes attspin { to { transform: rotate(360deg); } }

.att-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-name {
  font-size: 13px; color: var(--text); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-size { font-size: 11.5px; color: var(--text-3); }

.att-del {
  position: absolute; top: 3px; right: 3px;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(36, 39, 44, 0.58); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.att-del--row {
  position: static; flex: 0 0 auto; width: 24px; height: 24px;
  background: transparent; color: var(--text-4); font-size: 13px;
}
.att-del--row:active { color: var(--danger); }

.att-bar { display: flex; align-items: center; gap: 8px; }
.att-pick {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--card);
  color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer;
}
.att-pick .ico { color: var(--text-3); }
.att-pick:active { background: var(--primary-soft); }
.att-pick:disabled { opacity: 0.42; }
.att-count {
  margin-left: auto; font-size: 11.5px; color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

/* ---------- 公告附件：详情里展示 ---------- */
.view-atts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
/* 1 张时整幅、2 张时两列、3 张以上三列：auto-fit 会自动折叠空轨道 */
.view-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.view-imgs--one { grid-template-columns: 1fr; }
.view-img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-2); cursor: zoom-in;
}
.view-imgs--one .view-img {
  aspect-ratio: auto; max-height: 320px; object-fit: contain;
}

.view-files { display: flex; flex-direction: column; gap: 8px; }
.view-file {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--card); color: var(--text); text-decoration: none;
}
.view-file:active { background: #f7f6f1; }
.view-file__ico {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--text-3);
}
.view-file__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.view-file__name {
  font-size: 13.5px; color: var(--text); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.view-file__sub { font-size: 11.5px; color: var(--text-3); }
.view-file__dl { flex: 0 0 auto; display: flex; color: var(--text-3); }

/* 图片大图 */
.view-full {
  display: flex; align-items: center; justify-content: center;
  padding: 6px; border-radius: 12px; background: var(--paper-2);
}
.view-full img {
  display: block; max-width: 100%; max-height: 62vh;
  object-fit: contain; border-radius: 8px;
}

/* ============================================================
 * 数据看板 · 任务完成率（整体 / 门店 / 员工）
 * 一个主数字 + 一条进度条 + 一排小标签；门店与员工用同样的行结构。
 * ============================================================ */
.rate-hero { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.rate-hero__num {
  font-size: 34px; font-weight: 700; line-height: 1.05; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.6px;
}
.rate-hero__num.is-full { color: var(--success); }
.rate-hero__lbl { font-size: 12px; color: var(--text-3); }

.rate-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rate-meta__i {
  font-size: 11.5px; color: var(--text-2); background: var(--primary-soft);
  border-radius: 999px; padding: 3px 9px; font-variant-numeric: tabular-nums;
}
.rate-meta__i.is-warn { color: var(--danger); background: var(--danger-soft); }

.progress__bar.is-full { background: var(--success); }

.rate-row { padding: 12px 16px; }
.rate-row + .rate-row { border-top: 1px solid var(--line); }
.rate-row .progress { margin-top: 7px; }
.rate-row__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rate-row__name {
  font-size: 14px; font-weight: 600; color: var(--text); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rate-row__tag {
  display: inline-block; font-size: 11px; font-weight: 500; color: var(--text-3);
  background: var(--primary-soft); border-radius: 5px; padding: 1px 6px; margin-right: 6px;
  vertical-align: 1px;
}
.rate-row__pct {
  flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.rate-row__pct.is-full { color: var(--success); }
.rate-row__pct.is-empty { color: var(--text-4); font-weight: 500; }
.rate-row__sub {
  font-size: 11.5px; color: var(--text-3); margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.rate-foot {
  padding: 11px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums;
}

/* 看板导出的长图预览（弹层里按宽度铺满） */
.dash-img {
  display: block; width: 100%; height: auto;
  border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
}
