/* ================= 移动端小程序外壳 ================= */
.mobile-body {
  min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center; padding: 26px;
  background:
    radial-gradient(900px 600px at 20% 0%, rgba(47,107,255,.18), transparent 55%),
    radial-gradient(800px 600px at 85% 100%, rgba(122,90,248,.14), transparent 55%),
    #0b1220;
  font-family: var(--font);
}
.phone {
  width: 390px; height: 844px; max-height: calc(100vh - 40px);
  background: #f5f7fb; border-radius: 42px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 9px #0a0f18, 0 0 0 10px rgba(255,255,255,.08);
}
.status-bar {
  height: 40px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; font-size: 12px; font-weight: 600; background: #fff; color: var(--ink); z-index: 5;
}
.status-bar .signals { display: flex; gap: 5px; align-items: center; font-size: 10px; color: var(--ink-2); }
.status-bar .signals i { width: 14px; height: 8px; border: 1px solid currentColor; border-radius: 2px; display: inline-block; position: relative; }
.status-bar .signals i::after { content: ""; position: absolute; inset: 1px; right: 4px; background: currentColor; border-radius: 1px; }
.m-app { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #f4f6fb; position: relative; }
.m-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 18px; }
.tabbar {
  flex: none; height: 62px; background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); display: flex; align-items: stretch; padding-bottom: 2px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: none; background: transparent; color: #98a2b3; font-size: 10px; cursor: pointer; position: relative;
  font-family: var(--font); padding-top: 4px;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--brand); font-weight: 600; }
