/* ============================================================
 * 铁心桥街道消火栓管理工作台 · 样式
 * 配色：导航深蓝 #0e2a47 / 主色青绿 #1abc9c / 页面底 #eef2f6
 * 状态：正常 #2FBF87 · 隐患 #F2994A · 维修中 #9AA3AB
 *       三色按卫星暗底校准过对比度：灰不沉底，绿不跟绿化混淆
 *       并且状态一律「颜色 + 符号」双通道，灰度打印同样可分
 * ============================================================ */

:root {
  --navy: #0e2a47;
  --navy-2: #17456f;
  --teal: #1abc9c;
  --teal-d: #128f76;
  --bg: #eef2f6;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-2: #eef2f6;
  --ink: #1f2a37;
  --ink-2: #5a6473;
  --ink-3: #8b96a5;
  --normal: #2FBF87;
  --danger: #F2994A;
  --maintenance: #9AA3AB;
  --shadow: 0 1px 3px rgba(16, 42, 67, .08);
  --radius: 12px;
}

* { box-sizing: border-box; }

/* 通用隐藏类：JS 里统一用 classList.toggle("hidden") 控制显隐，
   之前这份规则缺失，POI 结果面板和回收站条都藏不住 */
.hidden { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
}

button { font-family: inherit; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 56px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  box-shadow: 0 2px 10px rgba(14, 42, 71, .18);
  position: relative;
  z-index: 30;
}

