/* 蓝密码 · 手机端 App 风格皮肤（只在 html.lm-mobile 下生效，电脑端不受影响） */

.m-header,
.m-tabbar,
.m-drawer-close,
.m-drawer-actions { display: none; }

html.lm-mobile {
  -webkit-text-size-adjust: 100%;
  --m-radius: 18px;
}

html.lm-mobile body {
  min-height: 100%;
  background: #f5f8fc;
  color: #1f2a3a;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

html.lm-mobile .app,
html.lm-mobile .main { display: block; min-height: 100vh; }

/* ---------------- 顶部 App 头部 ---------------- */
html.lm-mobile .topbar { display: none !important; }

html.lm-mobile .m-header {
  display: block;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(7px + env(safe-area-inset-top)) 14px 10px;
  color: #fff;
  background:
    radial-gradient(120% 120% at 92% 0%, rgba(93, 176, 255, .55) 0%, rgba(93, 176, 255, 0) 52%),
    linear-gradient(145deg, #0b2b5e 0%, #1550b9 58%, #2f74ee 100%);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 22px rgba(16, 51, 112, .18);
}

html.lm-mobile .m-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

html.lm-mobile .m-brand-mini {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

html.lm-mobile .m-brand-logo {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .08));
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

html.lm-mobile .m-brand-copy { min-width: 0; }
html.lm-mobile .m-brand-copy b {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.lm-mobile .m-brand-copy small {
  display: block;
  margin-top: 1px;
  color: rgba(255, 255, 255, .66);
  font-size: 10px;
  letter-spacing: .3px;
}

html.lm-mobile .m-header-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }

html.lm-mobile .m-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1b4f9f;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, .92);
  border: 2px solid rgba(255, 255, 255, .38);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .14);
}
html.lm-mobile .m-avatar img { width: 100%; height: 100%; object-fit: cover; }

html.lm-mobile .m-menu-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 9px;
  background: rgba(255, 255, 255, .12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
}
html.lm-mobile .m-menu-btn span {
  display: block;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .9);
}

html.lm-mobile .m-header-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  display: block;
}
html.lm-mobile .m-header-title h1 {
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.2px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html.lm-mobile .m-header-title p {
  overflow: hidden;
  margin-top: 1px;
  color: rgba(255, 255, 255, .66);
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

html.lm-mobile .m-header-logout {
  flex: 0 0 auto;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .92);
  font-size: 10px;
  line-height: 1.3;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
}

/* ---------------- 手机抽屉菜单 ---------------- */
html.lm-mobile .sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 82%;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  padding-top: env(safe-area-inset-top);
  z-index: 56;
  overflow-y: auto;
  transform: translateX(-105%);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  border-radius: 0 22px 22px 0;
  box-shadow: 0 24px 70px rgba(5, 18, 42, .38);
}
html.lm-mobile .sidebar.open { transform: translateX(0); }
html.lm-mobile body.m-drawer-open { overflow: hidden; }

html.lm-mobile .overlay {
  z-index: 55;
  background: rgba(7, 18, 38, .5);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

html.lm-mobile .m-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: calc(12px + env(safe-area-inset-top));
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .8);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
html.lm-mobile .sidebar .brand { padding-right: 50px; }
html.lm-mobile .sidebar .menu { padding-bottom: 10px; }
html.lm-mobile .sidebar .menu-item { padding: 12px 13px; font-size: 15px; border-radius: 11px; }
html.lm-mobile .sidebar .menu-group { padding-top: 16px; }

