/* ==========================================================================
   客户地图导航 — 样式表
   响应式：桌面为「左侧面板 + 右侧地图」，手机为「全屏地图 + 底部抽屉」
   ========================================================================== */

:root {
  --bg: #f2f3f5;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --border: #e5e6eb;
  --border-2: #d4d7dc;
  --primary: #2b6de5;
  --primary-soft: #eaf1fe;
  --ok: #00a870;
  --ok-soft: #e6f7f1;
  --warn: #e37318;
  --warn-soft: #fdf1e6;
  --danger: #d54941;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .16);
  --radius: 10px;
  --topbar-h: 52px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d0d3d9; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b8bcc4; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 布局 */
#app { display: flex; height: 100%; position: relative; }

#mapWrap { flex: 1; position: relative; min-width: 0; z-index: 0; }
#map { width: 100%; height: 100%; background: #e8eaed; }

/* 未配置 Key 时的占位提示 */
.map-placeholder {
  position: absolute; inset: 0; z-index: 1100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #e8eaed; color: var(--text-2); text-align: center; padding: 24px; gap: 6px;
}
.map-placeholder .big { font-size: 44px; opacity: .45; margin-bottom: 4px; }
.map-placeholder .t1 { font-size: 16px; font-weight: 600; color: var(--text); }
.map-placeholder .t2 { font-size: 13px; line-height: 1.8; }
.map-placeholder.err .t1 { color: var(--danger); }

/* ---------------------------------------------------------------- 侧栏 */
#sidebar {
  width: 340px; flex: 0 0 340px; background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%;
  z-index: 500;
}

.brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 8px;
  padding: 0 14px; border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.brand .logo {
  width: 26px; height: 26px; border-radius: 7px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700; flex: 0 0 auto;
}
.brand h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.brand .sub { font-size: 11px; color: var(--text-3); margin-left: auto; }

/* 搜索 */
.search-box { padding: 10px 12px 6px; flex: 0 0 auto; }
.search-box .inp-wrap { position: relative; }
.search-box input {
  width: 100%; height: 34px; padding: 0 30px 0 30px;
  border: 1px solid var(--border-2); border-radius: 8px;
  background: var(--panel-2); outline: none; transition: .15s;
}
.search-box input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.search-box .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; }
.search-box .clr {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--text-3); font-size: 16px; line-height: 1;
  padding: 2px 5px; border-radius: 4px; display: none;
}
.search-box .clr:hover { background: var(--border); }

/* 标签页 */
.tabs {
  display: flex; gap: 4px; padding: 6px 12px 8px; flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
}
.tabs button {
  flex: 1; height: 30px; border: 0; border-radius: 7px; background: transparent;
  color: var(--text-2); font-size: 13px; font-weight: 500; transition: .15s;
  position: relative;
}
.tabs button:hover { background: var(--panel-2); }
.tabs button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.tabs button .cnt {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; margin-left: 3px; border-radius: 8px;
  background: rgba(0, 0, 0, .08); font-size: 10px; font-weight: 600; vertical-align: 1px;
}
.tabs button.on .cnt { background: rgba(43, 109, 229, .18); }

/* 列表容器 */
.list-scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 80px; }

.sec-title {
  font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: .5px;
  padding: 10px 6px 5px; display: flex; align-items: center; gap: 6px;
}
.sec-title .line { flex: 1; height: 1px; background: var(--border); }