.tab .dot-badge { position: absolute; top: 5px; right: calc(50% - 18px); min-width: 15px; height: 15px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* 顶部导航 */
.m-nav {
  padding: 14px 18px 18px; color: #fff; position: relative; overflow: hidden; flex: none;
  background: linear-gradient(150deg, #2f6bff, #5b8cff 55%, #7a9dff);
}
.theme-master .m-nav { background: linear-gradient(150deg, #101c33, #1c3561 60%, #24508f); }
.theme-adminm .m-nav { background: linear-gradient(150deg, #0d1526, #182b4d 60%, #1f3d70); }
.theme-customer .m-nav { background: linear-gradient(150deg, #2f6bff, #6a8dff 60%, #a08bff); }
.m-nav::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.1); right: -80px; top: -130px; }
.m-nav::before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.07); right: 40px; top: -90px; }
.m-nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.m-nav h1 { font-size: 19px; font-weight: 700; letter-spacing: -.3px; }
.m-nav .sub { font-size: 11.5px; opacity: .78; margin-top: 3px; }
.m-nav .back { width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.m-nav .nav-action { font-size: 11px; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-family: var(--font); }
.m-nav.light { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.m-nav.light .sub { color: var(--ink-4); }
.m-nav.light .back { color: var(--ink-2); border-color: var(--line); background: #fff; }

/* 内容 */
.m-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.m-body.flush { padding: 0; gap: 0; }
.m-card { background: #fff; border-radius: 16px; padding: 16px; box-shadow: 0 2px 10px rgba(16,24,40,.05); border: 1px solid rgba(234,236,240,.9); }
.m-card.tight { padding: 12px 14px; }
.m-card.flush { padding: 0; overflow: hidden; }
.m-sec-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m-sec-title b { font-size: 14px; font-weight: 700; }
.m-sec-title span { font-size: 11px; color: var(--ink-4); }
.m-muted { color: var(--ink-4); }
.m-xs { font-size: 11px; }
.m-row { display: flex; align-items: center; gap: 8px; }
.m-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m-col { display: flex; flex-direction: column; }
.grow { flex: 1; min-width: 0; }

/* 按钮 */
.m-btn { height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; font-family: var(--font); padding: 0 16px; }
.m-btn-primary { background: linear-gradient(135deg, #3f7bff, #2f6bff); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(47,107,255,.3); }
.m-btn-dark { background: #101828; color: #fff; border-color: #101828; }
.m-btn-danger { background: #fff; color: var(--danger); border-color: #fecdca; }
.m-btn-success { background: linear-gradient(135deg, #12b76a, #0e9f5d); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(18,183,106,.26); }
.m-btn-sm { height: 32px; font-size: 12px; border-radius: 9px; padding: 0 12px; }
.m-btn-xs { height: 28px; font-size: 11.5px; border-radius: 8px; padding: 0 10px; }
.m-btn:disabled { opacity: .5; }
.m-btn-block { width: 100%; }

/* 表单 */
.m-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.m-field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.m-input, .m-select, .m-textarea {
  width: 100%; height: 42px; border: 1px solid var(--line-strong); border-radius: 11px; padding: 0 12px;
  font-size: 13.5px; font-family: var(--font); background: #fff; color: var(--ink); outline: none;
}
.m-textarea { height: auto; min-height: 82px; padding: 10px 12px; line-height: 1.65; resize: vertical; }
.m-input:focus, .m-select:focus, .m-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); }
.m-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.m-input::placeholder, .m-textarea::placeholder { color: #b0b8c4; }

/* 状态胶囊 */
.m-pill { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 99px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.m-pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* 工单卡 */
.m-order { background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 2px 10px rgba(16,24,40,.05); border: 1px solid rgba(234,236,240,.9); display: flex; flex-direction: column; gap: 9px; }
.m-order-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.m-order-no { font-family: "SF Mono", Consolas, monospace; font-size: 10.5px; color: var(--ink-4); }
.m-order-desc { font-size: 14px; font-weight: 600; line-height: 1.45; margin-top: 2px; }
.m-order-meta { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--ink-3); }
.m-order-meta div { display: flex; gap: 5px; align-items: flex-start; line-height: 1.5; }
.m-order-meta svg { flex: none; margin-top: 1px; opacity: .65; }
.m-order-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px dashed var(--line); padding-top: 9px; }
.m-money { font-weight: 700; font-variant-numeric: tabular-nums; }
.m-money small { font-size: 10px; font-weight: 500; color: var(--ink-4); }
.m-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* 首页 / KPI */
.m-hero { position: relative; z-index: 1; margin-top: 12px; display: flex; gap: 10px; }
.m-hero-stat { flex: 1; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); border-radius: 13px; padding: 10px 12px; color: #fff; backdrop-filter: blur(6px); }
.m-hero-stat b { font-size: 20px; font-weight: 750; display: block; line-height: 1.2; }
.m-hero-stat span { font-size: 10.5px; opacity: .78; }
.m-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.m-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m-cat { background: #fff; border-radius: 14px; border: 1px solid var(--line); padding: 13px 10px; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; }
.m-cat .ci { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; background: #eef4ff; }
.m-cat span { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.m-cat.active { border-color: var(--brand); background: var(--brand-50); }

/* 分段 */
.m-seg { display: flex; background: #eef1f6; border-radius: 11px; padding: 3px; gap: 2px; }
.m-seg button { flex: 1; height: 32px; border: none; border-radius: 8px; background: transparent; color: var(--ink-3); font-size: 12px; font-weight: 600; cursor: pointer; font-family: var(--font); }
.m-seg button.active { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(16,24,40,.1); }

/* 空状态 */
.m-empty { padding: 46px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-4); font-size: 12px; }
.m-empty svg { width: 40px; height: 40px; opacity: .35; }

/* 列表项 */
.m-item { display: flex; align-items: center; gap: 11px; padding: 13px 0; border-bottom: 1px solid #f0f2f6; }
.m-item:last-child { border-bottom: none; }
.m-item .ic { width: 34px; height: 34px; border-radius: 10px; background: #f2f6ff; color: var(--brand); display: flex; align-items: center; justify-content: center; flex: none; }
.m-item .txt { flex: 1; min-width: 0; }
.m-item .txt b { display: block; font-size: 13px; font-weight: 600; }
.m-item .txt span { font-size: 11px; color: var(--ink-4); }
.m-item .right { text-align: right; font-size: 12px; }
.m-item .chev { color: #cbd5e1; }

/* 底部操作条（详情页） */
.m-foot-bar { flex: none; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; gap: 8px; }
.m-foot-bar .m-btn { flex: 1; }

/* 时间线 */
.m-timeline { padding-left: 4px; }
.m-tl { position: relative; padding: 0 0 14px 18px; border-left: 1.5px dashed #e4e7ec; }
.m-tl:last-child { border-left-color: transparent; padding-bottom: 0; }
.m-tl::before { content: ""; position: absolute; left: -4.5px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.m-tl b { font-size: 12px; display: block; }
.m-tl span { font-size: 10.5px; color: var(--ink-4); }
.m-tl p { font-size: 11.5px; color: var(--ink-3); margin: 3px 0 0; line-height: 1.55; }

/* 登录 */
.m-login { flex: 1; display: flex; flex-direction: column; background: linear-gradient(165deg, #0d1526, #16294a); color: #fff; padding: 48px 26px 30px; overflow-y: auto; }
.m-login .logo { width: 58px; height: 58px; border-radius: 17px; background: linear-gradient(135deg,#4d86ff,#2f6bff); display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px rgba(47,107,255,.4); }
.m-login h2 { font-size: 24px; font-weight: 750; margin-top: 24px; letter-spacing: -.4px; }
.m-login p { font-size: 12px; color: #8fa3c0; margin-top: 8px; line-height: 1.8; }
.m-login form { margin-top: 30px; }
.m-login .m-field label { color: #b6c6dd; }
.m-login .m-input { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: #fff; }
.m-login .m-input::placeholder { color: #6d8099; }
.m-login .m-btn { margin-top: 8px; }
.m-login .demo { margin-top: 22px; background: rgba(255,255,255,.05); border: 1px dashed rgba(255,255,255,.16); border-radius: 12px; padding: 12px 14px; font-size: 11px; color: #93a7c2; line-height: 1.8; }
.m-login .demo code { color: #9fc0ff; }
.m-login .footer { margin-top: auto; padding-top: 26px; display: flex; gap: 14px; font-size: 11px; color: #64748b; }
.m-login .footer a { color: #8fa3c0; }

/* 客户主题点缀 */
.theme-customer .m-card { border-radius: 18px; }
.theme-customer .m-sec-title b { font-size: 14.5px; }
.c-hero { margin: -18px 14px 0; border-radius: 18px; background: linear-gradient(135deg,#fff,#f3f7ff); padding: 16px; box-shadow: 0 8px 24px rgba(47,107,255,.12); border: 1px solid #e8effd; position: relative; z-index: 2; }

/* 金额大按钮 */
.pay-bar { background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; display: flex; gap: 10px; align-items: center; flex: none; }
.pay-bar .sum { flex: 1; font-size: 11px; color: var(--ink-4); }
.pay-bar .sum b { display: block; font-size: 17px; color: var(--danger); font-weight: 750; }

/* 星级 */
.m-stars { color: #f59e0b; letter-spacing: 2px; font-size: 18px; }
.m-stars button { border: none; background: transparent; font-size: 24px; color: #d0d5dd; padding: 0 3px; cursor: pointer; }
.m-stars button.on { color: #f59e0b; }

@media (max-width: 520px) {
  .mobile-body { padding: 0; align-items: stretch; }
  .phone { width: 100%; height: 100vh; max-height: none; border-radius: 0; box-shadow: none; }
  .status-bar { display: none; }
}