html.lm-mobile .m-drawer-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .08);
}
html.lm-mobile .m-drawer-actions a {
  flex: 1;
  padding: 9px 8px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  color: #bfcada;
  background: rgba(255, 255, 255, .07);
}
html.lm-mobile .m-drawer-actions a.danger { color: #ffb7b7; background: rgba(220, 38, 38, .13); }

/* ---------------- 内容区 ---------------- */
html.lm-mobile .content {
  padding: 14px 14px calc(92px + env(safe-area-inset-bottom));
}
html.lm-mobile .content > .page-title { display: none; }

html.lm-mobile .card {
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e8eff8;
  border-radius: var(--m-radius);
  box-shadow: 0 6px 20px rgba(27, 61, 120, .055);
}

html.lm-mobile .card-head {
  display: block;
  margin-bottom: 13px;
}
html.lm-mobile .card-head h3 { font-size: 16px; line-height: 1.4; }
html.lm-mobile .card-head .sub {
  display: block;
  width: 100%;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.55;
}
html.lm-mobile .card-head .spacer { display: none; }
html.lm-mobile .card-head > .btn,
html.lm-mobile .card-head > a.btn,
html.lm-mobile .card-head form { width: 100%; margin-top: 10px; }
html.lm-mobile .card-head .btn { width: 100%; }

html.lm-mobile .stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
html.lm-mobile .stats > .stat:nth-child(odd):last-child { grid-column: span 2; }
html.lm-mobile .stat {
  padding: 14px 15px;
  border: 1px solid #e8eff8;
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(27, 61, 120, .05);
}
html.lm-mobile .stat::after {
  width: 72px;
  height: 72px;
  right: -28px;
  top: -30px;
  opacity: .65;
}
html.lm-mobile .stat .s-label { font-size: 11px; }
html.lm-mobile .stat .s-value { margin-top: 4px; font-size: 20px; letter-spacing: -.6px; }
html.lm-mobile .stat .s-extra { margin-top: 3px; font-size: 11px; line-height: 1.45; }

/* ---------------- 大表格自动变卡片列表 ---------------- */
html.lm-mobile .table-wrap.m-card-wrap { overflow: visible; border-radius: 0; }

html.lm-mobile table.m-cards {
  display: block;
  width: 100%;
  min-width: 0;
}
html.lm-mobile table.m-cards thead { display: none; }
html.lm-mobile table.m-cards tr.m-head-row { display: none; }
html.lm-mobile table.m-cards tbody { display: block; }
html.lm-mobile table.m-cards tr {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 2px;
  align-items: start;
  margin: 0 0 10px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid #e8eff8;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(26, 58, 112, .045);
}
html.lm-mobile table.m-cards tbody tr:last-child { margin-bottom: 0; }
html.lm-mobile table.m-cards td {
  display: block;
  min-width: 0;
  padding: 6px 0;
  border: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #263346;
  overflow-wrap: anywhere;
}
html.lm-mobile table.m-cards td.m-wide { grid-column: 1 / -1; }
html.lm-mobile table.m-cards td.m-hide { display: none; }
html.lm-mobile table.m-cards td[data-label="当前佣金"] .muted,
html.lm-mobile table.m-cards td[data-label="二级佣金"] .muted { display: none; }

html.lm-mobile table.m-cards tfoot { display: block; }
html.lm-mobile table.m-cards tfoot tr {
  display: block;
  margin-top: 8px;
  padding: 12px 15px;
  border: 1px solid #dbe7fb;
  border-radius: 14px;
  background: #f1f6ff;
}
html.lm-mobile table.m-cards tfoot td {
  display: block;
  padding: 3px 0;
  border: 0;
  color: #1e4f9d;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
html.lm-mobile table.m-cards td[data-label]::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 2px;
  color: #97a3b4;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .2px;
}
html.lm-mobile table.m-cards td:first-child { padding-top: 0; }
html.lm-mobile table.m-cards td:first-child::before { display: none; }
html.lm-mobile table.m-cards td.m-seq { display: none; }

html.lm-mobile table.m-cards td.actions-cell {
  display: block;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed #e8eff8;
}
html.lm-mobile table.m-cards td.actions-cell::before { display: block; }
html.lm-mobile table.m-cards td.actions-cell .btn { margin: 0 5px 5px 0; }
html.lm-mobile table.m-cards td.actions-cell .tag { margin: 0 5px 5px 0; }

html.lm-mobile table.m-cards tr.m-total-row {
  background: #f3f7ff;
  border-color: #dae6fb;
}
html.lm-mobile table.m-cards tr.m-total-row td { font-weight: 600; color: #1f4f9f; }

html.lm-mobile table.m-cards tr.m-empty-tr {
  padding: 26px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
html.lm-mobile table.m-cards tr.m-empty-tr td {
  padding: 0;
  color: #97a3b4;
  text-align: center;
  font-size: 13px;
}
html.lm-mobile table.m-cards tr.m-empty-tr td::before { display: none; }

html.lm-mobile tr.js-row { cursor: pointer; }
html.lm-mobile table.m-cards tr.js-row { position: relative; }
html.lm-mobile table.m-cards tr.js-row::after {
  content: '›';
  position: absolute;
  right: 14px;
  top: 11px;
  color: #b7c3d4;
  font-size: 20px;
  line-height: 1;
}

/* 行内展开的明细表在小屏里横向滚动，不拆成卡片 */
html.lm-mobile .plan-detail {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
html.lm-mobile .plan-table { min-width: 560px; }
html.lm-mobile .plan-table th,
html.lm-mobile .plan-table td { font-size: 12px; padding: 7px 8px; }

/* ---------------- 表单 / 筛选 ---------------- */
html.lm-mobile .form { max-width: none; }
html.lm-mobile .grid2,
html.lm-mobile .grid3,
html.lm-mobile .detail-grid { grid-template-columns: 1fr; }
html.lm-mobile .field { margin-bottom: 14px; }
html.lm-mobile .field label { font-size: 13px; margin-bottom: 6px; }
html.lm-mobile .field input[type=text],
html.lm-mobile .field input[type=password],
html.lm-mobile .field input[type=number],
html.lm-mobile .field input[type=date],
html.lm-mobile .field input[type=datetime-local],
html.lm-mobile .field input[type=tel],
html.lm-mobile .field select,
html.lm-mobile .field textarea {
  font-size: 16px;
  padding: 12px 13px;
  border-radius: 12px;
  border-color: #dfe7f2;
  background: #fff;
}
html.lm-mobile .field textarea { min-height: 104px; }
html.lm-mobile .field input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1px dashed #d8e3f2;
  border-radius: 12px;
  background: #f8fbff;
  color: #6f7e91;
  font-size: 13px;
}
html.lm-mobile .field input[type=file]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: #eef4ff;
  color: #1f5ed0;
  font-size: 13px;
  font-family: inherit;
}
html.lm-mobile .form-actions { flex-direction: column; gap: 8px; }
html.lm-mobile .form-actions .btn { width: 100%; min-height: 44px; }
html.lm-mobile .voice-btn { min-height: 46px; }

html.lm-mobile .filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-bottom: 13px;
}
html.lm-mobile .filter input[type=text],
html.lm-mobile .filter input[type=search],
html.lm-mobile .filter input[type=date],
html.lm-mobile .filter select { grid-column: 1 / -1; }
html.lm-mobile .filter input,
html.lm-mobile .filter select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  font-size: 16px;
  border-radius: 12px;
}
html.lm-mobile .filter .btn,
html.lm-mobile .filter a.btn { width: 100%; min-height: 42px; }

