/* BGK CRM 移动版样式：触屏优先，无外部依赖 */
:root {
  --m-primary: #2e60c5;
  --m-primary-strong: #214ca5;
  --m-primary-soft: #eef3ff;
  --m-bg: #f4f7fb;
  --m-card: #fff;
  --m-border: #e2e9f2;
  --m-text: #182b43;
  --m-sub: #63748a;
  --m-danger: #c7363c;
  --m-ok: #16816a;
  --m-warn: #a96216;
  --m-radius: 18px;
  --m-shadow: 0 4px 18px rgba(26, 49, 84, .055);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 15px; }
body {
  font: 15px/1.6 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--m-text); background: var(--m-bg);
  min-height: 100vh;
}
a { color: var(--m-primary); text-decoration: none; }
.m-link { color: var(--m-primary); }
.m-mono { font-family: Consolas, monospace; }
.m-sub { color: var(--m-sub); font-size: .82rem; display: block; line-height: 1.5; }
.m-danger { color: var(--m-danger) !important; }
.m-ok { color: var(--m-ok) !important; }
.m-warn { color: var(--m-warn) !important; }
.m-center { text-align: center; }
.m-empty { text-align: center; color: var(--m-sub); padding: 26px 0; font-size: .9rem; }
.m-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-content-text { white-space: pre-wrap; word-break: break-word; }

/* ---------- 顶栏 ---------- */
.m-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; min-height: 50px;
  padding: env(safe-area-inset-top) 12px 0;
  background: linear-gradient(135deg, #1d3557, #2563eb);
  color: #fff;
}
.m-title { font-size: 1.02rem; font-weight: 600; padding: 10px 0; }
.m-title-center { flex: 1; text-align: center; }
.m-back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-right: 4px;
  color: #fff; font-size: 1.5rem; border-radius: 50%;
  background: rgba(255,255,255,.14);
}

/* ---------- 内容区 ---------- */
.m-content {
  padding: 12px 12px calc(78px + env(safe-area-inset-bottom));
  max-width: 640px; margin: 0 auto;
}
/* 页面含悬浮新增按钮时，补足底部留白防止滚动遮挡（JS 挂类，:has 为增强兜底） */
.m-content.m-has-fab,
.m-content:has(.m-fab) {
  padding-bottom: calc(135px + env(safe-area-inset-bottom));
}

/* ---------- 卡片 ---------- */
.m-card {
  background: var(--m-card); border-radius: var(--m-radius);
  box-shadow: 0 1px 3px rgba(16,24,40,.07);
  padding: 14px; margin-bottom: 12px;
  display: block; color: var(--m-text);
}
.m-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-card-head h2 { font-size: .95rem; }
.m-sub h2 { font-weight: 400; }

/* 速报卡片 */
.m-stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 4px; }
.m-stat3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.m-stat2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.m-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 10px; color: var(--m-text);
}
.m-stat strong { font-size: 1.15rem; }
.m-stat span { color: var(--m-sub); font-size: .72rem; }
.m-stat-row { display: flex; gap: 8px; margin-top: 6px; }
.m-stat-row > div {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  background: var(--m-primary-soft); border-radius: 10px; padding: 8px 10px;
}
.m-stat-row span { color: var(--m-sub); font-size: .72rem; }
.m-stat-row strong { font-size: .95rem; }

/* 审批提醒横幅 */
.m-approve-banner {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, #fff7ed, #ffedd5);
  border: 1px solid #fed7aa; color: #9a3412;
  border-radius: var(--m-radius); padding: 12px 14px; margin-bottom: 12px;
  font-size: .86rem;
}
.m-approve-banner em { margin-left: auto; font-style: normal; font-weight: 600; }
.m-approve-dot {
  min-width: 26px; height: 26px; border-radius: 50%;
  background: #ea580c; color: #fff; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; font-size: .82rem;
}

