/* ================================================================
   移动端主题 v2 — 对齐参考站（m.zxfps.com）视觉风格
   Primary: #16d37d  BG: #f7f7f7  Card: #fff
================================================================ */
html, body { font-size: 15px; overflow-x: hidden; background: #f4f6f9; }

/* ── 顶部栏 ── */
.m-header {
  position: fixed; top: 0; left: 0; right: 0; height: 52px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: none;
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px; z-index: 100;
  box-shadow: 0 1px 0 rgba(22,211,125,.12), 0 4px 20px rgba(15,23,42,.06);
}
.m-header::after {
  content:''; position:absolute; bottom:0; left:0; right:0; height:2px;
  background:linear-gradient(90deg,#16d37d 0%,#38bdf8 50%,#a78bfa 100%);
  animation: headerGlow 3s ease infinite;
}
@keyframes headerGlow {
  0%,100%{opacity:.7;filter:brightness(1)} 50%{opacity:1;filter:brightness(1.2)}
}
.m-header-logo {
  font-weight: 900; font-size: 20px; flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #16d37d, #38bdf8);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.m-header-search {
  flex: 1; display: flex; align-items: center;
  background: #f4f5f7; border-radius: 99px;
  height: 34px; padding: 0 12px; gap: 6px;
  border: 1px solid #eef0f4;
  transition: border-color .18s;
}
.m-header-search:focus-within {
  background: #fff; border-color: rgba(22,211,125,.4);
  box-shadow: 0 0 0 2px rgba(22,211,125,.1);
}
.m-header-search input {
  flex: 1; border: none; background: transparent;
  font-size: 13px; color: #333; outline: none;
}
.m-header-search input::placeholder { color: #c0c4cc; }
.m-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.m-header-icon {
  width: 32px; height: 32px; display: flex; align-items: center;
  justify-content: center; color: #555; font-size: 19px;
  position: relative; cursor: pointer; border-radius: 50%;
}
.m-header-icon:active { background: #f0f0f0; }
.m-header-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 15px; height: 15px; padding: 0 3px;
  background: #e71111; border-radius: 8px;
  font-size: 9px; color: #fff; display: none;
  align-items: center; justify-content: center; line-height: 1;
}
.m-header-badge.show { display: flex; }

/* ── 内容区 ── */
.m-content {
  padding-top: 50px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
  min-height: 100vh; background: #f4f6f9;
}
.m-content-notab { padding-top: 50px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ── 底部 TabBar ── */
.m-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(56px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.92); border-top: none;
  display: flex; z-index: 100;
  box-shadow: 0 -1px 0 rgba(22,211,125,.08), 0 -4px 24px rgba(15,23,42,.06);
  backdrop-filter: saturate(200%) blur(20px);
  -webkit-backdrop-filter: saturate(200%) blur(20px);
}
.m-tab {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; color: #bbb; cursor: pointer;
  transition: color .18s; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.m-tab.active { color: var(--primary); }
.m-tab.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2.5px;
  background: linear-gradient(90deg,var(--primary),#0abf6a);
  border-radius: 0 0 4px 4px;
}
.m-tab-icon {
  width: 24px; height: 24px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.m-tab-icon img {
  width: 24px; height: 24px; object-fit: contain;
  filter: grayscale(1) brightness(.6) opacity(.55);
  transition: filter .18s;
}
.m-tab.active .m-tab-icon img {
  filter: grayscale(0) opacity(1)
    sepia(1) hue-rotate(95deg) saturate(4) brightness(.85);
}
.m-tab-label { font-size: 10px; line-height: 1; }
.m-tab-dot {
  position: absolute; top: 0; right: -4px;
  width: 7px; height: 7px;
  background: #e71111; border-radius: 50%; display: none;
}
.m-tab-dot.show { display: block; }

/* ── 顶部状态 Tabs (参考站下划线风格) ── */
.m-top-tabs {
  background: #fff; border-bottom: 1px solid #ededed;
  display: flex; padding: 0 16px; gap: 20px; overflow-x: auto;
  -ms-overflow-style: none; scrollbar-width: none;
}
.m-top-tabs::-webkit-scrollbar { display: none; }
.m-top-tab {
  padding: 11px 0 9px; font-size: 14px; color: #999;
  position: relative; cursor: pointer; white-space: nowrap;
  transition: color .18s; flex-shrink: 0;
}
.m-top-tab.active { color: #222; font-weight: 700; }
.m-top-tab.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--primary); border-radius: 2px 2px 0 0;
}

/* ── 胶囊筛选条 ── */
.m-filter-pills {
  display: flex; gap: 8px; padding: 10px 14px;
  overflow-x: auto; background: #fff;
  border-bottom: 1px solid #f0f2f5;
  -ms-overflow-style: none; scrollbar-width: none;
}
.m-filter-pills::-webkit-scrollbar { display: none; }
.m-pill {
  flex-shrink: 0; height: 30px; padding: 0 15px;
  border-radius: 99px; font-size: 12px;
  border: 1.5px solid #e4e7ec; background: #f8f9fb; color: #666;
  transition: all .25s cubic-bezier(.4,0,.2,1); white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  font-weight: 600; letter-spacing:.2px;
}
.m-pill.active {
  background: linear-gradient(135deg,#16d37d,#0abf6a);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 10px rgba(22,211,125,.35);
  transform: scale(1.04);
}
.m-pill.m-pill-tag { border-color: #ffd591; color: #d46b08; background: #fffcf0; }
.m-pill.m-pill-tag.active {
  background: linear-gradient(135deg,#fa8c16,#f5720a);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 10px rgba(250,140,22,.35);
  transform: scale(1.04);
}

/* ── 订单卡片 ── */
@keyframes cardIn {
  from { opacity:0; transform:translateY(18px) } to { opacity:1; transform:none }
}
.m-order-card {
  background: #fff; border-radius: 16px;
  margin: 10px 12px 0;
  padding: 0;
  box-shadow: 0 2px 6px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  cursor: pointer; border: 1px solid rgba(238,240,246,.7);
  transition: box-shadow .25s, transform .25s, border-color .25s;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden; position: relative;
  animation: cardIn .4s cubic-bezier(.23,1,.32,1) both;
}
.m-order-card:nth-child(1){animation-delay:.05s}
.m-order-card:nth-child(2){animation-delay:.1s}
.m-order-card:nth-child(3){animation-delay:.15s}
.m-order-card:nth-child(4){animation-delay:.2s}
.m-order-card:nth-child(5){animation-delay:.25s}
.m-order-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:3.5px;
  background:linear-gradient(180deg,#16d37d,#38bdf8);
  border-radius:0 4px 4px 0;
  opacity:.8; transition:opacity .2s;
}
.m-order-card:active {
  transform: scale(.985);
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
  border-color:rgba(22,211,125,.2);
}
.m-order-card-inner {
  padding: 14px 15px 12px 18px;
}
.m-order-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 9px; border-bottom: 1px solid #f3f5f8; margin-bottom: 9px;
}
.m-order-no {
  font-size: 10.5px; color: #b0b8c8;
  font-family: 'SF Mono',Consolas,'Courier New',monospace;
  letter-spacing: .5px; opacity:.7;
}
.m-order-title {
  font-size: 14.5px; font-weight: 700; color: #0f172a; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.m-order-info-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 0;
}
.m-order-info-item { display: flex; align-items: center; gap: 3px; }
.m-order-info-label { font-size: 11px; color: #999; white-space: nowrap; }
.m-order-info-val { font-size: 11px; color: #444; }
.m-order-card-ft {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f2f5;
}
.m-order-price {
  font-size: 22px; font-weight: 900; letter-spacing: -.5px;
  background: linear-gradient(135deg,#e71111,#ff4d4f);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
  background-clip:text;
}
.m-order-price small { font-size: 11px; font-weight: 400; -webkit-text-fill-color:#94a3b8; }
.m-order-time { font-size: 11px; color: #b0b8c8; }
.m-order-btn {
  height: 34px; padding: 0 18px; border-radius: 99px;
  background: linear-gradient(135deg,var(--primary),#0abf6a); color: #fff;
  font-size: 13px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 3px 12px rgba(22,211,125,.3);
  transition: all .2s cubic-bezier(.4,0,.2,1); border: none;
  -webkit-tap-highlight-color: transparent;
  position:relative; overflow:hidden;
}
.m-order-btn::after {
  content:''; position:absolute; inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.25),transparent);
  transform:translateX(-100%); transition:none;
}
.m-order-btn:active { transform: scale(.95); box-shadow: 0 1px 6px rgba(22,211,125,.2); }
.m-order-btn:active::after { transform:translateX(100%); transition:transform .4s; }
.m-order-btn.secondary { background: #f0f2f7; color: #64748b; box-shadow: none; }
.m-order-btn.secondary::after{display:none}
.m-order-btn.blue { background: linear-gradient(135deg,#6366f1,#4f46e5); box-shadow: 0 3px 12px rgba(99,102,241,.3); }

/* ── 消息 Tab (参考站风格: icon + 标题 + badge) ── */
.m-msg-section-title {
  font-size: 17px; font-weight: 700; color: #1a1a1a;
  padding: 16px 14px 10px;
}
.m-msg-channels {
  background: #fff; border-radius: 14px;
  margin: 0 12px 8px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.07);
  border: 1px solid var(--border);
}
.m-msg-channel-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid #f4f6f9;
  cursor: pointer; transition: background .15s;
}
.m-msg-channel-item:active { background: #f8fffe; }
.m-msg-channel-item:last-child { border-bottom: none; }
.m-msg-channel-icon {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; position: relative;
}
.m-msg-channel-badge {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #e71111; border-radius: 8px;
  font-size: 9px; color: #fff;
  display: none; align-items: center; justify-content: center;
}
.m-msg-channel-badge.show { display: flex; }
.m-msg-channel-body { flex: 1; min-width: 0; }
.m-msg-channel-name { font-size: 15px; font-weight: 600; color: #1a1a1a; margin-bottom: 2px; }
.m-msg-channel-desc { font-size: 12px; color: #1890ff; }
.m-msg-channel-arrow { color: #ccc; font-size: 14px; flex-shrink: 0; }

.m-msg-list-wrap {
  background: #fff; border-radius: 14px;
  margin: 0 12px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.07);
  border: 1px solid var(--border);
}
.m-msg-item {
  padding: 14px 16px; border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}
.m-msg-item:last-child { border-bottom: none; }
.m-msg-title { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.m-msg-title.unread::before {
  content: ''; display: inline-block; width: 7px; height: 7px;
  background: #e71111; border-radius: 50%; margin-right: 5px; vertical-align: middle;
}
.m-msg-time { font-size: 11px; color: #bbb; margin-top: 3px; }
.m-msg-preview {
  font-size: 12px; color: #666; margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── 底部筛选弹层 ── */
.m-filter-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-radius: 16px 16px 0 0;
  z-index: 700; transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  max-height: 85vh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.m-filter-sheet.show { transform: translateY(0); }
.m-filter-sheet-handle {
  width: 36px; height: 4px; background: #e0e0e0;
  border-radius: 2px; margin: 10px auto 0;
}
.m-filter-sheet-title {
  font-size: 16px; font-weight: 700; text-align: center;
  padding: 12px 0 4px; color: #1a1a1a;
}
.m-filter-sheet-body { padding: 0 16px 16px; overflow-y: auto; flex: 1; }
.m-filter-section-title { font-size: 12px; color: #999; margin: 14px 0 7px; }
.m-filter-sheet-footer {
  display: flex; gap: 12px; padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
}

/* ── 详情滑层 ── */
.m-detail-sheet {
  position: fixed; inset: 0; background: #f4f6f9; z-index: 800;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.m-detail-sheet.show { transform: translateX(0); }
.m-detail-header {
  display: flex; align-items: center; height: 50px;
  padding: 0 16px; border-bottom: 1px solid #ededed;
  gap: 12px; flex-shrink: 0; background: #fff;
}
.m-detail-back { font-size: 24px; color: #555; line-height: 1; cursor: pointer; }
.m-detail-body { flex: 1; overflow-y: auto; padding: 12px; }
.m-detail-footer {
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #ededed; flex-shrink: 0;
  display: flex; gap: 10px; background: #fff;
}

/* ── 悬浮客服 ── */
@keyframes floatPulse {
  0%{box-shadow:0 4px 14px rgba(22,211,125,.45),0 0 0 0 rgba(22,211,125,.35)}
  70%{box-shadow:0 4px 14px rgba(22,211,125,.45),0 0 0 12px rgba(22,211,125,0)}
  100%{box-shadow:0 4px 14px rgba(22,211,125,.45),0 0 0 0 rgba(22,211,125,0)}
}
.m-float-service {
  position: fixed; right: 16px;
  bottom: calc(66px + env(safe-area-inset-bottom));
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg,var(--primary),#0abf6a);
  box-shadow: 0 4px 14px rgba(22,211,125,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; font-size: 22px; color: #fff;
  text-decoration: none; transition: transform .15s;
  animation: floatPulse 2.5s infinite;
}
.m-float-service:active { transform: scale(.88); animation:none; }

/* ── 回到顶部 ── */
@keyframes goTopIn { from{opacity:0;transform:translateY(10px)scale(.8)} to{opacity:1;transform:none} }
.m-go-top {
  position: fixed; right: 16px;
  bottom: calc(126px + env(safe-area-inset-bottom));
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(15,23,42,.55); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  cursor: pointer; font-size: 16px;
  display: none; align-items: center; justify-content: center;
  z-index: 199; transition: background .2s;
}
.m-go-top.show { display: flex; animation: goTopIn .25s ease; }
.m-go-top:active { background: rgba(15,23,42,.7); }

/* ── 登录页 ── */
.m-login-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  background: #f4f6f9;
}
.m-login-hero {
  padding: 56px 32px 36px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(160deg, #e8faf2 0%, #f4f6f9 100%);
}
.m-login-logo { font-size: 36px; font-weight: 800; color: var(--primary); }
.m-login-sub { font-size: 13px; color: #999; margin-top: 6px; }
.m-login-form {
  flex: 1; background: #fff; border-radius: 20px 20px 0 0;
  padding: 26px 22px 40px; box-shadow: 0 -6px 24px rgba(0,0,0,.06);
}
.m-login-form-title { font-size: 19px; font-weight: 700; margin-bottom: 22px; color: #1a1a1a; }
.m-input-group { margin-bottom: 14px; }
.m-input-label { font-size: 12px; color: #666; margin-bottom: 6px; }
.m-input {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid #e0e0e0; border-radius: 8px;
  font-size: 15px; background: #fafafa; transition: border .2s;
}
.m-input:focus { border-color: var(--primary); background: #fff; }
.m-login-btn {
  width: 100%; height: 48px; border-radius: 8px;
  background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 600;
  box-shadow: 0 3px 12px rgba(22,211,125,.35);
  margin-top: 8px; border: none; cursor: pointer; transition: opacity .2s;
}
.m-login-btn:active { opacity: .88; }

/* ── 个人中心 ── */
.m-profile-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0fb36a 100%);
  padding: 66px 18px 28px;
  display: flex; align-items: center; gap: 14px;
}
.m-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.4);
}
.m-profile-name { font-size: 17px; font-weight: 700; color: #fff; }
.m-profile-role { font-size: 12px; color: rgba(255,255,255,.72); margin-top: 2px; }
.m-wallet-card {
  background: #fff; border-radius: 16px;
  margin: -20px 12px 0; padding: 18px 16px;
  box-shadow: 0 4px 12px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.1);
  display: flex; align-items: center; justify-content: space-around;
  text-align: center; position: relative; z-index: 1;
  border: 1px solid rgba(255,255,255,.8);
}
.m-wallet-amount { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.m-wallet-label { font-size: 11px; color: #999; margin-top: 2px; }
.m-menu-list {
  margin: 12px 12px 0; background: #fff;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.07);
  border: 1px solid var(--border);
}
.m-menu-item {
  display: flex; align-items: center; padding: 14px 16px;
  border-bottom: 1px solid #f4f6f9; gap: 12px; font-size: 14px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .14s;
}
.m-menu-item:last-child { border-bottom: none; }
.m-menu-item:active { background: #f8fffe; }
.m-menu-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.m-menu-arrow { margin-left: auto; color: #c8cdd8; font-size: 13px; }

/* ── 上传图片 ── */
.m-upload-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.m-upload-item {
  aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  border: 1.5px dashed #ddd;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa; font-size: 22px; color: #c0c0c0; cursor: pointer;
}
.m-upload-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── 提现历史 ── */
.m-withdraw-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid #f5f5f5;
}
.m-withdraw-item:last-child { border-bottom: none; }

/* ── 详情卡片区块 ── */
.m-detail-card {
  background: #fff; border-radius: 14px;
  padding: 15px 16px; margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.06);
  border: 1px solid var(--border);
}
.m-detail-card-title {
  font-size: 11px; color: #94a3b8; font-weight: 700;
  text-transform: uppercase; margin-bottom: 12px;
  letter-spacing: .7px;
}
.m-detail-row {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 8px; gap: 8px;
}
.m-detail-row:last-child { margin-bottom: 0; }
.m-detail-label { font-size: 12px; color: #999; flex-shrink: 0; }
.m-detail-value { font-size: 13px; color: #222; text-align: right; word-break: break-all; }
