/* 智拓CRM · 移动端样式
   作用域：body.m-mode 与 .m-* 命名空间，电脑端（.app）完全不受影响。
   设计规范：蓝白灰商务风；触摸目标 ≥44px；单列卡片；无横向滚动。 */

body.m-mode {
  background: #F4F7FC;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: contain;
}
body.m-lock { overflow: hidden; }

.m-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
.m-scroll { padding-bottom: 8px; }

/* ---------- 加载 / 空态 ---------- */
.m-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 60px 20px; color: var(--text-3); font-size: 13.5px;
}
.m-spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #E3ECF9; border-top-color: var(--brand);
  animation: m-spin .7s linear infinite;
}
@keyframes m-spin { to { transform: rotate(360deg); } }
.m-empty { text-align: center; padding: 42px 24px; color: var(--text-3); }
.m-empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.m-empty p { margin: 0; font-size: 13px; line-height: 1.7; }
.m-empty-s {
  color: var(--text-3); font-size: 13px; line-height: 1.7;
  padding: 10px 2px; background: #f8fafc; border-radius: 10px; text-align: center;
}
.m-muted { color: var(--text-3); }
.m-err {
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  padding: 10px 12px; border-radius: 10px; font-size: 13px;
}

/* ---------- 底部导航 ---------- */
.m-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 20px -16px rgba(15, 23, 42, .35);
}
.m-tab {
  flex: 1; min-height: 56px; border: none; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #8CA0BC; font-size: 10.5px; letter-spacing: .2px;
  cursor: pointer; padding: 6px 0 4px; -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.m-tab svg { width: 22px; height: 22px; }
.m-tab.on { color: var(--brand); font-weight: 600; }
.m-tab.center .m-tab-ico {
  width: 44px; height: 44px; margin-top: -18px; border-radius: 14px;
  background: linear-gradient(145deg, #4A7AE0, #234A9E);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .85);
}
.m-tab.center .m-tab-ico svg { width: 25px; height: 25px; stroke-width: 2.2; }
.m-tab.center { color: var(--text-2); }
.m-tab.center.on { color: var(--brand); }

/* ---------- 页头 ---------- */
.m-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.m-head-txt { flex: 1; min-width: 0; }
.m-head h1 { font-size: 18px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.m-head p { margin: 2px 0 0; font-size: 12px; color: var(--text-3); }
.m-head-right { display: flex; align-items: center; gap: 6px; }
.m-back, .m-x {
  width: 38px; height: 38px; flex: none; border: none; background: #f1f5f9;
  border-radius: 11px; color: var(--text); display: grid; place-items: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.m-back svg, .m-x svg { width: 19px; height: 19px; }
.m-back:active, .m-x:active { background: #e2e8f0; }
.m-head-btn {
  border: 1px solid var(--line); background: #fff; color: var(--brand);
  font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; cursor: pointer;
}
.m-pad { padding: 14px 14px 0; }

/* ---------- 首页顶部 ---------- */
.m-hero {
  padding: calc(18px + env(safe-area-inset-top)) 18px 20px;
  background: linear-gradient(160deg, #315FC5 0%, #1E3A8A 100%);
  color: #fff; border-radius: 0 0 22px 22px;
  box-shadow: 0 14px 30px -22px rgba(30, 64, 175, .9);
}
.m-hero-top { display: flex; align-items: flex-start; gap: 12px; }
.m-hero-hi { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.m-hero-date { margin: 4px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.m-avatar {
  width: 40px; height: 40px; flex: none; margin-left: auto;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .18); color: #fff;
  font-size: 15px; font-weight: 700; display: grid; place-items: center; cursor: pointer;
}
.m-avatar.big { width: 56px; height: 56px; font-size: 21px; margin: 0; border: none; background: #E3ECF9; color: var(--brand-dark); }
.m-hero-stats { display: flex; gap: 8px; margin-top: 16px; }
.m-hero-stats .stat {
  flex: 1; border: none; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .14); border-radius: 13px;
  padding: 10px 12px; color: #fff; -webkit-tap-highlight-color: transparent;
}
.m-hero-stats .stat b { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; }
.m-hero-stats .stat span { font-size: 11.5px; color: rgba(255, 255, 255, .82); }
.m-hero-stats .stat.alert b { color: #fecaca; }

/* ---------- 主 CTA ---------- */
.m-cta {
  width: 100%; display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: none; border-radius: 16px; padding: 15px 16px; margin-bottom: 12px;
  background: linear-gradient(135deg, #4A7AE0 0%, #315FC5 55%, #234A9E 100%);
  color: #fff; text-align: left;
  box-shadow: 0 14px 26px -16px rgba(37, 99, 235, .95);
  -webkit-tap-highlight-color: transparent;
}
.m-cta:active { transform: translateY(1px); }
.m-cta-ico {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  background: rgba(255, 255, 255, .2); display: grid; place-items: center;
}
.m-cta-ico svg { width: 23px; height: 23px; }
.m-cta-txt { flex: 1; min-width: 0; }
.m-cta-txt b { display: block; font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.m-cta-txt em { display: block; font-style: normal; font-size: 11.5px; color: rgba(255, 255, 255, .82); margin-top: 2px; }
.m-cta-arrow svg { width: 18px; height: 18px; opacity: .8; }

/* ---------- 卡片 ---------- */
.m-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 10px 24px -22px rgba(15, 23, 42, .3);
}
.m-card.flat { padding: 12px 14px; box-shadow: none; }
.m-card.draft { border-style: dashed; border-color: #fcd34d; background: #fffdf5; }
.m-card.hot { border-color: #fecaca; background: #fffafa; }
.m-card.tight { padding: 12px; }
.m-card.tappable { display: block; width: 100%; text-align: left; cursor: pointer; }
.m-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.m-card-head h2 { font-size: 15px; margin: 0; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.m-badge {
  background: #fee2e2; color: #b91c1c; font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
}
.m-link {
  margin-left: auto; border: none; background: none; color: var(--brand);
  font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px;
  cursor: pointer; padding: 10px 2px 10px 10px; min-height: 40px; margin-top: -8px; margin-bottom: -8px;
}
.m-link svg { width: 14px; height: 14px; }
.m-sub { font-size: 11.5px; color: var(--text-3); margin-left: auto; font-weight: 500; }
.m-card-foot {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed #eef1f6;
  font-size: 11.5px; color: var(--text-3);
}
.m-sec-title {
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  margin: 16px 2px 8px; display: flex; align-items: center; gap: 6px;
}
.m-hintline { font-size: 11.5px; color: var(--text-3); line-height: 1.7; margin: 10px 2px; }
.m-foot-note { text-align: center; font-size: 11px; color: var(--text-3); padding: 16px 0 6px; }
.m-bottom-space { height: 12px; }
.m-flash {
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857;
  padding: 10px 12px; border-radius: 12px; font-size: 12.5px; margin-bottom: 12px;
}

/* ---------- 行 / 列表 ---------- */
.m-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; text-align: left; cursor: pointer;
  padding: 11px 2px; border-bottom: 1px solid #f1f5f9;
  -webkit-tap-highlight-color: transparent;
}
.m-row:last-child { border-bottom: none; }
.m-row.card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 12px; margin-bottom: 8px; }
.m-row-main { flex: 1; min-width: 0; }
.m-row-main b { display: block; font-size: 14px; font-weight: 600; line-height: 1.45; }
.m-row-main em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.m-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.m-row-side em { font-style: normal; font-size: 11px; color: var(--text-3); }
.m-tag {
  flex: none; font-size: 11px; font-weight: 600; color: var(--text-2);
  background: #f1f5f9; padding: 3px 8px; border-radius: 8px; white-space: nowrap;
}
.m-tag.warn { background: #fef3c7; color: #b45309; }
.m-tag.bad { background: #fee2e2; color: #b91c1c; }
.m-list { display: block; }

/* 高校卡片 */
.m-uni {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 14px; margin-bottom: 10px; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.m-uni:active { background: #f8fbff; }
.m-uni-ico {
  width: 44px; height: 44px; flex: none; border-radius: 13px;
  background: linear-gradient(150deg, #EAF0FB, #E3ECF9); color: var(--brand-dark);
  display: grid; place-items: center; font-size: 14px; font-weight: 700; letter-spacing: .5px;
}
.m-uni-main { flex: 1; min-width: 0; }
.m-uni-main b { display: block; font-size: 15px; font-weight: 600; }
.m-uni-main em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.m-uni-meta { display: flex; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.m-uni-meta i { font-style: normal; font-size: 11px; color: var(--text-2); background: #f1f5f9; padding: 1px 7px; border-radius: 6px; }
.m-chev { color: #cbd5e1; flex: none; }
.m-chev svg { width: 18px; height: 18px; }
.m-call {
  width: 40px; height: 40px; flex: none; border-radius: 12px; background: #EAF0FB;
  color: var(--brand); display: grid; place-items: center;
}
.m-call svg { width: 18px; height: 18px; }

/* 搜索框 */
.m-searchbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 8px;
  margin: 0 14px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 6px 18px -18px rgba(15, 23, 42, .6);
  margin-top: 12px;
}
.m-search-ico { color: var(--text-3); display: grid; place-items: center; }
.m-search-ico svg { width: 18px; height: 18px; }
.m-searchbar input {
  flex: 1; min-width: 0; border: none; outline: none; background: none;
  font-size: 16px; color: var(--text); padding: 2px 0;
}
.m-searchbar input::placeholder { color: #b6c2d2; font-size: 14px; }
.m-searchbar input::-webkit-search-cancel-button { display: none; }
.m-search-clear {
  border: none; background: #eef2f7; color: var(--text-2); width: 22px; height: 22px;
  border-radius: 50%; font-size: 12px; cursor: pointer; line-height: 1;
}

/* 快捷入口方格 */
.m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.m-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 13px; cursor: pointer; text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.m-tile:active { background: #f8fbff; }
.m-tile-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 2px; }
.m-tile-ico svg { width: 18px; height: 18px; }
.m-tile-ico.blue { background: #EAF0FB; color: #315FC5; }
.m-tile-ico.green { background: #ecfdf5; color: #059669; }
.m-tile-ico.violet { background: #f5f3ff; color: #7c3aed; }
.m-tile-ico.orange { background: #fff7ed; color: #ea580c; }
.m-tile b { font-size: 13.5px; font-weight: 600; }
.m-tile em { font-style: normal; font-size: 11px; color: var(--text-3); line-height: 1.5; }

/* ---------- 标签 ---------- */
.m-pill {
  display: inline-flex; align-items: center; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: #f1f5f9; color: var(--text-2);
}
.m-pill.ok { background: #ecfdf5; color: #047857; }
.m-pill.info { background: #EAF0FB; color: #234A9E; }
.m-pill.warn { background: #fffbeb; color: #b45309; }
.m-pill.bad { background: #fef2f2; color: #b91c1c; }
.m-pill.mute { background: #f1f5f9; color: #5A6F8F; }

/* ---------- 客户详情 ---------- */
.m-detail-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  background: linear-gradient(160deg, #234A9E, #315FC5);
  color: #fff;
}
.m-detail-head h1 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: -.2px; }
.m-detail-head p { margin: 3px 0 0; font-size: 12px; color: rgba(255, 255, 255, .8); }
.m-detail-head .m-back { background: rgba(255, 255, 255, .18); color: #fff; margin-top: 2px; }
.m-detail-body { padding-top: 12px; }
.m-statgrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 12px;
}
.m-statgrid > div { background: #fff; padding: 11px 4px; text-align: center; }
.m-statgrid b { display: block; font-size: 14px; font-weight: 700; color: var(--brand-dark); }
.m-statgrid span { font-size: 10.5px; color: var(--text-3); }

.m-follow { padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.m-follow:last-of-type { border-bottom: none; }
.m-follow-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-follow-date { font-size: 11.5px; color: var(--text-3); }
.m-follow-who { font-size: 11.5px; color: var(--text-2); margin-left: auto; }
.m-follow p { margin: 6px 0 0; font-size: 13px; line-height: 1.65; color: var(--text); }
.m-mini-stats {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px;
  padding-top: 9px; border-top: 1px dashed #eef1f6; font-size: 11.5px; color: var(--text-3);
}

.m-contact { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.m-contact:last-child { border-bottom: none; }
.m-contact-ava {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background: #EAF0FB; color: var(--brand-dark); display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}
.m-contact-main { flex: 1; min-width: 0; }
.m-contact-main b { display: block; font-size: 14px; font-weight: 600; }
.m-contact-main em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.m-contact-act { display: flex; gap: 6px; flex: none; }
.m-iconbtn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--brand); display: grid; place-items: center; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-iconbtn svg { width: 18px; height: 18px; }
.m-iconbtn:disabled { opacity: .35; }
.m-iconbtn.flip svg { transform: rotate(180deg); }

.m-proj { padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.m-proj:last-child { border-bottom: none; }
.m-proj-top { display: flex; align-items: center; gap: 8px; }
.m-proj-top b { flex: 1; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.m-proj-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: 11.5px; color: var(--text-3); }
.m-bar { height: 5px; border-radius: 4px; background: #eef2f7; margin-top: 7px; overflow: hidden; }
.m-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6E96E5, #315FC5); }

.m-plan { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.m-plan:last-child { border-bottom: none; }
.m-plan-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 7px; flex: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.m-plan-main { flex: 1; min-width: 0; }
.m-plan-main b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.55; }
.m-plan-main em { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.m-mini-btn {
  flex: none; border: 1px solid #bfdbfe; background: #EAF0FB; color: var(--brand-dark);
  font-size: 12px; font-weight: 600; padding: 7px 10px; border-radius: 9px; cursor: pointer;
  white-space: nowrap;
}
.m-more {
  width: 100%; margin-top: 10px; border: 1px dashed var(--line); background: #fff;
  border-radius: 12px; padding: 11px; color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer;
}
.m-note { padding: 9px 0; border-bottom: 1px dashed #eef1f6; }
.m-note:last-child { border-bottom: none; }
.m-note-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-note-date { font-size: 11.5px; color: var(--text-3); }
.m-note-who { font-size: 11.5px; color: var(--text-2); margin-left: auto; }
.m-note p { margin: 5px 0 0; font-size: 13px; line-height: 1.65; }
.m-note-line { font-size: 11.5px; color: var(--text-2); margin-top: 4px; line-height: 1.6; }
.m-note-line.next { color: #234A9E; }

/* 底部操作条 */
.m-actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.m-detail-body { padding-bottom: 82px; }

/* ---------- 按钮 ---------- */
.m-btn {
  flex: 1; min-height: 48px; border: none; border-radius: 13px; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 16px; -webkit-tap-highlight-color: transparent;
  transition: background .15s, opacity .15s;
}
.m-btn:active { background: var(--brand-dark); }
.m-btn svg { width: 18px; height: 18px; }
.m-btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.m-btn.ghost:active { background: #f1f5f9; }
.m-btn.full { width: 100%; flex: none; }
.m-btn.sm { min-height: 38px; font-size: 13px; padding: 0 12px; border-radius: 10px; flex: none; }
.m-btn:disabled { opacity: .5; }
.m-btn.danger-text { color: #b91c1c; border-color: #fecaca; }

/* ---------- 底部弹层 ---------- */
.m-mask {
  position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; opacity: 0; transition: opacity .2s;
}
.m-mask.on { opacity: 1; }
.m-sheet {
  width: 100%; max-height: 88vh; background: #fff;
  border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(14px); transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.m-mask.on .m-sheet { transform: translateY(0); }
.m-grip { width: 38px; height: 4px; border-radius: 3px; background: #e2e8f0; margin: 8px auto 0; flex: none; }
.m-sheet-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px 8px; border-bottom: 1px solid #f1f5f9; flex: none;
}
.m-sheet-head > div { flex: 1; min-width: 0; }
.m-sheet-head b { font-size: 16px; font-weight: 700; display: block; }
.m-sheet-head span { font-size: 11.5px; color: var(--text-3); }
.m-sheet-body { padding: 14px 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.m-sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.m-sheet-actions.two > * { flex: 1; }
.m-sheet-text { font-size: 14px; line-height: 1.75; margin: 10px 0; }
.m-quote {
  background: #f8fafc; border-left: 3px solid var(--brand); border-radius: 8px;
  padding: 10px 12px; font-size: 13.5px; line-height: 1.65; margin-bottom: 12px;
}
.m-basis {
  font-size: 12px; color: var(--text-2); line-height: 1.7;
  background: #f8fafc; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px;
}
.m-actlist { display: flex; flex-direction: column; gap: 8px; }
.m-act {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--line); background: #fff; border-radius: 13px;
  padding: 13px 14px; font-size: 14.5px; color: var(--text); cursor: pointer; text-align: left;
}
.m-act svg { width: 19px; height: 19px; color: var(--text-2); }
.m-act:active { background: #f8fafc; }
.m-act.danger { color: #b91c1c; }
.m-act.danger svg { color: #b91c1c; }

/* 表单 */
.m-field { margin-bottom: 14px; }
.m-field > label { display: block; font-size: 12.5px; color: var(--text-2); font-weight: 600; margin-bottom: 7px; }
.m-req { color: #dc2626; }
.m-input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; font-size: 16px; background: #fbfcfe; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.m-input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
textarea.m-input { line-height: 1.65; resize: vertical; min-height: 84px; }
.m-input.big { min-height: 130px; font-size: 16px; }
select.m-input { background-image: none; }
.m-fold {
  border: 1px solid var(--line); border-radius: 12px; padding: 0 12px;
  margin: 4px 0 14px; background: #fcfdff;
}
.m-fold > summary {
  list-style: none; padding: 12px 0; font-size: 13px; font-weight: 600; color: var(--text-2);
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
}
.m-fold > summary::-webkit-details-marker { display: none; }
.m-fold > summary::after { content: '＋'; color: var(--text-3); font-weight: 400; }
.m-fold[open] > summary::after { content: '－'; }
.m-fold[open] { padding-bottom: 4px; }

/* 标签选择 */
.m-chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
.m-chips.wrap { flex-wrap: wrap; overflow: visible; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex: none; border: 1px solid var(--line); background: #fff; color: var(--text-2);
  border-radius: 999px; padding: 9px 14px; font-size: 13px; cursor: pointer;
  min-height: 40px; -webkit-tap-highlight-color: transparent;
}
.m-chip.solid { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- 待办 ---------- */
.m-seg {
  display: flex; gap: 4px; background: #eef2f7; border-radius: 12px; padding: 4px; margin-bottom: 12px;
}
.m-seg-btn {
  flex: 1; border: none; background: none; border-radius: 9px; padding: 9px 4px;
  font-size: 13px; color: var(--text-2); cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 4px; min-height: 40px;
}
.m-seg-btn i {
  font-style: normal; font-size: 10.5px; background: #fff; border-radius: 999px;
  padding: 0 5px; color: var(--text-2);
}
.m-seg-btn.on { background: #fff; color: var(--brand-dark); font-weight: 700; box-shadow: 0 2px 6px -3px rgba(15, 23, 42, .3); }
.m-seg.small .m-seg-btn { min-height: 34px; font-size: 12.5px; }
.m-alertbar {
  width: 100%; display: flex; align-items: center; gap: 8px;
  border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c;
  border-radius: 12px; padding: 11px 13px; font-size: 13px; font-weight: 600;
  margin-bottom: 12px; cursor: pointer;
}
.m-alertbar svg { width: 17px; height: 17px; }
.m-todo {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; margin-bottom: 9px; transition: opacity .2s, transform .2s;
}
.m-todo.compact { border: none; border-bottom: 1px solid #f1f5f9; border-radius: 0; padding: 10px 0; margin: 0; background: none; }
.m-todo.done { opacity: 0; transform: translateX(12px); }
.m-check {
  width: 26px; height: 26px; flex: none; margin-top: 1px; border-radius: 50%;
  border: 1.8px solid #cbd5e1; background: #fff; color: transparent;
  display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.m-check svg { width: 15px; height: 15px; stroke-width: 3; }
.m-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.m-check.od { border-color: #fca5a5; }
.m-todo-main { flex: 1; min-width: 0; }
.m-todo-main b { display: block; font-size: 14px; font-weight: 500; line-height: 1.5; }
.m-todo-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; font-size: 11px; color: var(--text-3); }
.m-dot-high { background: #fee2e2; color: #b91c1c; border-radius: 6px; padding: 0 5px; font-weight: 700; }
.m-todo-cli { color: var(--brand); font-weight: 600; }
.m-auto { background: #f1f5f9; border-radius: 6px; padding: 0 5px; }
.m-todo-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.m-due { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.m-due.od { color: #dc2626; font-weight: 700; }
.m-due.now { color: #b45309; font-weight: 600; }
.m-due.soon { color: var(--text-2); }
.m-more-btn {
  border: none; background: none; color: #cbd5e1; width: 30px; height: 30px;
  display: grid; place-items: center; cursor: pointer; border-radius: 8px;
}
.m-more-btn svg { width: 18px; height: 18px; }
.m-tipcard {
  background: #f8fafc; border: 1px dashed #dbe3ee; border-radius: 14px;
  padding: 14px; margin-top: 6px;
}
.m-tipcard b { font-size: 13.5px; display: block; margin-bottom: 4px; }
.m-tipcard p { margin: 0 0 12px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.m-tip-inline { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin-bottom: 10px; }

/* ---------- 记录 / 向导 ---------- */
.m-cta-wrap { padding: 0; }
.m-statrow {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; margin-bottom: 14px;
}
.m-statrow.four { grid-template-columns: repeat(4, 1fr); }
.m-statrow > div { background: #fff; padding: 12px 4px; text-align: center; }
.m-statrow b { display: block; font-size: 17px; font-weight: 700; color: var(--text); }
.m-statrow span { font-size: 10.5px; color: var(--text-3); }
.m-log-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.m-log-date { font-size: 11px; color: var(--text-3); margin-left: auto; }
.m-log-who { font-size: 11.5px; color: var(--text-2); }
.m-log-content { margin: 0; font-size: 13.5px; line-height: 1.7; }
.m-log-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 11.5px; color: var(--text-3); align-items: center; }
.m-log-meta .m-link { margin-left: 0; font-size: 11.5px; }
.m-log-acts { margin-top: 8px; display: flex; gap: 8px; }

.m-wiz-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.m-wiz-title { flex: 1; min-width: 0; }
.m-wiz-title b { display: block; font-size: 15.5px; font-weight: 700; }
.m-wiz-title span { font-size: 11px; color: var(--text-3); }
.m-steps { display: flex; gap: 4px; flex: none; }
.m-steps i { width: 16px; height: 4px; border-radius: 3px; background: #e2e8f0; }
.m-steps i.on { background: var(--brand); }
.m-wiz-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: flex; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
body.m-wizard .m-tabs { display: none; }
body.m-wizard .m-shell { padding-bottom: 84px; }
body.m-subpage .m-tabs { display: none; }

.m-types { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.m-type {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 15px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.m-type:active { background: #f8fbff; }
.m-type.on { border-color: var(--brand); background: #f5f9ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.m-type-ico {
  width: 44px; height: 44px; flex: none; border-radius: 13px; background: #EAF0FB;
  color: var(--brand); display: grid; place-items: center;
}
.m-type-ico svg { width: 21px; height: 21px; }
.m-type-txt b { display: block; font-size: 15px; font-weight: 600; }
.m-type-txt em { display: block; font-style: normal; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.m-picklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.m-pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 13px 14px; cursor: pointer; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.m-pick.on { border-color: var(--brand); background: #f5f9ff; }
.m-pick b { font-size: 14.5px; font-weight: 600; }
.m-pick em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.m-pick-tick {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center;
}
.m-pick-tick svg { width: 15px; height: 15px; stroke-width: 3; }
.m-context { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.m-ctx-uni {
  border: 1px dashed #bfdbfe; background: #f5f9ff; color: var(--brand-dark);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.m-ctx-uni svg { width: 13px; height: 13px; }

/* ---------- 日报 ---------- */
.m-datebar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.m-dateinput {
  flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px;
  font-size: 16px; background: #fff; color: var(--text); text-align: center; outline: none;
}
.m-rep-head { margin-bottom: 10px; }
.m-rep-head b { display: block; font-size: 14.5px; }
.m-rep-head em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.m-rep-sec { margin-bottom: 12px; }
.m-rep-sec h3 { font-size: 13px; margin: 0 0 5px; color: var(--brand-dark); font-weight: 700; }
.m-rep-text p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.8; color: var(--text); }
.m-rep-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.m-rep-acts .m-btn { flex: none; text-decoration: none; }
.rep-edit { min-height: 90px; font-size: 14px; }

/* ---------- AI 计划 ---------- */
.m-ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.m-ai-when { font-size: 11.5px; color: var(--text-3); }
.m-ai-action { display: block; font-size: 14px; line-height: 1.6; }
.m-ai-reason { margin: 6px 0 8px; font-size: 12px; color: var(--text-2); line-height: 1.7; }
.m-ai-acts { display: flex; gap: 8px; }
.m-ai-acts .m-mini-btn { margin-left: auto; }

/* ---------- 我的 ---------- */
.m-me-head {
  display: flex; align-items: center; gap: 14px;
  padding: calc(20px + env(safe-area-inset-top)) 18px 20px;
  background: linear-gradient(160deg, #1E3A8A, #315FC5); color: #fff;
  border-radius: 0 0 22px 22px;
}
.m-me-head h1 { font-size: 19px; margin: 0; }
.m-me-head p { margin: 3px 0 0; font-size: 12px; color: rgba(255, 255, 255, .8); }
.m-menu {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; margin-bottom: 12px;
}
.m-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: none; background: none; padding: 14px; cursor: pointer;
  font-size: 14.5px; color: var(--text); text-align: left;
  border-bottom: 1px solid #f1f5f9; -webkit-tap-highlight-color: transparent;
}
.m-menu-item:last-child { border-bottom: none; }
.m-menu-item:active { background: #f8fafc; }
.m-menu-item svg { width: 19px; height: 19px; color: var(--text-3); }
.m-menu-item span { flex: 1; }
.m-menu-item svg:last-child { width: 16px; height: 16px; color: #cbd5e1; }

/* ---------- 提示条适配 ---------- */
body.m-mode .toast {
  top: auto; bottom: calc(88px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, .92); font-size: 13.5px; padding: 11px 18px;
  border-radius: 12px; max-width: 86vw; text-align: center;
}
body.m-mode .toast.bad { background: rgba(185, 28, 28, .95); }

/* 确认框在手机上改为底部抽屉式，按钮更好点 */
body.m-mode .mask { align-items: flex-end; padding: 0; }
body.m-mode .mask .modal {
  width: 100%; max-width: 100%; border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: m-up .2s ease;
}
body.m-mode .mask .modal .modal-foot { display: flex; gap: 10px; padding: 12px 16px 16px; }
body.m-mode .mask .modal .modal-foot .btn { flex: 1; min-height: 48px; }
@keyframes m-up { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }

/* 小屏（iPhone SE 375）与大屏（Pro Max 430）都保持单列 */
@media (max-width: 360px) {
  .m-hero-hi { font-size: 18px; }
  .m-tile em { display: none; }
  .m-statgrid b { font-size: 13px; }
}
@media (min-width: 600px) and (max-width: 860px) {
  .m-pad { padding: 16px 22px 0; }
  .m-tiles { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 序鹿 V3.0 小序鹿建议卡 ---------- */
.m-xulu {
  background: linear-gradient(135deg, #EAF2FF, #F0FBF8);
  border: 1px solid #D5E5F7; border-radius: 16px;
  padding: 12px 13px; margin-bottom: 12px;
}
.m-xulu-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.m-xulu-head b { font-size: 13px; color: #234A9E; }
.m-xulu-tag {
  margin-left: auto; font-size: 9.5px; color: #234A9E;
  background: rgba(255,255,255,.7); border: 1px solid #D5E5F7;
  border-radius: 999px; padding: 1px 8px;
}
.m-xulu-ava {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #315FC5, #52B7A5);
  display: grid; place-items: center; font-size: 13px;
  box-shadow: 0 4px 10px -3px rgba(49,95,197,.4);
}
.m-xulu-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-xulu-body b { font-size: 12.5px; color: #234A9E; }
.m-xulu-body em { font-style: normal; font-size: 12px; color: #5A6F8F; line-height: 1.5; }
.m-xulu-row {
  width: 100%; display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 0; border: none; border-top: 1px dashed #D9E4F2;
  background: none; text-align: left; cursor: pointer;
}
.m-xulu-row:first-of-type { border-top: none; }
.m-xulu-pri {
  flex: none; font-size: 9.5px; font-weight: 600; border-radius: 6px;
  padding: 1px 6px; margin-top: 2px;
}
.m-xulu-pri.hi { color: #b91c1c; background: #fee2e2; }
.m-xulu-pri.md { color: #92400e; background: #fef3c7; }
.m-xulu-pri.lo { color: #5A6F8F; background: #eef1f6; }
.m-xulu-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.m-xulu-main b { font-size: 12.5px; color: #263650; font-weight: 600; }
.m-xulu-main em { font-style: normal; font-size: 11px; color: #5A6F8F; line-height: 1.45; }
