/* 新旧同程 · 运营中台 · 移动充电 — 在 /ops/ops.css 之上补充场地平面图、设备、告警样式（Stitch 重设计 · 浅色）。 */
:root{
  --c1:#0E9F6E; --c2:#2F6FED;
  --m-floor:#E9EDF2; --m-floor-g:#E8ECE6; --m-aisle:#F8FAFC; --m-lane:#C9D1DB; --m-spot:#FFFFFF; --m-spot-l:#D5DCE4; --m-pillar:#9AA5B3;
  --m-occ:#B7C0CC; --m-text:#4B5A6A; --m-halo:rgba(255,255,255,.9);
  --d-idle:#8A97A5; --d-move:#2F6FED; --d-arr:#C2703D; --d-chg:#0E9F6E; --d-rep:#B45309; --d-fault:#DC2626;
}
.kpis{grid-template-columns:repeat(6,minmax(0,1fr))}
.kpi-v b{font-size:30px}
.main{padding-bottom:12px}
.col--side{max-height:calc(100vh - 90px);overflow-y:auto;padding-bottom:2px;scrollbar-width:thin}
.foot-note{padding:6px 24px 28px;font-size:12px;color:var(--ink-3);text-align:center}
@media (max-width:1400px){.kpi{padding:14px 16px}.kpi-v b{font-size:26px}.main{grid-template-columns:minmax(0,1fr) 380px}}
@media (max-width:1100px){.kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.col--side{max-height:none;overflow:visible}}
@media (max-width:760px){
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px 12px 0;gap:10px}
  .main{padding:12px}
  .user,.clock,.brand-n{display:none}
  .nav-i{padding:0 8px;font-size:13px}
}

