/* 指挥调度平台 - 全局样式（简洁明亮） */
:root {
    /* ===== 消防行业主色板 =====
       主色=消防红；深红=激活/按下；浅红=软底。
       救援金(amber)用于警示/高亮；消防墨蓝(navy)用于结构/侧栏；消防青绿(teal)用于数据/正常态。
       地图覆盖层 --tech-* 保持蓝色（服务于天地图，不在本改造范围）。 */
    --primary: #E0301E;
    --primary-dark: #B01E12;
    --primary-soft: #FCE9E6;
    --danger: #E0301E;
    --danger-soft: #FCE9E6;
    --success: #1FA85A;
    --success-soft: #E8F7EF;
    --warn: #F2A33C;
    --warn-soft: #FDF2E2;
    --navy: #16335B;
    --navy-deep: #0E2A47;
    --teal: #0E8C7F;
    --gold: #F2A33C;
    --text: #1f2937;
    --text-sub: #6b7280;
    --border: #ece4e2;
    --bg: #f6f4f3;
    --panel: #ffffff;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(40, 16, 12, .06);
    --shadow-lg: 0 8px 28px rgba(40, 16, 12, .12);
    /* 地图覆盖层亮色主题（两侧面板 / 信息窗口 / 视频浮窗 / 搜索栏）—— 保持蓝色，服务于天地图 */
    --tech-bg: rgba(255, 255, 255, 0.94);
    --tech-bg-2: rgba(248, 250, 252, 0.97);
    --tech-bg-3: rgba(243, 246, 250, 0.92);
    --tech-bg-card: rgba(247, 249, 252, 0.95);
    --tech-line: rgba(22, 119, 255, 0.22);
    --tech-line-bright: rgba(22, 119, 255, 0.45);
    --tech-cyan: #1677ff;
    --tech-cyan-2: #4096ff;
    --tech-cyan-3: #69b1ff;
    --tech-blue: #1677ff;
    --tech-text: #1f2937;
    --text-bright: #0f172a;
    --text-white: #0f172a;
    --tech-sub: #6b7280;
    --tech-sub-dim: #9ca3af;
    --tech-glow: 0 2px 12px rgba(16, 24, 40, 0.08);
    --tech-glow-strong: 0 8px 28px rgba(16, 24, 40, 0.14);
    --tech-accent-red: #E0301E;
    --tech-accent-orange: #F2A33C;
    --tech-accent-green: #1FA85A;
    --tech-accent-purple: #7c3aed;
    /* 统一 hover 色板：全部基于消防红，避免青/蓝色相混用 */
    --hover-bg: rgba(224, 48, 30, .06);
    --hover-bg-strong: rgba(224, 48, 30, .12);
    --hover-border: rgba(224, 48, 30, .40);
    --hover-text: #E0301E;
    --hover-text-strong: #B01E12;
    --hover-danger-bg: rgba(224, 48, 30, .08);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* 链接配色：未悬停时与正文同色（深色可读），悬停时变为主题蓝，
   避免"亮蓝链接文字在白色背景上到处突兀"的视觉噪音 */
a { color: var(--text); text-decoration: none; }
a:link    { color: var(--text); }
a:visited { color: var(--text); }
a:hover   { color: var(--primary); }
a:active  { color: var(--primary-dark); }
h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 600; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
code { background: #f1f3f5; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* ---------- 卡片 / 按钮 / 表单 ---------- */
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}
.card > h2:first-child { margin-top: 0; }

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
}
.btn:hover { border-color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 按钮内的 <a> 链接：强制白色文字，防止全局 a 规则或地图 InfoWindow 内置样式污染 */
a.btn-primary, a.btn-danger, a.btn-tech { color: #ffffff !important; }
a.btn-primary:hover, a.btn-danger:hover, a.btn-tech:hover { color: #ffffff !important; }

label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 13px; }
input[type=text], input[type=password], input[type=number], input[type=tel], select, textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
textarea { min-height: 88px; resize: vertical; }
.field { margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* 分段式表单（项目新增 / 编辑） */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.form-col { min-width: 0; }
@media (max-width: 880px) { .form-grid { grid-template-columns: 1fr; } }
.form-section { background: #fafbfc; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 16px; margin-bottom: 16px; }
.form-section:last-child { margin-bottom: 0; }
.form-section > *:last-child { margin-bottom: 0; }
.form-section .row-line { margin-bottom: 14px; }
.fs-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; }
.fs-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: var(--primary); }
.ezviz-box { background: #fbfcfe; }
.form-section-map { background: #fff; }
@media (min-width: 881px) { .form-section-map { position: sticky; top: 16px; } }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.alert-error   { background: var(--danger-soft); color: #a3123a; border: 1px solid #f3bcc7; }
.alert-success { background: var(--success-soft); color: #1d6b32; border: 1px solid #b7e2c4; }
.alert-warn    { background: var(--warn-soft); color: var(--warn); border: 1px solid #ffe1a1; }
.alert-info    { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #bcdcff; }
/* set_flash('ok', …) 的别名：全仓有 40+ 处在用 'ok'，此前没有对应样式 → 成功提示退化成白底无边框 */
.alert-ok      { background: var(--success-soft); color: #1d6b32; border: 1px solid #b7e2c4; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}
.badge-gray { background: #9ca3af; }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--text-sub); }
.badge-info { background: #2f80ed; }
.badge-warn { background: #f5821f; }
.badge-ok { background: #1f9d55; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { background: #f8fafc; font-weight: 600; color: var(--text-sub); white-space: nowrap; }
.table tbody tr:hover { background: var(--hover-bg); }
.table .nowrap { white-space: nowrap; }
.table-responsive { overflow-x: auto; }

/* ---------- 固定列宽表格：含「位置 / 地址」这类长文本列时用（个人中心） ----------
   自动布局（table-layout: auto）下，同行的 nowrap 短列（时间、坐标、手机号）不可压缩，
   浏览器的压缩量会被长文本列全部吸走 —— 窄屏（手机 / 小程序 web-view）上地址列
   被压成「1 字 1 行」的竖排，看起来像把卡片撑破了。
   这里改成固定列宽 + 允许任意断行：列宽由 <colgroup> 决定，永远拿到指定比例，
   短列也不会溢出格子（配合 word-break）。 */
.table-pf { table-layout: fixed; }
.table-pf th { white-space: normal; }                            /* 表头允许折行，窄屏不被挤出格 */
.table-pf td { word-break: break-word; overflow-wrap: anywhere; } /* 长文本在格内换行，不撑破 */
.table-pf td.c-addr { word-break: break-all; }                    /* 地址：任意位置断行 */
.table-pf td.break  { word-break: break-all; }                    /* 手机号等超长不可断 token */
@media (max-width: 640px) {
    .table-pf { font-size: 12px; }
    .table-pf th, .table-pf td { padding: 8px 9px; }
}

.empty { padding: 30px; text-align: center; color: var(--text-sub); }
.muted { color: var(--text-sub); }
.small { font-size: 12px; }
.tip { font-size: 12px; color: var(--text-sub); }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.row-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- 登录 / 注册（移动优先；桌面端模拟手机窗口） ---------- */
.auth-page {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    background: linear-gradient(135deg, #eaf2ff 0%, #f6f8fb 55%, #e9f6f1 100%);
}
.auth-box {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 30px;
    box-sizing: border-box;
}
/* 桌面端：模拟手机窗口（圆角机身 + 阴影 + 边框），与维保工作后台一致 */
@media (min-width: 480px) {
    .auth-page { padding: 22px 15px; }
    .auth-box {
        max-width: 420px;
        min-height: 760px;
        border-radius: 30px;
        box-shadow: 0 24px 70px rgba(20, 30, 50, .28);
        border: 1px solid #c7cfda;
        padding: 40px 30px;
        display: flex; flex-direction: column; justify-content: center;
    }
}
/* 移动端：整屏铺满，去掉卡片感 */
@media (max-width: 479px) {
    .auth-page { padding: 0; align-items: stretch; }
    .auth-box {
        max-width: none; min-height: 100vh; border-radius: 0;
        box-shadow: none; border: none; padding: 28px 20px;
        display: flex; flex-direction: column; justify-content: center;
    }
}
.auth-box h1 { font-size: 22px; text-align: center; margin-bottom: 4px; }
.auth-box .sub { text-align: center; color: var(--text-sub); margin-bottom: 20px; font-size: 13px; }
.auth-links { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
/* 移动优先：放大输入与按钮触摸目标 */
.auth-box .field input[type=text], .auth-box .field input[type=tel], .auth-box .field input[type=password], .auth-box .field input[type=file], .auth-box .field select, .auth-box .field textarea {
    padding: 13px 14px; font-size: 16px; border-radius: 10px;
}
.auth-box .btn { padding: 14px; font-size: 16px; border-radius: 10px; }

.avatar-upload { display: flex; align-items: center; gap: 14px; }
.avatar-upload img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); background: #f1f3f5; }
.avatar-upload input[type=file] { font-size: 12px; }

/* ---------- 地图主页 ---------- */
.dash { display: flex; flex-direction: column; height: 100%; }
/* 悬浮标题卡片（左上角，浮于地图之上；整页背景即为地图） */
.float-brand {
    position: absolute; top: 12px; left: 12px; z-index: 1003;
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid var(--tech-line);
    border-radius: 8px;
    box-shadow: var(--tech-glow-strong);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    font-weight: 600; font-size: 16px;
    color: var(--text-bright);
    white-space: nowrap;
}
.float-brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tech-accent-red); box-shadow: 0 0 0 4px rgba(215,38,61,.15); flex-shrink: 0; }
.float-brand .fb-title { letter-spacing: 1px; }
/* Logo + 主标题 + 辅标题 */
.float-brand .fb-logo { width: 200px; height: auto; object-fit: contain; border-radius: 6px; flex-shrink: 0; background: rgba(255, 255, 255, .5); padding: 2px; }
/* PNG / SVG 格式 Logo 使用透明背景（保留图片自身透明度） */
.float-brand .fb-logo.is-png { background: transparent; }
.float-brand .fb-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.float-brand .fb-sub { font-size: 11px; font-weight: 400; color: var(--tech-sub); letter-spacing: .3px; }

/* 悬浮用户卡片（右上角，浮于地图之上） */
.float-user {
    position: absolute; top: 12px; right: 12px; z-index: 1003;
    display: flex; align-items: center; gap: 10px;
    padding: 7px 12px;
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    border-radius: 8px;
    box-shadow: var(--tech-glow-strong);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.float-user .fu-locate { white-space: nowrap; }
#locateTip { display: none; }
.float-user .fu-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 3px 8px; border-radius: 20px; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.float-user .fu-chip:hover { background: var(--tech-bg-3); border-color: var(--tech-line); }
.float-user .fu-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tech-line); }
.float-user .fu-name { line-height: 1.2; font-weight: 600; color: var(--text-bright); }
.float-user .fu-meta .small { line-height: 1.2; }

.map-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    /* 强制建立层叠上下文：内部所有子元素的 z-index 都只在 .map-stage 内部比较，
       彻底杜绝第三方地图 SDK 的高 z-index 元素盖住悬浮面板 */
    isolation: isolate;
}

/* 地图包裹层：定位元素 + 非 auto 的 z-index 会创建层叠上下文，
   天地图内部 z-index 高达数百的窗格元素因此被限制在本层内 */
.map-canvas {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;   /* 不用 inset，兼容老浏览器 */
    z-index: 0;
    background: #eaeef3;
}
#mapContainer {
    width: 100%; height: 100%;
    /* 兜底：即使天地图用行内样式改了 position/z-index，!important 也能压过去，
       保证地图容器自身形成层叠上下文，其子元素不会跑到面板之上 */
    position: absolute !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    z-index: 0 !important;
}

.panel-layer {
    position: absolute;
    top: 108px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 300px;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
/* 顶部预留 108px 给悬浮品牌卡/用户卡片（避免与地图上的用户信息冲突）；底部预留约 96px，避免盖住左下角图例与右下天地图控件 */
.panel-layer.left { left: 12px; max-height: calc(100% - 204px); }
.panel-layer.right { right: 12px; max-height: calc(100% - 150px); }
.panel-layer::-webkit-scrollbar { width: 6px; }
.panel-layer::-webkit-scrollbar-thumb { background: rgba(0,0,0,.15); border-radius: 3px; }

.fpanel {
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .12), 0 2px 8px rgba(16, 24, 40, .06);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    overflow: hidden;
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
/* 面板顶部装饰线 */
.fpanel::before {
    content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--tech-cyan), var(--tech-cyan-2), transparent);
    opacity: .8;
}
/* 面板头部 —— 仿参考图：> 箭头 + 标题 + 深色底 */
.fpanel .fp-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tech-line);
    background: linear-gradient(90deg, rgba(0, 180, 255, .08), transparent);
    cursor: pointer; user-select: none;
    position: relative;
}
/* > 箭头图标（仿大屏面板标题左侧箭头） */
.fpanel .fp-head::before {
    content: "";
    display: inline-block; flex-shrink: 0;
    width: 7px; height: 7px;
    margin-right: 2px;
    border-top: 2px solid var(--tech-cyan);
    border-right: 2px solid var(--tech-cyan);
    transform: rotate(45deg);
}
.fpanel .fp-head .fp-title {
    color: var(--text-white);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
    flex: 1;
}
.fpanel .fp-head .fp-toggle {
    color: var(--tech-sub);
    font-size: 11px;
    padding: 2px 8px;
    border: 1px solid rgba(40, 140, 200, .25);
    border-radius: 3px;
    transition: all .15s;
    flex-shrink: 0;
}
.fpanel .fp-head .fp-toggle:hover {
    color: var(--hover-text);
    border-color: var(--hover-border);
    background: var(--hover-bg);
}
.fpanel .fp-body { padding: 10px 12px; font-size: 12px; max-height: 56vh; overflow-y: auto; min-width: 0; box-sizing: border-box; flex: 1 1 auto; min-height: 0; }
.fpanel.collapsed .fp-body { display: none; }

/* 统计卡片 —— 仿参考图：图标(左) + 数字(中) + 标签(右) 横向布局 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-item {
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-line);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 4px;
    position: relative;
    overflow: hidden;
}
/* 统计卡片左侧色条装饰 */
.stat-item::before {
    content: "";
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, rgba(0, 180, 255, .50), rgba(0, 140, 220, .25));
}
.stat-item .num {
    font-size: 20px; font-weight: 800;
    color: var(--text-white);
    line-height: 1.2;
}
.stat-item .lbl {
    font-size: 11px;
    color: var(--tech-sub);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* ============ 工作概览面板（管理员/高级管理员） ============ */
/* 顶部总结：今日任务 / 已完成 / 进行中 */
.wo-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}
.wo-s-item {
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-line);
    border-radius: 10px;
    padding: 7px 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.wo-s-num {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.1;
}
.wo-s-lbl {
    font-size: 11px;
    color: var(--tech-sub);
    letter-spacing: 0.3px;
}
/* 时间轴 */
.wo-timeline {
    position: relative;
    padding-left: 4px;
}
.wo-item {
    display: grid;
    grid-template-columns: 46px 16px 1fr;
    gap: 6px;
    align-items: stretch;
    position: relative;
}
/* 竖向连接线 */
.wo-item:not(:last-child) .wo-node::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 14px;
    bottom: -6px;
    width: 2px;
    background: var(--tech-line);
}
.wo-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-top: 1px;
    line-height: 1.25;
}
.wo-time .wo-t1 { font-size: 12px; font-weight: 700; color: var(--text-white); }
.wo-time .wo-t2 { font-size: 10px; color: var(--tech-sub); }
.wo-node {
    position: relative;
    display: flex;
    justify-content: center;
}
.wo-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    margin-top: 4px;
    flex: 0 0 auto;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
    z-index: 1;
}
.wo-card {
    background: var(--tech-bg-card);
    border: 1px solid var(--tech-line);
    border-radius: 10px;
    padding: 7px 9px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.wo-card:hover {
    background: var(--hover-bg);
    border-color: var(--hover-border);
}
.wo-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wo-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border: 1px solid;
    border-radius: 12px;
    white-space: nowrap;
}
.wo-status {
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
}
.wo-card-sub {
    font-size: 11px;
    color: var(--tech-sub);
    margin-top: 4px;
    line-height: 1.35;
}

/* 项目列表 —— 仿参考图右侧报警列表：图标+文字+操作按钮 */
.plist { list-style: none; margin: 0; padding: 0; }
.plist li {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(40, 140, 200, .10);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    transition: background .15s;
}
.plist li:last-child { border-bottom: 0; }
.plist li:hover {
    background: var(--hover-bg);
    border-radius: 4px;
}
/* 项目名称（左侧主文字） */
.plist .pname {
    font-weight: 600;
    cursor: pointer;
    color: var(--text-white);
    font-size: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.plist .pname:hover {
    color: var(--hover-text);
}
/* 项目元信息 */
.plist .pmeta {
    font-size: 11px;
    color: var(--tech-sub-dim);
    flex-shrink: 0;
}

/* 在线人员列表 —— 仿参考图左侧圆形头像+名字+定位按钮 */
.ulist { list-style: none; margin: 0; padding: 0; }
.ulist li {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(40, 140, 200, .10);
    transition: background .15s;
}
.ulist li:last-child { border-bottom: 0; }
.ulist li:hover {
    background: var(--hover-bg);
    border-radius: 4px;
}
/* 在线人员列表：头像+名字+角色（紧凑行） */
.ulist-online li { align-items: center; padding: 6px 2px; }
/* 头像 —— 圆形 + 青色边框辉光 */
.ulist img {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    border: 2px solid rgba(22, 119, 255, .25);
    flex-shrink: 0;
}
/* 名字行 */
.ulist .uname {
    font-weight: 600;
    color: var(--text-white);
    font-size: 12px;
    flex: 1;
    min-width: 0;
}
.ulist .umeta {
    font-size: 10px;
    color: var(--tech-sub-dim);
}
.role-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }

/* 在线人员：点击名字展开的详情面板（上下排列：定位 / 时间 / 备注 / 操作） */
.u-toggle { cursor: pointer; text-decoration: none; color: var(--text-white); }
.u-toggle:hover { color: #60a5fa; text-decoration: underline; }
.u-detail {
    margin-top: 6px; padding: 8px 10px;
    background: rgba(22, 119, 255, .06);
    border: 1px solid rgba(22, 119, 255, .14);
    border-radius: 6px;
    animation: uSlideIn .2s ease;
}
@keyframes uSlideIn { from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; } to { opacity: 1; max-height: 200px; } }
.u-detail-row {
    display: flex; flex-direction: column; gap: 1px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(40, 140, 200, .06);
}
.u-detail-row:last-child { border-bottom: 0; }
.u-d-label { font-size: 10px; color: var(--tech-sub-dim, #9ca3af); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.u-d-val { font-size: 12px; color: #374151; word-break: break-word; line-height: 1.4; }
.u-detail-actions { display: flex; gap: 6px; margin-top: 4px; border-bottom: 0 !important; }

/* 面板内搜索框 */
.panel-search {
    width: 100%; box-sizing: border-box;
    padding: 6px 10px; margin-bottom: 8px;
    border: 1px solid rgba(40, 140, 200, .2);
    border-radius: 6px;
    font-size: 12px; color: #374151;
    background: rgba(255,255,255,.7);
    outline: none; transition: border-color .15s;
}
.panel-search:focus { border-color: var(--primary, #1677ff); background: #fff; }
.panel-search::placeholder { color: #9ca3af; }

/* 在线人员列表：至少显示10名，超10名滚动 */
.ulist-online {
    max-height: calc(10 * 52px); /* 每行约 52px（头像34 + padding） */
    overflow-y: auto;
    padding-right: 2px;
}
/* 项目列表也支持搜索后滚动 */
.plist { max-height: 55vh; overflow-y: auto; }
.map-corner {
    position: absolute; left: 12px; bottom: 12px; z-index: 1001;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
    max-width: 46%;
}
.map-status {
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    border-radius: 8px;
    padding: 9px 13px;
    font-size: 12px;
    color: var(--tech-sub);
    box-shadow: var(--tech-glow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.map-status b { color: var(--tech-cyan-2); }
.map-legend {
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 10px;
    box-shadow: var(--tech-glow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center;
    max-width: calc(100% - 0px);
}
.map-legend .lg-item { display: inline-flex; align-items: center; gap: 4px; margin: 1px 0; color: var(--tech-sub); white-space: nowrap; }
.map-legend .lg-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
/* 车辆 GPS 图层开关（图例内可点击 toggle） */
.map-legend .lg-item.lg-toggle { cursor: pointer; padding: 1px 6px; border-radius: 6px; border: 1px solid transparent; }
.map-legend .lg-item.lg-toggle:hover { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .4); }
.map-legend .lg-item.lg-toggle .lg-state { font-size: 9px; color: var(--tech-sub-dim); margin-left: 1px; }
.map-legend .lg-item.lg-toggle.on { color: #f59e0b; }
.map-legend .lg-item.lg-toggle:not(.on) { opacity: .62; }
/* 按需求隐藏左下角图例卡（图例说明已由底部「项目 / 人员 / 车辆 / 全部展示」分段控件承担） */
.map-corner { display: none !important; }

/* 地图右上角：车辆实时计数角标（红色调，与车辆标记一致） */
.vehicle-count {
    position: absolute; top: 12px; right: 12px; z-index: 30;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 11px; border-radius: 999px;
    background: rgba(226, 60, 60, .94); color: #fff;
    font-size: 12px; font-weight: 600; line-height: 1;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    backdrop-filter: blur(2px);
    pointer-events: none;            /* 纯展示，不挡地图操作 */
    white-space: nowrap;
}
.vehicle-count b { font-size: 13px; font-weight: 700; }
.vehicle-count .vc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
    flex: 0 0 auto; animation: vcPulse 1.6s ease-in-out infinite;
}
.vehicle-count .vc-on { color: #fff; }
.vehicle-count .vc-hidden { font-weight: 500; opacity: .85; font-size: 11px; }
@keyframes vcPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.7); opacity: .6; } }
@media (max-width: 640px) {
    .vehicle-count { top: 8px; right: 8px; padding: 5px 9px; font-size: 11px; }
    .vehicle-count b { font-size: 12px; }
}

/* 顶部工具条居中，避免与左右两侧面板重叠 */
.map-tools {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1002;
    display: flex; gap: 6px;
}
/* 底部「上报位置」快捷按钮：桌面端隐藏，仅手机端显示（见 @media max-width:640px） */
.fab-locate { display: none; }
.map-tools .btn { background: rgba(255,255,255,.96); box-shadow: var(--shadow); }

/* ============================================================
   地图顶部搜索栏 + 城市分类筛选（仿大屏监控中心）
   位置：地图上方居中，工具条下方
   ============================================================ */
.map-search-bar {
    position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
    z-index: 1001;
    display: flex;
    justify-content: center;
    width: auto;
    max-width: calc(100% - 340px - 340px - 40px);
    pointer-events: none;
}
.msb-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    pointer-events: auto;
}
/* 搜索框 */
.msb-search {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--tech-bg);
    border: 1px solid var(--tech-line-bright);
    border-radius: 8px;
    padding: 0 10px;
    width: 320px;
    height: 38px;
    box-shadow: var(--tech-glow-strong), 0 4px 20px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255,255,255,.04);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0.5;
    transition: border-color .2s, box-shadow .2s;
}
.msb-search:focus-within {
    border-color: var(--tech-cyan);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, .15), 0 4px 20px rgba(16, 24, 40, .12);
    opacity: 1;
}
.msb-icon {
    width: 16px; height: 16px; flex-shrink: 0;
    color: var(--tech-sub-dim);
    stroke: var(--tech-cyan-2);
    opacity: .7;
    transition: opacity .2s;
}
.msb-search:focus-within .msb-icon { opacity: 1; }
.msb-search input {
    flex: 1;
    background: transparent;
    border: 0; outline: none;
    color: var(--text-bright);
    font-size: 13px;
    padding: 0 8px;
    font-family: inherit;
    letter-spacing: .5px;
}
.msb-search input::placeholder {
    color: var(--tech-sub-dim);
    opacity: .7;
}
.msb-clear {
    cursor: pointer;
    color: var(--tech-sub-dim);
    font-size: 18px;
    line-height: 1;
    padding: 2px 4px;
    opacity: 0;
    transition: opacity .15s, color .15s;
    user-select: none;
}
.msb-clear.visible { opacity: .7; }
.msb-clear:hover { color: var(--tech-accent-red); opacity: 1; }
/* 城市筛选标签栏：全部独立成行 + 城市 8 列网格对齐 */
.msb-cities {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    max-width: 460px;
}
/* 「全部」单独显示，独占一行，不参与 8 列对齐 */
.msb-city-all {
    align-self: center;
}
/* 城市按 8 列网格排列：第二行第一个与第一行第一个对齐 */
.msb-city-grid {
    display: grid;
    grid-template-columns: repeat(8, auto);
    gap: 5px 8px;
    justify-content: center;
    width: 100%;
}
.msb-city {
    display: inline-block;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--tech-sub);
    background: var(--tech-bg-3);
    border: 1px solid var(--tech-line);
    border-radius: 20px;
    cursor: pointer;
    user-select: none;
    transition: all .18s ease;
    white-space: nowrap;
    text-align: center;
}
.msb-city:hover {
    color: var(--hover-text);
    border-color: var(--hover-border);
    background: var(--hover-bg-strong);
}
.msb-city.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 212, 255, .35), rgba(0, 180, 230, .20));
    border-color: var(--tech-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, .25), inset 0 0 8px rgba(0, 212, 255, .10);
}

