/* ===== 方案B · 亮色商务风 数据大屏 ===== */
* { margin:0; padding:0; box-sizing:border-box; }
html,body { width:100%; height:100%; overflow:hidden; background:#eef2f8; color:#22344e;
  font-family:"Microsoft YaHei","PingFang SC","Segoe UI",sans-serif; user-select:none; }

/* 视口：把 1920x1080 的 stage 等比缩放到任意屏幕 */
.vp { position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:#eef2f8; }
.stage { width:1920px; height:1080px; transform-origin:center center; background:#eef2f8;
  display:flex; flex-direction:column; padding:0; }

/* 顶栏（白底软阴影） */
.header { height:92px; flex:none; background:#fff; display:flex; align-items:center; gap:20px;
  padding:0 44px; box-shadow:0 2px 12px rgba(34,52,78,.08); position:relative; z-index:2; }
.logo { width:44px; height:44px; border-radius:12px; flex:none;
  background:linear-gradient(135deg,#3b6ef5,#6d8dff); display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:22px; font-weight:700; }
.h-left { display:flex; gap:16px; align-items:center; }
.h-text { display:flex; flex-direction:column; }
.h-title { font-size:28px; font-weight:700; letter-spacing:2px; color:#22344e; }
.h-sub { font-size:14px; color:#8194ad; margin-top:3px; }
.clock { text-align:right; font-size:15px; color:#8194ad; margin-left:auto; line-height:1.35; }
.clock b { display:block; font-size:22px; color:#22344e; letter-spacing:1px; }

/* 徽标 */
.badge { font-size:13px; padding:5px 14px; border-radius:20px; background:#f0f4fa; color:#5d7191; letter-spacing:1px; white-space:nowrap; }
.badge.live { background:#e8f7f0; color:#2f9e6e; }
.badge.warn { background:#fff6e5; color:#b26205; }

/* 主体 */
.page { flex:1; display:flex; flex-direction:column; gap:20px; padding:22px 44px; min-height:0; }
.row2 { flex:1; display:grid; grid-template-columns:1.5fr 1fr; gap:20px; min-height:0; }
.col1 { display:flex; flex-direction:column; gap:20px; min-height:0; }

/* 卡片 */
.panel { background:#fff; border-radius:16px; padding:20px 24px; box-shadow:0 4px 16px rgba(34,52,78,.06);
  display:flex; flex-direction:column; min-height:0; }
.panel.grow { flex:1; }
.g-title { font-size:17px; font-weight:700; color:#22344e; margin-bottom:4px; display:flex; align-items:center; }
.g-title::before { content:""; width:4px; height:16px; border-radius:2px; background:#3b6ef5; margin-right:8px; }
.g-tag { margin-left:auto; font-weight:400; font-size:13px; color:#8194ad; letter-spacing:0; }
.g-tag.live-tag { color:#3b6ef5; }
.g-tag.live-tag::before { content:"● "; }

/* KPI 卡（白卡内多列） */
.kpi-band { display:grid; grid-template-columns:repeat(4,1fr); gap:0; flex:none; background:#fff;
  border-radius:16px; padding:20px 12px; box-shadow:0 4px 16px rgba(34,52,78,.06); }
.kpi { text-align:center; padding:4px 10px; border-right:1px solid #eef2f8; position:relative; }
.kpi:last-child { border-right:none; }
.kpi .ico { font-size:22px; margin-bottom:2px; }
.kpi .num { font-size:40px; font-weight:800; letter-spacing:-1px; line-height:1.05; color:#22344e;
  font-family:"Arial Narrow","DIN Alternate",sans-serif; }
.kpi .num span { font-size:15px; font-weight:400; color:#8194ad; margin-left:4px; }
.kpi-band.sm .kpi .num { font-size:34px; }
.kpi .lab { font-size:14px; color:#8194ad; margin-top:3px; }
.kpi .delta { font-size:13px; margin-top:4px; color:#93a3ba; }
.up { color:#e5484d; } .down { color:#2f9e6e; } .warn { color:#b26205; }

/* 图表 */
.chart { flex:1; width:100%; min-height:0; margin-top:8px; }
.chart svg { width:100%; height:100%; display:block; }
.tick { fill:#93a3ba; font-size:12px; font-family:"Microsoft YaHei",sans-serif; }
.grid-l { stroke:#eef2f8; stroke-width:1; }
.axis-l { stroke:#e4eaf3; stroke-width:1; }
.legend { display:flex; gap:18px; font-size:13px; color:#7d8da5; margin-top:6px; }
.legend i { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:middle; }
.seg { display:flex; gap:8px; margin-left:auto; }
.seg button { font:inherit; font-size:14px; padding:6px 18px; border-radius:20px; cursor:pointer;
  background:#f0f4fa; border:0; color:#5d7191; transition:.15s; }
.seg button:hover { color:#22344e; }
.seg button.on { background:#3b6ef5; color:#fff; font-weight:600; }

/* 相机卡片（入侵） */
.cam-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin-top:10px; overflow:auto; }
.cam-grid.big { grid-template-columns:repeat(3,1fr); }
.cam { border-radius:12px; padding:12px 14px; background:#f6f9fd; border:1px solid #eaf0f8; position:relative; overflow:hidden; }
.cam::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:#3b6ef5; }
.cam.off::before { background:#e5484d; }
.cam .c-name { font-size:14px; color:#3d4f6b; padding-right:56px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cam .c-num { font-size:30px; font-weight:800; margin:4px 0 2px; color:#3b6ef5; letter-spacing:-1px; }
.cam .c-sub { font-size:12px; color:#93a3ba; }
.cam .c-state { position:absolute; top:12px; right:12px; font-size:11px; padding:2px 9px; border-radius:10px; }
.cam .on { background:#e8f7f0; color:#2f9e6e; }
.cam .off { background:#fdebec; color:#e5484d; }
.cam-empty { color:#93a3ba; font-size:13px; padding:14px; text-align:center; }

/* 报警流 */
.feed { margin-top:8px; display:flex; flex-direction:column; gap:2px; overflow:auto; flex:1; }
.feed-item { display:flex; gap:12px; padding:11px 6px; border-bottom:1px solid #f1f4f9; font-size:14px; align-items:center; }
.feed-item:last-child { border-bottom:none; }
.fd-time { color:#93a3ba; font-size:13px; width:48px; flex:none; }
.fd-dot { width:9px; height:9px; border-radius:50%; flex:none; }
.fd-dot.hot { background:#e5484d; }
.fd-dot.muted { background:#ffb35c; }
.fd-dot.done { background:#2f9e6e; }
.fd-txt { color:#3d4f6b; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fd-txt b { color:#22344e; font-weight:600; }
.fd-tag { font-size:12px; padding:3px 10px; border-radius:6px; font-weight:600; flex:none; }
.fd-tag.muted { background:#fff6e5; color:#b26205; }
.fd-tag.done { background:#e8f7f0; color:#2f9e6e; }
.fd-tag.hot { background:#fdebec; color:#e5484d; }
.fd-empty { color:#93a3ba; font-size:13px; padding:14px; text-align:center; }

/* 人脸抓拍网格 */
.fc-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:8px; overflow:auto; flex:1; align-content:start; }
.fc-grid.big { grid-template-columns:repeat(4,1fr); }
.fc { border-radius:12px; overflow:hidden; background:#f6f9fd; border:1px solid #eaf0f8; position:relative; aspect-ratio:1/1; }
.fc img { width:100%; height:100%; object-fit:cover; display:block; }
.fc .fc-ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#c3d2f7; font-size:34px; background:#f6f9fd; }
.fc .fc-bar { position:absolute; left:0; right:0; bottom:0; padding:6px 9px; display:flex; justify-content:space-between; align-items:center; gap:6px;
  background:linear-gradient(transparent, rgba(245,248,252,.92)); }
.fc .fc-name { font-size:13px; color:#22344e; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fc .fc-name.unk { color:#8194ad; font-weight:400; }
.fc .fc-sc { font-size:11px; color:#2f9e6e; flex:none; }
.fc .fc-time { position:absolute; top:6px; left:7px; font-size:11px; color:#22344e; background:rgba(255,255,255,.85); padding:1px 7px; border-radius:8px; }

/* 实时画面 */
.shot { position:relative; margin-top:8px; border-radius:12px; overflow:hidden; flex:1; background:#f6f9fd;
  border:1px solid #eaf0f8; display:flex; align-items:center; justify-content:center; min-height:120px; }
.shot img { width:100%; height:100%; object-fit:cover; display:block; }
.shot .shot-ph { color:#c3d2f7; font-size:14px; }
.shot .tag { position:absolute; left:10px; bottom:8px; font-size:12px; padding:3px 10px; border-radius:9px; background:rgba(255,255,255,.85); color:#5d7191; }

/* 圆环仪表 */
.gauge-wrap { display:flex; flex-direction:column; align-items:center; gap:16px; padding:8px; }
.gauge { width:210px; height:210px; }
.gauge svg { width:100%; height:100%; }
.fc-legend { display:flex; gap:34px; font-size:16px; color:#5d7191; }
.fc-legend b { color:#22344e; margin-left:8px; font-size:20px; }
.fc-legend .dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:7px; vertical-align:middle; }
.fc-legend .dot.k { background:#3b6ef5; }
.fc-legend .dot.u { background:#c3d2f7; }
.fc-bar-track { width:100%; height:14px; border-radius:8px; background:#eef2f8; overflow:hidden; }
.fc-bar-known { height:100%; width:0; background:linear-gradient(90deg,#6d8dff,#3b6ef5); transition:width .6s ease; }

/* ===== 入口选择器（三模块） ===== */
.launcher { flex:1; display:flex; gap:34px; align-items:center; justify-content:center; }
.lc-card { width:400px; height:470px; border-radius:26px; padding:40px 32px; text-decoration:none;
  background:#fff; border:1px solid #e4eaf3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px;
  box-shadow:0 8px 30px rgba(34,52,78,.08); transition:.25s; }
.lc-card:hover { transform:translateY(-10px); border-color:#3b6ef5; box-shadow:0 24px 50px -20px rgba(59,110,245,.4); }
.lc-icon { font-size:88px; line-height:1; }
.lc-title { font-size:34px; font-weight:800; letter-spacing:4px; color:#22344e; }
.lc-desc { font-size:15px; color:#8194ad; text-align:center; line-height:1.7; }
.lc-go { margin-top:6px; font-size:16px; font-weight:700; letter-spacing:2px; color:#3b6ef5; }

/* 登录 */
.login-mask { position:fixed; inset:0; z-index:50; display:flex; align-items:center; justify-content:center;
  background:rgba(238,242,248,.86); backdrop-filter:blur(8px); }
.login-mask.hidden { display:none; }
.login-card { width:min(380px,88vw); background:#fff; border:1px solid #e4eaf3; border-radius:18px; padding:30px 28px;
  box-shadow:0 30px 80px -30px rgba(34,52,78,.4); text-align:center; }
.lc-logo { font-size:24px; font-weight:800; letter-spacing:4px; color:#3b6ef5; }
.lc-sub { font-size:13px; color:#8194ad; margin:6px 0 22px; letter-spacing:1px; }
.lg-input { width:100%; height:46px; border:1px solid #e4eaf3; background:#f6f9fd; border-radius:12px; padding:0 14px;
  font-size:14px; color:#22344e; box-sizing:border-box; outline:none; margin-bottom:12px; }
.lg-input:focus { border-color:#3b6ef5; background:#fff; }
.lg-btn { width:100%; height:46px; border:0; border-radius:12px; cursor:pointer; font-size:15px; font-weight:700;
  color:#fff; background:linear-gradient(90deg,#3b6ef5,#6d8dff); letter-spacing:2px; }
.lg-err { color:#e5484d; font-size:13px; min-height:18px; margin-top:12px; }
.lg-hint { color:#93a3ba; font-size:12px; margin-top:14px; line-height:1.6; }

/* Toast */
.toast { position:fixed; left:50%; bottom:40px; transform:translateX(-50%) translateY(20px);
  background:#22344e; color:#fff; padding:12px 22px; border-radius:12px; font-size:14px; opacity:0; pointer-events:none; transition:.25s; z-index:60; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* 滚动条 */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-thumb { background:rgba(34,52,78,.18); border-radius:3px; }

/* ================= 客流大屏（参考图版式） ================= */
.head-right { margin-left:auto; display:flex; align-items:center; gap:18px; }
.ptabs { display:flex; background:#eef2f8; border-radius:999px; padding:4px; gap:2px; }
.ptabs button { border:0; background:transparent; color:#5d7191; font-size:14px; padding:6px 18px; border-radius:999px; cursor:pointer; font-family:inherit; }
.ptabs button.on { background:#3b6ef5; color:#fff; font-weight:600; }

.ff-page { gap:14px; padding:16px 30px; }

.kpi6 { display:grid; grid-template-columns:repeat(6,1fr); gap:14px; flex:none; }
.kcard { background:#fff; border-radius:12px; box-shadow:0 2px 10px rgba(34,52,78,.05); padding:12px 16px 10px; display:flex; flex-direction:column; gap:2px; }
.kcard .ico { font-size:17px; }
.kcard .kv { display:flex; align-items:baseline; gap:5px; }
.kcard .kv b { font-size:32px; font-weight:800; color:#22344e; line-height:1.15; letter-spacing:-.5px; }
.kcard .unit { font-style:normal; font-size:13px; color:#8194ad; }
.kcard .lab { font-size:13px; color:#8194ad; }
.kcard .delta { font-size:12px; font-weight:600; margin-top:2px; }
.delta.up { color:#e5484d; }
.delta.down { color:#2f9e6e; }
.delta.good { color:#2f9e6e; }
.delta.bad { color:#e5484d; }

.ff-row2 { flex:1.45; display:grid; grid-template-columns:1.62fr 1fr; gap:14px; min-height:0; }
.ff-row3 { flex:1; display:grid; grid-template-columns:1fr 1fr 1.18fr; gap:14px; min-height:0; }
.ff-page .panel { display:flex; flex-direction:column; min-height:0; }
.g-title-row { display:flex; align-items:center; justify-content:space-between; flex:none; }
.g-title-row .g-title { margin-bottom:0; }
.g-title-row .legend { margin-top:0; }

.rank-list { flex:1; overflow:auto; padding-top:8px; }
.rank-item { display:flex; align-items:center; gap:10px; padding:9px 0; }
.rk-badge { flex:none; width:22px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:#fff; background:#b9c8e6; }
.rk-badge.r1 { background:#f68c1f; }
.rk-badge.r2 { background:#3b6ef5; }
.rk-name { flex:none; width:96px; font-size:13px; color:#22344e; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rk-track { flex:1; height:10px; background:#eef2f8; border-radius:5px; overflow:hidden; }
.rk-fill { display:block; height:100%; border-radius:5px; background:linear-gradient(90deg,#f6a54a,#f68c1f); }
.rk-fill.blue { background:linear-gradient(90deg,#6d93f8,#3b6ef5); }
.rk-val { flex:none; width:56px; text-align:right; font-size:14px; font-weight:700; color:#22344e; }

.crowd-wrap { flex:1; display:flex; align-items:center; justify-content:center; gap:18px; min-height:0; }
.donut { width:min(46%,220px); }
.donut svg { width:100%; height:auto; display:block; }
.dg-legend { display:flex; flex-direction:column; gap:9px; font-size:13px; color:#5d7191; }
.dg-legend .dot { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:8px; vertical-align:middle; }

.evt-list { flex:1; overflow:auto; padding-top:4px; }
.evt-item { display:flex; align-items:center; gap:10px; padding:9px 2px; border-bottom:1px dashed #eef2f8; font-size:13px; }
.evt-item:last-child { border-bottom:none; }
.evt-tag { flex:none; font-size:11px; padding:2px 9px; border-radius:4px; font-weight:600; white-space:nowrap; }
.evt-tag.red { background:#fdecec; color:#e5484d; }
.evt-tag.blue { background:#e9effd; color:#3b6ef5; }
.evt-tag.orange { background:#fef1e2; color:#f68c1f; }
.evt-tag.gray { background:#eef2f8; color:#8194ad; }
.evt-txt { flex:1; color:#3c4c66; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.evt-time { flex:none; color:#8194ad; font-size:12px; }

.empty { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#a5b3c7; font-size:13px; gap:6px; text-align:center; line-height:1.7; }

/* 客群画像图例（性别 + 年龄段，紧凑两列） */
.dg-group { display:flex; flex-direction:column; gap:5px; }
.dg-h { font-size:11px; color:#a5b3c7; letter-spacing:.5px; }
.dg-ages { display:grid; grid-template-columns:1fr 1fr; gap:5px 14px; }
.dg-row { display:flex; align-items:center; font-size:12px; color:#3c4c66; white-space:nowrap; }
.dg-row .dot { width:8px; height:8px; border-radius:2px; margin-right:6px; flex:none; }
.dg-row b { margin-left:auto; padding-left:8px; font-weight:700; color:#22344e; }

/* 实时画面 / 事件 切换 */
.hidden { display:none !important; }
.ptabs.sm button { padding:3px 13px; font-size:12px; }
.live-shot { margin-top:0; }
.live-shot .shot-ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }

/* ================= 入侵大屏（强化版） ================= */
.al-page { gap:16px; padding:18px 34px; }
.al-page .ff-row2 { flex:1.18; }
.al-page .ff-row3 { flex:1; }

/* 事件类型分布（横向条） */
.type-list { flex:1; overflow:auto; padding:12px 2px 4px; display:flex; flex-direction:column; gap:16px; justify-content:center; }
.type-item { display:flex; flex-direction:column; gap:7px; }
.type-top { display:flex; justify-content:space-between; font-size:13px; color:#3c4c66; }
.type-top b { color:#22344e; font-weight:700; }
.type-track { height:12px; border-radius:6px; background:#eef2f8; overflow:hidden; }
.type-fill { display:block; height:100%; border-radius:6px; transition:width .5s ease; }

/* 7×24 热力图 */
.heat-wrap { flex:1; display:flex; flex-direction:column; gap:5px; justify-content:center; min-height:0; }
.heat-x { display:grid; grid-template-columns:34px repeat(24,1fr); gap:3px; font-size:9px; color:#a5b3c7; text-align:center; }
.heat-row { display:grid; grid-template-columns:34px repeat(24,1fr); gap:3px; align-items:center; }
.heat-lab { font-size:11px; color:#7d8da5; text-align:right; padding-right:5px; white-space:nowrap; }
.heat-cell { height:16px; border-radius:3px; background:#eef2f8; transition:background .3s; }
.heat-cell:hover { outline:2px solid #3b6ef5; outline-offset:-2px; }
.heat-legend { display:flex; align-items:center; gap:5px; font-size:11px; color:#93a3ba; margin-top:6px; justify-content:flex-end; }
.heat-legend i { width:15px; height:10px; border-radius:2px; display:inline-block; }

/* 相机排行里的在线点 */
.cam-name { flex:none; width:120px; display:flex; align-items:center; gap:6px; font-size:13px; color:#22344e; }
.cam-name .dot { width:7px; height:7px; border-radius:50%; flex:none; }
.cam-name span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* 顶栏静默时段文案可能较长，截断而不是挤掉时钟 */
#quietBadge { max-width:460px; overflow:hidden; text-overflow:ellipsis; }

/* 退出登录按钮（顶栏） */
.logout-btn { border:1px solid #e4eaf3; background:#fff; color:#5d7191; font-size:13px; padding:7px 18px;
  border-radius:999px; cursor:pointer; font-family:inherit; white-space:nowrap; transition:.15s; }
.logout-btn:hover { background:#fdebec; color:#e5484d; border-color:#f3c1c7; }

/* ================= 入侵大屏：多门店 · 多机位 ================= */
.al-head { gap:12px; }
.al-head .ptabs button { padding:6px 13px; font-size:13px; }
.st-dot { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.st-dot.on { background:#2f9e6e; }
.st-dot.off { background:#e5484d; }

/* 四段式：KPI → 左列(趋势+热力)/右列报警处理(通高) → 实时画面/抓拍墙 */
.al-page .al-row1 { flex:1.95; display:grid; grid-template-columns:1.62fr 1fr; gap:14px; min-height:0; }
.al-colL { display:flex; flex-direction:column; gap:14px; min-height:0; }
.al-colL .panel { flex:1; }
.al-page .al-row3 { flex:1.28; display:grid; grid-template-columns:1fr 1.45fr; gap:14px; min-height:0; }

/* ---- 入侵报警处理（原相机排行位置） ---- */

/* ---- 实时画面矩阵 ---- */
.live-grid { flex:1; display:grid; grid-template-columns:1fr 1fr; grid-template-rows:1fr 1fr; gap:8px; margin-top:8px; min-height:0; }
.live-grid[data-count="1"] { grid-template-columns:1fr; grid-template-rows:1fr; }
.live-grid[data-count="2"] { grid-template-columns:1fr 1fr; grid-template-rows:1fr; }
.live-grid[data-count="3"] .live-tile:nth-child(3) { grid-column:span 2; }
.live-tile { position:relative; border-radius:10px; overflow:hidden; background:#111a2b; min-height:0; }
.live-tile img { width:100%; height:100%; object-fit:cover; display:block; opacity:0; transition:opacity .3s; }
.live-tile img.on { opacity:1; }
.live-tile .lt-ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#7f93b3; font-size:12px; text-align:center; padding:0 10px; line-height:1.5; }
.live-tile .lt-live { position:absolute; top:6px; left:7px; display:flex; align-items:center; gap:4px;
  font-size:11px; color:#fff; background:rgba(229,72,77,.86); padding:1px 8px; border-radius:8px; letter-spacing:.5px; }
.live-tile .lt-live i { width:5px; height:5px; border-radius:50%; background:#fff; animation:ltblink 1.6s infinite; }
.live-tile.bad .lt-live { display:none; }
.live-tile .lt-bar { position:absolute; left:0; right:0; bottom:0; padding:14px 9px 5px; display:flex; gap:8px; align-items:center;
  background:linear-gradient(transparent,rgba(9,16,28,.78)); color:#fff; font-size:12px; }
.live-tile .lt-bar b { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.live-tile .lt-bar span { margin-left:auto; color:#a9bad6; font-size:11px; white-space:nowrap; }
@keyframes ltblink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ---- 报警抓拍墙（每页 4 张，正方形按比例） ---- */
.wall-grid { flex:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:8px;
  min-height:0; overflow:hidden; align-content:center; justify-items:center; }
.wall-pager { display:flex; align-items:center; justify-content:center; gap:12px; padding-top:8px; flex:none; }
.wall-pager button { border:0; background:#f0f4fa; color:#3d4f6b; font-size:12px; padding:5px 14px; border-radius:16px;
  cursor:pointer; font-family:inherit; }
.wall-pager button:hover:not(:disabled) { background:#3b6ef5; color:#fff; }
.wall-pager button:disabled { opacity:.35; cursor:default; }
.wall-pager .pg-info { font-size:12px; color:#8194ad; min-width:86px; text-align:center; }
.wall-tile { position:relative; border-radius:10px; overflow:hidden; background:#111a2b; cursor:pointer;
  aspect-ratio:1/1; width:min(100%, calc(100vh - 620px)); max-width:100%; transition:transform .15s ease; }
.wall-tile:hover { outline:2px solid #3b6ef5; outline-offset:-2px; transform:translateY(-2px); }
.wall-tile img { width:100%; height:100%; object-fit:cover; display:block; }
.wt-type { position:absolute; top:6px; left:6px; font-size:10px; font-weight:700; padding:1px 7px; border-radius:6px; color:#fff; }
.wt-type.intr { background:rgba(229,72,77,.9); }
.wt-type.item { background:rgba(246,140,31,.92); }
.wt-time { position:absolute; top:6px; right:6px; font-size:10px; color:#22344e; background:rgba(255,255,255,.88);
  padding:1px 7px; border-radius:8px; font-family:"Arial Narrow",sans-serif; }
.wt-store { position:absolute; left:7px; bottom:26px; font-size:10px; color:#dbe6f7; text-shadow:0 1px 3px rgba(0,0,0,.6); }
.wt-bar { position:absolute; left:0; right:0; bottom:0; padding:12px 7px 4px; display:flex; align-items:center; gap:6px;
  background:linear-gradient(transparent,rgba(9,16,28,.82)); }
.wt-bar b { color:#fff; font-size:11px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wt-tag { margin-left:auto; font-size:10px; font-style:normal; padding:1px 6px; border-radius:5px; flex:none; font-weight:600; }
.wt-tag.hot { background:#fdebec; color:#e5484d; }
.wt-tag.muted { background:#fff6e5; color:#b26205; }
.wt-tag.done { background:#e8f7f0; color:#2f9e6e; }

/* ---- 抓拍放大 ---- */
.lightbox { position:fixed; inset:0; z-index:70; background:rgba(11,18,30,.9); display:flex; align-items:center; justify-content:center; }
.lightbox.hidden { display:none !important; }
.lb-box { width:min(1420px,96vw); max-height:90vh; background:#fff; border-radius:16px; overflow:hidden; display:flex; flex-direction:column; }
.lb-head { display:flex; align-items:center; gap:14px; padding:14px 18px; border-bottom:1px solid #eef2f8; }
.lb-title { font-size:17px; font-weight:700; color:#22344e; }
.lb-meta { font-size:13px; color:#8194ad; }
.lb-x { margin-left:auto; border:0; background:#f0f4fa; color:#5d7191; width:32px; height:32px; border-radius:9px;
  font-size:20px; line-height:1; cursor:pointer; }
.lb-x:hover { background:#e5484d; color:#fff; }
.lb-img { flex:1; min-width:0; background:#0f1724; display:flex; align-items:center; justify-content:center; min-height:0; overflow:hidden; }
/* 全景 1280×720：按原始比例铺满，不裁不拉伸；只有超宽屏才被 max-height 收紧 */
.lb-img img { max-width:100%; max-height:min(74vh,760px); width:auto; height:auto; object-fit:contain; display:block;
  cursor:zoom-in; transition:transform .16s ease; touch-action:none; user-select:none; -webkit-user-drag:none; }
.lb-img img.zoomed { cursor:zoom-out; }
.lb-foot { display:flex; align-items:center; justify-content:center; gap:20px; padding:12px; border-top:1px solid #eef2f8; }
.lb-nav { border:0; background:#f0f4fa; color:#3d4f6b; font-size:13px; padding:7px 18px; border-radius:20px; cursor:pointer; font-family:inherit; }
.lb-nav:hover:not(:disabled) { background:#3b6ef5; color:#fff; }
.lb-nav:disabled { opacity:.4; cursor:default; }
.lb-idx { font-size:13px; color:#8194ad; min-width:70px; text-align:center; }
.lb-hint { font-size:12px; color:#a7b4c8; margin-left:8px; }

/* ---- 入侵报警处理（原相机排行位置） ---- */
.hd-filter { display:flex; gap:8px; margin-left:14px; flex:none; }
.hd-filter button { border:2px solid #e4eaf3; background:#fff; color:#5d7191; font-size:14px; font-weight:700;
  padding:6px 20px; border-radius:999px; cursor:pointer; font-family:inherit; transition:.15s; white-space:nowrap; }
.hd-filter button:hover { box-shadow:0 4px 12px rgba(34,52,78,.15); transform:translateY(-1px); }
.hd-filter button.on { color:#fff; box-shadow:0 4px 12px rgba(34,52,78,.18); }
.hd-filter button.on[data-f="all"] { background:#3b6ef5; border-color:#3b6ef5; }
.hd-filter button.on[data-f="unhandled"] { background:#e5484d; border-color:#e5484d; }
.hd-filter button.on[data-f="done"] { background:#2f9e6e; border-color:#2f9e6e; }
.handle-list { flex:1; margin-top:8px; overflow:auto; display:flex; flex-direction:column; gap:6px; min-height:0; }
.hd-row { display:flex; align-items:center; gap:10px; background:#fff; border:1px solid #eef2f8; border-radius:10px;
  padding:8px 12px; cursor:pointer; }
.hd-row:hover { border-color:#3b6ef5; }
.hd-dot { width:8px; height:8px; border-radius:50%; flex:none; }
.hd-dot.hot { background:#e5484d; box-shadow:0 0 0 3px #fdebec; }
.hd-dot.done { background:#2f9e6e; box-shadow:0 0 0 3px #e8f7f0; }
.hd-dot.muted { background:#b26205; box-shadow:0 0 0 3px #fff6e5; }
.hd-loc { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.hd-loc b { font-size:13px; color:#22344e; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hd-loc i { font-style:normal; font-size:11px; color:#8194ad; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hd-time { font-family:"Arial Narrow","Microsoft YaHei",sans-serif; font-size:13px; color:#3d4f6b; flex:none; white-space:nowrap; }
.hd-badge { border:0; font-size:11px; font-weight:600; padding:4px 12px; border-radius:12px; flex:none;
  cursor:pointer; font-family:inherit; max-width:150px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hd-badge.hot { background:#fdebec; color:#e5484d; }
.hd-badge.done { background:#e8f7f0; color:#2f9e6e; }
.hd-badge.muted { background:#fff6e5; color:#b26205; }

/* ---- 处理弹窗 ---- */
.hd-box { width:min(900px,92vw); }
.hd-body { display:flex; gap:14px; padding:14px; min-height:0; overflow:auto; }
.hd-photo { flex:none; width:44%; }
.hd-photo img { width:100%; border-radius:10px; display:block; background:#0f1724; min-height:200px; object-fit:contain; }
.hd-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:8px; }
.hd-sec { font-size:12px; font-weight:700; color:#3b6ef5; }
.hd-kv { display:grid; grid-template-columns:76px 1fr; gap:5px 12px; font-size:13px; color:#22344e; align-items:start; }
.hd-kv b { color:#8194ad; font-weight:500; white-space:nowrap; }
.hd-kv span { word-break:break-all; }
.hd-form { display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.hd-note { width:100%; border:1px solid #dbe4f0; border-radius:8px; padding:8px 10px; font-family:inherit;
  font-size:13px; resize:vertical; box-sizing:border-box; }
.hd-note:focus { outline:none; border-color:#3b6ef5; }
.hd-submit { width:100%; }
.hd-box .lg-err { text-align:left; }




/* ================= 人脸抓拍大屏 ================= */
.fc-page { gap:14px; padding:18px 34px; }
.fc-page .fc-row1 { flex:1.85; display:grid; grid-template-columns:1.62fr 1fr; gap:14px; min-height:0; }
.fc-colL { display:flex; flex-direction:column; gap:14px; min-height:0; }
.fc-colL .panel { flex:1; }
.fc-page .fc-row2 { flex:1.3; display:grid; grid-template-columns:1.04fr 1fr 1.1fr; gap:14px; min-height:0; }

/* ---- 抓拍墙：正方形缩略图，4 列 × 2 行 = 8 张 / 页 ---- */
.fw-grid { flex:1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:8px;
  min-height:0; overflow:hidden; align-content:start; }
.fw-grid .empty { grid-column:1 / -1; }
.fw-tile { position:relative; aspect-ratio:1/1; border-radius:10px; overflow:hidden; background:#0f1724;
  cursor:pointer; transition:transform .15s ease; }
.fw-tile:hover { outline:2px solid #3b6ef5; outline-offset:-2px; transform:translateY(-2px); }
.fw-tile img { width:100%; height:100%; object-fit:cover; display:block; }
.fw-tile .fw-ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#4d5f7a; font-size:24px; }
.fw-badge { position:absolute; top:6px; left:6px; font-size:10px; font-weight:700; padding:1px 7px;
  border-radius:6px; color:#fff; max-width:60%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fw-badge.known { background:rgba(47,158,110,.92); }
.fw-badge.unknown { background:rgba(93,113,145,.82); }
.fw-time { position:absolute; top:6px; right:6px; font-size:10px; color:#22344e; background:rgba(255,255,255,.88);
  padding:1px 7px; border-radius:8px; font-family:"Arial Narrow",sans-serif; }
.fw-bar { position:absolute; left:0; right:0; bottom:0; padding:14px 7px 5px; display:flex; align-items:center; gap:6px;
  background:linear-gradient(transparent,rgba(9,16,28,.85)); }
.fw-bar b { color:#fff; font-size:11px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fw-bar i { margin-left:auto; font-style:normal; font-size:10px; color:#a9bad6; flex:none; font-family:"Arial Narrow",sans-serif; }
.fw-bar i.sc { color:#7ee2b0; font-weight:700; }

/* ---- 识别命中列表 ---- */
.fm-list { flex:1; overflow:auto; display:flex; flex-direction:column; gap:6px; margin-top:8px; min-height:0; }
.fm-row { display:flex; align-items:center; gap:9px; border:1px solid #eef2f8; border-radius:10px;
  padding:6px 9px; cursor:pointer; flex:none; }
.fm-row:hover { border-color:#3b6ef5; background:#f8fbff; }
.fm-ava { width:36px; height:36px; border-radius:9px; object-fit:cover; background:#0f1724; flex:none; display:block; }
.fm-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.fm-info b { font-size:13px; color:#22344e; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fm-info i { font-style:normal; font-size:11px; color:#8194ad; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fm-score { flex:none; font-size:11px; font-weight:700; color:#2f9e6e; background:#e8f7f0;
  padding:3px 8px; border-radius:10px; font-family:"Arial Narrow",sans-serif; }
.fm-time { flex:none; font-size:11px; color:#93a3ba; font-family:"Arial Narrow",sans-serif; }
.fm-empty { color:#a5b3c7; font-size:12px; text-align:center; padding:16px 8px; line-height:1.8; }

/* ---- 实时画面（人脸页 2 路） ---- */
.fc-live { grid-template-columns:1fr 1fr; grid-template-rows:1fr; margin-top:8px; }

/* ---- 人脸放大：右侧信息栏 ---- */
.lb-body { display:flex; min-height:0; flex:1; }
.lb-body .lb-img { flex:1; }
.lb-side { flex:none; width:300px; padding:16px 18px; border-left:1px solid #eef2f8; overflow:auto; }
/* 人员资料：档案照（库里的登记照片）+ 本次抓拍人脸，方形并排 */
.lb-faces { display:flex; gap:10px; margin-bottom:14px; }
.lb-face { position:relative; flex:1; min-width:0; aspect-ratio:1/1; border-radius:10px; overflow:hidden;
  background:#0f1724; }
.lb-face img { width:100%; height:100%; object-fit:cover; display:block; }
.lb-face span { position:absolute; left:0; right:0; bottom:0; font-size:11px; color:#fff; text-align:center;
  padding:6px 0 4px; letter-spacing:.5px; background:linear-gradient(transparent,rgba(0,0,0,.68)); }
.lb-face.pf { outline:2px solid #cfe0ff; outline-offset:-2px; }
.lb-face.noimg { background:#f0f4fa; display:flex; align-items:center; justify-content:center; }
.lb-face.noimg::after { content:'无档案照'; font-size:12px; color:#98a7bd; }
.lb-face.noimg span { background:none; color:#8194ad; }
.lb-kv span.hl { color:#2f9e6e; font-weight:700; }
.lb-kv { display:grid; grid-template-columns:64px 1fr; gap:9px 10px; font-size:13px; color:#22344e; }
.lb-kv b { color:#8194ad; font-weight:500; white-space:nowrap; }
.lb-name { font-size:20px; font-weight:800; color:#22344e; margin-bottom:2px; }
.lb-sub { font-size:12px; color:#8194ad; margin-bottom:14px; }
.lb-pill { display:inline-block; font-size:11px; font-weight:700; padding:2px 10px; border-radius:10px; margin-bottom:12px; }
.lb-pill.known { background:#e8f7f0; color:#2f9e6e; }
.lb-pill.unknown { background:#eef2f8; color:#5d7191; }