/* ---------- 列表行 ---------- */
.m-list { display: flex; flex-direction: column; }
.m-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px; border-bottom: 1px solid #f0f2f6; color: var(--m-text);
}
.m-list .m-row:last-child { border-bottom: none; }
.m-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-row-main strong { font-size: .92rem; word-break: break-all; }
.m-selected-fields { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; line-height: 1.35; }
.m-selected-field { display: inline-flex; align-items: baseline; max-width: 100%; padding: 3px 7px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: .72rem; overflow-wrap: anywhere; }
.m-selected-field b { font-weight: 650; }
.m-selected-fields-empty { color: var(--m-sub); font-size: .72rem; }
.m-chev { color: #c0c6d0; font-size: 1.3rem; }

/* ---------- 模块卡片列表（订单/合同/售后等模块列表统一卡片风格） ---------- */
.m-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.m-cards .m-row {
  background: var(--m-card); border-radius: 10px; padding: 13px 14px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .08); border-bottom: none;
  border-left: 3px solid transparent;
}
.m-cards .m-row:active { background: #eef2f9; }
.m-cards .m-row:last-child { border-bottom: none; }
.m-cards .m-row.st-ok { border-left-color: var(--m-ok); }
.m-cards .m-row.st-info { border-left-color: var(--m-primary); }
.m-cards .m-row.st-warn { border-left-color: var(--m-warn); }
.m-cards .m-row.st-bad { border-left-color: var(--m-danger); }
.m-cards .m-row .amt { font-family: Consolas, monospace; font-size: .95rem; white-space: nowrap; }
.m-cards .m-row .amt.income { color: var(--m-ok); }
.m-cards .m-row .amt.expense { color: var(--m-danger); }

/* 选项卡（客户/审批） */
.m-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.m-tab-pill {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 999px;
  background: var(--m-card); color: var(--m-text); font-size: .88rem;
  border: 1px solid var(--m-border);
}
.m-tab-pill.active { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 600; }

/* 搜索 */
.m-search { display: flex; gap: 8px; margin-bottom: 12px; }
.m-search input {
  flex: 1; padding: 11px 14px; border: 1px solid var(--m-border);
  border-radius: 999px; font-size: .9rem; background: var(--m-card);
}
.m-search button {
  padding: 0 18px; border: none; border-radius: 999px;
  background: var(--m-primary); color: #fff; font-size: .9rem;
}

/* ---------- 表单 ---------- */
.m-field { margin-bottom: 14px; }
.m-field label { display: block; font-size: .8rem; color: var(--m-sub); margin-bottom: 6px; font-weight: 600; }
.m-field input, .m-field select, .m-field textarea {
  width: 100%; padding: 12px 13px; font-size: .95rem;
  border: 1px solid var(--m-border); border-radius: 10px; background: #fff;
  font-family: inherit; color: var(--m-text);
}
.m-field input:focus, .m-field select:focus, .m-field textarea:focus {
  outline: none; border-color: var(--m-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.m-field textarea { resize: vertical; }
.m-hint { font-size: .75rem; color: var(--m-sub); margin-top: 8px; }
.m-customer-picker .customer-search-wrap { position: relative; }
.m-customer-picker [data-customer-search] { min-height: 46px; }
.m-customer-picker [data-customer-search][hidden],
.m-customer-picker [data-customer-select][hidden],
.m-customer-picker [data-customer-suggestions][hidden] { display: none; }
.m-customer-picker .customer-suggestions {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0;
  max-height: min(48vh, 320px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--m-border); border-radius: 12px;
  background: #fff; box-shadow: 0 12px 28px rgba(17, 38, 69, .18);
}
.m-customer-picker .customer-suggestion {
  display: block; width: 100%; min-height: 46px; padding: 11px 13px;
  border: 0; border-bottom: 1px solid #edf1f6; background: #fff;
  color: var(--m-text); font: inherit; text-align: left; overflow-wrap: anywhere;
}
.m-customer-picker .customer-suggestion:last-child { border-bottom: 0; }
.m-customer-picker .customer-suggestion:is(:active, :focus, [aria-selected="true"]) {
  background: #eef4ff; color: var(--m-primary); outline: none;
}
.m-customer-picker .customer-suggestions-empty { padding: 13px; color: var(--m-sub); font-size: .82rem; }
.m-menu-note { margin: 0 0 12px; line-height: 1.6; }
.m-menu-list { display: grid; gap: 10px; }
.m-menu-row { margin: 0; }
.m-menu-row .m-row-main { margin-bottom: 10px; }
.m-menu-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.m-menu-form .m-check { min-height: 42px; }
.m-menu-status { display: flex; align-items: center; gap: 7px; color: var(--m-sub); font-size: .81rem; }
.m-menu-status select { min-height: 40px; padding: 6px 8px; border: 1px solid var(--m-border); border-radius: 8px; background: #fff; color: var(--m-text); }
.m-menu-form .m-mini-btn { margin-left: auto; min-height: 40px; padding-inline: 17px; }
.m-snippets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.m-snippet {
  padding: 6px 12px; font-size: .78rem; border-radius: 999px;
  border: 1px solid var(--m-border); background: #f8faff; color: var(--m-primary);
}

/* 药丸单选组（跟单方式/进度） */
.m-pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.m-pill { position: relative; }
.m-pill input { position: absolute; opacity: 0; width: 0; }
.m-pill {
  padding: 9px 16px; border-radius: 999px; font-size: .85rem;
  border: 1px solid var(--m-border); background: var(--m-card); color: var(--m-text);
}
.m-pill:has(input:checked) { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 600; }

/* 高级筛选：数值比较/区间控件 */
.range-group { display: flex; align-items: center; gap: 6px; }
.range-group .range-input { flex: 1 1 0; width: 0; min-width: 0; padding: 10px 12px; font-size: .92rem;
  border: 1px solid var(--m-border); border-radius: 8px; background: #fff; color: var(--m-text); font-family: inherit; }
.range-group .range-input:focus { outline: none; border-color: var(--m-primary); }
.range-group .range-sep { color: var(--m-sub); flex-shrink: 0; }
.range-group .range-op { width: auto; flex-shrink: 0; padding: 10px 8px; font-size: .88rem; border: 1px solid var(--m-border);
  border-radius: 8px; background: #fff; color: var(--m-text); font-family: inherit; }

/* ---------- 按钮 ---------- */
.m-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 11px 18px; border-radius: 11px; font-size: .92rem;
  border: 1px solid var(--m-border); background: var(--m-card); color: var(--m-text);
  cursor: pointer; font-family: inherit;
}
.m-btn:active { transform: scale(.97); }
.m-btn-primary { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 600; }
.m-btn-ok { background: var(--m-ok); border-color: var(--m-ok); color: #fff; font-weight: 600; }
.m-btn-no { background: #fff; border-color: #fecaca; color: var(--m-danger); }
.m-btn-block { width: 100%; }
.m-mini-btn {
  padding: 6px 12px; font-size: .78rem; border-radius: 999px;
  border: 1px solid var(--m-border); background: var(--m-primary-soft); color: var(--m-primary);
}
/* 操作按钮行（页内流式排布，等宽两键） */
.m-action-row { display: flex; gap: 10px; margin-bottom: 12px; }
.m-action-row .m-btn { flex: 1; }

/* 审批按钮组 */
.m-approve-actions { display: flex; gap: 10px; }
.m-approve-actions .m-btn { flex: 1; }

/* 速拨按钮组 */
.m-call-group { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.m-call, .m-sms {
  font-size: .78rem; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.m-call { background: var(--m-ok); color: #fff; font-weight: 600; }
.m-sms { background: #f3f4f6; color: var(--m-sub); }

/* ---------- KV / 时间线 ---------- */
.m-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.m-kv > div { padding: 7px 0; border-bottom: 1px dashed #eef1f5; font-size: .86rem; }
.m-kv > .m-full { grid-column: 1 / -1; }
.m-kv span { color: var(--m-sub); display: block; font-size: .74rem; }
.m-kv strong { font-weight: 500; }
.m-timeline { list-style: none; }
.m-timeline li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--m-border); margin-left: 6px; }
.m-timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--m-primary); }
.m-tl-meta { color: var(--m-sub); font-size: .74rem; }
.m-tl-body { margin-top: 3px; font-size: .85rem; white-space: pre-wrap; word-break: break-word; }

/* ---------- 快捷入口网格 ---------- */
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.m-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 2px; border-radius: 10px; color: var(--m-text); font-size: .74rem;
}
.m-grid-item:active { background: var(--m-primary-soft); }
.m-grid-icon { font-size: 1.35rem; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .72rem; }
.badge-green { background: #ecfdf5; color: #059669; }
.badge-red { background: #fef2f2; color: #dc2626; }
.badge-orange { background: #fff7ed; color: #c2410c; }
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }

/* ---------- 提示条 ---------- */
.m-alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-size: .85rem; }
.m-alert-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.m-alert-err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- 页面内确认弹层 ---------- */
.m-modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.m-modal {
  background: var(--m-card); border-radius: 14px; padding: 20px 18px 14px;
  width: 100%; max-width: 320px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.m-modal-text { font-size: .92rem; line-height: 1.6; word-break: break-all; margin-bottom: 16px; }
.m-modal-btns { display: flex; gap: 10px; }
.m-modal-btns .m-btn { flex: 1; }

/* ---------- 底部标签栏 ---------- */
.m-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--m-border);
  padding-bottom: env(safe-area-inset-bottom);
}
.m-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 7px 0 6px; color: var(--m-sub); font-size: .68rem;
}
.m-tab-icon { font-size: 1.25rem; line-height: 1.2; }
.m-tab.active { color: var(--m-primary); font-weight: 600; }

/* ---------- 登录页 ---------- */
.m-login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
  background: linear-gradient(160deg, #0f1e3d 0%, #1d3557 55%, #2563eb 130%);
}
.m-login { width: 100%; max-width: 360px; background: var(--m-card); border-radius: 18px; padding: 28px 24px 20px; }
.m-login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.m-login-logo h1 { font-size: 1.1rem; }
.m-login-logo h1 em { font-style: normal; color: var(--m-sub); font-size: .8rem; }
.m-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; font-weight: 800; font-size: 1.2rem;
}
.m-login-tagline { color: var(--m-sub); font-size: .78rem; margin-bottom: 18px; }
.m-login-feats { display: flex; justify-content: space-between; gap: 6px; margin-top: 16px; }
.m-login-feats span {
  flex: 1; text-align: center; font-size: .7rem; color: var(--m-primary);
  background: var(--m-primary-soft); border-radius: 8px; padding: 6px 2px;
}
.m-login-alt { display: flex; justify-content: space-around; margin-top: 16px; font-size: .82rem; }
.m-login-alt a { color: var(--m-primary); }
.m-login-quote { margin-top: 14px; text-align: center; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 7px 10px; font-size: .72rem; }

/* ---------- 我的 ---------- */
.m-me-card { display: flex; align-items: center; gap: 14px; }
.m-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff; font-size: 1.3rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.m-details summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
.m-details[open] summary { margin-bottom: 12px; }
.m-me-links .m-row { padding: 12px 2px; }

/* 地图卡片 */
.m-map-card { display: flex; align-items: center; gap: 10px; }
.m-map-icon { font-size: 1.4rem; }

/* ---------- 错误页 ---------- */
.m-error-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--m-bg); }
.m-error { text-align: center; background: var(--m-card); border-radius: 18px; padding: 40px 34px; box-shadow: 0 1px 3px rgba(16,24,40,.07); }
.m-error-code { font-size: 3rem; font-weight: 800; color: var(--m-primary); opacity: .25; }
.m-error h1 { font-size: 1.05rem; margin: 4px 0 8px; }
.m-error p { color: var(--m-sub); font-size: .85rem; margin-bottom: 18px; }

/* ---------- 全功能版扩展 ---------- */

/* 悬浮新增按钮 */
.m-fab {
  position: fixed; right: 14px;
  bottom: calc(70px + env(safe-area-inset-bottom));
  z-index: 25;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 12px 18px; border-radius: 999px;
  background: var(--m-primary); color: #fff;
  font-size: .88rem; font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, .4);
}
.m-fab:active { transform: scale(.96); }

/* 业务模块横向切换条 */
.m-chips {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: none;
}
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex-shrink: 0; padding: 8px 14px; border-radius: 999px;
  background: var(--m-card); border: 1px solid var(--m-border);
  color: var(--m-text); font-size: .82rem; white-space: nowrap;
}
.m-chip.active { background: var(--m-primary); border-color: var(--m-primary); color: #fff; font-weight: 600; }

/* 顶栏铃铛 */
.m-bell {
  position: relative; margin-left: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.14); font-size: 1.05rem;
}
.m-bell-dot {
  position: absolute; top: -4px; right: -6px; font-style: normal;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: .66rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* 订单/采购动态明细行 */
.m-item-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  padding: 10px; border: 1px dashed var(--m-border); border-radius: 10px; margin-bottom: 8px;
  background: #fafbfd;
}
.m-item-row input, .m-item-row select {
  padding: 9px 10px; font-size: .86rem; border: 1px solid var(--m-border);
  border-radius: 8px; font-family: inherit; color: var(--m-text); background: #fff; width: 100%;
}
.m-item-row select:first-child { grid-column: 1 / -1; }
.m-item-row input:focus, .m-item-row select:focus { outline: none; border-color: var(--m-primary); }

/* 复选与复选组 */
.m-check { display: flex; align-items: center; gap: 7px; font-size: .86rem; padding: 5px 0; }
.m-check input { width: 18px; height: 18px; accent-color: var(--m-primary); }
.m-check-group { display: flex; flex-wrap: wrap; gap: 2px 14px; }

/* 报表条形图 */
.m-bar-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.m-bar-label { width: 84px; flex-shrink: 0; font-size: .78rem; color: var(--m-sub); text-align: right; }
.m-bar-track { flex: 1; height: 14px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.m-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #2563eb); min-width: 4px; }
.m-bar-alt { background: linear-gradient(90deg, #34d399, #059669); }
.m-bar-num { width: 34px; flex-shrink: 0; font-size: .82rem; text-align: left; }

/* 我的-管理分组卡片头复位 */
.m-me-links .m-card-head { margin-bottom: 2px; }

/* 折叠面板内表单间距 */
.m-details form { padding: 10px 0 4px; }
.m-details > form { border-top: 1px dashed #eef1f5; }
summary.m-mini-btn { display: inline-flex; cursor: pointer; list-style: none; }
summary.m-mini-btn::-webkit-details-marker { display: none; }

/* 状态徽章（审批/单据）在列表中的间距 */
.m-sub .badge { margin-right: 3px; }

/* ---------- 跟单卡片列表 ---------- */
.fu-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.fu-card { background: var(--m-card); border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .09); border-left: 3px solid var(--m-primary); }
.fu-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.fu-cust { font-size: .92rem; font-weight: 700; color: var(--m-text); }
.fu-cust:active { color: var(--m-primary); }
.fu-del { border: none; background: transparent; color: #c0c8d4; font-size: 13px;
  cursor: pointer; padding: 2px 6px; border-radius: 4px; font-family: inherit; }
.fu-del:hover { color: var(--m-danger); background: rgba(220, 38, 38, .08); }
.fu-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 5px; }
.fu-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .7rem; font-weight: 600; }
.fu-type-phone  { background: #eff6ff; color: #2563eb; }
.fu-type-visit  { background: #ecfdf5; color: #059669; }
.fu-type-email  { background: #fdf2f8; color: #be185d; }
.fu-type-wechat { background: #f0fdf4; color: #16a34a; }
.fu-type-other  { background: #f3f4f6; color: #6b7280; }
.fu-prog { background: #fef3c7; color: #92400e; }
.fu-next { background: #dbeafe; color: #1d4ed8; }
.fu-body { font-size: .84rem; color: #475569; line-height: 1.5; margin: 5px 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fu-meta { font-size: .72rem; color: var(--m-sub); }

/* ---------- 商用移动界面：统一视觉、触控与响应式布局 ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a, button, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid rgba(46, 96, 197, .38);
  outline-offset: 2px;
}
.m-icon {
  display: block; width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.m-sub { color: var(--m-sub); overflow-wrap: anywhere; }
.m-mono, .m-num { font-variant-numeric: tabular-nums; }

/* 导航：固定信息层级和安全区域，所有主页面共用。 */
.m-topbar {
  display: block; min-height: 0; padding: env(safe-area-inset-top) 0 0;
  background: #122b49; box-shadow: 0 2px 12px rgba(17, 42, 73, .15);
}
.m-topbar-inner {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 760px; min-height: 64px;
  margin: 0 auto; padding: 7px 16px;
}
.m-brand-mark {
  display: grid; place-items: center; flex: none;
  width: 39px; height: 39px; border-radius: 12px;
  background: #3873d8; color: #fff; font-size: 1.12rem; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26);
}
.m-back, .m-bell {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; margin: 0; border-radius: 12px;
  background: rgba(255,255,255,.1); color: #fff;
}
.m-back:active, .m-bell:active { background: rgba(255,255,255,.2); }
.m-title-wrap { min-width: 0; flex: 1; }
.m-title-kicker {
  display: block; color: #aebfda; font-size: .65rem;
  font-weight: 600; letter-spacing: .045em; line-height: 1.2;
}
.m-title {
  padding: 0; margin-top: 3px; color: #fff; font-size: 1.02rem;
  font-weight: 700; line-height: 1.3; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.m-bell-dot { top: -5px; right: -6px; border: 2px solid #122b49; }
.m-content {
  width: 100%; max-width: 760px; min-width: 0;
  padding: 18px 16px calc(103px + env(safe-area-inset-bottom));
}
.m-content.m-has-fab, .m-content:has(.m-fab) {
  padding-bottom: calc(155px + env(safe-area-inset-bottom));
}
.m-card {
  border: 1px solid #e9eef5; border-radius: var(--m-radius);
  box-shadow: var(--m-shadow); padding: 17px; margin-bottom: 14px;
}
.m-card-head { gap: 12px; margin-bottom: 13px; }
.m-card-head h2 { font-size: .98rem; font-weight: 700; letter-spacing: -.015em; }
.m-card-head .m-sub { font-size: .76rem; white-space: nowrap; }
.m-row { min-height: 54px; padding: 11px 2px; border-bottom-color: #edf1f6; }
.m-row-main { gap: 4px; }
.m-row-main strong { font-size: .93rem; font-weight: 650; word-break: break-word; }
.m-chev { color: #9cabc0; line-height: 1; }

/* 工作台：欢迎区、指标和功能入口。 */
.m-home-hero {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 146px; padding: 21px 22px; margin-bottom: 14px;
  border-radius: 20px; overflow: hidden; color: #fff;
  background: linear-gradient(120deg, #1a3b62 0%, #285ab1 76%, #3973cf 100%);
  box-shadow: 0 10px 24px rgba(33, 76, 155, .15);
}
.m-home-hero::after {
  content: ""; position: absolute; right: -34px; top: -58px;
  width: 176px; height: 176px; border: 1px solid rgba(255,255,255,.17);
  border-radius: 50%; box-shadow: 0 0 0 37px rgba(255,255,255,.045);
  pointer-events: none;
}
.m-home-hero > div { position: relative; z-index: 1; min-width: 0; }
.m-home-eyebrow { color: #c9dcff; font-size: .75rem; font-weight: 600; }
.m-home-hero h2 { margin: 10px 0 5px; font-size: 1.32rem; line-height: 1.3; font-weight: 750; }
.m-home-hero p { color: #dfebff; font-size: .82rem; }
.m-home-hero-symbol {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 56px; height: 56px; flex: none; border-radius: 18px;
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
}
.m-home-hero-symbol .m-icon { width: 28px; height: 28px; }
.m-approve-banner {
  min-height: 70px; padding: 12px 15px; gap: 12px;
  background: #fff8e9; border-color: #f3dfb1; color: #7f4b13;
  box-shadow: var(--m-shadow);
}
.m-approve-dot { width: 34px; height: 34px; flex: none; background: #c47520; }
.m-approve-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; }
.m-approve-copy strong { color: #6b3d0b; font-size: .88rem; }
.m-approve-copy small { font-size: .73rem; color: #8c6741; }
.m-approve-banner > .m-icon { width: 18px; height: 18px; }
.m-stat4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 0; }
.m-stat3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-stat2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.m-stat {
  min-width: 0; min-height: 83px; align-items: flex-start; justify-content: center;
  gap: 4px; padding: 12px; border: 1px solid #ecf0f6;
  border-radius: 14px; background: #f8fafd;
}
.m-stat strong { max-width: 100%; font-size: clamp(1.02rem, 4.5vw, 1.45rem); line-height: 1.2; font-weight: 750; overflow-wrap: anywhere; }
.m-stat span { color: var(--m-sub); font-size: .74rem; line-height: 1.3; }
.m-stat-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.m-stat-row > div {
  min-width: 0; gap: 4px; padding: 12px 13px;
  border: 1px solid #e4ebfb; border-radius: 14px; background: #f0f5ff;
}
.m-stat-row > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.m-stat-row span { font-size: .73rem; }
.m-stat-row strong { font-size: .94rem; line-height: 1.25; font-weight: 700; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.m-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 4px; }
.m-grid-item {
  min-width: 0; min-height: 88px; justify-content: flex-start;
  gap: 8px; padding: 7px 2px; border-radius: 12px;
  text-align: center; color: var(--m-text); font-size: .76rem; line-height: 1.25;
}
.m-grid-icon {
  display: grid; place-items: center; flex: none;
  width: 43px; height: 43px; border-radius: 14px;
  color: #2e60c5; background: #ebf1fd;
}
.m-grid-icon .m-icon { width: 21px; height: 21px; }
.m-grid-item:nth-child(4n+2) .m-grid-icon { color: #0c8178; background: #e9f7f4; }
.m-grid-item:nth-child(4n+3) .m-grid-icon { color: #975a18; background: #fff3e4; }
.m-grid-item:nth-child(4n+4) .m-grid-icon { color: #6759ad; background: #f1effb; }
.m-grid-label { max-width: 100%; overflow-wrap: anywhere; }
.m-grid-item:active { background: #f1f5fc; }
.m-announcement { padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.m-announcement:last-child { border-bottom: 0; }
.m-announcement summary { cursor: pointer; font-size: .88rem; }
.m-announcement-body { padding: 9px 0 2px; color: var(--m-sub); font-size: .83rem; white-space: pre-wrap; }
.m-notification-preview { display: flex; align-items: baseline; gap: 7px; padding: 5px 0; font-size: .84rem; }
.m-notification-preview > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.m-notification-preview time { flex: none; color: var(--m-sub); font-size: .69rem; }
.m-notification-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--m-primary); }

/* 列表、筛选和卡片。 */
.m-tabs {
  gap: 4px; padding: 4px; margin-bottom: 14px;
  border-radius: 14px; background: #e9eff7;
  overflow-x: auto; scrollbar-width: none;
}
.m-tabs::-webkit-scrollbar { display: none; }
.m-tab-pill {
  display: grid; place-items: center; min-height: 44px; min-width: 0;
  padding: 8px 7px; border: 0; border-radius: 11px;
  background: transparent; color: #5b6d84; font-size: .85rem; white-space: nowrap;
}
.m-tab-pill.active { color: var(--m-primary-strong); background: #fff; box-shadow: 0 2px 7px rgba(24,48,84,.1); }
.m-search { align-items: stretch; gap: 8px; margin-bottom: 12px; }
.m-search input {
  min-width: 0; min-height: 48px; padding: 10px 14px;
  border-radius: 13px; background: #fff; box-shadow: var(--m-shadow);
  color: var(--m-text); font-size: .9rem;
}
.m-search input::placeholder, .m-field input::placeholder, .m-field textarea::placeholder { color: #9ba9bb; }
.m-search button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  flex: none; min-width: 78px; min-height: 48px; padding: 0 13px;
  border-radius: 13px; background: var(--m-primary); font-weight: 650;
}
.m-search button .m-icon { width: 17px; height: 17px; }
.m-filter { margin-bottom: 15px; border: 1px solid var(--m-border); border-radius: 14px; background: #fff; box-shadow: var(--m-shadow); }
.m-filter-toggle {
  display: flex; align-items: center; gap: 9px; min-height: 47px;
  padding: 9px 14px; color: var(--m-text); font-size: .85rem; font-weight: 650; cursor: pointer; list-style: none;
}
.m-filter-toggle::-webkit-details-marker { display: none; }
.m-filter-toggle > .m-icon { width: 18px; height: 18px; color: var(--m-primary); }
.m-filter-count { margin-left: auto; color: var(--m-primary); font-size: .72rem; font-weight: 600; }
.m-filter-toggle > .m-filter-chevron { margin-left: auto; color: #91a0b4; transition: transform .18s ease; }
.m-filter-count + .m-filter-chevron { margin-left: 0; }
.m-filter[open] .m-filter-chevron { transform: rotate(90deg); }
.m-filter-panel { padding: 0 12px 13px; border-top: 1px solid #edf1f6; }
.m-filter-panel .m-card { margin: 12px 0; padding: 14px; border-radius: 12px; background: #f8fafd; box-shadow: none; }
.m-filter-panel .m-action-row { margin: 12px 0 0; }
.m-recycle-link { margin-bottom: 14px; }
.m-list-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 3px 2px 10px; }
.m-list-heading strong { font-size: .91rem; }
.m-list-heading span { color: var(--m-sub); font-size: .75rem; }
.m-cust-card, .m-cards .m-row, .fu-card {
  border: 1px solid #e8eef5; border-radius: 16px;
  background: #fff; box-shadow: var(--m-shadow);
}
.m-cust-card { margin-bottom: 10px; padding: 15px; }
.m-cards .m-row { min-height: 78px; padding: 14px 15px; border-left: 3px solid transparent; }
.m-cards .m-row.st-ok { border-left-color: var(--m-ok); }
.m-cards .m-row.st-info { border-left-color: var(--m-primary); }
.m-cards .m-row.st-warn { border-left-color: var(--m-warn); }
.m-cards .m-row.st-bad { border-left-color: var(--m-danger); }
.m-cards .m-row:active, .m-cust-card:active { background: #f7faff; }
.m-empty { padding: 28px 12px; line-height: 1.5; }
.m-chips { gap: 7px; padding: 0 0 11px; margin-bottom: 12px; }
.m-chip { min-height: 38px; padding: 9px 14px; border-radius: 11px; background: #fff; font-size: .81rem; box-shadow: var(--m-shadow); }
.m-chip.active { background: var(--m-primary); border-color: var(--m-primary); }
.fu-card { padding: 15px; border-left: 3px solid var(--m-primary); }
.fu-head { gap: 8px; }
.fu-cust { min-width: 0; overflow-wrap: anywhere; }
.fu-del { min-width: 36px; min-height: 36px; font-size: 1rem; color: #738399; }

/* 表单与操作目标统一至少 44 像素。 */
.m-field { margin-bottom: 17px; }
.m-field label { margin-bottom: 7px; color: #465b75; font-size: .81rem; font-weight: 650; }
.m-field input, .m-field select, .m-field textarea {
  min-height: 48px; padding: 11px 13px; border-radius: 12px;
  color: var(--m-text); font-size: .94rem;
}
.m-field textarea { min-height: 100px; }
.m-field :is(input, select, textarea):focus { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(46, 96, 197, .12); }
.m-btn { min-height: 45px; padding: 10px 16px; border-radius: 12px; font-size: .88rem; font-weight: 650; }
.m-btn-primary { border-color: var(--m-primary); background: var(--m-primary); }
.m-btn-primary:active, .m-search button:active { background: var(--m-primary-strong); }
.m-mini-btn { display: inline-grid; place-items: center; min-height: 44px; padding: 7px 12px; font-weight: 650; }
.m-action-row { gap: 9px; margin-bottom: 14px; }
.m-action-row > * { min-width: 0; }
.m-fab {
  right: max(16px, calc((100vw - 760px)/2 + 16px));
  bottom: calc(83px + env(safe-area-inset-bottom));
  min-height: 48px; padding: 12px 18px;
  background: var(--m-primary); box-shadow: 0 8px 22px rgba(34, 79, 169, .28);
}
.m-content.m-filter-open .m-fab { display: none; }
.m-kv { gap: 0 16px; }
.m-kv > div { min-width: 0; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.m-kv span { margin-bottom: 2px; font-size: .73rem; }
.m-kv strong { overflow-wrap: anywhere; font-size: .85rem; font-weight: 600; }
.m-contact-row { flex-wrap: wrap; }
.m-contact-row .m-row-main { flex-basis: 100%; }
.m-contact-row .m-call-group { width: 100%; flex-direction: row; align-items: stretch; gap: 8px; }
.m-contact-row .m-call-group a { flex: 1; justify-content: center; }
.m-call, .m-sms { display: inline-flex; align-items: center; min-height: 44px; }
.m-map-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; color: var(--m-primary); background: var(--m-primary-soft); }
.m-details > summary { display: flex; align-items: center; min-height: 43px; }
.m-item-row { background: #f8fafd; border: 1px solid var(--m-border); border-radius: 13px; }
.m-item-row :is(input, select) { min-height: 43px; }

/* 底部导航与登录页。 */
.m-tabbar {
  display: block; padding: 0 0 env(safe-area-inset-bottom);
  background: rgba(255,255,255,.98); border-top-color: #e6ebf2;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 -5px 20px rgba(25, 45, 72, .045);
}
.m-tabbar-inner { display: flex; gap: 3px; max-width: 760px; margin: 0 auto; padding: 7px 11px 6px; }
.m-tab {
  min-width: 0; min-height: 55px; padding: 7px 3px 5px;
  gap: 3px; border-radius: 12px; font-size: .7rem; line-height: 1.2;
  font-weight: 600;
}
.m-tab-icon { width: 22px; height: 22px; }
.m-tab.active { color: var(--m-primary-strong); background: #edf3ff; font-weight: 700; }
.m-tab:active { background: #edf3ff; }
.m-login-body {
  min-height: 100vh; min-height: 100svh; padding: 26px 18px;
  background: radial-gradient(circle at 84% 12%, rgba(84,143,230,.3), transparent 36%),
    linear-gradient(148deg, #102743, #18416f 62%, #285bb4);
}
.m-login {
  max-width: 410px; padding: 29px 25px 24px;
  border: 1px solid rgba(255,255,255,.5); border-radius: 22px;
  box-shadow: 0 24px 56px rgba(4, 20, 41, .28);
}
.m-login-eyebrow { margin-bottom: 16px; color: var(--m-primary); font-size: .68rem; font-weight: 800; letter-spacing: .14em; }
.m-login-logo { gap: 13px; margin-bottom: 13px; }
.m-login-logo h1 { color: var(--m-text); font-size: 1.23rem; line-height: 1.25; }
.m-login-logo h1 em { display: block; margin-top: 3px; color: var(--m-sub); font-size: .75rem; font-weight: 500; }
.m-logo-mark { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(140deg, #1e4b9c, #3a76d9); box-shadow: 0 6px 14px rgba(38,93,192,.18); }
.m-login-tagline { margin-bottom: 22px; color: var(--m-sub); font-size: .84rem; line-height: 1.5; }
.m-login .m-field { margin-bottom: 17px; }
.m-login .m-btn-block { min-height: 49px; margin-top: 4px; }
.m-login-feats { gap: 7px; margin-top: 21px; }
.m-login-feats span { padding: 8px 2px; background: #f0f5fd; color: #3d5d91; font-size: .7rem; font-weight: 600; }
.m-login-alt { justify-content: space-between; margin-top: 20px; }
.m-login-quote { margin-top: 21px; padding: 10px 12px; border-color: #e7edf5; background: #f8fafd; color: #596b82; line-height: 1.5; }
.m-me-card { min-height: 104px; background: linear-gradient(120deg, #1b3c66, #3267ba); border: 0; color: #fff; }
.m-me-card h2 { font-size: 1.12rem; }
.m-me-card .m-sub { color: #d8e6fb; }
.m-avatar { width: 57px; height: 57px; flex: none; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.23); }
.m-error-body { padding: 18px; }

/* 订单台账：商务蓝独立主题，不影响其他模块。 */
.m-orders-ledger {
  --ledger-bg: #f3f7fc;
  --ledger-paper: #ffffff;
  --ledger-ink: #172b49;
  --ledger-blue: #174d91;
  --ledger-muted: #586d87;
  --ledger-line: #d9e3f0;
  --ledger-accent: #2d70c9;
  background: var(--ledger-bg); color: var(--ledger-ink);
}
.m-orders-ledger .m-topbar { background: var(--ledger-bg); border-bottom: 1px solid var(--ledger-line); box-shadow: none; }
.m-orders-ledger .m-brand-mark { border-radius: 50%; background: linear-gradient(145deg, #123e77, #2b70c4); box-shadow: none; }
.m-orders-ledger .m-title-kicker { color: #587397; }
.m-orders-ledger .m-title { color: var(--ledger-ink); }
.m-orders-ledger .m-bell { border: 1px solid var(--ledger-line); border-radius: 50%; background: #fff; color: var(--ledger-blue); }
.m-orders-ledger .m-bell:active { background: #e5eef9; }
.m-orders-ledger .m-bell-dot { background: var(--ledger-accent); border-color: var(--ledger-bg); }
.m-orders-ledger .m-content { padding: 0 16px calc(98px + env(safe-area-inset-bottom)); }
.m-orders-ledger .m-tabbar { background: #12345e; border-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.m-orders-ledger .m-tabbar-inner { padding-top: 6px; }
.m-orders-ledger .m-tab { position: relative; color: #c3d4e9; }
.m-orders-ledger .m-tab.active { background: transparent; color: #fff; }
.m-orders-ledger .m-tab.active::before { content: ""; position: absolute; top: -6px; left: 27%; right: 27%; height: 3px; background: #65a9ff; }
.m-orders-ledger .m-tab:active { background: rgba(255,255,255,.08); }
.ledger-module-nav { display: flex; gap: 24px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; border-bottom: 1px solid var(--ledger-line); scrollbar-width: none; }
.ledger-module-nav::-webkit-scrollbar, .ledger-status-nav::-webkit-scrollbar { display: none; }
.ledger-module-nav a { position: relative; display: grid; place-items: center; flex: none; min-height: 53px; color: var(--ledger-muted); font-size: .86rem; font-weight: 650; white-space: nowrap; }
.ledger-module-nav a.active { color: var(--ledger-blue); font-weight: 800; }
.ledger-module-nav a.active::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: -1px; height: 3px; background: var(--ledger-blue); }
.ledger-masthead { padding: 27px 0 20px; }
.ledger-masthead-top { display: flex; justify-content: space-between; gap: 8px; color: var(--ledger-blue); font-size: .65rem; font-weight: 800; letter-spacing: .14em; }
.ledger-edition { color: var(--ledger-muted); letter-spacing: .05em; }
.ledger-masthead-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 12px; }
.ledger-masthead-main > div { min-width: 0; }
.ledger-masthead h2 { color: var(--ledger-ink); font-size: 2.12rem; line-height: 1.1; font-weight: 800; letter-spacing: -.045em; white-space: nowrap; }
.ledger-masthead h2 span { font-weight: 450; }
.ledger-masthead h2 em { color: var(--ledger-accent); font-style: normal; }
.ledger-masthead-main p { margin-top: 9px; color: var(--ledger-muted); font-size: .78rem; }
.ledger-create { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 44px; padding: 10px 12px; border-radius: 4px; background: var(--ledger-blue); color: #fff; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.ledger-create span { margin-right: 3px; font-size: 1.12rem; line-height: 1; }
.ledger-create:hover, .ledger-create:active { background: #103d77; color: #fff; }
.ledger-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 26px; padding: 16px 0 14px; border-top: 1px solid var(--ledger-line); border-bottom: 1px solid var(--ledger-line); }
.ledger-metrics > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-left: 15px; border-left: 1px solid var(--ledger-line); }
.ledger-metrics > div:first-child { padding-left: 0; border-left: 0; }
.ledger-metrics strong { color: var(--ledger-blue); font-size: 2rem; line-height: 1.05; font-weight: 750; font-variant-numeric: tabular-nums; }
.ledger-metrics > div:nth-child(2) strong { color: var(--ledger-accent); }
.ledger-metrics span { color: var(--ledger-muted); font-size: .72rem; }
.ledger-scope-note { margin-top: 8px; color: var(--ledger-muted); font-size: .76rem; }
.ledger-search { display: flex; align-items: center; gap: 8px; min-height: 54px; margin: 4px 0 15px; padding: 4px 4px 4px 14px; border: 1px solid var(--ledger-line); border-radius: 5px; background: var(--ledger-paper); }
.ledger-search:focus-within { border-color: var(--ledger-accent); box-shadow: 0 0 0 3px rgba(45,112,201,.12); }
.ledger-search > .m-icon { width: 19px; height: 19px; color: var(--ledger-blue); }
.ledger-search input { flex: 1; min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent; color: var(--ledger-ink); font-size: .88rem; }
.ledger-search input::placeholder { color: #60758f; }
.ledger-search button { flex: none; min-width: 65px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 3px; background: var(--ledger-accent); color: #fff; font-size: .84rem; font-weight: 750; }
.ledger-search button:hover, .ledger-search button:active { background: #1d5aab; }
.ledger-status-nav { display: flex; gap: 22px; overflow-x: auto; margin-bottom: 22px; border-bottom: 1px solid var(--ledger-line); scrollbar-width: none; }
.ledger-status-nav a { position: relative; display: grid; place-items: center; flex: none; min-height: 46px; color: var(--ledger-muted); font-size: .81rem; font-weight: 600; white-space: nowrap; }
.ledger-status-nav a.active { color: var(--ledger-blue); font-weight: 800; }
.ledger-status-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ledger-blue); }
.ledger-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 13px; }
.ledger-list-head strong { font-size: 1.04rem; font-weight: 800; }
.ledger-list-head span { color: var(--ledger-muted); font-size: .74rem; }
.ledger-list { display: flex; flex-direction: column; gap: 11px; }
.ledger-ticket { display: block; min-width: 0; padding: 16px 17px 14px; border: 1px solid var(--ledger-line); border-radius: 6px; background: var(--ledger-paper); color: var(--ledger-ink); box-shadow: none; }
.ledger-ticket:hover, .ledger-ticket:active { border-color: #a9c5e8; background: #f9fbff; }
.ledger-ticket-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ledger-ticket-no { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #60758f; font: 600 .76rem/1.4 Consolas, monospace; letter-spacing: .02em; }
.ledger-state { display: inline-flex; align-items: center; flex: none; gap: 5px; font-size: .75rem; font-weight: 750; }
.ledger-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ledger-state--approved { color: #197766; }
.ledger-state--pending { color: #9a641d; }
.ledger-state--rejected { color: #b34b58; }
.ledger-state--draft { color: #75849a; }
.ledger-ticket h3 { margin-top: 11px; font-size: 1.01rem; line-height: 1.38; font-weight: 750; overflow-wrap: anywhere; }
.ledger-ticket-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 7px; color: var(--ledger-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.ledger-ticket-rule { margin: 15px -17px 12px; border-top: 1px dashed var(--ledger-line); }
.ledger-ticket-bottom { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) 34px; align-items: end; gap: 7px; }
.ledger-ticket-bottom > div { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ledger-ticket-bottom span:not(.ledger-ticket-arrow) { color: var(--ledger-muted); font-size: .75rem; }
.ledger-ticket-bottom strong { line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ledger-ticket-total strong { color: var(--ledger-ink); font-size: clamp(1rem, 5vw, 1.3rem); font-weight: 800; }
.ledger-ticket-balance strong { font-size: .93rem; font-weight: 750; }
.ledger-ticket-balance .is-due { color: #ad5b48; }
.ledger-ticket-balance .is-clear { color: #197766; }
.ledger-ticket-arrow { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ledger-line); border-radius: 50%; color: var(--ledger-blue); font-size: 1.15rem; line-height: 1; }
.ledger-empty { display: flex; align-items: center; flex-direction: column; padding: 36px 18px; border: 1px dashed #b9cde5; border-radius: 6px; background: rgba(255,255,255,.78); text-align: center; }
.ledger-empty-mark { color: var(--ledger-blue); font-size: 3rem; line-height: 1; }
.ledger-empty strong { margin-top: 8px; font-size: .96rem; }
.ledger-empty p { margin-top: 5px; color: var(--ledger-muted); font-size: .8rem; }
.ledger-empty a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 13px; color: var(--ledger-blue); font-size: .83rem; font-weight: 750; }

@media (min-width: 600px) {
  .m-content { padding: 22px 24px calc(110px + env(safe-area-inset-bottom)); }
  .m-stat4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .m-stat-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-stat-row.m-stat-row-3 > div:last-child:nth-child(odd) { grid-column: auto; }
  .m-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .m-orders-ledger .m-content { padding-inline: 24px; }
  .ledger-module-nav { margin-inline: -24px; padding-inline: 24px; }
}
@media (min-width: 700px) {
  .ledger-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ledger-empty { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  .m-topbar-inner { gap: 9px; padding-inline: 12px; }
  .m-content { padding-inline: 12px; }
  .m-card { padding: 15px; }
  .m-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .m-home-hero { padding: 18px; }
  .m-home-hero-symbol { width: 46px; height: 46px; }
  .m-stat-row { grid-template-columns: 1fr; }
  .m-stat-row > div:last-child:nth-child(odd) { grid-column: auto; }
  .m-search button { min-width: 48px; }
  .m-search button span { display: none; }
  .m-tabbar-inner { padding-inline: 5px; }
  .m-tab { font-size: .66rem; }
  .m-orders-ledger .m-content { padding-inline: 12px; }
  .ledger-module-nav { margin-inline: -12px; padding-inline: 12px; }
  .ledger-masthead h2 { font-size: 1.88rem; }
  .ledger-masthead-main p { font-size: .73rem; }
  .ledger-create { padding-inline: 9px; font-size: .73rem; }
  .ledger-ticket { padding-inline: 14px; }
  .ledger-ticket-rule { margin-inline: -14px; }
  .ledger-ticket-bottom { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) 30px; gap: 5px; }
  .ledger-ticket-arrow { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .m-filter-chevron, .m-btn, .m-fab { transition: none; }
}
.m-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 18px; }
.m-pager a, .m-pager > .disabled { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border: 1px solid var(--m-border); border-radius: 10px; background: var(--m-card); color: var(--m-text); font-size: .84rem; text-decoration: none; }
.m-pager > .disabled { color: var(--m-sub); opacity: .55; }
.m-pager .m-pager-status { color: var(--m-sub); font-size: .8rem; white-space: nowrap; }


/* 表单辅助说明 */
.m-help { display: block; margin-top: 6px; color: var(--m-sub); font-size: .76rem; line-height: 1.55; }
.m-field input[readonly] { background: #f5f7fb; color: var(--m-sub); }
