/* ==========================================================================
   phone.css —— 手机设备外框 + 移动端通用骨架（状态栏 / 导航栏 / 标签栏 / 安全区）
   小程序、商户端手机端、场勘员端共用。
   ========================================================================== */

/* ---------- 设备外框 ---------- */
.device-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.device-cap {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .8px;
}
.device-cap .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.device-cap .cap-hint { font-weight: 500; color: var(--ink-4); letter-spacing: .2px; }

.device {
  position: relative;
  width: var(--dev-w); height: var(--dev-h);
  border-radius: 46px;
  background: #0E1013;
  padding: 10px;
  box-shadow:
    0 0 0 2px #23262C,
    0 0 0 3.5px #34383F,
    0 34px 64px -14px rgba(16,18,24,.42),
    0 10px 22px -8px rgba(16,18,24,.28);
  flex: none;
}
.device::after { content: ""; position: absolute; right: -3.5px; top: 190px; width: 3.5px; height: 76px; border-radius: 0 3px 3px 0; background: #34383F; }
.device::before { content: ""; position: absolute; left: -3.5px; top: 158px; width: 3.5px; height: 54px; border-radius: 3px 0 0 3px; background: #34383F; }

.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 37px; overflow: hidden;
  background: var(--bg);
  display: flex; flex-direction: column;
}

/* 灵动岛 */
.notch {
  position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 106px; height: 26px; border-radius: var(--r-pill);
  background: #0E1013; z-index: 90; pointer-events: none;
}

/* ---------- 状态栏 ---------- */
.statusbar {
  flex: none; height: 46px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 28px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .3px;
  position: relative; z-index: 60;
  font-family: var(--font-num);
  transition: color .2s ease, background .2s ease;
}
.statusbar .sb-right { display: flex; align-items: center; gap: 5px; }
.statusbar svg { width: 15px; height: 15px; }
.statusbar.chrome-white { background: #fff; color: var(--ink); }
.statusbar.chrome-soft { background: var(--bg); color: var(--ink); }
.statusbar.chrome-red { background: var(--brand); color: #fff; }
.statusbar.chrome-grad { background: transparent; color: #fff; }
.statusbar.on-dark { color: #fff; }

/* ---------- Home 指示条 ---------- */
.homebar { flex: none; height: 21px; display: grid; place-items: center; background: transparent; z-index: 60; }
.homebar i { display: block; width: 126px; height: 5px; border-radius: 99px; background: rgba(22,24,29,.78); }
.homebar.on-dark i, .homebar.on-red i { background: rgba(255,255,255,.86); }

/* ---------- 小程序内容区 ---------- */
.mp-body {
  flex: 1 1 auto; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; position: relative;
}
.mp-body::-webkit-scrollbar { display: none; }
.mp-body.pad { padding-bottom: 14px; }

/* 导航栏 */
.navbar {
  flex: none; position: relative; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 14px;
}
.navbar .nav-title { font-size: 16.5px; font-weight: 800; letter-spacing: .3px; }
.navbar .nav-title.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); white-space: nowrap; }
.navbar .nav-back, .navbar .nav-act {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  flex: none; color: inherit;
}
.navbar .nav-back svg, .navbar .nav-act svg { width: 18px; height: 18px; }
.navbar .nav-back { background: rgba(255,255,255,.7); }
.navbar.on-dark .nav-back { background: rgba(255,255,255,.18); }
.navbar .nav-sp { flex: 1 1 auto; }
.navbar.on-red { background: var(--brand); color: #fff; }
.navbar.on-white { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }

/* 小程序胶囊按钮 */
.capsule {
  display: flex; align-items: center; gap: 1px; flex: none;
  height: 30px; padding: 0 3px; border-radius: 99px;
  border: 1px solid rgba(22,24,29,.09); background: rgba(255,255,255,.62);
  backdrop-filter: blur(6px);
}
.capsule.on-dark { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.2); color: #fff; }
.capsule b { width: 29px; height: 26px; display: grid; place-items: center; }
.capsule b + b { border-left: 1px solid rgba(22,24,29,.09); }
.capsule.on-dark b + b { border-left-color: rgba(255,255,255,.28); }
.capsule svg { width: 15px; height: 15px; }

/* ---------- 底部标签栏 ---------- */
.tabbar {
  flex: none; display: flex; align-items: stretch;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-2);
  padding: 7px 4px 0;
  position: relative; z-index: 60;
}
.tabbar button {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 3px 0 0; color: var(--ink-4); transition: color .14s ease;
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button span { font-size: 10px; font-weight: 600; letter-spacing: .2px; }
.tabbar button.on { color: var(--brand); }
.tabbar button.on span { font-weight: 800; }
.tabbar button:active { transform: scale(.94); }

/* ---------- 移动端通用卡片 ---------- */
.m-card { background: #fff; border-radius: var(--r-l); padding: 14px; box-shadow: 0 1px 2px rgba(22,24,29,.04); }
.m-card + .m-card { margin-top: 10px; }
.m-sec { margin: 12px 14px 0; }
.m-sec-title { display: flex; align-items: center; gap: 8px; margin: 16px 14px 9px; }
.m-sec-title .bar { width: 3px; height: 14px; border-radius: 2px; background: var(--brand-grad); flex: none; }
.m-sec-title h3 { font-size: 14.5px; font-weight: 800; letter-spacing: .2px; }
.m-sec-title .more { margin-left: auto; font-size: 11.5px; color: var(--ink-4); display: flex; align-items: center; gap: 2px; }
.m-sec-title .more svg { width: 12px; height: 12px; }

/* 列表项（移动端） */
.m-row {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px; background: #fff;
  border-bottom: 1px solid var(--line);
}
.m-row:last-child { border-bottom: 0; }
.m-row .m-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.m-row .m-ico svg { width: 16px; height: 16px; }
.m-row .m-tt { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.m-row .m-ss { margin-top: 3px; font-size: 11px; color: var(--ink-4); }
.m-row .m-ar { color: var(--ink-5); flex: none; }
.m-row .m-ar svg { width: 15px; height: 15px; }

/* 移动端底部固定操作条 */
.m-actionbar {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px 12px; background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
}
.m-actionbar .m-btn {
  flex: 1 1 auto; height: 46px; border-radius: var(--r-m);
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 15px; font-weight: 700; letter-spacing: .3px;
  background: var(--brand-grad); color: #fff; box-shadow: var(--brand-glow-s);
}
.m-actionbar .m-btn:active { transform: scale(.985); filter: brightness(.96); }
.m-actionbar .m-btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line-3); box-shadow: none; flex: 0 0 auto; padding: 0 18px; }
.m-actionbar .m-btn.gold { background: var(--gold-grad); }
.m-actionbar .m-btn svg { width: 17px; height: 17px; }

/* 移动端弹层 */
.m-sheet-mask { position: absolute; inset: 0; z-index: 120; background: rgba(16,18,24,.42); display: flex; align-items: flex-end; animation: fadeIn .18s ease; }
.m-sheet {
  width: 100%; background: #fff; border-radius: 22px 22px 0 0;
  max-height: 76%; overflow: auto; padding: 8px 0 18px;
  animation: sheetUp .26s cubic-bezier(.3,1,.4,1);
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .7; } to { transform: none; opacity: 1; } }
.m-sheet .sh-bar { width: 38px; height: 4px; border-radius: 99px; background: var(--line-3); margin: 6px auto 12px; }
.m-sheet .sh-title { font-size: 15.5px; font-weight: 800; padding: 0 18px 12px; display: flex; align-items: center; gap: 8px; }

.m-toast {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.m-toast .t {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 99px; background: rgba(22,24,29,.88);
  color: #fff; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  animation: popIn .2s cubic-bezier(.3,1.2,.4,1);
}
.m-toast .t svg { width: 13px; height: 13px; color: #4ADE80; }

/* ---------- 移动端页面切换动画 ---------- */
@keyframes mIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.mp-page { animation: mIn .22s cubic-bezier(.2,.9,.3,1); }

/* ---------- 窄屏自适应 ---------- */
@media (max-width: 900px) {
  .device { border-radius: 36px; padding: 8px; }
  .screen { border-radius: 29px; }
  .device::before, .device::after { display: none; }
}
@media (max-width: 430px) {
  .device { width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 30px; padding: 6px; }
  .screen { border-radius: 25px; }
}

body.is-capture .device { box-shadow: none; }