/* ---------------- 按钮 / 标签 / 分页 ---------------- */
html.lm-mobile .btn { min-height: 40px; padding: 9px 14px; border-radius: 11px; }
html.lm-mobile .btn.sm { min-height: 34px; padding: 6px 10px; }
html.lm-mobile .tag { font-size: 11px; padding: 2px 8px; }
html.lm-mobile .pager { justify-content: center; padding-top: 12px; }
html.lm-mobile .pager a,
html.lm-mobile .pager span { min-width: 34px; text-align: center; }

/* ---------------- 内容组件 ---------------- */
html.lm-mobile .tabs {
  overflow-x: auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
html.lm-mobile .tabs .tab { flex: 0 0 auto; }
html.lm-mobile .product-grid,
html.lm-mobile .shop-list { grid-template-columns: 1fr; }
html.lm-mobile .product .p-cover { height: 180px; }
html.lm-mobile .video-box video { max-height: 240px; }
html.lm-mobile .detail-item { padding: 9px 0; }

html.lm-mobile .empty { padding: 34px 12px; }
html.lm-mobile .empty .e-title { font-size: 14px; }

html.lm-mobile .flash { border-radius: 12px; font-size: 13px; line-height: 1.55; }

/* ---------------- 弹窗改成底部抽屉 ---------------- */
html.lm-mobile .lm-modal {
  align-items: flex-end;
  padding: 0;
}
html.lm-mobile .lm-modal-box {
  width: 100%;
  max-width: none;
  max-height: 88vh;
  max-height: 88dvh;
  border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
html.lm-mobile .lm-modal-box.wide { max-width: none; }
html.lm-mobile .lm-modal-box::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 99px;
  background: #e3e9f2;
  flex: 0 0 auto;
}
html.lm-mobile .lm-modal-head { position: sticky; top: 0; background: #fff; z-index: 2; }
html.lm-mobile .lm-modal-box .lm-modal-body { padding: 12px 16px 20px; }

/* ---------------- 底部 App 导航 ---------------- */
html.lm-mobile .m-tabbar {
  display: flex;
  align-items: stretch;
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 52;
  padding: 6px 4px;
  border: 1px solid rgba(224, 232, 244, .9);
  border-radius: 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 34px rgba(20, 52, 105, .17);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
html.lm-mobile .m-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 2px;
  border-radius: 14px;
  color: #8491a3;
  font-size: 10px;
  line-height: 1.2;
  transition: .15s;
}
html.lm-mobile .m-tab:hover { opacity: 1; }
html.lm-mobile .m-tab svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.lm-mobile .m-tab.active {
  color: #1f5ed0;
  font-weight: 600;
  background: linear-gradient(180deg, #eff5ff, #e8f1ff);
}
html.lm-mobile .m-tab.active svg { stroke: #1f5ed0; stroke-width: 2; }

/* ---------------- 电话号码一键拨号 ---------------- */
html.lm-mobile a.tel-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 0;
  color: #1f5ed0;
  font-weight: 600;
  border-bottom: 1px dashed rgba(31, 94, 208, .42);
  -webkit-tap-highlight-color: transparent;
}
html.lm-mobile a.tel-link::before {
  content: "☎";
  color: #2b66d9;
  font-size: 11px;
  line-height: 1;
}
html.lm-mobile a.tel-link:active { color: #0c3f9e; }

/* ---------------- 我的页面 / 我的服务列表 ---------------- */
html.lm-mobile .mine-desktop-only { display: none !important; }

html.lm-mobile .m-profile-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(22, 46, 88, .05);
}
html.lm-mobile .m-ph-avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d6be0, #61adff);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
html.lm-mobile .m-ph-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html.lm-mobile .m-ph-copy { flex: 1; min-width: 0; }
html.lm-mobile .m-ph-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #162538;
  font-size: 18px;
  font-weight: 700;
}
html.lm-mobile .m-ph-name span {
  padding: 3px 7px;
  border-radius: 7px;
  background: #edf4ff;
  color: #2b66d9;
  font-size: 11px;
  font-weight: 500;
}
html.lm-mobile .m-ph-copy small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #7b8a9e;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html.lm-mobile .m-ph-edit {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 10px;
  background: #edf4ff;
  color: #2b66d9;
  font-size: 12px;
  font-weight: 600;
}

html.lm-mobile .m-mine-menu {
  display: block;
  margin-bottom: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(22, 46, 88, .05);
}
html.lm-mobile .m-menu-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border-bottom: 1px solid #f0f3f8;
  color: #162538;
  -webkit-tap-highlight-color: transparent;
}
html.lm-mobile .m-menu-link:last-child { border-bottom: 0; }
html.lm-mobile .m-menu-link:active { background: #f5f9ff; }
html.lm-mobile .m-menu-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #edf4ff;
  color: #2b66d9;
  font-size: 15px;
  font-weight: 700;
}
html.lm-mobile .m-menu-icon.c-indigo { background: #eff0ff; color: #4f56d9; }
html.lm-mobile .m-menu-icon.c-green { background: #edf9f3; color: #159a63; }
html.lm-mobile .m-menu-icon.c-orange { background: #fff3e8; color: #d97812; }
html.lm-mobile .m-menu-icon.c-cyan { background: #eaf9fb; color: #078a99; }
html.lm-mobile .m-menu-icon.c-purple { background: #f5efff; color: #7c4bd6; }
html.lm-mobile .m-menu-copy { flex: 1; min-width: 0; }
html.lm-mobile .m-menu-copy b {
  display: block;
  color: #17273b;
  font-size: 15px;
  font-weight: 600;
}
html.lm-mobile .m-menu-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #8491a3;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html.lm-mobile .m-menu-arrow {
  flex: 0 0 auto;
  color: #9caabd;
  font-size: 20px;
  line-height: 1;
}

html.lm-mobile .m-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 12px;
  padding: 8px 13px;
  background: #fff;
  border: 1px solid #e2e9f4;
  border-radius: 10px;
  color: #2b66d9;
  font-size: 13px;
  font-weight: 500;
}
html.lm-mobile .m-sub-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid #e6edf7;
  border-radius: 14px;
  color: #245fcf;
  font-size: 14px;
  font-weight: 600;
}
html.lm-mobile .m-sub-link span { color: #9caabd; font-size: 18px; }
html.lm-mobile .m-section-tip {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f2f7ff;
  color: #61748c;
  font-size: 12.5px;
  line-height: 1.75;
}

/* ---------------- 登录页 ---------------- */
html.lm-mobile .login-page {
  align-items: flex-start;
  min-height: 100dvh;
  padding: calc(8vh + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
  background:
    radial-gradient(100% 55% at 85% 0%, rgba(97, 173, 255, .55), transparent 70%),
    linear-gradient(160deg, #0b2b5e 0%, #1550b9 48%, #f5f8fc 48.2%, #f5f8fc 100%);
}
html.lm-mobile .login-card {
  max-width: none;
  width: 100%;
  padding: 26px 22px;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(8, 31, 71, .2);
}
html.lm-mobile .login-card .logo-row { margin-bottom: 20px; }
html.lm-mobile .login-card h2 { font-size: 20px; }
html.lm-mobile .login-card .field input { font-size: 16px; padding: 12px 13px; border-radius: 12px; }
html.lm-mobile .login-card .btn { min-height: 46px; border-radius: 12px; }

/* ---------------- UI 精修 2026-11-28：更轻、更有主次 ---------------- */
html.lm-mobile {
  --primary: #1b57d6;
  --primary-dark: #0d3a96;
  --primary-light: #e9f1fe;
  --m-ink: #12233d;
  --m-ink-2: #56677f;
  --m-ink-3: #8b9aae;
  --m-line: rgba(18, 52, 104, .09);
  --m-soft: #f3f7fc;
  --m-card-shadow:
    0 1px 2px rgba(13, 38, 78, .04),
    0 10px 28px -12px rgba(13, 38, 78, .16),
    0 30px 60px -36px rgba(13, 38, 78, .18);
}

html.lm-mobile body {
  background:
    radial-gradient(120% 32% at 88% -8%, rgba(74, 148, 255, .14), transparent 62%),
    #eef3f9;
  color: var(--m-ink);
}

html.lm-mobile .m-header {
  padding: calc(6px + env(safe-area-inset-top)) 12px 8px;
  background:
    radial-gradient(120% 130% at 96% -10%, rgba(91, 183, 255, .46) 0%, rgba(91, 183, 255, 0) 54%),
    linear-gradient(135deg, #071f44 0%, #1046a6 58%, #2865df 100%);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 12px 26px -16px rgba(6, 30, 70, .58);
}
html.lm-mobile .m-header::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
}
html.lm-mobile .m-header-top { gap: 10px; }
html.lm-mobile .m-menu-btn,
html.lm-mobile .m-avatar {
  width: 32px;
  height: 32px;
}
html.lm-mobile .m-menu-btn {
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
}
html.lm-mobile .m-header-title h1 {
  font-size: 19px;
  letter-spacing: -.3px;
}
html.lm-mobile .m-header-title p {
  margin-top: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 10.5px;
  letter-spacing: .15px;
}

html.lm-mobile .content {
  padding: 12px 12px calc(104px + env(safe-area-inset-bottom));
}

html.lm-mobile .card {
  padding: 15px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--m-line);
  border-radius: 18px;
  box-shadow: var(--m-card-shadow);
}

html.lm-mobile .card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 11px;
}
html.lm-mobile .card-head h3 {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--m-ink);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
html.lm-mobile .card-head .sub {
  flex: 1 0 100%;
  order: 3;
  margin-top: 2px;
  color: var(--m-ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}
html.lm-mobile .card-head > .btn,
html.lm-mobile .card-head > a.btn {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  margin: 0 0 0 auto;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}
html.lm-mobile .card-head form {
  flex: 1 0 100%;
  order: 4;
  width: 100%;
  margin-top: 8px;
}
html.lm-mobile .card-head form > select,
html.lm-mobile .card-head form > input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  font-size: 14px;
}
html.lm-mobile .card-head form > select { padding-right: 30px !important; font-size: 13px; }
html.lm-mobile .card-head .btn[style*="success"] {
  background: #e9f7f0 !important;
  color: #0f7a55 !important;
  border: 1px solid rgba(15, 122, 85, .14);
  box-shadow: none;
}
html.lm-mobile .card-head form > .btn {
  flex: 1 0 100%;
  width: 100%;
  min-height: 44px;
}

/* 首页主指标：把“应付佣金”提到第一视觉层 */
html.lm-mobile .m-kpi-hero {
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 17px 17px 15px;
  color: #fff;
  border-radius: 22px;
  background:
    radial-gradient(90% 125% at 102% -8%, rgba(96, 183, 255, .58) 0%, rgba(96, 183, 255, 0) 58%),
    linear-gradient(135deg, #071f44 0%, #0e43a0 58%, #2261da 100%);
  box-shadow:
    0 2px 4px rgba(9, 34, 76, .1),
    0 18px 36px -16px rgba(9, 34, 76, .52),
    0 36px 70px -40px rgba(9, 34, 76, .55);
  animation: m-kpi-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
html.lm-mobile .m-kpi-hero::before {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  right: -40px;
  top: -68px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 26px rgba(255, 255, 255, .035);
  pointer-events: none;
}
html.lm-mobile .m-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
html.lm-mobile .m-kpi-label {
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .4px;
}
html.lm-mobile .m-kpi-month {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .82);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
html.lm-mobile .m-kpi-value {
  margin-top: 5px;
  font-size: 35px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.2px;
  font-variant-numeric: tabular-nums;
}
html.lm-mobile .m-kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
html.lm-mobile .m-kpi-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(255, 255, 255, .66);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}
html.lm-mobile .m-kpi-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .52);
}
html.lm-mobile .m-kpi-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #fff;
  color: #1046a6;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(4, 22, 54, .18);
}
html.lm-mobile .m-kpi-action span { font-size: 13px; }

/* 统计卡：统一、紧凑，不再用四张大白卡撑满首屏 */
html.lm-mobile .stats {
  gap: 8px;
  margin-bottom: 10px;
}
html.lm-mobile .stat {
  min-height: 86px;
  padding: 12px 13px;
  border: 1px solid var(--m-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 1px 2px rgba(13, 38, 78, .03), 0 8px 20px -12px rgba(13, 38, 78, .14);
}
html.lm-mobile .stat::after { display: none; }
html.lm-mobile .stat .s-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--m-ink-3);
  font-size: 10.5px;
  letter-spacing: .2px;
}
html.lm-mobile .stat .s-label::before {
  content: '';
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #7e91aa;
}
html.lm-mobile .stat.green .s-label::before { background: #159b69; }
html.lm-mobile .stat.orange .s-label::before { background: #cf7a16; }
html.lm-mobile .stat.red .s-label::before { background: #bd453c; }
html.lm-mobile .stat .s-value {
  margin-top: 3px;
  color: var(--m-ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}
html.lm-mobile .stat .s-extra {
  margin-top: 2px;
  color: var(--m-ink-3);
  font-size: 10.5px;
  line-height: 1.4;
}
html.lm-mobile .m-dash-stats .stat.red { display: none; }
html.lm-mobile .m-sales-stats .stat.green,
html.lm-mobile .m-sales-stats .stat.orange { display: none; }
html.lm-mobile .m-hide-mobile { display: none !important; }
html.lm-mobile .m-settle-stats,
html.lm-mobile .m-team-stats { display: none; }
html.lm-mobile .m-settle-hero .m-kpi-meta,
html.lm-mobile .m-team-hero .m-kpi-meta {
  gap: 5px;
  font-size: 10px;
  line-height: 1.45;
}

/* 排行：一行一个人，而不是一条一条的大卡 */
html.lm-mobile table.m-cards.m-rank-table tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 92px;
  align-items: center;
  column-gap: 8px;
  padding: 9px 12px;
}
html.lm-mobile table.m-cards.m-rank-table td { padding: 0; }
html.lm-mobile table.m-cards.m-rank-table td.m-primary {
  grid-column: 1;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 14px;
}
html.lm-mobile table.m-cards.m-rank-table td.m-primary .muted { font-size: 10.5px; }
html.lm-mobile table.m-cards.m-rank-table td[data-label="台数"],
html.lm-mobile table.m-cards.m-rank-table td[data-label="佣金"] {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
html.lm-mobile table.m-cards.m-rank-table td[data-label="台数"]::before,
html.lm-mobile table.m-cards.m-rank-table td[data-label="佣金"]::before { display: none; }
html.lm-mobile table.m-cards.m-rank-table tr.m-head-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 92px;
  column-gap: 8px;
  margin: 0;
  padding: 2px 12px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
html.lm-mobile table.m-cards.m-rank-table tr.m-head-row th {
  padding: 0;
  color: var(--m-ink-3);
  font-size: 9.5px;
  font-weight: 400;
  text-align: right;
  background: transparent !important;
  border: 0 !important;
}
html.lm-mobile table.m-cards.m-rank-table tr.m-head-row th:first-child { text-align: left; }
html.lm-mobile table.m-cards.m-rank-table tr::after { display: none; }
html.lm-mobile table.m-cards.m-salesman-table td[data-label="添加日期"] { display: none; }

/* 筛选区：一条搜索、一条筛选，不再四个大按钮 */
html.lm-mobile .filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
  padding: 9px;
  border: 1px solid rgba(18, 52, 104, .07);
  border-radius: 14px;
  background: #f4f8fe;
}
html.lm-mobile .filter input[type=text],
html.lm-mobile .filter input[type=search],
html.lm-mobile .filter input[type=date] {
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(18, 52, 104, .1);
  border-radius: 11px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(13, 38, 78, .03);
}
html.lm-mobile .filter select {
  grid-column: 1 / 3;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(18, 52, 104, .1);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
}
html.lm-mobile .filter .btn,
html.lm-mobile .filter a.btn {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: none;
}
html.lm-mobile .filter button.btn { grid-column: 3 / 4; }
html.lm-mobile .filter a.btn { grid-column: 4 / 5; }

/* 按钮 / 标签：触控高度够，主次分明 */
html.lm-mobile .btn {
  min-height: 44px;
  padding: 10px 15px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .15px;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
html.lm-mobile .btn.sm {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 9px;
}
html.lm-mobile .btn:active { transform: scale(.985); }
html.lm-mobile .tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
}
html.lm-mobile .tabs {
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--m-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}
html.lm-mobile .tabs .tab {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
}

/* 列表卡：更紧凑，姓名/客户名单独一行 */
html.lm-mobile table.m-cards tr {
  column-gap: 12px;
  row-gap: 0;
  margin-bottom: 8px;
  padding: 12px 13px;
  border: 1px solid var(--m-line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 2px rgba(13, 38, 78, .03), 0 7px 18px -12px rgba(13, 38, 78, .13);
}
html.lm-mobile table.m-cards td {
  padding: 4px 0;
  color: #2c3d55;
  font-size: 13.5px;
  line-height: 1.5;
}
html.lm-mobile table.m-cards td[data-label]::before {
  margin-bottom: 1px;
  color: #94a2b4;
  font-size: 9.5px;
  letter-spacing: .15px;
}
html.lm-mobile table.m-cards td.m-primary {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  padding-bottom: 7px;
  padding-right: 18px;
  border-bottom: 1px solid rgba(18, 52, 104, .065);
  color: var(--m-ink);
  font-size: 15px;
  font-weight: 650;
}
html.lm-mobile table.m-cards td.m-primary::before { display: none; }
html.lm-mobile table.m-cards td.m-primary .muted {
  color: var(--m-ink-3);
  font-size: 11px;
  font-weight: 400;
}
html.lm-mobile table.m-cards td[data-label="地址"] {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
html.lm-mobile table.m-cards td.actions-cell {
  margin-top: 5px;
  padding-top: 8px;
  border-top: 1px dashed rgba(18, 52, 104, .08);
}
html.lm-mobile table.m-cards td.actions-cell::before { display: none; }
html.lm-mobile table.m-cards td.actions-cell .btn {
  min-height: 30px;
  margin: 0 5px 4px 0;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
}
html.lm-mobile table.m-cards td.actions-cell .tag { margin-bottom: 4px; }
html.lm-mobile table.m-cards tfoot tr {
  padding: 10px 13px;
  border-radius: 13px;
  background: #f2f7ff;
}
html.lm-mobile table.m-cards tr.js-row::after {
  top: 13px;
  right: 12px;
  color: #a8b6c8;
}

/* 我的：头像卡、服务列表 */
html.lm-mobile .m-profile-hero {
  gap: 12px;
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid rgba(18, 52, 104, .08);
  border-radius: 20px;
  background:
    radial-gradient(90% 130% at 100% 0%, rgba(90, 160, 255, .14), transparent 62%),
    linear-gradient(145deg, #fdfeff 0%, #edf4ff 100%);
  box-shadow: var(--m-card-shadow);
}
html.lm-mobile .m-ph-avatar {
  flex-basis: 54px;
  width: 54px;
  height: 54px;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(16, 61, 133, .18);
}
html.lm-mobile .m-ph-name { font-size: 18px; letter-spacing: -.2px; }
html.lm-mobile .m-ph-edit {
  padding: 7px 11px;
  border: 1px solid rgba(27, 87, 214, .12);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 10px rgba(20, 63, 140, .07);
}
html.lm-mobile .m-mine-menu {
  margin-bottom: 12px;
  border: 1px solid var(--m-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--m-card-shadow);
}
html.lm-mobile .m-menu-link {
  gap: 12px;
  padding: 12px 14px;
}
html.lm-mobile .m-menu-icon {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 14px;
}
html.lm-mobile .m-menu-icon.c-indigo,
html.lm-mobile .m-menu-icon.c-cyan,
html.lm-mobile .m-menu-icon.c-purple {
  background: #eaf1fd;
  color: #1b57d6;
}
html.lm-mobile .m-menu-icon.c-green { background: #e8f7f0; color: #12845b; }
html.lm-mobile .m-menu-icon.c-orange { background: #fff3e4; color: #b46a15; }
html.lm-mobile .m-menu-copy b { font-size: 14.5px; font-weight: 650; }
html.lm-mobile .m-menu-copy small { margin-top: 2px; font-size: 11.5px; }
html.lm-mobile .m-menu-arrow { font-size: 18px; color: #a5b3c5; }
html.lm-mobile .m-back {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 12px rgba(13, 38, 78, .06);
}

/* 底部导航：更贴底、更稳 */
html.lm-mobile .m-tabbar {
  left: 10px;
  right: 10px;
  bottom: calc(6px + env(safe-area-inset-bottom));
  padding: 5px;
  border: 1px solid rgba(18, 52, 104, .08);
  border-radius: 22px;
  background: rgba(252, 253, 255, .94);
  box-shadow: 0 2px 5px rgba(13, 38, 78, .05), 0 18px 40px -12px rgba(13, 38, 78, .25);
}
html.lm-mobile .m-tab {
  gap: 2px;
  padding: 6px 2px;
  border-radius: 16px;
  font-size: 10px;
}
html.lm-mobile .m-tab.active {
  color: var(--primary);
  background: #e9f1fe;
}

html.lm-mobile .form-actions .btn { min-height: 46px; }
html.lm-mobile .flash {
  padding: 10px 12px;
  margin-bottom: 10px !important;
  border-radius: 12px;
  box-shadow: none;
}

@keyframes m-kpi-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html.lm-mobile .m-kpi-hero { animation: none; }
  html.lm-mobile .btn { transition: none; }
}

/* ---------------- 小屏收口 ---------------- */
@media (max-width: 370px) {
  html.lm-mobile .stats { grid-template-columns: 1fr; }
  html.lm-mobile .m-header-title h1 { font-size: 17px; }
  html.lm-mobile .m-header { padding-left: 12px; padding-right: 12px; }
}

/* 列表精简：手机上只保留高频字段，详情/编辑里仍可查看完整信息 */
html.lm-mobile table.m-cards.m-customer-table td[data-label="性别"],
html.lm-mobile table.m-cards.m-customer-table td[data-label="添加日期"],
html.lm-mobile table.m-cards.m-salesman-table td[data-label="性别"],
html.lm-mobile table.m-cards.m-salesman-table td[data-label="装机编号"],
html.lm-mobile table.m-cards.m-salesman-table td[data-label="添加日期"] {
  display: none;
}

/* 表单页：暂时收起底部导航，避免浮层压住输入项 */
html.lm-mobile.m-form-page .m-tabbar { display: none !important; }
html.lm-mobile.m-form-page .content { padding-bottom: 24px !important; }