/* ============================================================
   地图标注展示方式切换（4 态互斥）：仅项目 / 仅人员 / 仅车辆 / 全部
   位置：地图底部居中，悬浮于地图之上，不与顶部搜索栏/工具条/图例冲突
   ============================================================ */
.map-modes {
    /* 右移：置于左下角图例（max-width:46%）右侧、天地图右下角控件左侧之间，避免遮挡 */
    position: absolute; bottom: 16px; left: 52%; transform: none;
    z-index: 1003;
    display: flex; gap: 2px;
    padding: 3px;
    background: var(--tech-bg);
    border: 1px solid var(--tech-line-bright);
    border-radius: 11px;
    box-shadow: var(--tech-glow-strong), 0 4px 20px rgba(0, 0, 0, .30);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.map-modes .mm-btn {
    appearance: none; -webkit-appearance: none;
    border: 0; background: transparent; cursor: pointer;
    font-family: inherit; font-size: 13px; line-height: 1;
    color: var(--tech-sub);
    padding: 7px 15px; border-radius: 8px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.map-modes .mm-btn:hover { color: var(--text-white); background: rgba(255, 255, 255, .06); }
.map-modes .mm-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 212, 255, .45), rgba(0, 180, 230, .28));
    border-color: var(--tech-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, .30), inset 0 0 8px rgba(0, 212, 255, .12);
}
/* 搜索无结果提示 */
.map-no-result {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    border-radius: 10px;
    padding: 20px 28px;
    text-align: center;
    color: var(--tech-sub);
    font-size: 13px;
    z-index: 500;
    box-shadow: var(--tech-glow-strong);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    pointer-events: none;
    opacity: 0;
    transition: opacity .25s;
}
.map-no-result.show { opacity: 1; }
.map-no-result strong { color: var(--tech-cyan-2); }

/* 天地图自带控件（缩放/图层/比例尺）默认在左上，会压住左侧面板，统一移出可视干扰区 */
.map-canvas .tdt-control-container { z-index: 10 !important; }

/* 信息窗口 —— 仿参考图面板风格 */
.iw {
    width: 340px; max-width: 88vw;
    max-height: 480px;
    display: flex; flex-direction: column;
    overflow: hidden;
    font-size: 13px; line-height: 1.5;
    background: var(--tech-bg);
    border: 1px solid var(--tech-line-bright);
    border-radius: 8px;
    box-shadow: var(--tech-glow-strong), 0 8px 32px rgba(0, 0, 0, .40), inset 0 1px 0 rgba(255,255,255,.03);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    position: relative;
}
/* 信息窗顶部装饰线 */
.iw::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--tech-cyan), var(--tech-cyan-2), transparent);
}
/* 兼容人员标注弹窗 */
.iw h4 { margin: 0 0 8px; font-size: 15px; color: var(--text-white); }
.iw .iw-row { margin: 3px 0; color: #4b5563; }

/* ── 用户信息窗卡片式布局（左头像 + 右信息）── */
.iw-user-card { padding: 14px 16px; }
.iw-user-card .iw-user-main {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 10px;
}
.iw-user-card .iw-user-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tech-line-bright);
    flex-shrink: 0;
    background: rgba(255,255,255,.06);
}
.iw-user-card .iw-user-info {
    display: flex; flex-direction: column; gap: 3px;
    min-width: 0;
    flex: 1;
}
.iw-user-card .iw-user-name {
    font-size: 16px; font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}