/* 客户卡片 */
.cust {
  display: flex; gap: 9px; padding: 9px 10px; border-radius: 9px;
  border: 1px solid transparent; transition: .12s; margin-bottom: 2px; cursor: pointer;
  position: relative;
}
.cust:hover { background: var(--panel-2); border-color: var(--border); }
.cust.active { background: var(--primary-soft); border-color: rgba(43, 109, 229, .35); }
.cust .idx {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.cust.near .idx { background: var(--ok-soft); color: var(--ok); }
.cust .body { min-width: 0; flex: 1; }
.cust .nm {
  font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cust .meta { font-size: 11px; color: var(--text-3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.cust .meta .tag {
  padding: 1px 5px; border-radius: 4px; background: var(--panel-2);
  border: 1px solid var(--border); white-space: nowrap;
}
.cust .meta .km { color: var(--ok); font-weight: 600; }
.cust .meta .nogeo { color: var(--warn); }
.cust .badge-check {
  position: absolute; right: 9px; top: 9px; color: var(--ok); font-size: 13px;
}
.cust .addr {
  font-size: 11px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 导航模式下的站点状态 */
.cust.is-next { background: #fff3f2; border-color: rgba(213, 73, 65, .32); }
.cust.is-next .idx, .cust .idx.idx-next { background: var(--danger); color: #fff; }
.cust .idx.idx-done { background: var(--ok-soft); color: var(--ok); }
.cust .idx.idx-pass { background: #f0f1f3; color: var(--text-3); }
.cust .meta .tag-next {
  padding: 1px 6px; border-radius: 4px; background: var(--danger); color: #fff;
  font-weight: 600; white-space: nowrap;
}

/* 空状态 */
.empty { text-align: center; color: var(--text-3); padding: 40px 20px; font-size: 13px; line-height: 1.8; }
.empty .big { font-size: 30px; margin-bottom: 8px; opacity: .5; }

/* ---------------------------------------------------------------- 地图内浮动控件 */
.map-float { position: absolute; z-index: 1100; }

.f-actions { top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; }
.fab {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; box-shadow: var(--shadow); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: .15s;
}
.fab:hover { color: var(--primary); border-color: var(--primary); }
.fab.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* 路线面板 */
.route-card {
  left: 12px; top: 12px; width: 316px; max-width: calc(100% - 24px);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border); overflow: hidden;
}
.route-card .hd {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px;
}
.route-card .hd .x { margin-left: auto; border: 0; background: transparent; color: var(--text-3); font-size: 17px; padding: 0 3px; }
.route-card .bd { padding: 10px 12px; }
.field { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.field .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.field .dot.a { background: var(--ok); }
.field .dot.b { background: var(--danger); }
.field input {
  flex: 1; min-width: 0; height: 33px; padding: 0 10px;
  border: 1px solid var(--border-2); border-radius: 7px; background: var(--panel-2); outline: none;
}
.field input:focus { border-color: var(--primary); background: #fff; }
.field .pick {
  flex: 0 0 auto; width: 33px; height: 33px; border: 1px solid var(--border-2);
  border-radius: 7px; background: #fff; color: var(--text-2);
}
.field .pick:hover { color: var(--primary); border-color: var(--primary); }

.route-opts { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; font-size: 12px; color: var(--text-2); }
.route-opts select { height: 28px; border: 1px solid var(--border-2); border-radius: 6px; background: #fff; padding: 0 4px; }
.route-opts input[type=range] { flex: 1; min-width: 60px; accent-color: var(--primary); }

.btn {
  height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border-2);
  background: #fff; color: var(--text); font-size: 13px; font-weight: 500; transition: .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: #1f5cc8; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); }
.btn.block { width: 100%; }
.btn.danger { border-color: #f5c2c0; color: #d54941; }
.btn.danger:hover { background: #fdecec; border-color: #d54941; color: #d54941; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 沿途结果条 */
.route-sum { font-size: 12px; color: var(--text-2); padding: 8px 2px 2px; line-height: 1.6; }
.route-sum b { color: var(--primary); font-size: 14px; }

/* 定位/打卡状态条 */
.status-bar {
  left: 50%; transform: translateX(-50%); bottom: 18px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 7px 14px; box-shadow: var(--shadow); font-size: 12px; color: var(--text-2);
  white-space: nowrap; max-width: calc(100% - 24px);
}
.status-bar .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: 0 0 auto;
}
.status-bar.live .pulse { background: var(--ok); box-shadow: 0 0 0 0 rgba(0, 168, 112, .6); animation: pulse 1.8s infinite; }
.status-bar.err .pulse { background: var(--danger); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 168, 112, .55); }
  70% { box-shadow: 0 0 0 9px rgba(0, 168, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 168, 112, 0); }
}

/* ---------------------------------------------------------------- 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .42); z-index: 900;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 560px;
  max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: pop .2s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .m-hd {
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600;
}
.modal .m-hd .x { margin-left: auto; border: 0; background: transparent; color: var(--text-3); font-size: 20px; line-height: 1; }
.modal .m-bd { padding: 16px 18px; overflow-y: auto; flex: 1; }
.modal .m-ft { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.form-row .hint { font-size: 11px; color: var(--text-3); line-height: 1.65; margin-top: 6px; }
.form-row input[type=text], .form-row input[type=password], .form-row textarea, .form-row select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border-2); border-radius: 8px;
  background: var(--panel-2); outline: none; transition: .15s;
}
.form-row textarea { min-height: 130px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.form-row input:focus, .form-row textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }

.tip {
  background: var(--primary-soft); border-left: 3px solid var(--primary);
  padding: 10px 12px; border-radius: 6px; font-size: 12px; line-height: 1.75; color: #24467f;
}
.tip.warn { background: var(--warn-soft); border-color: var(--warn); color: #8a4a10; }
.tip.ok { background: var(--ok-soft); border-color: var(--ok); color: #0a6349; }
.tip ol, .tip ul { margin: 6px 0 0; padding-left: 20px; }
.tip li { margin-bottom: 3px; }
.tip code {
  background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 4px;
  font-family: ui-monospace, Consolas, monospace; font-size: 11px;
}

/* 同步状态行（不带说明文字，只显示状态与操作） */
.note-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 12.5px; color: var(--text-2);
}
.note-line.warn { color: #8a4a10; }

.steps-list { counter-reset: s; padding: 0; margin: 8px 0 0; list-style: none; }
.steps-list li { position: relative; padding-left: 26px; margin-bottom: 8px; font-size: 12px; line-height: 1.7; }
.steps-list li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* 打卡记录 */
.log-item {
  display: flex; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--border);
  font-size: 12px; align-items: flex-start;
}
.log-item:last-child { border-bottom: 0; }
.log-item .t { color: var(--text-3); flex: 0 0 auto; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.log-item .c { flex: 1; min-width: 0; }
.log-item .c b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.log-item .c span { color: var(--text-3); }

/* Toast */
#toastBox { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(31, 35, 41, .93); color: #fff; padding: 9px 16px; border-radius: 8px;
  font-size: 13px; box-shadow: var(--shadow-lg); animation: slideDown .22s ease;
  max-width: 86vw; text-align: center; line-height: 1.5;
}
.toast.ok { background: rgba(0, 138, 94, .95); }
.toast.err { background: rgba(196, 58, 50, .95); }
.toast.out { animation: slideUp .22s ease forwards; }
@keyframes slideDown { from { transform: translateY(-14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes slideUp { to { transform: translateY(-14px); opacity: 0; } }

/* 打卡大提示 */
.checkin-pop {
  position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.checkin-pop .box {
  background: #fff; border-radius: 16px; padding: 24px 30px; text-align: center;
  box-shadow: var(--shadow-lg); border: 2px solid var(--ok);
  animation: pop .3s cubic-bezier(.2, .9, .3, 1.2); max-width: 84vw;
}
.checkin-pop .box .ic { font-size: 40px; margin-bottom: 6px; }
.checkin-pop .box .t1 { font-size: 17px; font-weight: 700; color: var(--ok); margin-bottom: 6px; }
.checkin-pop .box .t2 { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* 地图标记气泡 */
.amap-marker-label { border: 0 !important; background: transparent !important; padding: 0 !important; }
.pin {
  position: relative; width: 22px; height: 28px; cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3));
}
.pin svg { display: block; }
.pin .num {
  position: absolute; left: 0; top: 0; width: 100%; height: 78.6%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; line-height: 1; pointer-events: none;
}

/* 底部抽屉（手机） */
.drawer-handle { display: none; }

/* ---------------------------------------------------------------- 导航模式 */
.navi-bar {
  position: absolute; left: 12px; top: 12px; z-index: 1100;
  width: 430px; max-width: calc(100% - 24px);
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 9px 12px 11px;
}

.nb-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.nb-x {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 17px; line-height: 1; padding: 0;
}
.nb-x:hover { color: var(--danger); border-color: var(--danger); }
.nb-seq {
  font-size: 12px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); padding: 3px 9px; border-radius: 20px;
}
.nb-done { font-size: 12px; color: var(--text-3); }
.nb-follow {
  margin-left: auto; width: 26px; height: 26px; flex: 0 0 auto; padding: 0;
  border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text-2);
}
.nb-follow.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.nb-name {
  font-size: 16px; font-weight: 700; line-height: 1.35; margin-bottom: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nb-addr {
  font-size: 11px; color: var(--text-3); line-height: 1.4; margin-bottom: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nb-metrics { font-size: 12px; color: var(--text-2); line-height: 1.7; }
.nb-metrics b { color: var(--text); font-size: 13px; }
.nb-metrics .sep { margin: 0 5px; color: var(--border-2); }
.nb-metrics .nb-ok { color: var(--ok); font-weight: 600; }
.nb-metrics .nb-wait { color: var(--text-3); }

.nb-prog-wrap { display: flex; align-items: center; gap: 8px; margin: 9px 0 10px; }
.nb-prog { flex: 1; height: 6px; border-radius: 3px; background: #eceef1; overflow: hidden; }
.nb-prog-in {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #2b6de5, #5b8ff0); transition: width .5s ease;
}
.nb-prog-txt { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.nb-acts { display: flex; gap: 7px; }
.nb-acts button {
  flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--border-2);
  background: #fff; color: var(--text-2); font-size: 13px;
}
.nb-acts button:hover { border-color: var(--primary); color: var(--primary); }
.nb-acts button.primary { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.nb-acts button.primary:hover { color: #fff; opacity: .92; }
.nb-acts button:disabled { opacity: .4; cursor: not-allowed; }

/* 导航模式下弱化地图上其它浮层，避免遮挡 */
body.navi-on .route-card { display: none !important; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 820px) {
  #app { flex-direction: column; }
  #sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; flex: none; height: 62vh; border-right: 0;
    border-top: 1px solid var(--border); border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
    transform: translateY(calc(100% - 46px)); transition: transform .28s cubic-bezier(.3, .9, .3, 1);
    z-index: 600;
  }
  #sidebar.open { transform: translateY(0); }
  .drawer-handle {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; flex: 0 0 auto; cursor: pointer; user-select: none;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  /* 手机上的登录 / 账号入口：常驻抽屉标题栏右侧 */
  .user-chip.uc-mobile:not(:empty) {
    display: flex; position: absolute; right: 10px; top: 50%;
    transform: translateY(-50%); margin-left: 0;
  }
  .uc-mobile .uc-btn { font-size: 11.5px; padding: 4px 10px; border-radius: 12px; }
  .uc-mobile .uc-btn.need-login {
    border-color: var(--primary); color: var(--primary);
    font-weight: 600; background: var(--primary-soft);
  }
  .drawer-handle .bar { width: 36px; height: 4px; border-radius: 2px; background: var(--border-2); }
  .drawer-handle .txt { font-size: 12px; color: var(--text-2); font-weight: 500; }
  .brand { display: none; }
  .list-scroll { padding-bottom: 20px; }
  .route-card { left: 8px; right: 8px; top: 8px; width: auto; max-width: none; }
  .f-actions { top: auto; bottom: 140px; right: 10px; }
  .status-bar { bottom: 56px; font-size: 11px; padding: 6px 12px; }
  #mapWrap { position: absolute; inset: 0; }

  /* 导航条在手机上铺满宽度 */
  .navi-bar { left: 8px; right: 8px; top: 8px; width: auto; max-width: none; padding: 8px 10px 10px; }
  .nb-name { font-size: 15px; }
  .nb-acts button { height: 32px; font-size: 12.5px; }
  /* 导航模式下抽屉收起，浮动按钮上移一点，避免挡住状态条 */
  body.navi-on .f-actions { bottom: 96px; }
}

@media (max-width: 480px) {
  .modal { max-height: 92vh; border-radius: 12px; }
  .modal .m-bd { padding: 13px 14px; }
  .fab { width: 36px; height: 36px; }
  .nb-metrics { font-size: 11.5px; }
}

/* ==========================================================================
 * 账号系统 / 管理系统 / 月度标识
 * ========================================================================== */

/* 顶栏当前用户 */
.user-chip { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.user-chip:empty { display: none; }
.user-chip .uc-name { font-size: 12px; font-weight: 600; color: var(--text-1); white-space: nowrap; }
.user-chip .uc-role {
  font-size: 10.5px; padding: 1px 6px; border-radius: 9px; white-space: nowrap;
  background: #e8f1ff; color: #2b6de5; font-weight: 600;
}
.user-chip .uc-role.is-admin { background: #fff3e0; color: #c46a00; }
.user-chip .uc-btn {
  border: 1px solid var(--border-2); background: #fff; border-radius: 7px;
  font-size: 11.5px; padding: 2px 8px; cursor: pointer; color: var(--text-2); white-space: nowrap;
}
.user-chip .uc-btn:hover { border-color: var(--primary); color: var(--primary); }

/* 登录遮罩 */
.login-mask {
  position: fixed; inset: 0; z-index: 3000;
  background: linear-gradient(160deg, #2b6de5 0%, #1e4fb0 100%);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.login-card {
  width: 360px; max-width: 100%; background: #fff; border-radius: 16px;
  padding: 26px 24px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}
.login-card .lg-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
.login-card .lg-brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
  color: #fff; font-size: 19px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.login-card .lg-brand h1 { margin: 0; font-size: 17px; font-weight: 700; }
.login-card .lg-tip { font-size: 12.5px; color: var(--text-3); margin: 2px 0 14px; }
.login-card .lg-err { color: #d54941; font-size: 12.5px; min-height: 18px; margin-top: 4px; }
.login-card .lg-hint {
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border);
}

/* 管理系统表格 */
.adm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.adm-table th, .adm-table td {
  border-bottom: 1px solid var(--border); padding: 7px 8px; text-align: left;
}
.adm-table th { color: var(--text-3); font-weight: 600; font-size: 11.5px; background: var(--panel-2); }
.adm-table td.ops { white-space: nowrap; }
.adm-table .lnk {
  border: 0; background: none; color: var(--primary); cursor: pointer;
  font-size: 12px; padding: 2px 5px;
}
.adm-table .lnk.danger { color: #d54941; }
.adm-table .lnk:hover { text-decoration: underline; }

/* 列表里「本月 N 次」标签配色（与地图标记一致：0 次 红 / 1 次 绿 / 2 次以上 紫） */
.tag.mv-none { background: #fdecec; color: #d54941; }
.tag.mv-once { background: #e5f7ef; color: #00875a; }
.tag.mv-multi { background: #f0e9fe; color: #6d28d9; }
.cust .meta .tag.rm-pend { background: #fff1f0; color: #d54941; font-weight: 600; }

/* 移除申请：快捷原因 */
.rm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rm-chip {
  border: 1px solid var(--border-2); background: #fff; border-radius: 13px;
  font-size: 12px; padding: 4px 11px; color: var(--text-2);
}
.rm-chip:hover { border-color: var(--primary); color: var(--primary); }
.rm-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* 手机端账号入口（抽屉标题栏右侧） */
.user-chip.uc-mobile { display: none; }

/* 附近页签：范围切换 */
.near-chips { display: flex; align-items: center; gap: 6px; padding: 10px 12px 2px; flex-wrap: wrap; }
.near-chips .nchip {
  border: 1px solid var(--border-2); background: #fff; border-radius: 14px;
  font-size: 12px; padding: 3px 12px; cursor: pointer; color: var(--text-2);
}
.near-chips .nchip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.near-chips .nchip-tip { font-size: 11px; color: var(--text-3); margin-left: auto; }