/* 场地地图 */
.sites{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:16px;align-items:start}
.sites .legend{grid-column:1/-1;margin-top:-4px;background:var(--panel);border-radius:12px;padding:10px 16px;box-shadow:var(--ring),var(--shadow)}
@media (max-width:760px){.sites{grid-template-columns:minmax(0,1fr)}}
.site .sec-h{margin-bottom:10px}
.site .sec-t{font-size:16px}
.kind{font-size:11.5px;font-weight:600;border-radius:999px;padding:2px 9px;white-space:nowrap}
.kind--garage{background:var(--info-bg);color:var(--info)}
.kind--ground{background:var(--warn-bg);color:var(--warn)}
.map{border-radius:12px;overflow:hidden;background:var(--sunk);box-shadow:var(--ring)}
.map svg{display:block;width:100%;height:auto}
.legend{display:flex;gap:6px 16px;flex-wrap:wrap;align-items:center;font-size:12.5px;color:var(--ink-2)}
.legend b{display:inline-flex;align-items:center;gap:7px;font-weight:400}
.legend i{width:12px;height:12px;border-radius:3px;flex:none;display:inline-block}
.legend-sep{width:1px;height:14px;background:var(--line-2)}
.lg-dev{border-radius:50%!important}
.lg-dev.s-idle{background:var(--d-idle)} .lg-dev.s-moving{background:var(--d-move)} .lg-dev.s-arrived{background:var(--d-arr)}
.lg-dev.s-charging{background:var(--d-chg)} .lg-dev.s-replenish{background:var(--d-rep)} .lg-dev.s-fault{background:var(--d-fault)}
.lg-path{height:0!important;width:18px!important;border-top:2px dashed var(--amber);border-radius:0!important}
.lg-occ{background:var(--m-occ)}
.lg-real{background:var(--m-occ);box-shadow:0 0 0 2px var(--brand)}
.lg-depot{background:#FFF4D6;box-shadow:inset 0 0 0 1.5px var(--amber)}

.cmap{font-family:var(--f-ui)}
.cm-floor{fill:var(--m-floor)}
.cmap--ground .cm-floor{fill:var(--m-floor-g)}
.cm-aisle{fill:var(--m-aisle)}
.cm-lane{stroke:var(--m-lane);stroke-width:.2;stroke-dasharray:1.4 1.1;fill:none}
.cm-arrow{fill:none;stroke:var(--m-lane);stroke-width:.25;stroke-linecap:round;stroke-linejoin:round}
.cm-spot{fill:var(--m-spot);stroke:var(--m-spot-l);stroke-width:.14}
.cm-occ{fill:var(--m-occ)}
.cm-occ--chg{fill:color-mix(in srgb,var(--d-chg) 45%,var(--m-occ))}
.cm-occ--arr{fill:color-mix(in srgb,var(--d-arr) 45%,var(--m-occ))}
.cm-occ--wait{fill:none;stroke:var(--d-arr);stroke-width:.3;stroke-dasharray:.6 .4}
.cm-occ.real{stroke:var(--brand);stroke-width:.45}
.cm-pillar{fill:var(--m-pillar)}
.cm-depot>rect:first-child{fill:#FFF4D6;stroke:var(--amber);stroke-width:.25;stroke-dasharray:.9 .6}
.cm-pile{fill:#0B7A55}
.cm-bolt{fill:#FFD54A}
.cm-gate circle{fill:var(--d-move)}
.cm-t{fill:var(--m-text);font-weight:600;paint-order:stroke;stroke:var(--m-halo);stroke-width:.3}
.cm-t--row{font-family:var(--f-mono);font-weight:400;fill:var(--ink-3)}
.cm-t--plate{font-family:var(--f-mono);font-weight:600;fill:var(--ink)}
.cm-t--dev{fill:var(--ink);font-family:var(--f-mono)}
.cm-t--depot{fill:var(--warn);font-weight:500}
.cm-path{fill:none;stroke:var(--amber);stroke-width:.4;stroke-dasharray:1 .8;stroke-linecap:round;stroke-linejoin:round;animation:cmDash 1s linear infinite}
.cm-path.ret{opacity:.55}
@keyframes cmDash{to{stroke-dashoffset:-1.8}}
.cm-cable{fill:none;stroke:var(--ink);stroke-width:.3;stroke-linecap:round}
.cm-cable.on{stroke:var(--d-chg);stroke-width:.4;stroke-dasharray:.8 .6;animation:cmDash .6s linear infinite}
.cm-dev{transition:transform 1s linear;cursor:pointer}
.cm-d-body{fill:var(--d-idle);stroke:var(--panel);stroke-width:.28}
.cm-d-eye{fill:#9FE5FF}
.cm-d-handle{fill:none;stroke:var(--d-idle);stroke-width:.4;stroke-linecap:round}
.cm-d-bolt{fill:#FFE27A}
.cm-d-halo{fill:none}
.cm-dev.s-moving .cm-d-body,.cm-dev.s-returning .cm-d-body{fill:var(--d-move)}
.cm-dev.s-arrived .cm-d-body{fill:var(--d-arr)}
.cm-dev.s-charging .cm-d-body{fill:var(--d-chg)}
.cm-dev.s-replenish .cm-d-body{fill:var(--d-rep)}
.cm-dev.s-fault .cm-d-body{fill:var(--d-fault)}
.cm-dev.s-moving{color:var(--d-move)} .cm-dev.s-charging{color:var(--d-chg)} .cm-dev.s-arrived{color:var(--d-arr)} .cm-dev.s-fault{color:var(--d-fault)} .cm-dev.s-replenish{color:var(--d-rep)}
.cm-dev.s-moving .cm-d-halo,.cm-dev.s-charging .cm-d-halo,.cm-dev.s-arrived .cm-d-halo,.cm-dev.s-fault .cm-d-halo,.cm-dev.s-replenish .cm-d-halo{fill:currentColor;transform-box:fill-box;transform-origin:center;animation:cmHalo 1.6s ease-out infinite}
.cm-dev.focus .cm-d-halo{fill:var(--brand);opacity:.25;animation:none}
.cm-dev.focus .cm-d-body{stroke:var(--brand);stroke-width:.5}
@keyframes cmHalo{0%{transform:scale(.5);opacity:.35}100%{transform:scale(1.3);opacity:0}}

/* 表格补充 */
.tbl-wrap--scroll{max-height:360px;overflow-y:auto}
.tbl th{position:sticky;top:0;background:var(--panel)}
.tbl td{white-space:nowrap}
.sm{font-size:11.5px}
.tbl tr.real-r td:first-child{box-shadow:inset 3px 0 0 var(--brand)}
.acts{display:flex;gap:6px;justify-content:flex-end}
.acts .btn{min-height:30px;padding:0 11px}
.devlink{font-family:var(--f-mono);font-size:12.5px;color:var(--info);background:var(--info-bg);border-radius:6px;padding:1px 7px;text-decoration:none;font-weight:600}
.pcell{display:flex;align-items:center;gap:8px;min-width:150px}
.sbar{position:relative;flex:1;height:6px;border-radius:3px;background:var(--sunk-2);min-width:70px}
.sbar i{position:absolute;left:0;top:0;bottom:0;border-radius:3px;background:var(--d-chg);transition:width .9s linear}
.sbar em{position:absolute;top:-3px;bottom:-3px;width:2px;margin-left:-1px;background:var(--d-arr);border-radius:1px}
.sbar-t{font-size:11.5px;color:var(--ink-2);min-width:58px;font-family:var(--f-mono)}
.sbar--sm{margin-top:6px;height:4px}

/* 设备 */
.devs{display:flex;flex-direction:column;gap:10px}
.dv{border-radius:14px;padding:14px;box-shadow:inset 0 0 0 1px var(--line);cursor:pointer;transition:box-shadow .2s,background .2s}
.dv:hover{background:var(--hover)}
.dv.hl{box-shadow:inset 0 0 0 1.5px var(--brand);background:#F7FBF9}
.dv.fault{box-shadow:inset 0 0 0 1.5px var(--crit);background:#FFF7F7}
.dv.flash{animation:rowflash 1.8s ease-out}
.dv-h{display:flex;align-items:center;gap:10px}
.dv-ic{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:#FFE27A;background:var(--d-idle);flex:none;font-size:15px}
.dv-ic .ic{width:20px;height:20px}
.dv-ic.s-moving,.dv-ic.s-returning{background:var(--d-move)} .dv-ic.s-arrived{background:var(--d-arr)} .dv-ic.s-charging{background:var(--d-chg)} .dv-ic.s-replenish{background:var(--d-rep)} .dv-ic.s-fault{background:var(--d-fault)}
.dv-n{flex:1;min-width:0;line-height:1.35}
.dv-n b{font-size:14px;font-weight:700;display:block}
.dv-n span{font-size:12px;color:var(--ink-3);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dv-e{display:flex;align-items:center;gap:10px;margin-top:12px}
.dv-e span{font-size:12px;color:var(--ink-2);white-space:nowrap;font-family:var(--f-mono)}
.ebar{flex:1;height:8px;border-radius:4px;background:var(--sunk-2);overflow:hidden}
.ebar i{display:block;height:100%;background:var(--brand);border-radius:4px;transition:width .9s linear}
.ebar.mid{background:var(--warn-bg)} .ebar.mid i{background:var(--amber)}
.ebar.low{background:var(--crit-bg)} .ebar.low i{background:var(--crit)}
.dv-task{font-size:12.5px;margin-top:8px;line-height:1.5}
.dv-task b{font-weight:700}
.dv-m{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--ink-3);margin-top:8px}
.dv-m .hot{color:var(--crit);font-weight:700}
.dv-a{display:flex;gap:6px;margin-top:12px}
.dv-a .btn{flex:1;min-height:34px;padding:0 6px;font-size:12.5px}

/* 告警 */
.alerts{display:flex;flex-direction:column;max-height:520px;overflow-y:auto;margin:0 -6px}
.al{padding:12px 6px;border-bottom:1px solid var(--line)}
.al:last-child{border-bottom:none}
.al.closed{opacity:.62}
.al-h{display:flex;align-items:center;gap:8px}
.al-h b{font-size:13.5px;font-weight:700;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-t{font-size:11px;color:var(--ink-3);font-family:var(--f-mono)}
.al-n{font-size:12.5px;color:var(--ink-2);margin-top:4px;line-height:1.55}
.al-m{font-size:11.5px;color:var(--ink-3);margin-top:2px}
.al .shots{margin-top:6px}
.al .shot{width:52px;height:52px}
.al-a{margin-top:8px}
.al-r{font-size:11.5px;color:var(--good);margin-top:4px}
.ack-q{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.ack-o{text-align:left;font-size:13px;padding:9px 12px;border-radius:10px;background:var(--sunk)}
.ack-o:hover{background:var(--brand-soft);color:var(--brand-2)}
.ack-in{width:100%;border:1px solid var(--line);border-radius:12px;background:var(--sunk);padding:10px 12px;font-size:13.5px;resize:none;outline:none}
.ack-in:focus{border-color:var(--brand);background:#fff;box-shadow:0 0 0 3px rgba(14,159,110,.12)}

/* 近14天 */
.hist{position:relative}
.hc-grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
@media (max-width:900px){.hc-grid2{grid-template-columns:1fr}}
.hc-f{margin:0;min-width:0}
.hc-f figcaption{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:12px;color:var(--ink-3);margin-bottom:4px}
.hc-f figcaption b{font-size:13px;color:var(--ink);font-weight:700}
.hc{display:block;max-width:100%;overflow:visible}
.hc-grid{stroke:var(--line);stroke-width:1}
.hc-base{stroke:var(--line-2);stroke-width:1}
.hc-ax{fill:var(--ink-3);font-size:10.5px;font-family:var(--f-mono)}
.hc-val{fill:var(--ink);font-size:11px;font-family:var(--f-mono);font-weight:600}
.hc-hit{fill:transparent;cursor:crosshair}
.hc-bar{pointer-events:none;transition:opacity .15s}
.hc-bar.c1{fill:var(--c1)} .hc-bar.c2{fill:var(--c2)}
.hc-bar.today{opacity:.55}
.hc-bar.off{opacity:.3}
.hc-bar.on{opacity:1}
.hc-tip{position:absolute;pointer-events:none;background:var(--panel);border-radius:10px;padding:8px 11px;box-shadow:0 10px 30px -10px rgba(15,31,46,.3),var(--ring);font-size:12px;min-width:136px;opacity:0;transition:opacity .12s;z-index:5}
.hc-tip.on{opacity:1}
.hc-tip-h{color:var(--ink-3);font-size:11.5px;margin-bottom:4px}
.hc-tip-r{display:flex;align-items:center;gap:7px;line-height:1.7}
.hc-tip-r i{width:12px;height:2px;border-radius:1px;background:var(--ink-3)}
.hc-tip-r i.c1{background:var(--c1)} .hc-tip-r i.c2{background:var(--c2)}
.hc-tip-r b{font-family:var(--f-mono);font-weight:600}
.hc-tip-r span{color:var(--ink-3);margin-left:auto;padding-left:10px}
