/* 移动端商用版：连续页面、清晰分区、平面列表。保留原组件行为，只替换视觉层。 */
.m-app {
  --m-primary: #1b5dab;
  --m-primary-strong: #164b89;
  --m-primary-soft: #edf4fc;
  --m-bg: #f4f7fb;
  --m-border: #dce5ef;
  --m-text: #1a2d46;
  --m-sub: #5c7089;
  --m-radius: 6px;
  --m-shadow: none;
  background: var(--m-bg);
}

/* 顶栏与内容是一个完整页面，而非漂浮的卡片堆。订单台账保留独立蓝色页眉。 */
.m-app:not(.m-orders-ledger) .m-topbar {
  background: #fff;
  color: var(--m-text);
  border-bottom: 1px solid var(--m-border);
  box-shadow: none;
}
.m-app:not(.m-orders-ledger) .m-brand-mark {
  border-radius: 5px;
  background: #1b5dab;
  box-shadow: none;
}
.m-app:not(.m-orders-ledger) .m-title-kicker { color: #637b99; }
.m-app:not(.m-orders-ledger) .m-title { color: var(--m-text); }
.m-app:not(.m-orders-ledger) .m-back,
.m-app:not(.m-orders-ledger) .m-bell {
  border-radius: 5px;
  background: transparent;
  color: var(--m-primary);
}
.m-app:not(.m-orders-ledger) .m-back:active,
.m-app:not(.m-orders-ledger) .m-bell:active { background: var(--m-primary-soft); }
.m-app:not(.m-orders-ledger) .m-bell-dot { border-color: #fff; }
.m-app:not(.m-orders-ledger) .m-content {
  min-height: calc(100vh - 64px);
  padding: 0 18px calc(90px + env(safe-area-inset-bottom));
  background: #fff;
  border-right: 1px solid var(--m-border);
  border-left: 1px solid var(--m-border);
}
.m-app:not(.m-orders-ledger) .m-content.m-has-fab,
.m-app:not(.m-orders-ledger) .m-content:has(.m-fab) {
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* 标题、内容和明细统一按节排列。 */
.m-app .m-card {
  margin: 0;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.m-app .m-card-head { margin-bottom: 12px; }
.m-app .m-card-head h2 {
  color: #19395f;
  font-size: 1rem;
  font-weight: 750;
}
.m-app .m-row {
  min-height: 62px;
  padding: 14px 0;
  border-color: var(--m-border);
  background: transparent;
}
.m-app .m-row-main strong { line-height: 1.4; }
.m-app .m-chev { color: #8093aa; }
.m-app .m-cards,
.m-app .fu-list { gap: 0; margin: 0; }
.m-app .m-cards .m-row,
.m-app .m-cust-card,
.m-app .fu-card {
  min-height: 76px;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.m-app .m-cards .m-row.st-ok,
.m-app .m-cards .m-row.st-info,
.m-app .m-cards .m-row.st-warn,
.m-app .m-cards .m-row.st-bad,
.m-app .fu-card { border-left: 0; }
.m-app .m-cards .m-row:active,
.m-app .m-cust-card:active,
.m-app .fu-card:active { background: #f7faff; }
.m-app .fu-head { margin-bottom: 8px; }
.m-app .fu-badge,
.m-app .badge { border-radius: 3px; }
.m-app .m-list-heading { margin: 18px 0 4px; }
.m-app .m-list-heading strong { font-size: 1rem; color: #19395f; }
.m-app .m-empty { padding: 34px 8px; }

/* 工作台：欢迎区、指标和功能目录不再嵌套小卡片。 */
.m-app .m-home-hero {
  min-height: 128px;
  margin: 0 -18px;
  padding: 24px 18px;
  border-bottom: 1px solid #d4e3f4;
  border-radius: 0;
  background: linear-gradient(105deg, #eaf3fd, #f8fbff);
  color: #173f73;
  box-shadow: none;
}
.m-app .m-home-hero::after { content: none; }
.m-app .m-home-eyebrow { color: #376ba6; }
.m-app .m-home-hero h2 { margin: 8px 0 4px; }
.m-app .m-home-hero p { color: #5c7089; }
.m-app .m-home-hero-symbol {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #1b5dab;
}
.m-app .m-approve-banner {
  min-height: 66px;
  margin: 16px 0 0;
  padding: 10px 13px;
  border: 0;
  border-left: 3px solid var(--m-primary);
  border-radius: 0;
  background: #f1f6fc;
  color: #214b78;
  box-shadow: none;
}
.m-app .m-approve-dot { background: var(--m-primary); }
.m-app .m-approve-copy strong { color: #193f70; }
.m-app .m-approve-copy small { color: #5b718c; }
.m-app .m-stat4,
.m-app .m-stat3,
.m-app .m-stat2 { gap: 0; }
.m-app .m-stat {
  min-height: 70px;
  gap: 5px;
  padding: 12px 10px;
  border: 0;
  border-right: 1px solid var(--m-border);
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
}
.m-app .m-stat strong {
  min-width: 0;
  max-width: 100%;
  color: #194d8a;
  font-size: clamp(1rem, 4vw, 1.36rem);
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.m-app .m-stat-row { gap: 0; margin-top: 0; }
.m-app .m-stat-row > div {
  min-height: 68px;
  padding: 13px 10px;
  border: 0;
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
}
.m-app .m-stat-row strong { color: #194d8a; }
.m-app .m-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.m-app .m-grid-item {
  min-height: 58px;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  color: var(--m-text);
  font-size: .87rem;
  text-align: left;
}
.m-app .m-grid-icon,
.m-app .m-grid-item:nth-child(n) .m-grid-icon {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--m-primary);
}
.m-app .m-grid-icon .m-icon { width: 20px; height: 20px; }
.m-app .m-grid-label { flex: 1; }

/* 切换栏与筛选区采用横向导航，不做一排药丸卡片。 */
.m-app .m-tabs,
.m-app .m-chips {
  gap: 15px;
  margin: 0 0 14px;
  padding: 0;
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
}
.m-app .m-tab-pill,
.m-app .m-chip {
  position: relative;
  flex: none;
  min-height: 48px;
  padding: 11px 2px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--m-sub);
  font-weight: 600;
}
.m-app .m-tab-pill.active,
.m-app .m-chip.active {
  border-color: var(--m-primary);
  background: transparent;
  box-shadow: none;
  color: var(--m-primary-strong);
  font-weight: 750;
}
.m-app .m-search { margin: 14px 0; }
.m-app .m-search input,
.m-app .m-search button {
  min-height: 46px;
  border-radius: 5px;
  box-shadow: none;
}
.m-app .m-search input { border: 1px solid var(--m-border); }
.m-app .m-filter {
  margin: 0 0 14px;
  border: 0;
  border-top: 1px solid var(--m-border);
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.m-app .m-filter-toggle { padding: 10px 0; }
.m-app .m-filter-panel { padding: 0 0 15px; }
.m-app .m-filter-panel .m-card {
  margin: 0;
  padding: 15px 0;
  border-radius: 0;
  background: transparent;
}
.m-app .m-fab {
  position: static;
  display: flex;
  width: max-content;
  min-height: 44px;
  margin: 6px 0 16px auto;
  padding: 10px 16px;
  border-radius: 5px;
  background: var(--m-primary);
  box-shadow: none;
}

/* 表单及操作区：统一矩形控件和留白。 */
.m-app .m-field input,
.m-app .m-field select,
.m-app .m-field textarea,
.m-app .range-input,
.m-app .range-op {
  border-radius: 5px;
  box-shadow: none;
}
.m-app .m-btn,
.m-app .m-mini-btn,
.m-app .m-pill,
.m-app .m-call,
.m-app .m-sms { border-radius: 5px; }
.m-app .m-mini-btn { background: #f1f6fc; }
.m-app .m-item-row {
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--m-border);
  border-radius: 0;
  background: transparent;
}
.m-app .m-item-row :is(input, select) { border-radius: 5px; }
.m-app .m-kv > div { border-bottom-style: solid; }
.m-app .m-approve-card { padding: 20px 0; }
.m-app .m-approve-actions { margin-top: 4px; }
.m-approval-hint { margin: 4px 0 0; }
.m-approval-link { display: block; min-width: 0; color: var(--m-text); }
.m-approval-link:active { background: #f7faff; }
.m-approval-cue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--m-primary);
  font-size: .82rem;
  font-weight: 700;
}
.m-approval-cue span { font-size: 1.3rem; line-height: 1; }
.m-approval-back { display: inline-block; margin: 14px 0 2px; color: var(--m-primary); font-size: .85rem; }
.m-approval-detail .m-card-head h2 { min-width: 0; overflow-wrap: anywhere; }
.m-approval-detail .m-card-head .badge { flex: none; }
.m-approval-detail .m-card > .m-hint { margin: 0 0 14px; }
.m-approval-detail .m-kv strong { overflow-wrap: anywhere; }
.m-approval-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 0;
  border-top: 1px solid var(--m-border);
  color: var(--m-text);
}
.m-approval-file > span { min-width: 0; overflow-wrap: anywhere; }
.m-approval-file small { display: block; color: var(--m-sub); font-size: .72rem; }
.m-approval-file em { flex: none; color: var(--m-primary); font-size: .8rem; font-style: normal; font-weight: 700; }
.m-approval-product { padding: 12px 0; border-top: 1px solid var(--m-border); }
.m-approval-product strong { display: block; overflow-wrap: anywhere; }
.m-approval-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 17px; border: 0; }
.m-approval-choices legend { margin-bottom: 8px; color: var(--m-sub); font-size: .81rem; font-weight: 650; }
.m-approval-choices label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 13px;
  border: 1px solid var(--m-border);
  border-radius: 5px;
  color: var(--m-text);
  cursor: pointer;
}
.m-approval-choices label:has(input:checked) { border-color: var(--m-primary); background: var(--m-primary-soft); }
.m-approval-choices input { width: 18px; height: 18px; accent-color: var(--m-primary); }
.m-approval-detail textarea { resize: vertical; }

/* 合同录入：关联对象与合同信息分区，日期各有标签。 */
.m-contract-form .m-card-head, .m-order-form .m-card-head { margin-bottom: 16px; }
.m-contract-form .m-field:last-child, .m-order-form .m-field:last-child { margin-bottom: 0; }
.m-contract-form .m-optional, .m-order-form .m-optional { color: var(--m-sub); font-size: .75rem; font-weight: 400; }
.m-contract-form .m-field .m-hint, .m-order-form .m-field .m-hint { margin-top: 6px; }
.m-contract-customer-readonly { margin: 0 0 17px; }
.m-contract-customer-readonly span { display: block; color: var(--m-sub); font-size: .81rem; }
.m-contract-customer-readonly strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.m-contract-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.m-contract-dates .m-field { min-width: 0; margin-bottom: 0; }
.m-contract-dates input { min-width: 0; }
.m-contract-date-hint { margin: 5px 0 17px; }
.m-contract-submit { padding: 20px 0 30px; }
.m-contract-submit .m-hint { margin-top: 9px; }
@media (max-width: 479px) {
  .m-contract-dates { grid-template-columns: 1fr; gap: 14px; }
}

/* 个人页是资料和设置清单，不是数张独立卡片。 */
.m-app .m-me-card {
  min-height: 114px;
  background: transparent;
  color: var(--m-text);
}
.m-app .m-me-card h2 { color: #19395f; }
.m-app .m-me-card .m-sub { color: var(--m-sub); }
.m-app .m-avatar {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 6px;
  background: #1b5dab;
}
.m-app .m-me-links .m-card-head { margin-bottom: 0; }
.m-app .m-map-icon { border-radius: 5px; }

/* 底栏保持可触达，但不使用选中卡片。 */
.m-app:not(.m-orders-ledger) .m-tabbar {
  border-top: 1px solid var(--m-border);
  background: #fff;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.m-app:not(.m-orders-ledger) .m-tab { position: relative; border-radius: 0; }
.m-app:not(.m-orders-ledger) .m-tab.active { background: transparent; }
.m-app:not(.m-orders-ledger) .m-tab.active::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 30%;
  right: 30%;
  height: 2px;
  background: var(--m-primary);
}

/* 订单台账沿用上次确定的商务蓝配色，只把订单卡片改为分隔行。 */
.m-orders-ledger .ledger-list { gap: 0; }
.m-orders-ledger .ledger-ticket {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--ledger-line);
  border-radius: 0;
  background: transparent;
}
.m-orders-ledger .ledger-ticket:hover,
.m-orders-ledger .ledger-ticket:active { border-color: var(--ledger-line); background: #edf4fd; }
.m-orders-ledger .ledger-ticket-rule { margin-right: 0; margin-left: 0; }
.m-orders-ledger .ledger-empty { border-right: 0; border-left: 0; border-radius: 0; background: transparent; }

/* 登录页也取消悬浮卡片：手机铺满页面，宽屏保留适宜的阅读宽度。 */
.m-login-body {
  background: #f5f8fc;
  color: #1a2d46;
}
.m-login {
  max-width: 430px;
  padding: 42px 24px;
  border: 0;
  border-top: 3px solid #1b5dab;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.m-login .m-field :is(input, select, textarea),
.m-login .m-btn { border-radius: 5px; }
.m-login-feats span { border-radius: 0; background: transparent; }
.m-login-quote { border: 0; border-top: 1px solid #dce5ef; border-radius: 0; background: transparent; }

@media (max-width: 759px) {
  .m-app:not(.m-orders-ledger) .m-content { border: 0; }
  .m-login-body { display: block; min-height: 100svh; padding: 0; background: #fff; }
  .m-login { max-width: none; min-height: 100svh; padding: 52px 24px 32px; }
}
@media (max-width: 479px) {
  .m-app .m-stat3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-app .m-stat3 > :last-child { grid-column: 1 / -1; }
  .m-app .m-grid { gap: 0 12px; }
  .m-app .m-grid-item { font-size: .82rem; }
  .m-app .m-tabs, .m-app .m-chips { gap: 13px; }
}
@media (min-width: 480px) {
  .m-app .m-stat4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
  .m-orders-ledger .ledger-list { gap: 0 24px; }
}

/* 部门管理：表单紧凑排布，列表操作保持同一行。 */
.m-dept-page { min-width: 0; }
.m-app .m-dept-create { padding: 20px 0 24px; }
.m-dept-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(96px, 1fr);
  column-gap: 12px;
}
.m-dept-form-grid > .m-field { min-width: 0; }
.m-dept-form-grid > .m-field:first-child { grid-column: 1 / -1; }
.m-dept-create .m-btn-block { margin-top: 2px; }
.m-dept-list { padding-bottom: 8px; }
.m-dept-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 8px;
}
.m-dept-list-head h2 { color: #19395f; font-size: 1rem; font-weight: 750; }
.m-dept-list-head span { color: var(--m-sub); font-size: .78rem; white-space: nowrap; }
.m-dept-item { border-bottom: 1px solid var(--m-border); }
.m-dept-row { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 0; }
.m-dept-name {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding-left: calc(var(--dept-depth) * 12px);
}
.m-dept-name strong { font-size: .94rem; line-height: 1.35; overflow-wrap: anywhere; }
.m-dept-name small { margin-top: 2px; color: var(--m-sub); font-size: .73rem; }
.m-dept-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.m-dept-actions form { margin: 0; }
.m-app .m-dept-actions .m-mini-btn {
  min-width: 54px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--m-border);
  font-size: .8rem;
  cursor: pointer;
}
.m-app .m-dept-actions .m-danger { border-color: #f3d1d3; background: #fff6f6; }
.m-dept-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 0 0 14px calc(var(--dept-depth) * 12px);
}
.m-dept-edit-form[hidden] { display: none; }
.m-dept-edit-form .m-field { min-width: 0; margin: 0; }
.m-dept-edit-form .m-btn { min-width: 72px; min-height: 48px; }
@media (max-width: 339px) {
  .m-dept-row { flex-wrap: wrap; }
  .m-dept-actions { justify-content: flex-end; width: 100%; }
}


/* 移动版系统介绍 */
.m-about-hero { margin: 0 -18px; padding: 28px 18px 25px; background: linear-gradient(145deg, #102d59, #1c5da9); color: #fff; }
.m-about-kicker { color: #a9c5f5; font-size: .65rem; font-weight: 750; letter-spacing: .15em; }
.m-about-brand { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.m-about-brand .m-logo-mark { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 11px; box-shadow: 0 7px 16px rgba(0, 0, 0, .16); }
.m-about-brand h2 { color: #fff; font-size: 1.08rem; }
.m-about-brand span:not(.m-logo-mark) { color: rgba(229, 239, 255, .62); font-size: .72rem; }
.m-about-hero h1 { max-width: 340px; margin-top: 21px; color: #fff; font-size: 1.75rem; line-height: 1.28; letter-spacing: -.035em; }
.m-about-hero > p { margin-top: 11px; color: rgba(229, 239, 255, .78); font-size: .82rem; line-height: 1.8; }
.m-about-actions { display: flex; gap: 8px; margin-top: 19px; }
.m-about-actions .m-btn { flex: 1; min-height: 43px; }
.m-about-actions .m-btn-light { border: 1px solid rgba(255,255,255,.26); background: rgba(255,255,255,.1); color: #fff; }
.m-about-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -18px; border-bottom: 1px solid var(--m-border); background: #f7faff; }
.m-about-strip > div { padding: 14px 5px; text-align: center; border-right: 1px solid var(--m-border); }
.m-about-strip > div:last-child { border-right: 0; }
.m-about-strip strong, .m-about-strip span { display: block; }
.m-about-strip strong { color: #1b579e; font-size: 1.08rem; }
.m-about-strip span { margin-top: 2px; color: var(--m-sub); font-size: .68rem; }
.m-about-section { padding: 27px 0 24px; border-bottom: 1px solid var(--m-border); }
.m-about-section-head > span { color: #3970bd; font-size: .64rem; font-weight: 750; letter-spacing: .15em; }
.m-about-section-head h2 { margin-top: 5px; color: #19395f; font-size: 1.12rem; }
.m-about-section-head p { margin-top: 5px; color: var(--m-sub); font-size: .78rem; line-height: 1.7; }
.m-about-flow-list { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 18px; }
.m-about-flow-list > div { min-height: 86px; padding: 12px 12px 12px 0; border-top: 1px solid var(--m-border); }
.m-about-flow-list > div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--m-border); }
.m-about-flow-list b { display: block; color: #3970bd; font-size: .64rem; letter-spacing: .08em; }
.m-about-flow-list strong { display: block; margin-top: 6px; color: #23466f; font-size: .89rem; }
.m-about-flow-list span { display: block; margin-top: 3px; color: var(--m-sub); font-size: .71rem; line-height: 1.5; }
.m-about-capabilities { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 14px; }
.m-about-capabilities > div { min-height: 105px; padding: 13px 12px 13px 0; border-top: 1px solid var(--m-border); }
.m-about-capabilities > div:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--m-border); }
.m-about-cap-icon { display: block; width: 27px; height: 27px; font-size: 1.08rem; line-height: 27px; }
.m-about-capabilities strong { display: block; margin-top: 7px; color: #23466f; font-size: .87rem; }
.m-about-capabilities p { margin-top: 3px; color: var(--m-sub); font-size: .7rem; line-height: 1.5; }
.m-about-security { margin: 25px 0 0; padding: 22px 0; border-bottom: 1px solid var(--m-border); }
.m-about-security h2 { margin-top: 5px; color: #19395f; font-size: 1.12rem; }
.m-about-security p { margin-top: 6px; color: var(--m-sub); font-size: .78rem; line-height: 1.75; }
.m-about-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.m-about-tags span { padding: 5px 8px; border: 1px solid #cddced; border-radius: 4px; background: #f7faff; color: #3569a9; font-size: .68rem; }
.m-about-foot { padding: 24px 0 4px; }
.m-about-back { display: block; margin-top: 13px; color: var(--m-sub); font-size: .78rem; text-align: center; }