.brand { font-size: 16px; font-weight: 600; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
.brand-icon { font-size: 19px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.sync-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  color: #cfe6f7;
  white-space: nowrap;
}
.sync-badge[data-state="ok"] { color: #7ef0d2; border-color: rgba(126, 240, 210, .5); }
.sync-badge[data-state="off"] { color: #ffc9a3; border-color: rgba(255, 201, 163, .45); }

/* ---------- 按钮 ---------- */
.btn {
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  background: var(--teal);
  color: #fff;
  transition: filter .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--teal); font-weight: 600; }
.btn.ghost { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .22); }
.btn.small { padding: 6px 12px; font-size: 12.5px; }
.btn.line { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.line:hover { border-color: #c7d5e2; background: #f7fafd; }
.btn.danger { background: #fdece4; color: #c0562a; border: 1px solid #f6d6c5; }
.btn.danger:hover { background: #fbe0d3; }

.icon-btn {
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  line-height: 1;
}
.icon-btn:hover { background: var(--line-2); color: var(--ink); }

/* ---------- 主布局 ---------- */
.layout {
  height: calc(100% - 56px);
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr) 340px;
  gap: 12px;
  padding: 12px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sidebar, .detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
}
.panel-head h2 { font-size: 13.5px; margin: 0; color: var(--navy); font-weight: 600; }
.panel-head .count { font-size: 12px; color: var(--ink-3); }

/* ---------- 搜索 ---------- */
.search-panel { padding: 12px; position: relative; }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7fafd;
  padding: 0 8px 0 10px;
  height: 38px;
}
.search-box:focus-within { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(26, 188, 156, .12); }
.search-icon { font-size: 13px; color: var(--ink-3); margin-right: 6px; }
.search-box input {
  border: none; outline: none; background: transparent; flex: 1;
  font-size: 13.5px; color: var(--ink); height: 100%; min-width: 0;
}

.poi-results {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 58px;
  max-height: 340px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(16, 42, 67, .16);
  z-index: 40;
}
.poi-item { padding: 9px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.poi-item:last-child { border-bottom: none; }
.poi-item:hover { background: #f4fbf9; }
.poi-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 600; }
.poi-count { font-size: 12px; color: var(--teal-d); font-weight: 700; white-space: nowrap; }
.poi-addr { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.poi-empty { padding: 12px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

.coord-row { display: flex; gap: 8px; margin-top: 10px; }
.coord-row input {
  flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; font-size: 12.5px; background: #f7fafd; outline: none;
}
.coord-row input:focus { border-color: var(--teal); background: #fff; }
.hint-line { margin: 6px 2px 0; font-size: 11.5px; color: var(--ink-3); }

/* 坐标制式切换（GCJ02 / WGS84） */
.coord-mode { display: flex; align-items: center; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.coord-mode-label { font-size: 11.5px; color: var(--ink-3); margin-right: 1px; }
.coord-mode .chip { padding: 3px 9px; font-size: 11.5px; }

/* ---------- 统计 ---------- */
.stats-panel { padding: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat {
  text-align: center; padding: 8px 4px; border-radius: 9px; background: #f7fafd; border: 1px solid var(--line-2);
}
.stat b { display: block; font-size: 18px; line-height: 1.3; color: var(--navy); }
.stat span { font-size: 11.5px; color: var(--ink-3); }
.stat[data-status="normal"] b { color: var(--normal); }
.stat[data-status="danger"] b { color: var(--danger); }
.stat[data-status="maintenance"] b { color: var(--maintenance); }

.filters { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 4px 11px; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.chip:hover { border-color: #c7d5e2; }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- 清单 ---------- */
.list-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hydrant-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }

.item-row {
  display: flex; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent;
}
.item-row:hover { background: #f5f9fd; }
.item-row.active { background: #eaf9f1; border-color: rgba(47, 191, 135, .5); }

.item-thumb {
  width: 52px; height: 52px; border-radius: 9px; object-fit: cover;
  background: #eef1f5; flex: 0 0 52px; border: 1px solid var(--line);
}
.item-thumb.empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); font-size: 16px;
}
.item-info { min-width: 0; flex: 1; }
.item-title { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.item-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 地址行：地址文字自己截断，「定位」贴着右边不被挤走 */
.item-addr { display: flex; align-items: center; gap: 6px; }
.item-addr .addr-text { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-locate {
  flex: 0 0 auto; border: 1px solid #cfe2f8; background: #f2f8ff; color: #1868c8;
  font: inherit; font-size: 11px; line-height: 1; padding: 3px 7px; border-radius: 999px; cursor: pointer;
}
.addr-locate:hover { background: #e4f0fd; }
.addr-locate:active { background: #d3e7fb; }

/* 清单右侧那一列：状态胶囊在上、删除在下。
   删除做成常驻但低对比度的图标键 —— 误删的代价太大，所以每次点都要二次确认，
   但也不能藏进「更多菜单」，那样等于没有。 */
.item-side {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.list-del {
  border: 0; background: transparent; color: #b6bfc8; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 6px;
}
.list-del:hover { background: #fdeceb; color: #c0392b; }
.list-del:active { background: #fbdedc; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 8px; }
.status-dot.normal { background: var(--normal); }
.status-dot.danger { background: var(--danger); }
.status-dot.maintenance { background: var(--maintenance); }

.status-tag {
  font-size: 11.5px; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}
.status-tag.normal { background: #e2f7ee; color: #14795a; }
.status-tag.danger { background: #fdecdd; color: #9a5a10; }
.status-tag.maintenance { background: #eef0f2; color: #5f6a72; }

/* 消火栓类型胶囊。与移动端 m-type-tag 用同一套配色，两端一眼认得出 */
.type-tag {
  font-size: 11.5px; border-radius: 999px; padding: 2px 9px; white-space: nowrap;
  border: 1px solid transparent;
}
.type-tag.t-municipal { background: #e8f2fd; color: #1868c8; border-color: #cfe2f8; }
.type-tag.t-community { background: #e7f6ee; color: #14795a; border-color: #c9e9d8; }
.type-tag.t-enterprise { background: #fdf1e3; color: #a8641a; border-color: #f6dcb8; }
.type-tag.t-other { background: #eef1f5; color: #5f6a72; border-color: #dfe4ea; }

.list-empty { padding: 26px 12px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* ---------- 回收站（软删除） ---------- */
.trash-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 6px 6px; padding: 7px 10px; border-radius: 9px;
  background: #fdf3e6; border: 1px solid #f3ddc0;
  color: #8a5a15; font-size: 12px;
}
.trash-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 空的回收站不该用「高亮警告色」吓人，也不该整个消失 —— 降到中性灰即可 */
.trash-bar.empty { background: #f4f6f8; border-color: var(--line); color: var(--ink-3); }
.trash-bar .btn.small[disabled] { opacity: .5; cursor: not-allowed; }
.item-row.trash { opacity: .7; }
.item-row.trash:hover { opacity: 1; }
.item-row.trash .btn.small { flex: 0 0 auto; }
/* 恢复 / 彻底删除并排：一个给后悔的人，一个给确定不要的人。
   「彻底删除」用红字描边 —— 这一步找不回来，入口的样子要跟后果匹配。 */
.trash-btns { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.btn.small.danger {
  border-color: #f0d6d2; background: #fff; color: #c0392b;
}
.btn.small.danger:hover { background: #fdf3f1; }

/* 详情面板：地址旁的「📍 定位」文字键 + 底部删除整条记录 */
.link-btn {
  border: 0; background: none; padding: 0; margin-left: 6px; cursor: pointer;
  font: inherit; font-size: 11.5px; color: #1868c8; white-space: nowrap;
}
.link-btn:hover { text-decoration: underline; }
/* 信息窗里的小按钮（地址「定位」）。名字不能叫 iw-link —— 那是已存在的链接样式 */
.iw-btn {
  border: 1px solid #cfe2f8; background: #f2f8ff; color: #1868c8;
  font: inherit; font-size: 11px; line-height: 1; padding: 2px 6px; border-radius: 999px; cursor: pointer;
}
.iw-btn:hover { background: #e4f0fd; }
.detail-danger {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; justify-content: flex-end;
}

/* ---------- 地图 ---------- */
.map-wrap { position: relative; min-width: 0; border-radius: var(--radius); overflow: hidden; background: #dfe6ec; }

#map { position: absolute; inset: 0; }

.map-hint {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px; color: #5a6473; background: #eef1f5;
}
.map-hint h3 { font-size: 20px; color: #c0392b; margin: 0 0 12px; }
.map-hint p { margin: 6px 0; font-size: 14px; max-width: 460px; line-height: 1.6; }
.map-hint code { background: #fff; padding: 2px 6px; border-radius: 4px; color: #c0392b; }
.map-hint .ok { color: #2e9e5b; font-weight: 600; }
.map-hint a { color: #2b6cb0; }
.map-hint[hidden] { display: none; }

.map-tools {
  position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap;
  z-index: 1100; /* 腾讯地图会注入 z-index:1000 的容器，必须高于它 */
}
.map-btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .96); color: var(--navy);
  border-radius: 9px; padding: 7px 12px; font-size: 12.5px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 42, 67, .14);
}
.map-btn:hover { background: #fff; border-color: #c7d5e2; }
.map-tip {
  position: absolute; right: 12px; bottom: 12px; z-index: 1100;
  background: rgba(14, 42, 71, .72); color: #dbeafe; font-size: 11.5px;
  padding: 4px 10px; border-radius: 999px; pointer-events: none;
}

/* 地图信息窗内容 */
/* 自定义信息窗的卡片底。
   之前 enableCustom 在构造时被静默关掉了（见 app.js InfoWindow 初始化处的注释），
   白底其实一直是 SDK 默认气泡给的；现在自定义真正生效，这个底就得自己画，
   否则文字会直接糊在卫星图上。 */
.iw {
  width: 232px; font-size: 13px; color: var(--ink);
  background: #fff; border-radius: 10px; padding: 8px 10px 10px;
  border: 1px solid rgba(16, 42, 67, .08);
  box-shadow: 0 4px 16px rgba(16, 42, 67, .24);
}
.iw-photo { width: 100%; height: 108px; object-fit: cover; border-radius: 8px; background: #eef1f5; display: block; }
.iw-photo.empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; }
.iw-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 4px; font-weight: 700; }
.iw-line { color: var(--ink-2); font-size: 12.5px; margin: 3px 0; }
.iw-line b { color: var(--ink); font-weight: 600; }
.iw-link { color: var(--teal); text-decoration: none; border-bottom: 1px dashed currentColor; }

/* 我的位置：两种坐标系解释的二选一 */
.iw-picks { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.iw-pick {
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 2px 7px;
  text-align: left; width: 100%; font: inherit; color: var(--ink-2); cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 9px;
}
.iw-pick:hover { border-color: var(--teal); background: #f4fbfa; }
.iw-dot { grid-row: 1 / span 2; width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; }
.dot-blue { background: #2b6cb0; }
.dot-orange { background: #F2994A; }
.iw-pick-t { font-size: 11.5px; line-height: 1.35; }
.iw-pick-c { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.iw-row { margin: 7px 0 2px; }
.iw-mini {
  width: 100%; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 9px;
}
.iw-mini:hover { border-color: var(--teal); background: #f4fbfa; }

/* ---------- 详情面板 ---------- */
.detail { overflow-y: auto; padding-right: 2px; }

.detail-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.detail-head {
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.detail-head h2 { margin: 0; font-size: 15px; color: var(--navy); }
.detail-body { padding: 12px 14px 16px; }

.photo-area { position: relative; border-radius: 10px; overflow: hidden; background: #eef1f5; }
.photo-img { width: 100%; height: 188px; object-fit: cover; display: block; cursor: zoom-in; }
.photo-empty {
  height: 188px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--ink-3); font-size: 13px;
}
.photo-empty .big { font-size: 26px; }
.photo-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.photo-actions .btn { flex: 1; min-width: 88px; }

.field-list { margin-top: 14px; }
.field { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px; }
.field:last-child { border-bottom: none; }
.field .k { color: var(--ink-3); flex: 0 0 62px; }
.field .v { color: var(--ink); flex: 1; word-break: break-all; }
.field .v.muted { color: var(--ink-3); }

.detail-empty { padding: 46px 20px; text-align: center; color: var(--ink-3); }
.detail-empty .big { font-size: 30px; display: block; margin-bottom: 8px; }

/* ---------- 弹窗 ---------- */
.cam-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(14, 42, 71, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.cam-overlay[hidden] { display: none; }

.cam-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  width: min(420px, 92vw); box-shadow: 0 18px 50px rgba(6, 20, 36, .35);
}
.cam-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
}
.cam-header h3 { margin: 0; font-size: 14.5px; color: var(--navy); }
#camVideo { width: 100%; height: 280px; object-fit: cover; background: #0e2a47; display: block; }
.cam-footer { padding: 12px 16px; display: flex; justify-content: center; }
.cam-footer .btn { min-width: 140px; }

.qr-body { padding: 16px 18px 20px; text-align: center; }
.qr-img {
  width: 232px; height: 232px; margin: 0 auto; border: 1px solid var(--line);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #f7fafd;
}
.qr-img img { width: 100%; height: 100%; object-fit: contain; }
.qr-tip { font-size: 12.5px; color: var(--ink-2); margin: 12px 0 6px; }
.qr-url { font-size: 12.5px; margin: 0; }
.qr-url a { color: #2b6cb0; word-break: break-all; }

.lightbox-card { width: min(680px, 94vw); }
.lightbox-card img { width: 100%; max-height: 74vh; object-fit: contain; display: block; background: #0e2a47; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 78px; z-index: 3000;   /* 抬到标签栏上方 */
  transform: translateX(-50%) translateY(10px);
  background: rgba(14, 42, 71, .93); color: #fff;
  padding: 9px 18px; border-radius: 999px; font-size: 13px;
  max-width: 80vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
 * 移动端巡检页（地图为主体的移动工作台）
 * 结构：顶部导航栏 / 全屏地图 + 中央准星 + 悬浮按钮 / 底部信息卡
 *       编辑抽屉、图册、确认框均为覆盖层
 * ============================================================ */
body.mobile {
  height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  background: #e9ebe4;                 /* 与路网底图同色，加载时不闪白 */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 顶部（原蓝色导航栏已按需求撤掉） ----------
   屏幕上方只留「本轮进度」一行：进度条 + 计数 + 离线徽标 + 结束本轮。
   离线徽标从原顶栏并到这里，语义不变。 */

/* 离线徽标：没网时橙底（警示），只在补传时黄底（提示）。
   现场一眼能看出「现在是离线采集」还是「数据还没传完」。 */
.m-progress .m-offline {
  flex: 0 0 auto; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 11px; font-weight: 600; line-height: 22px;
  white-space: nowrap; letter-spacing: .2px;
  background: #ffb020; color: #3d2600;
}
.m-progress .m-offline[data-kind="offline"] { background: #ff8b3d; color: #40210a; }
.m-progress .m-offline[hidden] { display: none; }

/* ---------- 标签页容器 ----------
   三个视图叠在同一格子里，切换用 visibility（不用 display:none）——
   地图的布局尺寸一直都在，切回巡检页不用等 SDK 重算瓦片。 */
.m-views { position: relative; flex: 1 1 auto; min-height: 0; }
.m-view {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  visibility: hidden; background: #f4f6f9;
}
.m-view.show { visibility: visible; }

/* ---------- 底部标签栏 ----------
   三个页签：巡检（地图）/ 清单 / 图册。地图上悬浮的样式按键在右下拇指区，
   标签栏压在它下面 —— 互不遮挡：样式按键 bottom:24px 是相对地图区的。 */
.m-tabbar {
  flex: 0 0 auto; z-index: 40;
  display: flex; background: #fff;
  border-top: 1px solid var(--line-2);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 10px rgba(16, 42, 67, .08);
}
.m-tab {
  flex: 1 1 0; height: 52px; border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; font-size: 10.5px; font-weight: 500; color: #8a97a6;
  cursor: pointer; touch-action: manipulation; position: relative;
  -webkit-tap-highlight-color: transparent;
}
.m-tab span { line-height: 1; }
.m-tab:active { background: #f2f6fb; }
.m-tab.on { color: #1868c8; font-weight: 600; }
.m-tab.on::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: #1868c8;
}

/* ---------- 清单页 ----------
   未巡的排前面 —— 打开就知道下一步去哪；行内给状态、类型、
   本轮已巡、待传、距离，一眼挑出要处理的目标。 */
.m-listwrap { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 10px 16px; }
.m-lrow {
  position: relative; width: 100%; margin-bottom: 8px; padding: 11px 12px;
  border: 1px solid var(--line-2); border-radius: 11px; background: #fff;
  font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
  display: flex; align-items: center; gap: 10px;
  -webkit-tap-highlight-color: transparent;
}
.m-lrow:active { background: #f2f7fd; }
.m-lrow.visited { opacity: .62; }
.m-lrow-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #2FBF87; }
.m-lrow-dot.st-danger { background: #F2994A; }
.m-lrow-dot.st-maintenance { background: #9AA3AB; }
.m-lrow-main { flex: 1 1 auto; min-width: 0; }
.m-lrow-code { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.m-lrow-sub {
  margin-top: 2px; font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-lrow-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.m-lrow-dist { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-list-empty { padding: 60px 24px; text-align: center; font-size: 13px; color: var(--ink-3); line-height: 1.7; }

/* 清单页顶部的小计数条：跟进度行呼应，但粒度不同（这里是全量台账） */
.m-list-head {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px 10px; font-size: 12px; color: var(--ink-3);
}

/* ---------- 我的 ----------
   页签从「图册」换成「我的」，照片降为个人信息里的一组缩略图。
   主页是「一张名片 + 一行统计 + 五个入口」，二级页从右侧盖上来。 */
.m-minewrap {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px 20px;
}
.m-mine-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px; margin-bottom: 10px;
  border-radius: 14px; background: #fff;
  box-shadow: 0 1px 4px rgba(16, 42, 67, .08);
}
.m-mine-ava {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%;
  background: #1868c8; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 600;
}
.m-mine-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-mine-who b { font-size: 16px; color: var(--ink); }
.m-mine-who i {
  font-style: normal; font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-mine-edit {
  flex: 0 0 auto; padding: 6px 10px; border-radius: 999px;
  background: #f2f6fb; color: #1868c8; font-size: 12px; font-weight: 600;
}
.m-mine-stat {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.m-mine-statbox {
  flex: 1 1 0; padding: 10px 6px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 4px rgba(16, 42, 67, .08);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.m-mine-statbox b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-mine-statbox i { font-style: normal; font-size: 11px; color: var(--ink-3); }

.m-mine-row {
  width: 100%; min-height: 56px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
  display: flex; align-items: center; gap: 12px;
  font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.m-mine-row:active { background: #f2f7fd; }
.m-mine-ico {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px;
  background: #f2f6fb; display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1;
}
.m-mine-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-mine-txt b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.m-mine-txt i {
  font-style: normal; font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-mine-go { flex: 0 0 auto; font-size: 18px; color: #c3ccd6; }
.m-mine-foot {
  padding: 18px 4px 0; text-align: center;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.7;
}

/* 二级页：盖在「我的」主页上，左上角返回 */
.m-subpage {
  position: absolute; inset: 0; z-index: 5; background: #f4f6f9;
  display: flex; flex-direction: column;
}
.m-subpage[hidden] { display: none; }
.m-subpage-head {
  flex: 0 0 auto; height: 48px; display: flex; align-items: center;
  padding: 0 6px; background: #fff; border-bottom: 1px solid var(--line-2);
}
.m-subpage-back {
  width: 44px; height: 44px; border: 0; background: none; padding: 0;
  color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.m-subpage-head h3 { flex: 1 1 auto; margin: 0; font-size: 15.5px; font-weight: 600; text-align: center; }
.m-subpage-pad { flex: 0 0 44px; }
.m-subpage-body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px 24px;
}
.m-sub-sec {
  padding: 12px 14px; margin-bottom: 10px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 4px rgba(16, 42, 67, .08);
}
.m-sub-sec h4 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.m-sub-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.m-sub-row label { flex: 0 0 62px; font-size: 13px; color: var(--ink-2); }
.m-sub-row input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 11px;
  border: 1.5px solid #cfdcea; border-radius: 10px;
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
}
.m-sub-note {
  margin: 8px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-3);
}
.m-sub-save { width: 100%; margin-top: 10px; min-height: 46px; }
.m-sub-kv {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line-2);
}
.m-sub-kv:last-of-type { border-bottom: 0; }
.m-sub-kv span { font-size: 13px; color: var(--ink-2); }
.m-sub-kv b {
  font-size: 13px; color: var(--ink); font-weight: 600;
  text-align: right; word-break: break-all;
}
.m-sub-state {
  display: block; margin: 10px 0 0; padding: 8px 10px; border-radius: 9px;
  font-size: 12.5px; background: #eef1f5; color: var(--ink-2);
}
.m-sub-state.ok { background: #e8f6ef; color: #14603f; }
.m-sub-state.warn { background: #fff4e2; color: #8a5300; }
.m-sub-state.bad { background: #fdeceb; color: #a5342a; }
.m-sub-danger {
  width: 100%; min-height: 44px; margin-top: 8px;
  border: 1.5px solid #f0d0cc; border-radius: 10px; background: #fff;
  color: #c0392b; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; touch-action: manipulation;
}
.m-sub-danger:active { background: #fdf3f1; }

/* 帮助中心：用原生 details，展开/收起不用写 JS */
.m-faq { border-bottom: 1px solid var(--line-2); }
.m-faq:last-child { border-bottom: 0; }
.m-faq summary {
  padding: 12px 2px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px;
}
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::before { content: "＋"; color: #1868c8; font-weight: 700; }
.m-faq[open] summary::before { content: "－"; }
.m-faq p {
  margin: 0 0 12px; padding-left: 20px;
  font-size: 12.5px; line-height: 1.8; color: var(--ink-2);
}
.m-note { padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.m-note:last-child { border-bottom: 0; }
.m-note b { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink); }
.m-note b i { font-style: normal; font-size: 11px; color: var(--ink-3); font-weight: 400; }
.m-note ul { margin: 6px 0 0; padding-left: 20px; }
.m-note li { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }

/* 个人信息里的照片缩略图：三列，点一张跳回巡检页选中它 */
.m-mine-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.m-mine-photos .m-gallery-item {
  position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0;
  border-radius: 9px; overflow: hidden; background: #dde5ee; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-mine-photos .m-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-mine-photos .m-gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 4px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .68));
  color: #fff; font-size: 11px; text-align: left;
}


/* ---------- 本轮巡检进度 ----------
   现场一次出勤要走十几个栓，抬头就该知道还剩几个。
   这一行只占 34px —— 地图矮一点点，换来的是全程不用去数标记。 */
.m-progress {
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 12px;
  background: #fff; border-bottom: 1px solid var(--line-2);
  position: relative; z-index: 25;
}
.m-progress-track {
  flex: 1 1 auto; height: 9px; border-radius: 5px;
  background: #e8edf3; overflow: hidden;
}
.m-progress-fill {
  height: 100%; width: 0; border-radius: 5px;
  background: linear-gradient(90deg, #12a150, #45c96f);
  transition: width .3s ease;
}
.m-progress-text {
  flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.m-progress.all-done .m-progress-text { color: #0f7a45; }

/* 「结束本轮」是低频操作，视觉上做小，但热区照样扩到 44px 上下 */
.m-progress-reset {
  position: relative; flex: 0 0 auto;
  height: 28px; padding: 0 10px; border-radius: 14px;
  border: 1.5px solid #dde4ec; background: #fff; color: var(--ink-3);
  font: inherit; font-size: 12px; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.m-progress-reset::before { content: ""; position: absolute; inset: -8px; }
.m-progress-reset:active { background: #f2f5f9; color: var(--ink); }
.m-progress-reset[hidden] { display: none; }

/* ---------- 地图层 ---------- */
/* 地图层自建层叠上下文（z-index 生效 + isolation）。
   #map 是 position:absolute 但 z-index:auto —— 它不产生层叠上下文，
   于是腾讯 SDK 插进去的那些自带高 z-index 的图层会直接窜到兄弟节点之上。
   给 .m-map-wrap 一个 z-index:0 把这一层封闭起来，SDK 内部无论用多大的数值
   （实测它有个 z-index:1000 的容器）都出不了这个圈。 */
.m-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.m-map-wrap { position: relative; z-index: 0; flex: 1 1 auto; min-height: 0; background: #e9ebe4; }
#map { position: absolute; inset: 0; }

/* 浮层：地图的兄弟节点，层级高于整个地图子树，专门放地图上的 UI。
   pointer-events:none 让手指能穿透到地图上拖动/缩放，
   只有真正的控件自己再打开 pointer-events。 */
.m-mapui { position: absolute; inset: 0; z-index: 900; pointer-events: none; }
.m-mapui > * { pointer-events: auto; }

.m-crosshair {
  position: absolute; left: 50%; top: 50%; width: 34px; height: 34px;
  margin: -17px 0 0 -17px; pointer-events: none;
}
.m-crosshair svg { display: block; }

/* 地图右下角唯一的按键：点了在「矢量路网 / 卫星混合」之间来回换。
   放右下而不是右上，是因为现场基本单手持机 —— 右上角拇指够不着，
   右下正好落在自然握持时拇指的弧线上。抬到 24px 是给腾讯自己的版权角标让位。
   按钮本身做得小（不挡地图），但用 ::before 把可点区域向外扩 8px，
   手指实际能戳中的范围仍是 48×48 上下 —— 看着秀气，按着不飘。 */
.m-mapbtn {
  position: absolute; right: 10px; bottom: 24px;
  height: 30px; padding: 0 9px;
  border: 0; border-radius: 15px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1px 6px rgba(16, 42, 67, .26), 0 0 0 1px rgba(16, 42, 67, .07);
  color: #0f766e; font: inherit; font-size: 11.5px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s, background .12s;
}
.m-mapbtn::before { content: ""; position: absolute; inset: -8px; border-radius: 22px; }
.m-mapbtn:active { background: #e6f2ee; transform: scale(.94); }
.m-mapbtn svg { display: block; flex: 0 0 auto; }

/* 提示条放地图底部靠左，右边给样式按键留出位置，两者不打架 */
.m-mapnote {
  position: absolute; left: 12px; right: 104px; bottom: 12px;
  background: rgba(255, 255, 255, .94); border-radius: 9px;
  padding: 8px 10px; font-size: 12px; color: var(--ink-2); line-height: 1.45;
  box-shadow: 0 1px 5px rgba(16, 42, 67, .14);
}

/* ---------- 底部信息卡 ---------- */
.m-sheet {
  flex: 0 0 auto; z-index: 20; background: #fff;
  box-shadow: 0 -2px 12px rgba(16, 42, 67, .13);
  max-height: 54vh; display: flex; flex-direction: column;
}
.m-sheet-empty { padding: 16px 16px 18px; }
.m-sheet-tip { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; text-align: center; }
.m-sheet-body { padding: 14px 16px 14px; overflow-y: auto; }

.m-code-line { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.m-code { margin: 0; font-size: 16.5px; font-weight: 600; color: var(--ink); }
/* 信息卡右上角的关闭：顶栏撤掉后，收起信息卡靠它（原来靠顶栏返回键）。
   视觉做小，::before 把热区扩到 40px 上下。 */
.m-sheet-x {
  position: relative; margin-left: auto; flex: 0 0 auto;
  width: 26px; height: 26px; border: 0; border-radius: 8px;
  background: none; color: var(--ink-3); font-size: 15px; line-height: 1;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.m-sheet-x::before { content: ""; position: absolute; inset: -8px; }
.m-sheet-x:active { color: var(--ink); background: #eef2f7; }
.m-addr { margin: 0 0 7px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.m-meta { margin: 0 0 4px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.m-meta .k { color: #9aa6b4; }
.m-meta b { color: var(--ink-2); font-weight: 500; }

.m-actions {
  display: flex; gap: 8px; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line-2);
}
.m-act {
  flex: 1; height: 42px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-size: 12.5px; color: #2b6cb0;
  display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.m-act:active { background: #f2f7fd; }
.m-act { min-height: 46px; }          /* 戴手套也点得中，不追求秀气 */
.m-act.danger { color: #c0392b; border-color: #f0d6d2; }
.m-act.danger:active { background: #fdf3f1; }
.m-act svg { display: block; flex: 0 0 auto; }

/* 本轮已巡 / 未巡：跟着编号一起显示，不用去地图上数绿勾 */
.m-visit-tag {
  flex: 0 0 auto; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap;
}
.m-visit-tag.done { background: #e3f6ea; color: #0f7a45; }
.m-visit-tag.todo { background: #fff1de; color: #a35a10; }

/* 「标记已巡」是现场最高频的动作，给整行大按钮，位置在屏幕下半部分。
   已经巡过的时候变成绿底 + 勾，再点一下取消 —— 误触了能马上改回来。 */
.m-visit-btn {
  width: 100%; min-height: 50px; margin-top: 12px;
  border-radius: 10px; border: 1.5px solid #b9d0ec; background: #fff;
  color: #1868c8; font: inherit; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.m-visit-btn:active { background: #eef4fb; }
.m-visit-btn.on { background: #e3f6ea; border-color: #8fd3ac; color: #0f7a45; }
.m-visit-btn.on:active { background: #d4efe0; }
.m-visit-btn svg { display: block; flex: 0 0 auto; }

/* 底部空信息卡：定位 + 新增两个动作并排。
   定位是「把我带到那里」，新增是「在这里建档」，主次不能颠倒 ——
   所以定位用描边次级样式，新增用实心主色。 */
.m-sheet-btns {
  display: flex; gap: 10px; align-items: stretch;
}
.m-locate-btn {
  flex: 0 0 40%; height: 46px; border-radius: 10px;
  border: 1.5px solid #b9d0ec; background: #fff; color: #1868c8;
  font: inherit; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.m-locate-btn:active { background: #eef4fb; }
.m-locate-btn[data-busy="1"] { color: #7d90a6; border-color: #d8e1ea; }
.m-locate-btn svg { display: block; flex: 0 0 auto; }

.m-add-btn {
  flex: 1 1 auto; height: 46px; border: 0; border-radius: 10px;
  background: #1868c8; color: #fff; font: inherit; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.m-add-btn:active { background: #14559f; }

/* 图册入口：从右上角按钮组挪到这里后的落脚点，做轻量文字链，不和主操作抢注意力 */
.m-sheet-link {
  display: block; width: 100%; margin-top: 10px; padding: 7px 0;
  border: 0; background: transparent; color: #6b7a8c;
  font: inherit; font-size: 12.5px; text-align: center; cursor: pointer;
}
.m-sheet-link:active { color: #1868c8; }

/* ---------- 导航方式选择层 ---------- */
.m-sheet-layer {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(12, 28, 48, .42);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.m-sheet-layer.show { opacity: 1; visibility: visible; }
.m-sheet-layer .m-sheet-card {
  position: absolute; left: 8px; right: 8px; bottom: 8px;
  background: #fff; border-radius: 16px; overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(101%); visibility: hidden;
  transition: transform .26s cubic-bezier(.22, .61, .36, 1), visibility .26s;
}
.m-sheet-layer.show .m-sheet-card { transform: translateY(0); visibility: visible; }

.m-sheet-head { padding: 14px 16px 10px; text-align: center; }
.m-sheet-head h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.m-sheet-head p {
  margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.m-sheet-opts { padding: 0 10px; }
.m-sheet-opt {
  width: 100%; border: 0; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 11px 10px; border-radius: 11px; font: inherit;
}
.m-sheet-opt:active { background: #f1f5fa; }
.m-opt-ico {
  flex: 0 0 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.m-opt-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.m-opt-txt b { font-size: 14px; font-weight: 500; color: var(--ink); }
.m-opt-txt i { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.m-sheet-cancel {
  width: 100%; height: 50px; border: 0; background: #fff; cursor: pointer;
  border-top: 1px solid var(--line-2); margin-top: 6px;
  font: inherit; font-size: 15px; color: var(--ink-2);
}
.m-sheet-cancel:active { background: #f1f5fa; }

/* ---------- 覆盖层通用 ---------- */
.m-mask {
  position: fixed; inset: 0; z-index: 1000; background: rgba(12, 28, 48, .42);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.m-mask.show { opacity: 1; visibility: visible; }

/* ---------- 编辑抽屉 ---------- */
.m-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001;
  max-height: 92vh; background: #fff; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(101%); visibility: hidden;
  transition: transform .26s cubic-bezier(.22, .61, .36, 1), visibility .26s;
}
.m-drawer.show { transform: translateY(0); visibility: visible; }
.m-drawer-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line-2);
}
.m-drawer-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.m-drawer-body {
  flex: 1 1 auto; overflow-y: auto; padding: 12px 16px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.m-drawer-foot {
  flex: 0 0 auto; display: flex; gap: 8px;
  padding: 10px 16px 14px; border-top: 1px solid var(--line-2);
}
.m-drawer-foot .btn { flex: 1; }

/* ---------- 确认框 ---------- */
.m-confirm {
  position: fixed; inset: 0; z-index: 1003; padding: 24px;
  background: rgba(12, 28, 48, .45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s;
}
.m-confirm.show { opacity: 1; visibility: visible; }
.m-confirm-card { width: 100%; max-width: 320px; background: #fff; border-radius: 14px; padding: 20px 18px 14px; }
.m-confirm-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.m-confirm-card p { margin: 0 0 16px; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.m-confirm-btns { display: flex; gap: 8px; }
.m-confirm-btns .btn { flex: 1; height: 42px; }

/* ---------- 表单控件（编辑抽屉内复用） ---------- */
body.mobile .m-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
body.mobile .m-body { display: flex; flex-direction: column; gap: 10px; }

body.mobile input, body.mobile select, body.mobile textarea {
  height: 44px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 12px; font-size: 14px; background: #f7fafd; color: var(--ink);
  font-family: inherit; outline: none; width: 100%;
}
body.mobile textarea { height: auto; padding: 10px 12px; resize: vertical; }
body.mobile input:focus, body.mobile select:focus, body.mobile textarea:focus {
  border-color: #1868c8; background: #fff; box-shadow: 0 0 0 3px rgba(24, 104, 200, .12);
}

body.mobile .m-coord { display: flex; gap: 8px; }
body.mobile .m-coord input { flex: 1; min-width: 0; }

/* 语音输入 / 历史记录的行：输入框吃掉剩余宽度，右侧按钮固定宽度不跟着挤 */
body.mobile .m-flabel { font-size: 12.5px; color: var(--ink-2); }
body.mobile .m-input-row { display: flex; gap: 8px; align-items: stretch; }
/* 输入框 15px 起：低于这个字号 iOS 一聚焦就把整页放大，现场很烦；
   同时也更符合「阳光下看得清」这条现场要求 */
body.mobile .m-input-row input,
body.mobile .m-input-row textarea {
  flex: 1 1 auto; min-width: 0; min-height: 46px;
  font-size: 15px; padding: 0 10px;
}
body.mobile .m-input-row textarea { padding: 9px 10px; line-height: 1.5; }

/* 麦克风按到 48px 宽 —— 它是「少打字」的主要入口，值得占这点地方 */
body.mobile .m-row-btn {
  flex: 0 0 auto; width: 48px; min-height: 46px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #cfdcea; border-radius: 9px;
  background: #fff; color: #1868c8; cursor: pointer;
}
body.mobile .m-mic svg { width: 19px; height: 19px; }
body.mobile .m-row-btn:active { background: #eef4fb; }
/* 浏览器不支持语音输入时按钮置灰，别让人以为点了没反应 */
body.mobile .m-row-btn[disabled] {
  color: #b3bcc6; border-color: #e3e8ee; background: #f6f8fa; cursor: not-allowed;
}

/* 录音中：红底 + 呼吸光圈，告诉操作者「这条还在听」，别急着点保存 */
body.mobile .m-mic[data-rec="1"] {
  color: #fff; background: #e2483a; border-color: #e2483a;
  animation: m-mic-pulse 1.15s ease-in-out infinite;
}
@keyframes m-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 72, 58, .45); }
  50%      { box-shadow: 0 0 0 6px rgba(226, 72, 58, 0); }
}
/* 录音中把麦克风图标换成白色「停止方块」：现在是手动收尾，
   还留着麦克风图案会让人以为它在等待、而不是在录。方块是明确的「按这里停」。 */
body.mobile .m-mic[data-rec="1"] svg { display: none; }
body.mobile .m-mic[data-rec="1"]::before {
  content: ""; display: block; width: 13px; height: 13px;
  border-radius: 2px; background: #fff;
}

/* 历史输入：点输入框就地展开，不遮挡、不脱离文档流（抽屉里可滚动到） */
body.mobile .m-histbox {
  margin-top: 2px;
  border: 1px solid #d9e3ee; border-radius: 10px;
  background: #fff; overflow: hidden;
  box-shadow: 0 4px 14px rgba(23, 43, 77, .07);
}
body.mobile .m-hist-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 10px; background: #f4f8fc; border-bottom: 1px solid #e6edf5;
  font-size: 11.5px; color: var(--ink-3);
}
body.mobile .m-hist-clear {
  font: inherit; font-size: 11.5px; color: #c0392b;
  background: none; border: 0; padding: 2px 4px; cursor: pointer;
}
body.mobile .m-hist-list { max-height: 210px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.mobile .m-hist-item {
  display: flex; align-items: flex-start; gap: 6px;
  padding: 8px 10px; border-bottom: 1px solid #f0f4f8;
}
body.mobile .m-hist-item:last-child { border-bottom: 0; }
body.mobile .m-hist-pick {
  flex: 1 1 auto; min-width: 0; text-align: left; word-break: break-all;
  font: inherit; font-size: 13.5px; line-height: 1.45; color: var(--ink);
  background: none; border: 0; padding: 0; cursor: pointer;
}
body.mobile .m-hist-pick:active { color: #1868c8; }
body.mobile .m-hist-when { display: block; margin-top: 2px; font-size: 11px; color: var(--ink-3); }

/* 附近的栓：点一下就带过去（台账里有的直接切到编辑，免得同一个栓存成两条）。
   行高压到 44 以上，戴手套连点几条也不会串行。 */
body.mobile .m-near-pick {
  width: 100%; min-height: 46px; padding: 8px 10px;
  border-bottom: 1px solid #f0f4f8; text-align: left;
}
body.mobile .m-near-pick b { font-size: 14px; }
body.mobile .m-near-pick:active { background: #f2f7fd; }

/* 常用短语：现场那几类问题翻来覆去就这些，点选比敲字快得多 */
body.mobile .m-chip-list {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 9px 10px;
}
body.mobile .m-chip {
  position: relative; min-height: 36px; padding: 0 12px; border-radius: 18px;
  border: 1px solid #d9e3ee; background: #f7fafc; color: var(--ink-2);
  font: inherit; font-size: 13px; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body.mobile .m-chip::before { content: ""; position: absolute; inset: -4px; }
body.mobile .m-chip:active { background: #e6f0fb; color: #1868c8; border-color: #b9d0ec; }

/* 热区兜底：视觉可以做小，手指能戳中的范围不能小。
   这些是低频的删除/清空，图标保持秀气，热区向外扩到 44px 上下。 */
body.mobile .m-hist-del, body.mobile .m-hist-clear { position: relative; }
body.mobile .m-hist-del::before, body.mobile .m-hist-clear::before {
  content: ""; position: absolute; inset: -8px;
}
body.mobile .m-hist-del {
  flex: 0 0 auto; width: 26px; height: 26px; line-height: 1;
  border: 0; border-radius: 6px; background: none;
  color: #9aa6b4; font-size: 15px; cursor: pointer;
}
body.mobile .m-hist-del:active { background: #f2f5f9; color: #c0392b; }
body.mobile .m-hist-empty { padding: 11px 10px; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

body.mobile .m-inline-btn {
  flex: 0 0 auto; padding: 0 12px; border-radius: 9px;
  border: 1.5px solid #cfdcea; background: #fff; color: #1868c8;
  font: inherit; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
body.mobile .m-inline-btn:active { background: #eef4fb; }
body.mobile .m-inline-btn[data-busy="1"] { color: #9aa6b4; border-color: #e3e8ee; }

/* 类型胶囊可能把编号挤出去，允许换行并让编号占满剩余空间 */
body.mobile .m-code-line { flex-wrap: wrap; }
body.mobile .m-code { flex: 1 1 auto; min-width: 0; word-break: break-all; }

/* 分段选择器：状态 / 类型这类短枚举，一次点击选中，比下拉少一步操作 */
body.mobile .m-seg {
  display: grid; gap: 5px; padding: 4px; width: 100%;
  border: 1px solid var(--line); border-radius: 11px; background: #f2f6fb;
}
body.mobile .m-seg-3 { grid-template-columns: repeat(3, 1fr); }
body.mobile .m-seg-4 { grid-template-columns: repeat(4, 1fr); }
body.mobile .m-seg-btn {
  height: 38px; min-width: 0; padding: 0 2px;
  border: none; border-radius: 8px; background: transparent;
  font: inherit; font-size: 13.5px; color: var(--ink-2);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.mobile .m-seg-btn.active {
  background: #fff; font-weight: 600; color: #1868c8;
  box-shadow: 0 1px 3px rgba(20, 40, 70, .13);
}
/* 选中态顺带带上语义色，不用读文字也知道当前是哪种 */
body.mobile #fStatus .m-seg-btn.active[data-value="normal"] { color: #14795a; }
body.mobile #fStatus .m-seg-btn.active[data-value="danger"] { color: #c0392b; }
body.mobile #fStatus .m-seg-btn.active[data-value="maintenance"] { color: #a8641a; }
body.mobile #fType .m-seg-btn.active[data-value="municipal"] { color: #1868c8; }
body.mobile #fType .m-seg-btn.active[data-value="community"] { color: #14795a; }
body.mobile #fType .m-seg-btn.active[data-value="enterprise"] { color: #a8641a; }
body.mobile #fType .m-seg-btn.active[data-value="other"] { color: #5f6a72; }

/* 信息卡上的类型胶囊 */
body.mobile .m-type-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; line-height: 1.75; font-weight: 600;
}
body.mobile .m-type-tag.t-municipal { background: #e8f2fd; color: #1868c8; }
body.mobile .m-type-tag.t-community { background: #e7f6ee; color: #14795a; }
body.mobile .m-type-tag.t-enterprise { background: #fdf1e3; color: #a8641a; }
body.mobile .m-type-tag.t-other { background: #eef1f5; color: #5f6a72; }

/* 「待传」：这条记录还在手机本地队列里，没上传到电脑 */
body.mobile .m-pending-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; line-height: 1.75; font-weight: 600;
  background: #ffb020; color: #3d2600;
}

body.mobile .m-hint { font-size: 12px; color: var(--ink-3); margin: 0; line-height: 1.55; }
body.mobile .m-hint a { color: #2b6cb0; }
body.mobile .m-hint.ok { color: #14795a; }
body.mobile .m-mini {
  display: block; width: 100%; margin-top: 7px; font: inherit; font-size: 12px;
  color: #2b6cb0; background: #fff; border: 1px solid #cfdcea; border-radius: 8px;
  padding: 7px 9px; text-align: left; cursor: pointer; line-height: 1.4;
}
body.mobile .m-mini:active { background: #eef5fc; }

body.mobile .m-photo {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 152px; border: 1px dashed #c8d4e0; border-radius: 10px;
  background: #f7fafd; color: var(--ink-3); font-size: 13.5px;
  cursor: pointer; overflow: hidden; position: relative;
}
body.mobile .m-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

body.mobile .btn { height: 44px; display: flex; align-items: center; justify-content: center; font-size: 14.5px; }
body.mobile .btn.primary { background: #1868c8; border-color: #1868c8; color: #fff; }
body.mobile .btn.primary:active { background: #14559f; }
body.mobile .btn.primary[disabled] { opacity: .6; }

/* ---------- 窄屏兜底 ---------- */
@media (max-width: 1420px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr) 310px; }
}
@media (max-width: 1180px) {
  .layout { grid-template-columns: 268px minmax(0, 1fr) 280px; gap: 8px; padding: 8px; }
}
@media (max-width: 980px) {
  body { overflow: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .map-wrap { height: 62vh; min-height: 320px; }
  .hydrant-list { max-height: 340px; }
}

/* ---------- 账号 / 改密码 ---------- */
/* 顶栏账号按钮：正常是半透明白字，「还在用初始口令」时转成琥珀色提醒 */
.who-btn { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-btn.warn {
  background: rgba(242, 153, 74, .22);
  border-color: rgba(242, 153, 74, .7);
  color: #ffd7ac;
}

.auth-body { padding: 4px 0 0; }
.auth-line { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.auth-line b { color: var(--ink); }
.auth-field { display: block; margin-bottom: 12px; }
.auth-field span {
  display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600;
}
.auth-field input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #f7f9fb; color: var(--ink); font-size: 14px; font-family: inherit; outline: none;
}
.auth-field input:focus {
  border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(26, 188, 156, .16);
}
.auth-err {
  display: none; margin: 0 0 10px; padding: 8px 11px;
  background: #fdecea; color: #b3382c; border-radius: 7px; font-size: 12.5px;
}
.auth-err.show { display: block; }
.auth-note { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.auth-note b { color: var(--ink-2); }

/* ---------- 移动端：账号管理里的改密表单 ---------- */
.m-auth-row { margin-bottom: 12px; }
.m-auth-row > span {
  display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600;
}
.m-auth-row input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #f7f9fb; color: var(--ink); font-size: 16px; font-family: inherit; outline: none;
}
.m-auth-row input:focus {
  border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(26, 188, 156, .16);
}
.m-auth-err {
  display: none; margin: 0 0 10px; padding: 9px 11px;
  background: #fdecea; color: #b3382c; border-radius: 8px; font-size: 13px;
}
.m-auth-err.show { display: block; }
.m-auth-ok {
  display: none; margin: 0 0 10px; padding: 9px 11px;
  background: #e8f8f2; color: #128f76; border-radius: 8px; font-size: 13px;
}
.m-auth-ok.show { display: block; }