.iw-user-card .iw-user-role {
    display: inline-block;
    font-size: 11px; font-weight: 600;
    padding: 1px 8px; border-radius: 10px;
    align-self: flex-start;
    letter-spacing: 0.3px;
}
.iw-user-card .iw-user-phone {
    font-size: 13px; color: #9ca3af;
    margin-top: 2px;
}
.iw-user-card .iw-user-phone b { color: #d1d5db; font-weight: 500; }
.iw-user-card .iw-user-loc {
    font-size: 12px; color: #1f2937;
    padding: 8px 10px;
    background: rgba(200, 205, 212, .35);
    border-radius: 6px;
    border-left: 3px solid var(--tech-cyan);
    line-height: 1.45;
}
.iw-user-card .iw-user-loc b { color: #1f2937; font-weight: 600; }
.iw-user-card .iw-user-time {
    float: right; font-size: 11px; color: #374151;
    white-space: nowrap; margin-left: 8px;
}
.iw-user-card .iw-user-proj {
    margin-top: 8px;
    font-size: 11px; color: #6b7280;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.iw-user-card .iw-user-remark {
    margin-top: 8px;
    font-size: 12px; color: #1f2937;
    padding: 7px 10px;
    background: rgba(200, 195, 230, .40);
    border-radius: 6px;
    border-left: 3px solid #a78bfa;
    line-height: 1.45;
}
.iw-user-card .iw-user-remark b { color: #1f2937; font-weight: 600; }

/* 头部 —— 与面板同款：> 箭头风格 + 深色底 */
.iw-head {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tech-line);
    background: linear-gradient(90deg, rgba(0, 180, 255, .08), transparent);
    position: relative;
}
.iw-head::before {
    content: "";
    display: inline-block; flex-shrink: 0;
    width: 7px; height: 7px;
    margin-right: 1px;
    border-top: 2px solid var(--tech-cyan);
    border-right: 2px solid var(--tech-cyan);
    transform: rotate(45deg);
}
.iw-title {
    font-size: 15px; font-weight: 700;
    color: var(--text-white);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    flex: 1;
}
.iw-edit {
    flex: 0 0 auto;
    font-size: 11px;
    color: var(--tech-sub);
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all .15s;
}
.iw-edit:hover {
    text-decoration: none;
    color: var(--primary);
    border-color: var(--hover-border);
    background: var(--hover-bg);
}

/* 正文：分区、可滚动 */
.iw-body { flex: 1 1 auto; overflow-y: auto; padding: 10px 14px; }
.iw-sec {
    padding: 10px 0;
    border-bottom: 1px solid rgba(40, 140, 200, .10);
    position: relative;
}
.iw-sec:last-child { border-bottom: 0; }
/* 分区标题 —— 仿参考图：左侧竖线 + 青色文字 */
.iw-sec-t {
    font-size: 12px;
    font-weight: 700;
    color: var(--tech-cyan);
    margin-bottom: 8px;
    padding-left: 12px;
    position: relative;
    letter-spacing: 1.5px;
}
.iw-sec-t::before {
    content: ""; position: absolute; left: 0; top: 1px; bottom: 1px;
    width: 3px;
    background: linear-gradient(180deg, var(--tech-cyan), var(--tech-cyan-3));
    border-radius: 2px;
}
.iw-sec-t i { font-style: normal; font-weight: 400; color: var(--tech-sub-dim); margin-left: 5px; font-size: 11px; }

/* 键值对 */
.iw-kv { display: flex; gap: 10px; margin: 5px 0; align-items: baseline; }
.iw-kv > span { flex: 0 0 48px; color: var(--tech-sub); font-size: 12px; }
.iw-kv > b { font-weight: 600; color: var(--text-white); font-size: 13px; }
.iw-kv.block { flex-direction: column; gap: 3px; margin: 6px 0; }
.iw-kv.block > span { flex: none; color: var(--tech-cyan); font-weight: 600; font-size: 12px; }
.iw-kv.block p { margin: 0; color: #374151; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.6; }
.iw-sublist { color: #374151; }
.iw-updated { margin-top: 8px; padding-top: 6px; border-top: 1px dashed rgba(40, 140, 200, .10); }

.iw-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; align-items: center; }
.iw-imgs img {
    width: 100%; height: 54px; object-fit: cover;
    border: 1px solid var(--tech-line); border-radius: 5px;
    cursor: pointer;
    background: #f1f3f5;
    transition: border-color .15s, box-shadow .15s;
}
.iw-imgs img:hover { border-color: var(--tech-cyan); box-shadow: 0 0 0 2px rgba(22, 119, 255, .18); }
.iw-imgs .iw-more { font-size: 11px; color: var(--tech-sub-dim); align-self: center; }

/* ===== 项目详情弹层：左右分栏（基本信息左 / 现场照片右） ===== */
.iw-top-row { display: flex; gap: 16px; align-items: flex-start; }
.iw-main-col { flex: 1 1 0; min-width: 0; }
.iw-photo-col {
    flex: 0 0 220px; width: 220px;
    display: flex; flex-direction: column; gap: 8px;
    position: sticky; top: 0;
}
.iw-photo-carousel {
    border: 1px solid var(--tech-line); border-radius: 12px;
    background: rgba(14, 28, 52, .7); overflow: hidden;
}
.iw-photo-frame {
    position: relative;
    width: 100%; height: 180px;
    background: #0a1220;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.iw-photo-frame .iw-photo-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity .3s ease;
    cursor: pointer;
}
.iw-photo-frame .iw-photo-img.active { opacity: 1; z-index: 1; }

/* 翻页导航条 */
.iw-photo-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 8px; gap: 6px;
    background: rgba(14, 28, 52, .9);
    border-top: 1px solid var(--tech-line);
}
.iw-photo-btn {
    width: 26px; height: 26px; border: 1px solid var(--tech-line);
    border-radius: 50%; background: transparent;
    color: var(--tech-cyan); font-size: 16px; line-height: 24px;
    text-align: center; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s; flex-shrink: 0;
    user-select: none;
}
.iw-photo-btn:hover { background: var(--tech-cyan); color: #fff; border-color: var(--tech-cyan); }
.iw-photo-page {
    font-size: 11px; color: var(--tech-sub-dim);
    white-space: nowrap; user-select: none;
}

/* 圆点指示器 */
.iw-photo-dots {
    display: flex; justify-content: center; gap: 5px;
    padding: 5px 0 2px;
}
.iw-photo-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: rgba(255,255,255,.25); cursor: pointer;
    transition: background .15s, transform .15s;
}
.iw-photo-dot.active { background: var(--tech-cyan); transform: scale(1.3); }
.iw-photo-dot:hover { background: rgba(255,255,255,.5); }

/* 手机端：上下排列 */
@media (max-width: 640px) {
    .iw-top-row { flex-direction: column; gap: 12px; }
    .iw-photo-col { flex: none; width: 100%; position: static; }
    .iw-photo-frame { height: 220px; }
}

.iw-members { display: flex; flex-direction: column; gap: 4px; }
.iw-member { display: flex; gap: 8px; align-items: baseline; font-size: 12px; padding: 4px 0; }
.iw-member b { color: var(--text-white); font-weight: 600; }
.iw-member span { color: var(--tech-sub-dim); }

/* ===== 联络中心（应急配置）面板 ===== */
.iw-emergency-group { margin-bottom: 8px; }
/* 消控室值班电话 独占整行，加大突出 */
.iw-em-row-hero {
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    background: linear-gradient(135deg, rgba(22,119,255,.08), rgba(59,130,246,.06)) !important;
    border-color: rgba(22,119,255,.25) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
}
.iw-em-row-hero .iw-em-label { font-size: 14px !important; min-width: 80px; }
.iw-em-row-hero .iw-em-role  { font-size: 13px !important; }
.iw-em-row-hero .iw-em-phone { font-size: 16px !important; letter-spacing: .5px; }
.iw-em-row-hero .iw-em-call { font-size: 14px !important; }
/* 值班联系人 / 责任人员 左右两列并排，窄屏自动堆叠 */
.iw-em-cols { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 4px; }
.iw-em-cols > .iw-emergency-group { flex: 1 1 0; min-width: 0; margin-bottom: 8px; }
@media (max-width: 640px) { .iw-em-cols { flex-direction: column; gap: 0; } }
.iw-emergency-title {
    font-size: 13px; font-weight: 700; color: #111827;
    margin-bottom: 6px; padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}
.iw-em-row {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 8px; margin: 3px 0;
    background: rgba(22, 119, 255, .06);
    border: 1px solid rgba(22, 119, 255, .12);
    border-radius: 6px; font-size: 12px;
}
.iw-em-label {
    flex: 0 0 auto; min-width: 64px; font-weight: 600;
    color: var(--tech-cyan); font-size: 12px;
}
.iw-em-role {
    flex: 0 0 auto; min-width: 56px; color: #374151;
    font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iw-em-phone {
    flex: 1 1 auto; color: #111827; font-weight: 600;
    font-size: 13px; direction: ltr; text-align: left;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iw-em-call {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 10px; border-radius: 14px;
    background: #e8f4fd; color: #1677ff; font-size: 12px; font-weight: 600;
    text-decoration: none; white-space: nowrap; transition: background .15s;
}
.iw-em-call:hover { background: #1677ff; color: #fff; }
.iw-em-call::before { content: '\260E'; font-size: 13px; }
.iw-em-actions {
    display: flex; gap: 10px; margin: 10px 0 6px;
}
.iw-em-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all .15s; text-align: center;
}
.iw-em-btn-video {
    background: #e8f4fd; color: #1677ff; border: 1px solid #b3d8ff;
}
.iw-em-btn-video:hover { background: #1677ff; color: #fff; border-color: #1677ff; }
.iw-em-btn-video::before { content: '\25B6'; font-size: 14px; }
.iw-em-btn-remote {
    background: #fef3e8; color: #d46b08; border: 1px solid #f5c57a;
}
.iw-em-btn-remote:hover { background: #d46b08; color: #fff; border-color: #d46b08; }
.iw-em-btn-remote::before { content: '\2699'; font-size: 14px; }

/* 地图信息窗内联络中心：文字始终保持黑色/深灰，确保在白色信息窗背景下清晰可读 */
#mapContainer .iw-em-row { background: rgba(22, 119, 255, .06); border-color: rgba(22, 119, 255, .12); }
#mapContainer .iw-em-role { color: #374151; }
#mapContainer .iw-em-phone { color: #111827; font-weight: 600; }
#mapContainer .iw-emergency-title { color: #111827; border-bottom-color: #e5e7eb; }

/* 项目详情大弹层（点击地图项目标记弹出，完整展示所有信息，不再是一行滚动的小气泡） */
.pd-modal-mask {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 4vh 16px; overflow-y: auto;
    animation: pdFade .15s ease;
}
@keyframes pdFade { from { opacity: 0; } to { opacity: 1; } }
.pd-modal {
    position: relative; width: min(960px, 96vw); max-height: 92vh;
    background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
    display: flex; flex-direction: column; overflow: hidden;
    animation: pdPop .18s ease;
}
@keyframes pdPop { from { transform: translateY(12px) scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }
.pd-modal-close {
    position: absolute; top: 10px; right: 12px; z-index: 3;
    width: 30px; height: 30px; border: none; border-radius: 50%;
    background: rgba(0,0,0,.06); color: #374151; font-size: 15px; line-height: 1; cursor: pointer;
    transition: background .15s, color .15s;
}
.pd-modal-close:hover { background: #ff3b30; color: #fff; }
.pd-modal-body {
    padding: 18px 22px 22px; overflow-y: auto; max-height: 92vh;
    -webkit-overflow-scrolling: touch;
}
/* 弹层内复用 .iw 卡片样式，但强制全宽、去掉信息窗下的尺寸/边框约束，让所有信息一次看全 */
.pd-modal .iw { width: 100% !important; max-width: none !important; box-shadow: none !important; border: none !important; background: transparent !important; }
.pd-modal .iw-head { padding-right: 48px; }
.pd-modal .iw-edit { right: 46px; top: 6px; }

/* ============ 维保员地图详情：红色主题 · 左信息分块 + 右当日计划时间轴 ============ */
.md-modal-mask {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    padding: 4vh 16px; overflow-y: auto;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: pdFade .15s ease;
}
.md-modal {
    /* 维保员红主题（与 role.css: maintainer 主题色 #e23c3c 一致） */
    --md-red: #e23c3c;
    --md-red-deep: #c62828;
    --md-red-soft: #fdecec;
    --md-line: #eceff4;
    --md-text: #26303d;
    --md-sub: #8a94a6;
    position: relative;
    width: min(820px, 94vw);
    max-height: 88vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: pdPop .18s ease;
}
/* 顶部红条：人物信息 + 关闭按钮（关闭按钮固定在顶栏右侧，独立一行，不再压住右栏内容） */
.md-head {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    background: linear-gradient(135deg, #e23c3c 0%, #c62828 100%);
}
.md-head-main { flex: 1 1 auto; min-width: 0; }
.md-modal-close {
    flex: 0 0 auto; margin-left: auto;
    width: 34px; height: 34px; padding: 0; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .16);
    color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.md-modal-close:hover { background: #fff; color: var(--md-red); border-color: #fff; }
.md-modal-close:active { transform: scale(.94); }
.md-body { display: flex; flex: 1 1 auto; min-height: 0; }

/* ---- 左栏：按「块」重新分布的信息卡 ---- */
.md-left {
    width: 300px; flex: 0 0 300px;
    padding: 14px 13px;
    border-right: 1px solid var(--md-line);
    background: #f8f9fb;
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
/* （人物信息区已上移为全宽顶栏 .md-head，此处不再重复） */
.md-user-avatar {
    width: 50px; height: 50px; flex: 0 0 50px; border-radius: 50%;
    object-fit: cover; display: block; background: #fff;
    border: 2px solid rgba(255, 255, 255, .78);
}
.md-head .md-user-avatar { width: 44px; height: 44px; flex: 0 0 44px; }
.md-user-avatar-txt {
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: var(--md-red); background: #fff;
}
.md-user-name {
    font-size: 17px; font-weight: 700; color: #fff;
    line-height: 1.25; word-break: break-all;
}
.md-user-role {
    display: inline-block; margin-top: 6px;
    font-size: 11px; font-weight: 600; color: #fff;
    background: rgba(255, 255, 255, .22);
    border: 1px solid rgba(255, 255, 255, .38);
    padding: 1px 9px; border-radius: 999px;
}
.md-block {
    background: #fff; border: 1px solid var(--md-line);
    border-radius: 10px; padding: 10px 12px; margin-bottom: 9px;
}
.md-block:last-child { margin-bottom: 0; }
.md-block-title {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: var(--md-red);
    margin-bottom: 7px;
}
.md-block-title::before {
    content: ''; flex: 0 0 3px; width: 3px; height: 11px;
    border-radius: 2px; background: var(--md-red);
}
.md-block-extra {
    margin-left: auto; font-size: 11px; font-weight: 400;
    color: var(--md-sub); white-space: nowrap;
}
.md-kv { display: flex; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.md-kv + .md-kv { margin-top: 6px; }
.md-k { flex: 0 0 34px; color: var(--md-sub); }
.md-v { flex: 1 1 auto; min-width: 0; color: var(--md-text); word-break: break-word; }
.md-text { font-size: 13.5px; line-height: 1.6; color: var(--md-text); word-break: break-word; }
.md-text-dim { color: var(--md-sub); }
.md-proj-list { list-style: none; margin: 0; padding: 0; }
.md-proj-list li {
    position: relative; padding: 5px 0 5px 13px;
    font-size: 13.5px; line-height: 1.45; color: var(--md-text);
    word-break: break-word;
}
.md-proj-list li + li { border-top: 1px dashed var(--md-line); }
.md-proj-list li::before {
    content: ''; position: absolute; left: 2px; top: 11px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--md-red); opacity: .5;
}

/* ---- 右栏：当日计划时间轴（版式对齐维保员后台「今日计划」） ---- */
.md-right {
    flex: 1 1 auto; min-width: 0;
    display: flex; flex-direction: column; min-height: 0;
    padding: 16px 18px 14px;
    background: #fff; overflow: hidden;
}
.md-right-head {
    display: flex; align-items: center; gap: 8px;
    padding-bottom: 10px; margin-bottom: 12px;
    border-bottom: 1px solid var(--md-line);
}
.md-right-title { font-size: 16px; font-weight: 700; color: var(--md-text); }
.md-right-title::before {
    content: ''; display: inline-block; vertical-align: -1px;
    width: 3px; height: 13px; border-radius: 2px;
    background: var(--md-red); margin-right: 7px;
}
.md-right-date { font-size: 12px; color: var(--md-sub); white-space: nowrap; }
.md-right-count {
    margin-left: auto; font-size: 11px; font-weight: 700; white-space: nowrap;
    color: var(--md-red); background: var(--md-red-soft);
    padding: 2px 9px; border-radius: 999px;
}
.md-timeline {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overflow-x: hidden;
    padding-right: 4px; -webkit-overflow-scrolling: touch;
}
.md-loading, .md-empty {
    color: var(--md-sub); padding: 26px 8px;
    text-align: center; font-size: 13px;
}

/* 时间轴：左时间列 + 中节点列 + 右卡片列（卡片宽度随弹窗收窄） */
.md-tl-list { margin: 0; padding: 0; }
.md-tl-item { display: flex; align-items: stretch; gap: 9px; padding-bottom: 12px; }
.md-tl-item:last-child { padding-bottom: 0; }
.md-tl-time {
    flex: 0 0 42px; width: 42px; text-align: right;
    display: flex; flex-direction: column; gap: 1px; padding-top: 1px;
}
.md-tl-t1 { font-size: 13px; font-weight: 700; color: var(--md-text); font-variant-numeric: tabular-nums; }
.md-tl-t2 { font-size: 11px; color: var(--md-sub); font-variant-numeric: tabular-nums; }
.md-tl-node { position: relative; flex: 0 0 14px; width: 14px; display: flex; justify-content: center; }
.md-tl-node::before {
    content: ''; position: absolute; left: 50%; top: 4px; bottom: -12px;
    transform: translateX(-50%); width: 2px; background: var(--md-line);
}
.md-tl-item:last-child .md-tl-node::before { display: none; }
.md-tl-dot {
    position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px;
    border-radius: 50%; background: var(--md-sub); border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}
.md-tl-card {
    flex: 1 1 auto; min-width: 0;
    background: #fbfcfd; border: 1px solid var(--md-line);
    border-left: 3px solid var(--md-sub); border-radius: 9px;
    padding: 8px 10px;
}
.md-tl-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.md-tl-type {
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
    padding: 1px 8px; border-radius: 999px;
}
.md-tl-proj {
    font-size: 13.5px; font-weight: 600; color: var(--md-text);
    margin-top: 5px; line-height: 1.45; word-break: break-word;
}
.md-tl-remark {
    font-size: 12.5px; color: var(--md-sub);
    margin-top: 3px; line-height: 1.5; word-break: break-word;
}
.md-st-tag {
    font-size: 11px; font-weight: 600; white-space: nowrap;
    padding: 1px 8px; border-radius: 999px;
}
.md-st-wait { background: #f1f3f7; color: #6b7280; }
.md-st-ing  { background: var(--md-red-soft); color: var(--md-red); }
.md-st-done { background: #eaf7f0; color: #1f9d55; }
/* 审核中：只出现在数智运维计划上（状态跟随本期数智运维报告） */
.md-st-review { background: #f1ecfd; color: #6d3bd1; }
.md-tl-active .md-tl-card { border-color: var(--md-red); box-shadow: 0 0 0 2px var(--md-red-soft); }
.md-tl-active .md-tl-dot { box-shadow: 0 0 0 3px var(--md-red-soft); animation: mdPulse 1.6s ease-in-out infinite; }
.md-tl-finished .md-tl-card { opacity: .72; }
.md-tl-finished .md-tl-t1, .md-tl-finished .md-tl-t2 { opacity: .6; }
.md-tl-missed .md-tl-card { border-color: #f5a623; }
.md-tl-now { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; }
.md-tl-now .md-tl-node::before { display: none; }
.md-tl-now-dot {
    width: 10px; height: 10px; border-radius: 50%; background: var(--md-red);
    box-shadow: 0 0 0 3px var(--md-red-soft);
}
.md-tl-now-line { flex: 1 1 auto; position: relative; border-top: 2px dashed var(--md-red); }
.md-tl-now-tag {
    position: absolute; right: 0; top: -10px;
    font-size: 10.5px; font-weight: 700; color: #fff;
    background: var(--md-red); padding: 1px 7px; border-radius: 999px;
}
@keyframes mdPulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--md-red-soft); }
    50% { box-shadow: 0 0 0 6px rgba(226, 60, 60, .14); }
}

/* 移动端：上下堆叠，左栏收起为顶部信息块 */
@media (max-width: 760px) {
    .md-modal { width: 96vw; max-height: 94vh; }
    .md-head { padding: 9px 12px; }
    .md-head .md-user-avatar { width: 38px; height: 38px; flex: 0 0 38px; }
    .md-user-name { font-size: 16px; }
    .md-body { flex-direction: column; }
    .md-left {
        width: auto; flex: 0 0 auto; max-height: 38vh;
        border-right: none; border-bottom: 1px solid var(--md-line);
    }
    .md-right { flex: 1 1 auto; }
}

/* 底部常驻操作 */
.iw-foot {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-top: 1px solid var(--tech-line);
    background: linear-gradient(90deg, rgba(0, 180, 255, .05), transparent);
}
.btn-block { display: block; width: 100%; text-align: center; box-sizing: border-box; }

/* 项目图片缩略图（后台表单） */
.img-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.img-thumb { width: 86px; text-align: center; }
.img-thumb img {
    width: 86px; height: 64px; object-fit: cover;
    border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
.img-thumb label {
    font-size: 11px; font-weight: 400; margin-top: 2px;
    display: flex; align-items: center; justify-content: center; gap: 3px;
}

/* FLV 监控播放浮窗 —— 仿面板风格 */
.flv-window {
    position: fixed; right: 20px; bottom: 20px;
    width: 480px; max-width: 94vw;
    background: var(--tech-bg);
    border: 1px solid var(--tech-line-bright);
    border-radius: 8px;
    box-shadow: var(--tech-glow-strong), 0 8px 32px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255,255,255,.03);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    z-index: 100000; overflow: hidden;
}
.flv-window::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--tech-cyan), var(--tech-cyan-2), transparent);
}
.flv-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 14px;
    background: linear-gradient(90deg, rgba(0, 180, 255, .08), transparent);
    border-bottom: 1px solid var(--tech-line);
    font-weight: 700; font-size: 13px;
    user-select: none;
    color: var(--text-white);
}
.flv-head .flv-title { }
.flv-close {
    cursor: pointer;
    color: var(--tech-sub);
    font-size: 18px; padding: 0 4px; line-height: 1;
    transition: color .15s;
}
.flv-close:hover { color: var(--tech-accent-red); }
.flv-body video { display: block; width: 100%; height: 260px; background: #000; }
.ezuikit-host { width: 100%; height: 270px; background: #000; }
.ezuikit-host iframe, .ezuikit-host canvas, .ezuikit-host video { width: 100% !important; height: 100% !important; display: block; border: 0; }
.flv-tip { padding: 0 14px 10px; color: var(--tech-sub); font-size: 12px; }
.flv-foot {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 14px 10px;
    border-top: 1px solid var(--tech-line);
    background: linear-gradient(90deg, rgba(0, 180, 255, .03), transparent);
}
.flv-url { font-size: 11px; word-break: break-all; max-height: 34px; overflow: hidden; line-height: 1.4; color: var(--tech-sub-dim); }
.flv-act { font-size: 12px; color: var(--tech-sub); }
.flv-act a { color: var(--text-sub); cursor: pointer; text-decoration: none; transition: color .15s; }
.flv-act a:hover { color: var(--primary); }

/* ============================================================
   科技感玻璃拟态主题覆盖（地图覆盖层）
   深度仿照智慧消防大屏监控中心
   ============================================================ */

/* 天地图信息窗口外壳透明化 */
.tdt-infowindow,
.tdt-infowindow-content-wrapper,
.tdt-infowindow-content,
.tdt-infowindow-tip,
.tdt-infowindow-top,
.tdt-infowindow-bottom,
.tdt-infowindow-left,
.tdt-infowindow-right {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* 两侧浮动面板 —— 覆盖层强化 */
.fpanel .fp-head {
    background: linear-gradient(90deg, rgba(0, 180, 255, .08), transparent);
}
.fpanel .fp-body { color: var(--tech-text); }

/* 面板内组件 */
.fpanel .stat-item { background: var(--tech-bg-card); border-color: var(--tech-line); }
.fpanel .stat-item .num {
    color: var(--text-white);
}
.fpanel .stat-item .lbl { color: var(--tech-sub); }
.fpanel .plist li { border-bottom-color: rgba(40, 140, 200, .10); }
.fpanel .plist .pname { color: var(--text-white); }
.fpanel .plist .pname:hover { color: var(--hover-text); }
.fpanel .plist .pmeta { color: var(--tech-sub-dim); }
.fpanel .ulist li { border-bottom-color: rgba(40, 140, 200, .10); }
.fpanel .ulist { width: 100%; box-sizing: border-box; }
.fpanel .ulist li { max-width: 100%; box-sizing: border-box; word-break: break-word; }
.fpanel .ulist .uname { color: var(--text-white); }
.fpanel .ulist .umeta { color: var(--tech-sub-dim); word-break: break-word; }
/* 面板内按钮 */
.fpanel .btn {
    background: rgba(0, 180, 255, .08);
    border: 1px solid rgba(40, 140, 200, .25);
    color: var(--tech-cyan-2);
    font-size: 11px; padding: 3px 10px;
    max-width: 100%;
    box-sizing: border-box;
}
.fpanel .btn:hover {
    background: var(--hover-bg-strong);
    border-color: var(--hover-border);
    color: var(--hover-text-strong);
}

/* 地图左下角图例 / 状态条 */
.map-status, .map-legend {
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    color: var(--tech-sub);
    box-shadow: var(--tech-glow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.map-legend .lg-item { color: var(--tech-sub); }
.map-status b { color: var(--tech-cyan-2); }

/* 顶部工具条 */
.map-tools .btn {
    background: var(--tech-bg);
    border: 1px solid var(--tech-line);
    color: var(--tech-text);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--tech-glow);
    font-size: 12px;
}
.map-tools .btn:hover { border-color: var(--hover-border); background: var(--hover-bg); }

/* 搜索栏暗色主题（确保在深色地图上协调） */
.msb-search { background: var(--tech-bg-2); border-color: var(--tech-line-bright); }
.msb-search input { color: var(--text-white); }
.msb-city { background: rgba(255, 255, 255, .88); border-color: var(--border); color: var(--text); }
.msb-city:hover { border-color: var(--primary); background: #fff; }
.msb-city.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 212, 255, .30), rgba(0, 180, 230, .15));
    border-color: var(--tech-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, .20);
}

/* 信息窗口内容亮色化 */
.iw { color: var(--tech-text); }
.iw h4 { color: var(--text-white); }
.iw .iw-row { color: #4b5563; }
.iw .iw-row b { color: var(--text-white); }
.iw .muted { color: var(--tech-sub-dim) !important; }
.iw-edit { color: var(--tech-sub); }
.iw-edit:hover { color: var(--primary); }
.iw-sec { border-bottom-color: rgba(40, 140, 200, .10); }
.iw-sec-t { color: var(--tech-cyan); }
.iw-sec-t i { color: var(--tech-sub-dim); }
.iw-kv > span { color: var(--tech-sub); }
.iw-kv > b { color: var(--text-white); }
.iw-kv.block p { color: #374151; }
.iw-imgs img { border-color: var(--tech-line); background: rgba(14, 28, 52, .8); }
.iw-imgs img:hover { border-color: var(--tech-cyan); box-shadow: 0 0 0 2px rgba(22, 119, 255, .18); }
.iw-member b { color: var(--text-white); }
.iw-member span { color: var(--tech-sub-dim); }
.iw-foot { background: linear-gradient(90deg, rgba(0, 180, 255, .04), transparent); }

/* ── 车辆 GPS 信息窗（地图车辆标记；结构对齐项目详情窗 .iw-head/.iw-body/.iw-sec/.iw-kv）── */
/* 标签列加宽：容下「分组/车队」「定位时间」等 4 字标签，避免折行 */
.vd-iw .iw-kv > span { flex: 0 0 62px; }
.vd-iw .iw-kv > b { word-break: break-word; }
/* 适度收紧行距/内边距，让「信息 + 标注编辑」在信息窗内完整呈现（不出现内部滚动条） */
.vd-iw.iw { max-height: 560px; }
.vd-iw .iw-body { padding: 8px 12px; }
.vd-iw .iw-sec { padding: 6px 0; }
.vd-iw .iw-sec-t { margin-bottom: 5px; }
.vd-iw .iw-kv { margin: 3px 0; }
.vd-iw .iw-kv.block { margin: 6px 0 2px; }
.vd-iw .iw-kv.block p { line-height: 1.5; }
/* 两列并排的键值行（分组/状态标签、速度/电量），省高度且左右对齐；
   左列稍宽：分组/车队这类值可能较长，右列多为「待命」「100%」等短值 */
.vd-iw .vd-iw-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 10px; }
.vd-iw .vd-iw-pair > .iw-kv { margin: 3px 0; }
/* 标题右侧在线/离线胶囊（与列表 .vd-badge 同族：浅底 + 无边框；离线取地图图例的灰而不是红） */
.vd-iw .vd-iw-badge {
    flex: 0 0 auto; display: inline-block;
    font-size: 11px; font-weight: 600; line-height: 1;
    padding: 4px 9px; border-radius: 999px; white-space: nowrap;
    background: #e7f7ed;
    color: var(--success);
}
.vd-iw .vd-iw-badge.off {
    background: #f1f3f5;
    color: var(--text-sub);
}
/* 标注编辑区（置于 .iw-sec 内，分隔线由 .iw-sec 提供，此处不再画虚线） */
.vd-iw .vd-iw-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.vd-iw .vd-iw-edit label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--tech-sub); }
.vd-iw .vd-iw-edit label input {
    width: 100%; padding: 6px 8px; box-sizing: border-box;
    border: 1px solid var(--tech-line); border-radius: 6px;
    font-size: 12px; background: #fff; color: var(--tech-text);
}
.vd-iw .vd-iw-edit label input:focus {
    outline: none; border-color: var(--tech-line-bright);
    box-shadow: 0 0 0 2px rgba(22, 119, 255, .12);
}
.vd-iw .vd-iw-edit .vd-iw-acts { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
@media (max-width: 640px) { .vd-iw .vd-iw-edit { grid-template-columns: 1fr; } }

/* 视频浮窗亮色化 */
.flv-head { background: linear-gradient(90deg, rgba(0, 180, 255, .06), transparent); color: var(--text-white); border-bottom-color: var(--tech-line); }
.flv-close { color: var(--tech-sub); }
.flv-close:hover { color: var(--tech-accent-red); }
.flv-tip { color: var(--tech-sub); }
.flv-foot { background: linear-gradient(90deg, rgba(0, 180, 255, .03), transparent); }
.flv-act a { color: var(--text-sub); }
.flv-act a:hover { color: var(--primary); }
.flv-url { color: var(--tech-sub-dim); }

/* 科技感视频按钮 —— 白色明亮风格：实心蓝底 + 白色文字 + 顶部扫描线 */
.btn-tech {
    display: inline-block; width: 100%; text-align: center; box-sizing: border-box;
    padding: 12px 18px;
    border: 1px solid var(--primary-dark);
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-weight: 700; letter-spacing: 2px; font-size: 13px;
    box-shadow: 0 2px 10px rgba(224, 48, 30, .28);
    cursor: pointer; user-select: none;
    transition: all .20s ease;
    position: relative;
    overflow: hidden;
}
/* 按钮顶部扫描线 */
.btn-tech::before {
    content: ""; position: absolute; top: 0; left: -100%; width: 60%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
    animation: btn-sweep 2.5s ease-in-out infinite;
}
@keyframes btn-sweep {
    0% { left: -60%; }
    100% { left: 160%; }
}
.btn-tech:hover {
    background: linear-gradient(135deg, #ef5b4c 0%, var(--primary) 100%);
    box-shadow: 0 4px 16px rgba(224, 48, 30, .42);
    color: #ffffff;
}
.btn-tech:active {
    transform: scale(.98);
    box-shadow: 0 1px 6px rgba(224, 48, 30, .38);
}

/* ---------- 后台布局（左侧层级导览 + 内容区） ---------- */
.admin { display: flex; flex-direction: row; min-height: 100vh; }

/* 旧左侧栏（已弃用，保留以防个别页面直接引用） */
.sidebar {
    width: 210px; flex: 0 0 210px;
    background: #fff; border-right: 1px solid var(--border);
    padding: 14px 10px;
}
.sidebar .sb-title { font-weight: 700; font-size: 15px; padding: 6px 10px 14px; display: flex; align-items: center; gap: 8px; }
.sidebar a {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 8px; color: var(--text); margin-bottom: 2px; font-size: 14px;
}
.sidebar a:hover { background: var(--hover-bg); color: var(--hover-text); }
.sidebar a.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.sidebar .sb-group { font-size: 12px; color: var(--text-sub); padding: 12px 12px 6px; }
/* 可配置导航：可折叠分组（层级无限） */
.sb-group-toggle { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; }
.sb-group-toggle:hover { color: var(--text); }
.sb-caret { display: inline-block; margin-left: 6px; font-size: 10px; transition: transform .15s; color: var(--text-sub); }
.sb-group-wrap:not(.open) .sb-caret { transform: rotate(-90deg); }
.sb-sub { display: none; }
.sb-group-wrap.open .sb-sub { display: block; }

/* 内容区：左侧让位给弹性侧栏（无需底部留白） */
.admin-main { flex: 1; min-width: 0; padding: 18px 22px; background: var(--bg); }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.admin-head h2 { margin: 0; }

/* ---------- 导入导出 / 备份 三栏卡片 ---------- */
.imp-box { flex: 1; min-width: 220px; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; background: #fbfcfe; }
.imp-box h3 { font-size: 15px; margin: 0 0 6px; }
.imp-box .small, .imp-box p.small { color: var(--text-sub); margin: 0 0 10px; line-height: 1.5; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--border); }

/* ---------- 后台外壳：左侧不动、右侧 iframe 局部切换 ---------- */
/* 顶层壳：内容区变成「撑满视口高度的纵向 flex」，iframe 自适应铺满整块右侧区域 */
body.has-shell { overflow: hidden; }
body.has-shell .admin-main {
    padding: 0; height: 100vh; min-height: 0; overflow: hidden;
    display: flex; flex-direction: column;
}
.admin-frame {
    flex: 1 1 auto; min-height: 0;
    width: 100%; height: 100%;
    border: 0; display: block; background: var(--bg);
}
/* 嵌入页（iframe 内）：只渲染内容，去掉整页 chrome */
body.is-embedded { margin: 0; padding: 0; height: 100vh; overflow: hidden; background: var(--bg); }
/* 锁定 iframe 实际高度（100vh=iframe 视口），避免 flex 容器高度“过期”导致下滑卡死 */
.admin-embed { display: flex; flex-direction: column; height: 100vh; }
.aeb-head {
    flex: 0 0 auto; position: sticky; top: 0; z-index: 5;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 22px;
    background: #fff; border-bottom: 1px solid var(--border);
}
.aeb-head b { font-size: 15px; font-weight: 700; color: var(--text); }
.aeb-body { flex: 1 1 auto; min-height: 0; padding: 18px 22px; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.aeb-body-full { padding: 0; flex: 1 1 auto; min-height: 0; height: auto; overflow: hidden; display: flex; flex-direction: column; }

/* ---------- 左侧层级导览（浅色/无背景色 + 消防红激活，用户 2026-09-22 明确不要背景色） ---------- */
.admin-sidenav {
    order: -1; flex: 0 0 244px; width: 244px;
    align-self: stretch;
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column;
    background: #fff;
    border-right: 1px solid var(--border);
    box-shadow: 1px 0 14px rgba(16, 24, 40, .06);
    z-index: 70;
}
.asn-brand {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 9px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--border);
    font-weight: 700; color: var(--text); font-size: 15px; white-space: nowrap;
}
.asn-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.asn-logo {
    width: 26px; height: 26px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4aa3ff, var(--primary));
    color: #fff; font-size: 14px; box-shadow: 0 4px 12px rgba(22, 119, 255, .35);
}
.asn-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 8px; }
.asn-scroll::-webkit-scrollbar { width: 8px; }
.asn-scroll::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .14); border-radius: 8px; }
.asn-node { margin-bottom: 1px; }
.asn-row { display: flex; align-items: stretch; }
.asn-link {
    flex: 1 1 auto; min-width: 0;
    display: flex; align-items: center;
    padding: 9px 10px; border-radius: 8px;
    color: var(--text); text-decoration: none; font-size: 13.5px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: background .15s ease, color .15s ease;
}
.asn-link:hover { background: var(--hover-bg); color: var(--hover-text); }
.asn-node.active > .asn-row > .asn-link {
    background: var(--primary-soft); color: var(--primary-dark); font-weight: 700;
    box-shadow: inset 3px 0 0 var(--primary);
}
.asn-home { color: var(--primary-dark); font-weight: 700; }
/* 底部固定区（退出登录）
   注意：必须显式写 flex: 0 0 auto —— 若沿用 .asn-link 会被其 flex:1 1 auto
   在列方向 flex 容器里拉满整栏高度，退化成一块巨大的色块 */
.asn-foot {
    flex: 0 0 auto;
    padding: 10px 8px;
    border-top: 1px solid var(--border);
    background: #fff;
}
.asn-exit {
    display: block; flex: 0 0 auto;
    padding: 9px 12px; border-radius: 9px;
    color: #c0392b; background: #fdeceb; border: 1px solid #f5c6c2;
    text-align: center; text-decoration: none; white-space: nowrap;
    font-size: 13px; font-weight: 600;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.asn-exit:hover { background: #f9d9d6; color: #a5281b; border-color: #efb3ad; }
.asn-caret {
    flex: 0 0 auto; width: 34px; border: 0; background: transparent;
    color: var(--text-sub); cursor: pointer; font-size: 11px; border-radius: 8px;
}
.asn-caret::before { content: '\25B8'; }
.asn-caret:hover { background: var(--hover-bg); color: var(--text); }
.asn-node.open > .asn-row > .asn-caret::before { content: '\25BE'; }
.asn-sub { display: none; padding-left: 14px; border-left: 1px solid var(--border); margin-left: 18px; }
.asn-node.open > .asn-sub { display: block; }
.asn-sub .asn-link { font-size: 13px; color: var(--text-sub); }
.asn-sub .asn-link:hover { color: var(--text); }

/* 窄屏抽屉开合按钮 + 遮罩（仅窄屏显示） */
.asn-fab {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 90;
    width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--border);
    background: #fff; color: var(--primary-dark); font-size: 18px; cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 24, 40, .18);
}
.asn-backdrop { display: none; position: fixed; inset: 0; z-index: 75; background: rgba(8, 18, 34, .45); }

@media (max-width: 1024px) {
    .admin { flex-direction: column; }
    .admin-sidenav {
        position: fixed; top: 0; left: 0; bottom: 0;
        transform: translateX(-100%); transition: transform .2s ease;
        box-shadow: 4px 0 24px rgba(8, 18, 34, .35);
    }
    body.asn-open .admin-sidenav { transform: none; }
    body.asn-open .asn-backdrop { display: block; }
    .admin-main { padding: 14px 12px; }
    /* 给悬浮 ☰ 按钮让位，避免压住页面标题 */
    .admin-head { padding-left: 50px; }
    .admin-topbar { padding-left: 62px; }
    .asn-fab { display: flex; align-items: center; justify-content: center; }
}

/* ---------- 后台导航配置编辑器 ---------- */
.nav-editor { margin-bottom: 6px; }
.nav-node { border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #fbfcfe; }
.nav-children { margin-left: 18px; border-left: 1px dashed var(--border); padding-left: 10px; margin-top: 8px; }
.nav-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nav-row .nn-title { flex: 1 1 140px; min-width: 120px; }
.nav-row .nn-href { flex: 1 1 160px; min-width: 140px; }
.nav-row .nn-sort { width: 64px; }
.nav-row input.nn-title, .nav-row input.nn-href, .nav-row input.nn-sort {
    padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; color: var(--text);
}
.nav-row .nn-en { font-size: 12px; color: var(--text-sub); display: inline-flex; align-items: center; gap: 4px; margin: 0; }
/* 调度组可见角色（后台导航配置，每个菜单项一行勾选） */
.nav-row2 { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--border); }
.nav-row2 .nn-roles-lab { font-size: 12px; color: var(--text-sub); }
.nav-row2 .nn-role { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12.5px; color: var(--text); cursor: pointer; }
.nav-row2 .nn-role input { margin: 0; }
.btn-xs { padding: 3px 9px; font-size: 12px; line-height: 1.5; }

/* ---------- 项目选择 / 复选 ---------- */
.project-picker { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: #fbfcfe; }
.project-picker label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0 0 6px; cursor: pointer; }

/* ---------- 天地图选点 ---------- */
.pick-map { height: 320px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; }
.search-result { border: 1px solid var(--border); border-radius: 8px; max-height: 220px; overflow-y: auto; margin-top: 8px; display: none; }
.search-result .item { padding: 8px 10px; border-bottom: 1px solid var(--border); cursor: pointer; font-size: 13px; }
.search-result .item:hover { background: var(--primary-soft); }
.search-result .item:last-child { border-bottom: 0; }
.search-result .item .name { font-weight: 500; }
.search-result .item .addr { font-size: 12px; color: var(--text-sub); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .admin { flex-direction: column; }
    .sidebar { width: 100%; flex: none; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    .sidebar .sb-title, .sidebar .sb-group { display: none; }
    .sidebar a { white-space: nowrap; }
    .admin-main { padding: 14px; }
    /* 移动端后台：导航分组强制展开、隐藏折叠箭头，避免横向滚动下嵌套错乱 */
    .sb-caret { display: none; }
    .sb-sub { display: block !important; }
    .sb-group-toggle { cursor: default; }
}

/* ============ 手机端响应式（≤640px，以竖屏为主）============
   目标：整页地图背景不变，所有悬浮元素重排为
   「顶部信息条（品牌/用户）＋ 中部搜索与工具条 ＋ 底部并排面板抽屉」，
   互不重叠、不溢出、可滚动。 */
@media (max-width: 640px) {
    /* —— 移动端输入框字号 ≥16px：避免 iOS 聚焦时自动放大整页导致布局错乱 —— */
    input, textarea, select { font-size: 16px; }
    /* —— 左下：品牌标题卡（Logo+标题），缩小 —— */
    .float-brand {
        top: auto; left: 8px; right: auto; bottom: 10px;
        padding: 6px 10px;
        font-size: 13px;
        gap: 7px;
        border-radius: 7px;
        max-width: 62vw;
    }
    .float-brand .dot { width: 8px; height: 8px; box-shadow: 0 0 0 3px rgba(215,38,61,.15); }
    .float-brand .fb-title { letter-spacing: .5px; }
    /* 手机端：LOGO 显示，高度 20px，宽度等比例；标题字号自适应 */
    .float-brand .fb-logo { display: block; height: 20px; width: auto; max-width: 120px; padding: 0; background: transparent; border-radius: 4px; }
    .float-brand .fb-text { line-height: 1.2; }
    .float-brand .fb-title { font-size: 14px; }

    /* —— 右上：用户卡，精简为「头像 + 退出」，定位提示换行右对齐 —— */
    .float-user {
        top: 8px; right: 8px;
        padding: 5px 8px;
        gap: 8px;
        border-radius: 7px;
        align-items: center;
    }
    /* 隐藏中间的文字按钮（后台管理 / 个人中心）；头像点击可进个人中心，退出保留 */
    .float-user a.btn:not([href*="logout"]) { display: none; }
    .float-user .fu-chip { padding: 2px 4px; }
    .float-user .fu-chip img { width: 28px; height: 28px; }
    .float-user .fu-meta .small { display: none; }            /* 角色名隐藏，仅留姓名 */
    .float-user .fu-name { font-size: 13px; }
    .float-user a.btn.btn-sm { padding: 4px 9px; font-size: 12px; }
    /* 定位提示：换行占满整行、右对齐小字，保证定位信息仍在 */
    .float-user .fu-locate {
        flex-basis: 100%;
        text-align: right;
        font-size: 11px;
        line-height: 1.3;
        margin-top: 2px;
    }

    /* —— 顶部工具条：手机端已隐藏（改由底部「上报位置」按钮承担），仅保留规则以免桌面样式串味 —— */
    .map-tools { top: 42px; gap: 5px; }
    .map-tools .btn { padding: 4px 10px; font-size: 12px; }

    /* —— 搜索栏 + 城市筛选：占满宽度居中、城市标签横向滚动 —— */
    .map-search-bar {
        top: 46px;
        width: 94%;
        max-width: 94%;
    }
    .msb-search { width: 100%; height: 40px; padding: 0 12px; }
    .msb-search input { font-size: 14px; padding: 0 6px; }
    .msb-cities {
        max-width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .msb-city-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 5px;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .msb-city-grid::-webkit-scrollbar { height: 4px; }
    .msb-city-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 2px; }
    .msb-city { flex: 0 0 auto; padding: 4px 13px; font-size: 12px; }

    /* —— 左右面板：手机端隐藏，只保留地图内容 —— */
    .panel-layer { display: none !important; }
    .fpanel .fp-head { padding: 10px 12px; font-size: 13px; }
    .fpanel .fp-head .fp-title { font-size: 13px; }
    .fpanel .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .fpanel .stat-item { padding: 9px 8px; }
    .fpanel .stat-item .num { font-size: 20px; }

    /* —— 左下角图例/状态：手机端隐藏 —— */
    .map-corner { display: none; }

    /* —— 右上角用户信息卡：手机端隐藏（仅保留地图 + 上报位置按钮） —— */
    .float-user { display: none !important; }

    /* —— 顶部工具条：手机端隐藏，改由底部「上报位置」快捷按钮承担 —— */
    .map-tools { display: none !important; }

    /* —— 标注展示方式分段控件：手机端图例已隐藏，保持居中 + 缩小，避免超出屏幕 —— */
    .map-modes { bottom: 12px; gap: 1px; padding: 2px; left: 50%; transform: translateX(-50%); }
    .map-modes .mm-btn { font-size: 12px; padding: 6px 10px; }

    /* —— 右侧垂直居中「上报位置」竖排快捷按钮（仅手机端显示） —— */
    .fab-locate {
        position: fixed; right: 12px; top: 50%; left: auto; bottom: auto; z-index: 1300;
        transform: translateY(-50%);
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
        width: 46px; padding: 14px 6px; border: 0; border-radius: 14px;
        background: var(--primary); color: #fff;
        font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1.15;
        box-shadow: 0 6px 20px rgba(224, 48, 30, .45);
        transition: background .15s, transform .1s;
    }
    .fab-locate:active { transform: translateY(-50%) scale(.94); background: var(--primary-dark); }
    .fab-locate svg { width: 22px; height: 22px; flex-shrink: 0; }
    .fab-locate span { writing-mode: vertical-rl; letter-spacing: 2px; }

    /* —— 报警提醒：居中弹窗（保持最高层级），手机端自适应 —— */
    .alarm-banner { padding: 12px; }
    /* —— 消息弹窗：抬到提醒条之上，两者不打架 —— */
    .msg-stack { right: 8px; left: 8px; bottom: 96px; width: auto; }

    /* —— 待分配提示：浮于上报按钮之上 —— */
    .map-pending {
        max-width: 92%;
        bottom: 78px;
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* 超窄屏（≤380px）进一步收紧，避免品牌卡与用户卡挤压 */
@media (max-width: 380px) {
    .float-brand { font-size: 12px; padding: 5px 8px; }
    .float-brand .fb-title { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
    .map-tools { top: 40px; }
    .map-tools .btn { padding: 3px 8px; font-size: 11px; }
    .map-search-bar { top: 44px; }
}

/* ================================================================== */
/* ================================================================== */
/* 在线消息：发消息编辑器 / 浮动弹窗 / 常用语句 / 提示音                      */
/* ================================================================== */

/* 在线人员面板姓名可点击 */
.u-msg-link { color: var(--tech-text); text-decoration: none; cursor: pointer; }
.u-msg-link:hover { color: var(--hover-text); text-decoration: underline; }

/* 发消息编辑器（模态） */
.msg-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 1300;
    background: rgba(15, 23, 42, 0.42);
    align-items: center; justify-content: center;
    padding: 16px;
}
.msg-modal {
    width: 100%; max-width: 460px;
    background: #fff;
    border: 1px solid var(--tech-line);
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(2, 8, 23, 0.28);
    overflow: hidden;
    animation: msgPop .18s ease-out;
}
@keyframes msgPop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.mm-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 16px; border-bottom: 1px solid var(--tech-line);
}
.mm-title { font-size: 16px; font-weight: 700; color: var(--tech-text); }
.mm-close {
    border: none; background: transparent; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--tech-sub);
    width: 28px; height: 28px; border-radius: 6px;
}
.mm-close:hover { background: #f1f5f9; color: var(--tech-text); }
.mm-to { padding: 10px 16px; font-size: 14px; color: var(--tech-text); }
.mm-online {
    display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px;
    font-size: 12px; color: #1d9a41; background: rgba(29, 154, 65, 0.12);
}
.mm-text {
    display: block; width: 100%; box-sizing: border-box;
    min-height: 112px; resize: vertical;
    margin: 4px 0 0; padding: 10px 12px;
    border: 1px solid var(--tech-line); border-radius: 8px;
    font: inherit; font-size: 14px; color: var(--tech-text); background: #fbfdff;
    outline: none;
}
.mm-text:focus { border-color: var(--tech-cyan); background: #fff; }
.mm-count { text-align: right; font-size: 12px; color: var(--tech-sub); padding: 2px 16px 0; }
.mm-phrases-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px 4px; font-size: 13px; font-weight: 600; color: var(--tech-text);
}
.mm-manage-btn {
    border: none; background: transparent; color: var(--tech-cyan);
    font-size: 12px; cursor: pointer; padding: 2px 6px;
}
.mm-phrases {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 4px 16px 10px; max-height: 150px; overflow: auto;
}
.mm-chip {
    display: inline-block; padding: 6px 11px; border-radius: 16px;
    border: 1px solid var(--tech-line); background: rgba(22, 119, 255, 0.06);
    color: var(--tech-text); font-size: 13px; cursor: pointer; user-select: none;
    white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.mm-chip:hover { background: rgba(22, 119, 255, 0.14); }
.mm-chip.global { background: rgba(22, 119, 255, 0.12); border-color: var(--tech-cyan); color: var(--tech-cyan); }
.mm-manage {
    border-top: 1px dashed var(--tech-line); padding: 10px 16px; margin-top: 2px;
    background: #f8fafc;
}
.mm-manage-list { max-height: 150px; overflow: auto; margin-bottom: 8px; }
.mm-manage-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 5px 0; font-size: 13px; color: var(--tech-text);
    border-bottom: 1px solid #f0f2f5;
}
.mm-mr-text.global { color: var(--tech-cyan); }
.mm-tag { font-style: normal; font-size: 11px; color: var(--tech-cyan); }
.mm-mr-del {
    border: none; background: transparent; color: var(--danger);
    font-size: 12px; cursor: pointer; white-space: nowrap;
}
.mm-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#mmPhraseInput {
    flex: 1; min-width: 140px; box-sizing: border-box;
    border: 1px solid var(--tech-line); border-radius: 8px;
    padding: 7px 10px; font: inherit; font-size: 13px; color: var(--tech-text); outline: none;
}
#mmPhraseInput:focus { border-color: var(--tech-cyan); }
.mm-global { font-size: 12px; color: var(--tech-sub); }
.mm-add-btn, .mm-send {
    border: none; background: var(--tech-cyan); color: #fff;
    border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mm-add-btn:hover, .mm-send:hover { background: #0f63e6; }
.mm-actions { padding: 12px 16px 16px; }
.mm-send { width: 100%; padding: 11px; font-size: 15px; }
.mm-send:disabled { opacity: .6; cursor: default; }

/* 浮动弹窗（接收方） */
.msg-stack {
    position: fixed; right: 16px; bottom: 16px; z-index: 1350;
    display: flex; flex-direction: column; gap: 12px;
    width: min(92vw, 340px); pointer-events: none;
}
.msg-popup {
    pointer-events: auto;
    background: #fff; border: 1px solid var(--tech-line);
    border-left: 3px solid var(--tech-cyan); border-radius: 12px;
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.2);
    overflow: hidden;
    transform: translateX(24px); opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}
.msg-popup.show { transform: none; opacity: 1; }
.mp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f0f2f5; }
.mp-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.mp-meta { flex: 1; min-width: 0; }
.mp-name { font-weight: 700; font-size: 14px; color: var(--tech-text); }
.mp-time { font-size: 11px; color: var(--tech-sub); margin-top: 2px; }
.mp-close {
    border: none; background: transparent; cursor: pointer;
    font-size: 18px; line-height: 1; color: var(--tech-sub);
    width: 24px; height: 24px; border-radius: 6px; flex: none;
}
.mp-close:hover { background: #f1f5f9; color: var(--tech-text); }
.mp-body {
    padding: 10px 12px; font-size: 14px; line-height: 1.6; color: var(--tech-text);
    white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow: auto;
}
.mp-foot { padding: 0 12px 10px; }
.mp-reply {
    border: none; background: transparent; color: var(--tech-cyan);
    font-size: 13px; cursor: pointer; padding: 2px 0;
}
.mp-reply:hover { text-decoration: underline; }
/* 新消息浮层：审核类通知可直接点进对应的审核内容 */
.mp-open {
    border: 1px solid rgba(224, 48, 30, .28); background: rgba(224, 48, 30, .06);
    color: #d4380d; font-size: 12.5px; font-weight: 700; cursor: pointer;
    padding: 3px 10px; border-radius: 6px; margin-right: 12px;
}
.mp-open:hover { background: rgba(224, 48, 30, .12); }

/* 发送成功轻提示 */
.msg-toast {
    position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 1400;
    background: rgba(15, 23, 42, 0.9); color: #fff;
    padding: 8px 16px; border-radius: 20px; font-size: 13px;
    box-shadow: 0 8px 24px rgba(2, 8, 23, 0.3);
}

@media (max-width: 640px) {
    .msg-stack { right: 10px; left: 10px; bottom: 10px; width: auto; }
    .msg-popup { width: 100%; }
    .msg-overlay { padding: 10px; }
    .msg-modal { max-width: none; }
}

/* 超窄屏（≤380px）进一步收紧 */
@media (max-width: 380px) {
    .mm-to { font-size: 13px; }
    .mm-phrases { gap: 6px; }
    .mm-chip { font-size: 12px; padding: 5px 9px; }
}

/* ==================================================================
   信息窗关闭按钮 + 一键报警（红色扩散水波纹 / 提醒条）
   ================================================================== */

/* 后台卡片头部（标题 + 右侧操作区）；此前只有语义没有样式 */
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px; margin-bottom: 10px;
}

/* 信息窗关闭按钮（天地图 InfoWindow 默认无关闭入口，自行注入） */
.iw-root { position: relative; }
/* 天地图 InfoWindow 容器内样式加固：确保 .iw 弹窗卡片视觉完整 */
.tdt-info-window,
.tdt-infowindow,
.tdt-info-win {
    max-width: 360px !important;
}
.tdt-info-window .iw-root,
.tdt-infowindow .iw-root,
.tdt-info-win .iw-root {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.iw-close {
    position: absolute; top: 6px; right: 6px; z-index: 5;
    width: 26px; height: 26px; line-height: 24px; text-align: center;
    border: 1px solid var(--tech-line, rgba(22, 119, 255, .18));
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #6b7280; font-size: 18px; cursor: pointer;
    padding: 0; box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}
.iw-close:hover { background: var(--hover-danger-bg); color: var(--danger); border-color: rgba(215, 38, 61, .35); }

/* ── 信息窗下方独立「关闭」按钮（浮动定位，不在内容框内）── */
#map-iw-close-btn {
    position: absolute; z-index: 1005;
    display: none; align-items: center; gap: 4px;
    padding: 6px 18px;
    border: 1px solid rgba(156, 163, 175, .35);
    border-radius: 20px;
    background: rgba(255, 255, 255, .92);
    color: #374151; font-size: 13px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all .18s ease;
    white-space: nowrap;
}
#map-iw-close-btn:hover {
    background: #fff;
    border-color: var(--danger);
    color: var(--danger);
    box-shadow: 0 3px 12px rgba(215, 38, 61, .2);
}
#map-iw-close-btn span:first-child {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; line-height: 14px;
    font-size: 14px; font-weight: 700;
}
/* 关闭按钮尚未注入头部时（降级为绝对定位），给标题栏右侧留出位置，避免压住「编辑」 */
.iw-root .iw-head { padding-right: 38px; }
.iw-root .iw-body > .iw-sec:first-child { padding-top: 4px; }
/* 已注入头部时：作为 flex 末位元素排列，与「编辑」并列，永不重叠 */
.iw-root.iw-close-inhead .iw-head { padding-right: 14px; }
.iw-head > .iw-close {
    position: static;
    flex: 0 0 auto;
    margin-left: auto;
    width: 24px; height: 24px; line-height: 22px; font-size: 17px;
}

/* 一键报警按钮（仅信息窗内，限定 .iw-root 作用域，避免撑满全站危险按钮） */
.iw-root .btn-danger {
    display: block; width: 100%; text-align: center;
    background: linear-gradient(135deg, #ff3b30, #d7263d);
    color: #fff !important; border: 1px solid #d7263d; border-radius: 8px;
    padding: 9px 12px; font-weight: 600; font-size: 13px; text-decoration: none;
    box-shadow: 0 4px 12px rgba(215, 38, 61, .22);
}
.iw-root .btn-danger:hover { filter: brightness(1.06); }
.iw-alarm-on {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    background: #fff1f0; border: 1px solid #ffccc7; border-radius: 8px;
    padding: 7px 9px; margin-bottom: 6px;
}
.iw-alarm-on b { color: #d7263d; }
.iw-alarm-dot {
    width: 9px; height: 9px; border-radius: 50%; background: #ff3b30;
    box-shadow: 0 0 0 0 rgba(255, 59, 48, .7); animation: alarmPulse 1.2s infinite;
}
@keyframes alarmPulse {
    70% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* 地图上的红色扩散水波纹（地震波效果） */
.alarm-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 620; }
.alarm-ripple { position: absolute; width: 0; height: 0; }
.alarm-ripple i {
    position: absolute; left: 0; top: 0;
    width: 30px; height: 30px; margin: -15px 0 0 -15px;
    border-radius: 50%;
    border: 3px solid rgba(255, 59, 48, .95);
    background: rgba(255, 59, 48, .22);
    animation: alarmWave 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}
.alarm-ripple i:nth-child(2) { animation-delay: .8s; }
.alarm-ripple i:nth-child(3) { animation-delay: 1.6s; }
@keyframes alarmWave {
    0%   { transform: scale(.25); opacity: .95; }
    70%  { opacity: .35; }
    100% { transform: scale(4.6); opacity: 0; }
}
.alarm-core {
    position: absolute; left: 0; top: 0;
    width: 22px; height: 22px; margin: -11px 0 0 -11px;
    border-radius: 50%; background: #ff3b30; color: #fff;
    font-size: 14px; font-weight: 700; line-height: 22px; text-align: center;
    border: 2px solid #fff; box-shadow: 0 0 10px rgba(255, 59, 48, .8);
    animation: alarmCore 1.2s ease-in-out infinite;
}
@keyframes alarmCore {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.18); }
}

/* 报警提醒：页面居中 + 最高层级显示的醒目卡片（简明扼要、显著；管理员可直接确认复位） */
.alarm-banner {
    position: fixed; left: 0; top: 0; right: 0; bottom: 0;
    z-index: 3000;                       /* 最高层级：压过面板 / 消息弹窗 / 提示 */
    display: none; align-items: center; justify-content: center;
    pointer-events: none;                /* 遮罩不拦截地图操作，仅卡片本身可点 */
    padding: 18px;
}
.alarm-banner .ab-card {
    pointer-events: auto;
    width: min(94vw, 460px); max-height: 86vh; overflow: auto;
    background: #fff;
    border: 1px solid #ffc9c2; border-top: 6px solid #ff3b30;
    border-radius: 16px; padding: 16px 18px 14px;
    animation: alarmCardIn .3s cubic-bezier(.2, .9, .3, 1.25), alarmCardPulse 1.5s ease-in-out .3s infinite;
}
@keyframes alarmCardIn {
    from { opacity: 0; transform: translateY(14px) scale(.94); }
    to   { opacity: 1; transform: none; }
}
@keyframes alarmCardPulse {
    0%, 100% { box-shadow: 0 24px 70px rgba(215, 38, 61, .42), 0 0 0 5px rgba(255, 59, 48, .16); }
    50%      { box-shadow: 0 24px 70px rgba(215, 38, 61, .42), 0 0 0 13px rgba(255, 59, 48, 0); }
}
.alarm-banner .ab-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.alarm-banner .ab-head b { color: #d7263d; font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.alarm-banner .ab-dot {
    width: 11px; height: 11px; border-radius: 50%; background: #ff3b30; flex-shrink: 0;
    animation: abDotPulse 1.1s ease-out infinite;
}
@keyframes abDotPulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 48, .65); }
    100% { box-shadow: 0 0 0 13px rgba(255, 59, 48, 0); }
}
.alarm-banner .ab-count {
    margin-left: auto; font-size: 12px; font-weight: 700; color: #fff; background: #ff3b30;
    border-radius: 20px; padding: 3px 11px; white-space: nowrap;
}
.alarm-banner .ab-list { display: flex; flex-direction: column; gap: 10px; }
.alarm-banner .ab-item {
    border: 1px solid #ffe1dd; border-left: 4px solid #ff3b30;
    border-radius: 10px; padding: 9px 11px; background: #fff9f8;
}
.alarm-banner .ab-item.ab-sos { border-left-color: #e23b3b; background: #fff5f4; }
.alarm-banner .ab-row1 { display: flex; align-items: center; gap: 8px; }
.alarm-banner .ab-name {
    font-weight: 700; color: #0f172a; font-size: 15px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alarm-banner .ab-ago { margin-left: auto; color: #98a1ad; font-size: 12px; white-space: nowrap; }
.alarm-banner .ab-addr { margin-top: 4px; color: #5b6570; font-size: 12.5px; line-height: 1.5; word-break: break-word; }
.alarm-banner .ab-tag {
    background: #e23b3b; color: #fff; font-weight: 800; letter-spacing: .5px;
    border-radius: 6px; padding: 1px 8px; font-size: 12px; flex-shrink: 0;
}
.alarm-banner .ab-wait { margin-left: auto; color: #b06a00; font-size: 12px; }
.alarm-banner .ab-acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.alarm-banner .ab-btn {
    border: 0; border-radius: 8px; padding: 8px 14px;
    font-size: 13px; font-weight: 600; cursor: pointer; background: #eef1f4; color: #495057;
}
.alarm-banner .ab-loc:hover { background: #e2e6ea; }
.alarm-banner .ab-ack { margin-left: auto; background: #ff3b30; color: #fff; }
.alarm-banner .ab-ack:hover { filter: brightness(1.08); }
/* SOS 水波纹：更醒目的橙红色扩散（与项目报警红色波纹形成区分） */
.alarm-ripple.sos .alarm-core { background: #e23b3b; }

/* 报警提示 Toast */
.alarm-toast {
    position: fixed; left: 50%; top: 84px; transform: translateX(-50%);
    z-index: 2200; background: rgba(215, 38, 61, .96); color: #fff;
    padding: 10px 18px; border-radius: 8px; font-size: 13px;
    box-shadow: 0 6px 20px rgba(215, 38, 61, .35);
}

/* 手机端：提醒条让开左下角「上报位置」按钮，保证提醒仍完整可见 */
@media (max-width: 640px) {
    .alarm-banner { padding: 12px; }
    .alarm-banner .ab-card { width: 94vw; padding: 14px 15px 12px; }
    .alarm-banner .ab-head b { font-size: 17px; }
    .alarm-toast { top: 70px; }
    .iw-close { width: 30px; height: 30px; line-height: 28px; font-size: 20px; }
}

/* 导入比对预览表格 */
.rw-new  { background: rgba(22, 119, 255, .07); }
.rw-upd  { background: rgba(29, 154, 65, .07); }
.rw-skip { background: rgba(163, 18, 58, .07); }
.op-tag {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap;
}
.op-new    { background: #1677ff; color: #fff; }
.op-update { background: #1d9a41; color: #fff; }
.op-skip   { background: #a3123a; color: #fff; }
.chg { font-size: 12px; line-height: 1.5; color: #374151; }
.chg b { color: #1f2937; font-weight: 600; }
.chg-new { color: #1677ff; font-weight: 600; }
.rsn { font-size: 12px; color: #a3123a; margin-top: 2px; }

/* ============================================================
   快速派工：任务浮层（电脑端右下角浮动 / 手机端顶部独立显示）
   ============================================================ */
.task-float {
    position: absolute; right: 12px; bottom: 12px; z-index: 1003;
    width: 300px; max-width: calc(100vw - 24px);
    display: flex; flex-direction: column; gap: 0;
    max-height: 62vh; overflow: auto;
}
.task-float.is-mobile {
    position: fixed; top: 0; left: 0; right: 0; bottom: auto;
    width: 100%; max-width: 100%; z-index: 2000;
    max-height: none; border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    overflow: hidden;
}
.tf-head {
    background: var(--primary); color: #fff; padding: 8px 14px;
    border-radius: 8px 8px 0 0; font-weight: 700;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none;
    flex-shrink: 0;
}
.task-float.is-mobile .tf-head { border-radius: 0; }
.tf-title { display: flex; align-items: center; gap: 6px; }
.tf-toggle-icon { font-size: 11px; opacity: .85; transition: transform .2s; }
.tf-count { background: rgba(255,255,255,.28); border-radius: 10px; padding: 0 8px; font-size: 12px; }

/* 折叠/展开容器 */
.tf-body {
    overflow: hidden;
    transition: max-height .3s ease, opacity .25s ease;
    display: flex; flex-direction: column; gap: 8px;
    padding: 8px;
}
/* 折叠状态 */
.task-float:not(.tf-expanded) .tf-body {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0; padding-bottom: 0;
    margin: 0;
}
/* 展开状态 */
.task-float.tf-expanded .tf-body {
    max-height: 55vh;
    opacity: 1;
}
.tf-card {
    background: var(--tech-bg, #fff); border: 1px solid var(--tech-line, #e5e7eb);
    border-radius: 8px; padding: 9px 11px; box-shadow: var(--tech-glow, 0 4px 14px rgba(22,119,255,.18));
}
.tf-proj { font-weight: 700; color: var(--tech-cyan-2, #1677ff); margin-bottom: 3px; }
.tf-proj.tf-loc-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 3px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.tf-proj.tf-loc-btn:hover { color: #0d5fd9; }
.tf-loc-hint { font-size: 13px; opacity: .7; }
.tf-content { font-size: 13px; color: #1f2937; white-space: pre-wrap; word-break: break-word; }
.tf-meta { font-size: 11px; color: var(--tech-sub, #6b7280); margin: 5px 0 7px; }
.tf-done { width: 100%; }
.tf-foot { font-size: 11px; color: var(--tech-sub, #6b7280); text-align: center; padding: 2px; }

/* ============================================================
   快速派工：弹窗（管理员选择项目 / 预览最近在线人员 / 填工作内容）
   ============================================================ */
.dk-modal-mask {
    position: fixed; inset: 0; z-index: 3000;
    background: rgba(0,0,0,.45);
    display: flex; align-items: center; justify-content: center;
}
.dk-modal {
    background: #fff; width: min(460px, 92vw); border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.3); overflow: hidden;
}
.dk-modal-head {
    padding: 12px 16px; font-weight: 700; border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
}
.dk-modal-close { cursor: pointer; font-size: 20px; line-height: 1; color: #999; }
.dk-modal-body { padding: 14px 16px; max-height: 80vh; overflow: auto; }
.dk-field { margin-bottom: 12px; }
.dk-field label { display: block; font-weight: 600; margin-bottom: 5px; color: #374151; }
.dk-input {
    width: 100%; box-sizing: border-box; padding: 8px 10px;
    border: 1px solid #d0d7de; border-radius: 8px; font-size: 14px; font-family: inherit;
}
.dk-workers { margin: 6px 0 12px; min-height: 20px; }
.dk-wk-title { font-weight: 600; margin-bottom: 6px; color: #374151; }
.dk-wk {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px;
    border: 1px solid #eef0f3; border-radius: 8px; margin: 4px 0; cursor: pointer;
}
.dk-wk-name { font-weight: 600; }
.dk-wk-role { color: #6b7280; font-size: 12px; }
.dk-wk-dist { margin-left: auto; color: var(--primary); font-size: 12px; }
.dk-empty { color: #a3123a; font-weight: 600; }
.dk-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ============================================================
   项目信息配置 - 项目列表（卡片化重排，替代原 14 列宽表）
   ============================================================ */
.list-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.list-toolbar .lt-left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.list-toolbar .lt-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.input-search {
    width: 280px; max-width: 52vw; box-sizing: border-box;
    padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; font-family: inherit; background: #fff; color: var(--text);
}
.input-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.proj-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 880px) { .proj-list { grid-template-columns: 1fr; } }
.proj-card {
    border: 1px solid var(--border); border-radius: 12px; background: #fff;
    padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.proj-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary); }
.proj-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.proj-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.proj-id {
    flex: none; font-size: 12px; color: var(--text-sub);
    background: #f1f3f5; border-radius: 6px; padding: 1px 7px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}
.proj-name {
    font-size: 15px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    font-size: 11.5px; line-height: 1; padding: 4px 8px; border-radius: 6px;
    border: 1px solid transparent; white-space: nowrap;
}
.tag-blue   { background: var(--primary-soft); color: var(--primary); }
.tag-green  { background: var(--success-soft); color: var(--success); }
.tag-orange { background: var(--warn-soft); color: var(--warn); }
.tag-plain  { background: #f1f3f5; color: var(--text-sub); }

/* ── 项目卡片：左 缩略图 / 右 内容 ── */
.proj-body { display: flex; gap: 12px; align-items: flex-start; }
.proj-thumb {
    flex: none; width: 96px; height: 96px; border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border); background: #f1f3f5;
    display: flex; align-items: center; justify-content: center;
}
.proj-thumb.has-img { cursor: pointer; transition: opacity .15s ease; }
.proj-thumb.has-img:hover { opacity: .85; }
.proj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-thumb-empty { color: var(--text-sub); font-size: 11.5px; line-height: 1.5; text-align: center; }
.proj-body-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* 加了缩略图后右侧变窄，宽度不足时把信息区降为单列，避免挤压成省略号 */
@media (max-width: 1180px) { .proj-body-main .proj-meta { grid-template-columns: 1fr; } }

.proj-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; font-size: 12.5px; }
.proj-meta .pm { display: flex; gap: 6px; min-width: 0; }
.proj-meta .pm i { font-style: normal; color: var(--text-sub); flex: none; width: 48px; white-space: nowrap; }
.proj-meta .pm b { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.proj-meta .pm.pm-full { grid-column: 1 / -1; }
.proj-meta .pm b.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

.proj-card-actions {
    display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px;
    border-top: 1px solid var(--border); margin-top: auto;
}
.proj-card-actions .btn { flex: 0 0 auto; }
.proj-empty { margin-top: 8px; }

/* 批量操作栏 / 分页栏（项目信息配置 - 项目列表） */
.list-bulk {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 14px; padding: 10px 12px; background: #f7f9fc;
    border: 1px solid var(--border); border-radius: 10px;
}
.list-bulk .lb-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.list-bulk .btn-danger[disabled] { opacity: .5; cursor: not-allowed; }
.lb-tip { color: var(--text-sub); font-size: 12px; }

.list-pager {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border);
}
.lp-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-size { font-size: 13px; color: var(--text-sub); display: inline-flex; align-items: center; gap: 6px; }
.lp-size select { width: auto; }
.lp-cur { font-size: 13px; color: var(--text); min-width: 56px; text-align: center; }

/* 项目卡片多选框（覆盖全局 input 满宽规则） */
.proj-sel { width: auto; margin: 0 2px 0 0; flex: none; align-self: center; cursor: pointer; }

/* ===== 用户列表（卡片网格，每行 2 个） ===== */
.user-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 880px) { .user-list { grid-template-columns: 1fr; } }

.user-card {
    border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff;
    display: flex; flex-direction: column; gap: 12px;
}
.user-card-head { display: flex; align-items: center; gap: 10px; }
.user-card-head .u-sel { width: auto; margin: 0; flex: none; cursor: pointer; }
.user-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--border); }
.user-id { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.user-sub { font-size: 12px; color: var(--text-sub); }
.user-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.user-rows {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px; background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px;
}
.um-row { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.um-k { flex: 0 0 64px; color: var(--text-sub); }
.um-v { flex: 1; min-width: 0; word-break: break-all; }
.um-v.um-muted { color: var(--text-sub); }

.user-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
/* 调度组：无权操作的角色 → 按钮保留（点击提示无权限），视觉上置灰并给出说明 */
.user-actions.is-denied .btn {
    opacity: .5;
    cursor: not-allowed;
    filter: grayscale(.35);
}
.user-actions .ua-denied-tip {
    flex: 1 1 100%;
    font-size: 12px;
    color: #b0483c;
    background: #fdf3f2;
    border: 1px dashed #f0c7c1;
    border-radius: 8px;
    padding: 4px 8px;
    margin-top: 2px;
}

/* ── 按角色分类筛选条（2026-09-23 新增） ── */
.u-role-filter {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--border);
}
.u-role-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; border: 1px solid var(--border); border-radius: 999px;
    background: #fff; color: var(--text); font-size: 13px; font-family: inherit;
    line-height: 1; cursor: pointer;
    transition: background .13s ease, border-color .13s ease, color .13s ease;
}
.u-role-btn:hover { border-color: var(--primary); color: var(--primary); }
.u-role-btn.active,
.u-role-btn.active:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.u-role-btn.active .u-role-dot { background: #fff !important; }
.u-role-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.u-role-n { font-size: 12px; color: var(--text-sub); font-variant-numeric: tabular-nums; }
.u-role-btn.active .u-role-n { color: rgba(255, 255, 255, .85); }
.u-role-hint { margin-left: auto; font-size: 12px; color: var(--text-sub); }

/* ── 用户卡片默认折叠：仅显示 头像 / 姓名 / 电话 / 角色 / 状态；点头部展开 ── */
.user-card { transition: border-color .15s ease, box-shadow .15s ease; }
.user-card:hover { border-color: #ded4d2; box-shadow: var(--shadow); }
.user-card-head { cursor: pointer; user-select: none; -webkit-user-select: none; }
.user-caret {
    flex: none; width: 8px; height: 8px; margin: 0 3px 4px 4px;
    border-right: 2px solid #b3a9a6; border-bottom: 2px solid #b3a9a6;
    transform: rotate(-45deg); transition: transform .16s ease;
}
.user-card.is-collapsed .user-caret { transform: rotate(45deg); }
.user-card.is-collapsed .user-rows,
.user-card.is-collapsed .user-actions { display: none; }

/* ===== 浮动窗口（编辑 / 重置密码 / 执业证书） ===== */
.um-mask {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(15, 23, 42, .45);
    display: none; align-items: center; justify-content: center; padding: 16px;
}
.um-mask.open { display: flex; }
.um-modal {
    background: #fff; width: 100%; max-width: 460px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    animation: umPop .16s ease-out;
}
@keyframes umPop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.um-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.um-modal-head h3 { margin: 0; font-size: 16px; }
.um-modal-close {
    border: none; background: transparent; font-size: 22px; line-height: 1; cursor: pointer;
    color: var(--text-sub); padding: 0 4px;
}
.um-modal-close:hover { color: var(--text); }
.um-modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.um-modal-foot {
    padding: 12px 18px; border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
}
.um-info { display: flex; align-items: center; gap: 12px; }
.um-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); flex: none; }
.um-info-name { font-weight: 600; font-size: 15px; }
.um-info-sub { font-size: 12px; color: var(--text-sub); }
.um-read { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; }
.um-read .um-k { flex-basis: 64px; }

/* ===== 用户架构页（2026-09-24 改版：表格式 → 卡片式） ===== */
.arch-page { display: flex; flex-direction: column; gap: 16px; }

/* —— 架构总览卡 —— */
.card.arch-hero {
    display: flex; flex-wrap: wrap; gap: 18px 28px;
    align-items: center; justify-content: space-between;
    margin-bottom: 0; padding: 20px 22px;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, #fff 0%, #fdf7f6 100%);
}
.arch-hero-txt { flex: 1 1 460px; min-width: 260px; }
.arch-hero-title { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--text); }
.arch-hero-sub { margin: 0; font-size: 13px; line-height: 1.85; color: var(--text-sub); }
.arch-hero-sub b { color: var(--primary-dark); font-weight: 600; }

.arch-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.arch-stat { min-width: 84px; padding: 10px 14px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.arch-stat-n { display: block; font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; }
.arch-stat-l { display: block; margin-top: 3px; font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.arch-stat.is-primary { background: var(--primary-soft); border-color: #f2c7c1; }
.arch-stat.is-primary .arch-stat-n { color: var(--primary-dark); }
.arch-stat.is-warn { background: var(--warn-soft); border-color: #f2d7ac; }
.arch-stat.is-warn .arch-stat-n { color: #b26a12; }

/* —— 级别卡片区 —— */
.arch-board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; }
.arch-board-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.arch-hint { font-size: 12px; color: var(--text-sub); }

.arch-levels { display: flex; flex-direction: column; gap: 14px; }

/* 一张卡 = 一个级别 / 组别 */
.arch-lvcard {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 30, 50, .04);
}
.arch-lvcard::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: var(--lv, var(--primary));
}
.arch-lvcard-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer;
    padding: 14px 18px 14px 22px;
    background: linear-gradient(90deg, var(--lv-soft, rgba(47, 128, 237, .09)) 0%, rgba(255, 255, 255, 0) 62%);
}
.arch-lvcard-rank {
    flex: none; min-width: 48px; padding: 6px 10px; border-radius: 10px; text-align: center;
    background: var(--lv, var(--primary)); color: #fff;
    font-size: 15px; font-weight: 800; letter-spacing: .5px; font-variant-numeric: tabular-nums;
}
.arch-lvcard-tt { flex: 1 1 260px; min-width: 190px; }
.arch-lvcard-name { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.arch-lvcard-desc { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-sub); }
.arch-lvcard-metrics { display: flex; gap: 8px; flex: none; }
.arch-metric { min-width: 64px; padding: 6px 12px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.arch-metric-n { display: block; font-size: 17px; font-weight: 700; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.arch-metric-l { display: block; font-size: 11px; color: var(--text-sub); }
.arch-lvcard-toggle {
    flex: none; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff;
    font-size: 12px; color: var(--text-sub); user-select: none;
}
.arch-lvcard-head:hover .arch-lvcard-toggle { border-color: var(--lv, var(--primary)); color: var(--lv, var(--primary)); }

.arch-lvcard-body { padding: 4px 16px 16px 22px; }
.arch-lvcard.collapsed .arch-lvcard-body { display: none; }

/* 角色卡片网格 */
.arch-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 12px; }
.arch-rolecard {
    position: relative; padding: 12px 14px;
    background: #fcfdff; border: 1px solid var(--border); border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.arch-rolecard:hover {
    border-color: var(--lv, var(--primary)); transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(20, 30, 50, .08);
}
.arch-rc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.arch-rc-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.arch-rc-name { font-size: 14.5px; font-weight: 700; color: var(--text); }
.arch-rc-slug {
    padding: 1px 7px; border-radius: 6px; background: #f2f5f9; border: 1px solid #e6ebf2;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: #7d8798;
}
.arch-rc-num { margin-left: auto; flex: none; font-size: 12px; color: var(--text-sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
.arch-rc-num b { margin-right: 2px; font-size: 18px; font-weight: 700; color: var(--text); }
.arch-rolecard.is-zero .arch-rc-num b { color: #c9cfd9; }
.arch-rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.arch-rc-tag { padding: 2px 9px; border-radius: 999px; font-size: 12px; color: #4b5563; background: #eef2f7; border: 1px solid #e4e9ef; }
.arch-rc-tag.is-soft { background: #fff; border-style: dashed; color: var(--text-sub); }
.arch-rc-note { margin: 9px 0 0; font-size: 12px; line-height: 1.65; color: var(--text-sub); }

.arch-foot { display: flex; justify-content: flex-end; }

@media (max-width: 720px) {
    .arch-lvcard-head { padding: 12px 14px 12px 18px; }
    .arch-lvcard-body { padding: 2px 12px 14px 18px; }
    .arch-lvcard-metrics { width: 100%; }
    .arch-lvcard-toggle { margin-left: auto; }
    .arch-board-head { flex-wrap: wrap; }
}

/* ===== 平台配置类页面统一卡片化（2026-09-24，风格对齐用户架构） =====
   用法：在配置页把若干张 <div class="card"> 包进 <div class="cfg-page">，
        每张卡可用内联 style="--cfg:#xxxxxx" 指定自己的主题色（不写则用站点主色）。 */
.cfg-page { display: flex; flex-direction: column; gap: 16px; }

.cfg-page .card {
    position: relative; overflow: hidden;
    margin-bottom: 0; border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 30, 50, .04);
}
/* 左侧主题色竖条（与用户架构卡片同一视觉语言） */
.cfg-page .card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
    background: var(--cfg, var(--primary)); z-index: 2;
}
/* 卡头：负外边距出血到卡片边缘，配主题色短竖条 + 浅色渐变底 */
.cfg-page .card > h2:first-child {
    position: relative; isolation: isolate;
    display: flex; align-items: center; gap: 10px;
    margin: -20px -20px 16px; padding: 14px 18px 14px 24px;
    font-size: 16px; font-weight: 700; color: var(--text);
    border-bottom: 1px solid var(--border);
}
.cfg-page .card > h2:first-child::before {
    content: ''; flex: none; width: 6px; height: 18px; border-radius: 3px;
    background: var(--cfg, var(--primary));
}
.cfg-page .card > h2:first-child::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, var(--cfg, var(--primary)) 0%, rgba(255, 255, 255, 0) 62%);
    opacity: .09;
}
.cfg-page .card > .alert { margin-top: 0; }
.cfg-page > .card + .card { margin-top: 0; }
/* 与登录页配置的工具栏 / 标签栏共存：间距交给 .cfg-page 的 gap */
.cfg-page > .lp-toolbar, .cfg-page > .lp-tabs { margin-bottom: 0; }
@media (max-width: 720px) {
    .cfg-page .card > h2:first-child { padding: 12px 14px 12px 20px; font-size: 15px; }
}

/* ---------- 建筑消防设施维保 - 工作目录管理 ---------- */
.maint-head { margin-bottom: 14px; }
.maint-desc { background: var(--primary-soft); border: 1px solid var(--tech-line, #cfe2ff); color: #1f3a5f;
    padding: 10px 14px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; }
.maint-desc b { color: var(--primary-dark); }
.maint-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.maint-tab { display: inline-flex; align-items: center; padding: 9px 22px; border-radius: 10px 10px 0 0;
    background: #eef1f6; color: var(--text-sub); font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.maint-tab:hover { background: #e4e9f2; color: var(--text); text-decoration: none; }
.maint-tab.active { background: var(--panel); color: var(--primary); border-color: var(--border); border-bottom-color: var(--panel); box-shadow: var(--shadow); }
.maint-subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.maint-subtab { display: inline-flex; align-items: center; padding: 7px 16px; border-radius: 999px;
    background: #eef1f6; color: var(--text-sub); font-size: 13px; text-decoration: none; transition: all .12s; }
.maint-subtab:hover { background: #e4e9f2; color: var(--text); text-decoration: none; }
.maint-subtab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.maint-add-card { margin-bottom: 14px; }
.maint-add-card h3, .card > h3 { margin: 0 0 12px; font-size: 15px; }
.maint-form-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.maint-edit-inline { margin: 4px 0; }
.maint-add-inline { background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; }

/* 2 级：平铺显示，每行 3 项 */
.maint-l2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1100px) { .maint-l2-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .maint-l2-grid { grid-template-columns: 1fr; } }
.maint-l2-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.maint-l2-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.maint-l2-title { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; overflow: hidden; }
.maint-l2-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.maint-caret { border: 1px solid var(--border); background: var(--panel); color: var(--text); border-radius: 6px; width: 26px; height: 26px; line-height: 24px; font-size: 13px; cursor: pointer; padding: 0; transition: transform .15s ease, background .15s ease; flex-shrink: 0; }
.maint-caret:hover { background: var(--primary-soft, #eaf1fb); }
.maint-caret.open { background: var(--primary-soft, #eaf1fb); }
.maint-l2-body { margin-top: 8px; padding-left: 6px; border-left: 2px solid var(--border); }
.maint-l2-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.maint-l3-actions, .maint-con-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.maint-l2-remark { margin: 4px 0 2px; }
.maint-lv { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 5px; padding: 1px 6px; flex-shrink: 0; }
.maint-lv-sub { background: var(--tech-accent-purple, #7c3aed); }

/* 3 级：在对应 2 级卡片内显示为一行 */
.maint-l3-list { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.maint-l3-row { padding: 7px 0; border-bottom: 1px dashed #eef1f5; }
.maint-l3-row:last-child { border-bottom: none; }
.maint-l3-line { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.maint-l3-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.maint-l3-actions { flex-shrink: 0; margin-left: auto; }
.maint-l3-line .muted { width: 100%; }

/* 4 级：内容条目 */
.maint-content-list { margin: 6px 0 2px; }
.maint-content-item { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 5px 0;
    border-bottom: 1px dotted #eef1f5; }
.maint-content-item:last-child { border-bottom: none; }
.maint-con-title { font-weight: 600; color: var(--text); font-size: 13px; }
.maint-con-body { font-size: 12px; }
.maint-con-actions { margin-left: auto; }

/* ============ 项目维保信息配置页 ============ */
.maint-section { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px 16px; margin: 0 0 16px; background: var(--panel); }
.maint-section legend { font-weight: 700; font-size: 14px; color: var(--primary); padding: 0 8px; }
.maint-section .tip { margin: 2px 0 10px; }
.building-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 10px 0; background: #fbfcfe; }
.building-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.building-idx { font-weight: 700; font-size: 13px; color: var(--primary); }
#buildingList .building-card:first-child { margin-top: 0; }
#maintAddBuilding { margin-top: 4px; }
.maint-sel-summary { font-size: 13px; line-height: 1.6; padding: 6px 0; min-height: 20px; }
.maint-sel-group { margin-bottom: 8px; }
.maint-sel-group:last-child { margin-bottom: 0; }
.maint-sel-group-title { font-weight: 700; color: var(--primary); font-size: 12px; padding: 2px 0; }
.maint-sel-group-items { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.maint-sys-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; margin-top: 8px; }
.chk-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 6px; background: #fbfcfe; border: 1px solid var(--border); }
.chk-item:hover { background: var(--primary-soft, #eaf1fb); }
.chk-item input[type="checkbox"] { width: auto; margin: 0; }
@media (max-width: 720px) { .maint-sys-box { grid-template-columns: 1fr; } }

/* 维保人员多选弹窗（人员信息 - 4 类角色） */
.maint-picker { position: relative; }
.maint-picker-pop {
    position: absolute; z-index: 60; left: 0; top: 100%; margin-top: 6px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px; box-shadow: var(--shadow); min-width: 260px; max-width: 360px;
    max-height: 300px; overflow: auto;
}
.maint-picker-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.maint-picker-list label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.maint-picker-list label:hover { background: var(--primary-soft, #eaf1fb); }
.maint-picker-list input[type="checkbox"] { width: auto; margin: 0; }
.maint-picker-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }
.maint-chip { display: inline-block; background: var(--primary-soft, #eaf1fb); color: var(--primary); border-radius: 6px; padding: 2px 8px; font-size: 12px; line-height: 1.6; }

/* ---------- 工作内容统一排序管理（排序目录） ---------- */
.maint-sort-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.maint-sort-bar-bottom { margin-top: 2px; }
.maint-sort-sys { margin-bottom: 14px; }
.maint-sort-sys-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.maint-sort-sub { margin: 0 0 14px; padding-left: 10px; border-left: 2px solid var(--tech-line, #cfe2ff); }
.maint-sort-sub-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.maint-sort-list { list-style: decimal; margin: 0; padding-left: 26px; }
.maint-sort-row { display: flex; align-items: center; gap: 10px; background: var(--panel, #fff); border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; margin: 6px 0; }
.maint-sort-row.dragging { opacity: .45; box-shadow: 0 6px 16px rgba(20, 30, 50, .18); }
.maint-sort-handle { cursor: grab; color: var(--text-sub); font-size: 16px; user-select: none; flex: 0 0 auto; line-height: 1; }
.maint-sort-handle:active { cursor: grabbing; }
.maint-sort-star { flex: 0 0 14px; width: 14px; text-align: center; }
/* 标题与数字框必须用 .maint-sort-row 前缀提高特异性：
   全局 input[type=number]{width:100%} 为 (0,1,1)，裸类选择器 (0,1,0) 会被压过，
   导致输入框撑满整行、标题被挤成 0 宽而不可见。 */
.maint-sort-row .maint-sort-title { flex: 1 1 auto; min-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.maint-sort-row .maint-sort-input { flex: 0 0 76px; width: 76px; min-width: 0; text-align: center; padding: 5px 6px; }
.maint-sort-move { display: flex; gap: 4px; flex: 0 0 auto; }
.maint-sort-move .btn { padding: 4px 9px; line-height: 1; font-size: 12px; }
@media (max-width: 560px) {
    .maint-sort-row { flex-wrap: wrap; }
    .maint-sort-row .maint-sort-title { flex: 1 1 100%; order: 3; min-width: 0; margin-top: 2px; }
}

/* ========== 平台版权信息（常驻显示在四个角色前端页面底部 + 个人中心） ========== */
.site-copyright {
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-sub);
    padding: 10px 12px 6px;
    flex-shrink: 0;
    word-break: break-word;
}
.site-copyright a { color: var(--primary); text-decoration: none; }
.site-copyright a:hover { text-decoration: underline; }

/* ================================================================== */
/* 考勤模块                                                             */
/* ================================================================== */

/* 首页「考勤打卡」入口（与一键定位上报并列，绿色区分） */
.role-attend-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 13px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1f9d55 0%, #178a4a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(31, 157, 85, .22);
}
.role-attend-btn:active { opacity: .85; }
.role-attend-btn .ico { font-size: 18px; }

/* ---------- 考勤打卡页（移动端） ---------- */
.attend-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px 16px;
    margin: 12px;
    box-shadow: 0 4px 14px rgba(22, 119, 255, .08);
}
.attend-clock {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.attend-date {
    text-align: center;
    font-size: 13px;
    color: var(--text-sub);
    margin-top: 2px;
}
.attend-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
    padding: 9px 12px;
    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.attend-label { flex: 0 0 56px; font-size: 12px; color: var(--text-sub); }
.attend-val { flex: 1; min-width: 0; font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.5; }
.attend-loc-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.attend-loc-btn {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: none;
    border-radius: 10px;
    background: var(--primary-soft, #eaf1fb);
    color: var(--primary-dark, #1677ff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.attend-loc-btn:disabled { opacity: .6; cursor: default; }
.attend-range { font-size: 12px; color: var(--text-sub); }
.attend-range.in { color: #1f9d55; font-weight: 600; }
.attend-range.out { color: #e23c3c; font-weight: 600; }

.attend-photo-wrap { margin-top: 14px; }
.attend-photo {
    width: 100%;
    height: 160px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    overflow: hidden;
}
.attend-photo-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attend-photo-ph { font-size: 14px; }
.attend-photo-btn {
    margin-top: 10px;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.attend-photo-btn:active { background: #f1f5f9; }

.attend-actions { display: flex; gap: 12px; margin-top: 16px; }
.attend-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}
.attend-btn:disabled { opacity: .6; cursor: default; }
.attend-on  { background: linear-gradient(135deg, #1f9d55 0%, #178a4a 100%); }
.attend-off { background: linear-gradient(135deg, #ff8c42 0%, #f5731f 100%); box-shadow: 0 8px 18px rgba(245, 115, 31, .22); }

.attend-status {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
}
.attend-status.ok   { background: #eaf7f0; color: #1f9d55; border: 1px solid #bfe9d2; }
.attend-status.warn { background: #fff4ec; color: #d9660a; border: 1px solid #f6d3b0; }
.attend-st-sub { display: block; font-size: 12px; font-weight: 400; color: var(--text-sub); margin-top: 3px; }

.attend-today { margin: 4px 12px 12px; }
.attend-today h3 { font-size: 15px; margin: 0 0 10px; color: var(--text); }
.attend-rec {
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid #1f9d55;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 9px;
}
.attend-rec.warn { border-left-color: #f5731f; }
.attend-rec-head { display: flex; align-items: center; gap: 8px; }
.attend-rec-type { font-size: 14px; font-weight: 700; color: var(--text); }
.attend-rec-status {
    margin-left: auto;
    font-size: 12px; font-weight: 600;
    padding: 1px 9px; border-radius: 999px;
    background: #eaf7f0; color: #1f9d55;
}
.attend-rec.warn .attend-rec-status { background: #fff4ec; color: #d9660a; }
.attend-rec-time { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.attend-rec-addr { font-size: 12px; color: var(--text-sub); margin-top: 2px; word-break: break-word; }
.attend-rec-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.attend-rec-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; margin-top: 8px; border: 1px solid var(--border); display: block; }

/* 未开放考勤提示 */
.attend-denied {
    margin: 40px 20px;
    padding: 28px 22px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
}
.attend-denied-ico { font-size: 46px; }
.attend-denied h3 { margin: 12px 0 6px; font-size: 18px; color: var(--text); }
.attend-denied p { margin: 4px 0; font-size: 14px; color: var(--text-sub); }
.attend-denied-tip { font-size: 12px !important; }
.attend-denied .btn { margin-top: 16px; display: inline-block; }

/* ---------- 后台：考勤配置 ---------- */
.role-checks { display: flex; flex-wrap: wrap; gap: 10px; }
.role-check {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 400;
    padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fbfcfe; cursor: pointer; margin: 0;
}
.role-check input[type="checkbox"] { width: auto; margin: 0; }
.field-inline { display: flex; gap: 16px; flex-wrap: wrap; }
.field-inline .field { flex: 1 1 200px; min-width: 0; margin-bottom: 0; }

.attend-stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.attend-stat {
    flex: 1 1 0; min-width: 84px;
    text-align: center;
    padding: 12px 6px;
    border: 1px solid var(--border); border-radius: 10px;
    background: #fbfcfe;
}
.attend-stat .n { display: block; font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.attend-stat .l { display: block; font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.attend-stat.ok   { background: #eaf7f0; border-color: #bfe9d2; }
.attend-stat.ok .n { color: #1f9d55; }
.attend-stat.warn { background: #fff4ec; border-color: #f6d3b0; }
.attend-stat.warn .n { color: #d9660a; }
.attend-stat.err  { background: #fdecec; border-color: #f6c4c4; }
.attend-stat.err .n { color: #e23c3c; }

.attend-overview-list { display: flex; flex-direction: column; gap: 8px; }
.attend-ov-item {
    border: 1px solid var(--border); border-radius: 10px;
    padding: 9px 12px; background: #fff;
}
.attend-ov-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.attend-ov-user { font-size: 14px; font-weight: 600; color: var(--text); }
.attend-ov-type { font-size: 12px; color: var(--text-sub); }
.attend-ov-status {
    margin-left: auto;
    font-size: 12px; font-weight: 600;
    padding: 1px 9px; border-radius: 999px;
    background: #eaf7f0; color: #1f9d55;
}
.attend-ov-status.s-late, .attend-ov-status.s-early { background: #fff4ec; color: #d9660a; }
.attend-ov-status.s-abnormal { background: #fdecec; color: #e23c3c; }
.attend-ov-sub { font-size: 12px; color: var(--text-sub); margin-top: 4px; word-break: break-word; }

/* ---------------- 打卡页：策略徽标 / 记录策略名 ---------------- */
.attend-strategy {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 13px; color: var(--text-sub); margin-bottom: 8px;
}
.attend-strategy b { color: var(--text); }
.attend-mode {
    font-size: 11px; font-weight: 600; padding: 1px 9px; border-radius: 999px;
    background: #eef2f7; color: #475569;
}
.attend-mode-point { background: #eaf2ff; color: #2f80ed; }
.attend-mode-area  { background: #f3ecff; color: #8e44ad; }
.attend-mode-none  { background: #eaf7f0; color: #1f9d55; }
.attend-rec-st { font-size: 12px; color: #6b7280; background: #f1f5f9; padding: 1px 8px; border-radius: 999px; }
.attend-ov-st { font-size: 11px; color: #475569; background: #eef2f7; padding: 1px 7px; border-radius: 999px; }

/* ---------------- 后台：策略管理列表 ---------------- */
.attend-strategy-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.attend-strategy-item {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff;
}
.attend-strategy-item.off { opacity: .62; background: #fafafa; }
.asi-main { flex: 1; min-width: 240px; }
.asi-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asi-name { font-size: 15px; font-weight: 700; color: var(--text); }
.asi-disabled { font-size: 11px; color: #e23c3c; border: 1px solid #f6c4c4; background: #fdecec; padding: 1px 8px; border-radius: 999px; }
.asi-meta { font-size: 12px; color: var(--text-sub); margin-top: 4px; line-height: 1.6; word-break: break-word; }
.asi-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------- 后台：统计报表 ---------------- */
.attend-filter .field-inline { align-items: flex-end; }
.wb-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; border-radius: 8px; overflow: hidden; }
.wb-table th, .wb-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.wb-table th { background: #f5f7fa; color: var(--text-sub); font-weight: 600; white-space: nowrap; }
.wb-table tbody tr:hover { background: #fafbfc; }
.wb-table .c-warn { color: #d9660a; font-weight: 600; }
.wb-table .c-err  { color: #e23c3c; font-weight: 600; }
.attend-total td { background: #f5f7fa; font-weight: 700; }
.attend-stats-table th:nth-child(4), .attend-stats-table td:nth-child(4),
.attend-stats-table th:nth-child(5), .attend-stats-table td:nth-child(5),
.attend-stats-table th:nth-child(6), .attend-stats-table td:nth-child(6),
.attend-stats-table th:nth-child(7), .attend-stats-table td:nth-child(7),
.attend-stats-table th:nth-child(8), .attend-stats-table td:nth-child(8),
.attend-stats-table th:nth-child(9), .attend-stats-table td:nth-child(9) { text-align: center; }
.attend-detail-table .s-late, .attend-detail-table .s-early { color: #d9660a; font-weight: 600; }
.attend-detail-table .s-abnormal { color: #e23c3c; font-weight: 600; }
.attend-detail-table .s-normal { color: #1f9d55; }

/* 登录页吉祥物元数据（dx_uploads 记录展示） */
.mascot-meta { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.mascot-meta .mm-title { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.mascot-meta-table { max-width: 460px; }
.mascot-meta-table th { width: 120px; color: var(--muted); font-weight: 600; background: #fafbfc; }

/* 登录页吉祥物图库（多图网格 + 缩略图 + 删除） */
.mascot-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.mascot-gallery:empty { margin-top: 0; }
.mascot-thumb { position: relative; width: 120px; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 1px 3px rgba(20,40,70,.08); }
.mascot-thumb img { display: block; width: 100%; height: 140px; object-fit: contain; background: #fff; }
.mascot-thumb .mascot-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; line-height: 20px; text-align: center; padding: 0; border: 0; border-radius: 50%; background: rgba(220,53,69,.92); color: #fff; font-size: 15px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.mascot-thumb .mascot-del:hover { background: #c82333; }
.mascot-thumb .mascot-cap { padding: 6px 8px; font-size: 11px; color: var(--muted); line-height: 1.35; word-break: break-all; border-top: 1px solid var(--border); }

/* ================ 后台：登录页面配置（标签页 + 列表编辑器） ================ */
.lp-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; margin-bottom: 14px; background: #f3f6fa; border: 1px solid var(--border); border-radius: 12px; }
.lp-tab { appearance: none; border: 0; background: transparent; color: var(--text-sub); font-size: 13px; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.lp-tab:hover { background: #e7edf4; color: var(--text); }
.lp-tab.is-active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(20,40,70,.12); }
.lp-panel { display: none; }
.lp-panel.is-active { display: block; }
.lp-panel .card + .card { margin-top: 14px; }

/* 登录页面配置 · 手机预览工具栏 + 弹窗 */
.lp-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.lp-toolbar .tip { margin: 0; }

.nf-prev-mask { position: fixed; inset: 0; z-index: 9999; background: rgba(15,23,36,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.nf-prev-mask[hidden] { display: none; }
.nf-prev-box { width: 438px; max-width: 100%; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; display: flex; flex-direction: column; }
.nf-prev-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-sub); background: #f7f9fc; }
.nf-prev-ops { display: flex; gap: 8px; }
.nf-prev-phone { background: #0c0f14; padding: 16px; display: flex; justify-content: center; }
.nf-prev-phone iframe { width: 390px; height: 760px; max-width: 100%; border: 0; border-radius: 28px; background: #fff; box-shadow: 0 0 0 9px #0c0f14, 0 0 0 12px #2a3340; }
@media (max-width: 480px) {
    .nf-prev-phone iframe { height: 70vh; }
}

/* 列表编辑器（能力胶囊 / 产品功能 / 调度流程 / 适用场景 / 帮助中心 / 工具条 / 页脚） */
.lp-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; }
.lp-row { display: flex; gap: 8px; align-items: center; background: #fafbfc; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; }
.lp-row .lp-grip { cursor: grab; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 2px; user-select: none; }
.lp-row .lp-grip:active { cursor: grabbing; }
.lp-row input[type=text], .lp-row input.lp-text { flex: 1; min-width: 80px; }
.lp-row textarea { flex: 1; min-width: 160px; resize: vertical; }
/* 行内小控件用两段式选择器压过全局 input 特异性 */
.lp-row.lp-row input[type=text], .lp-row.lp-row input.lp-text, .lp-row.lp-row textarea { margin: 0; }
.lp-row .lp-fixed { font-size: 12px; color: var(--muted); background: #eef2f7; border: 1px dashed var(--border); border-radius: 8px; padding: 7px 10px; min-width: 120px; text-align: center; }
.lp-row .lp-del { flex: 0 0 auto; }
.lp-row-head { display: flex; gap: 8px; font-size: 12px; color: var(--muted); margin: 2px 0 4px; }
.lp-row-head .lp-col { flex: 1; min-width: 80px; }
.lp-row-head .lp-col.lp-col-fixed { min-width: 120px; text-align: center; }
.lp-list-actions { margin-top: 8px; }
.lp-hint { font-size: 12px; color: var(--muted); margin: 4px 0 10px; line-height: 1.6; }
.lp-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 14px 0 6px; }

/* ------------------------------------------------------------------ */
/* 地图页浮动提示条（一次性 flash 消息，如「无权访问该页面」）          */
/* ------------------------------------------------------------------ */
.map-flash {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9000;
    width: max-content;
    max-width: min(520px, 86vw);
    transition: opacity .55s ease;
}
.map-flash .alert {
    margin: 0;
    box-shadow: 0 10px 26px rgba(20, 33, 61, .18);
}
@media (max-width: 900px) {
    .map-flash { top: 64px; max-width: 92vw; }
}



