/* 动态演示层：所有定位与告警数据均为本地虚构数据。 */
.map-scan { position:absolute; z-index:1; left:29%; right:29%; top:-18%; height:18%; pointer-events:none; opacity:.35; background:linear-gradient(to bottom,transparent,rgba(64,226,244,.18) 70%,rgba(97,238,250,.7)); filter:drop-shadow(0 4px 9px rgba(40,212,238,.2)); animation:mapScan 9s linear infinite; }
.network-mode .map-scan { display:none; }
.live-overlay { position:absolute; z-index:2; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
.fence-overlay { opacity:0; transition:opacity .25s ease; }
.fence-overlay.visible { opacity:1; }
.site-fence,.restricted-fence { fill:rgba(35,211,234,.055); stroke:#36dfef; stroke-width:2.3; stroke-dasharray:9 7; vector-effect:non-scaling-stroke; filter:drop-shadow(0 0 5px rgba(40,212,238,.38)); animation:fenceMarch 7s linear infinite; }
.restricted-fence { fill:rgba(255,91,79,.09); stroke:#ff796f; }
.fence-label { fill:#a9f5fa; paint-order:stroke; stroke:rgba(4,19,27,.85); stroke-width:4px; font-size:13px; letter-spacing:1px; }
.fence-label.warning { fill:#ffd0ca; }
.live-trail { fill:none; stroke:rgba(58,226,241,.35); stroke-width:2; stroke-dasharray:7 8; vector-effect:non-scaling-stroke; animation:trailFlow 5s linear infinite; }
.live-trail.vehicle { stroke:rgba(154,216,105,.46); }
.live-trail.alert { stroke:rgba(255,118,109,.5); }

.map-marker { width:30px; height:30px; margin:-15px 0 0 -15px; transform:none; border:0; border-radius:50%; padding:0; overflow:visible; background:transparent!important; box-shadow:none!important; transition:filter .2s ease; }
.map-marker.alert { animation:none; }
.marker-icon { position:absolute; z-index:3; inset:2px; display:grid; place-items:center; border:2px solid #fff; border-radius:50%; background:#20bfd5; box-shadow:0 0 13px rgba(40,212,238,.7); }
.map-marker .marker-icon { transform:none; font-size:initial; }
.marker-icon svg { width:17px; height:17px; fill:#fff; }
.map-marker.vehicle .marker-icon { background:#75bd4f; box-shadow:0 0 13px rgba(154,216,105,.7); }
.map-marker.alert .marker-icon { background:#ef635a; box-shadow:0 0 15px rgba(255,118,109,.8); }
.marker-halo { position:absolute; z-index:1; inset:0; border:1px solid rgba(89,233,247,.82); border-radius:50%; animation:locatorHalo 2.2s ease-out infinite; }
.map-marker.vehicle .marker-halo { border-color:rgba(168,230,111,.86); animation-delay:.55s; }
.map-marker.alert .marker-halo { border-color:rgba(255,126,112,.95); animation-duration:1.35s; }
.marker-label { position:absolute; z-index:2; left:35px; top:-4px; min-width:88px; padding:5px 8px; border:1px solid rgba(60,198,216,.45); border-radius:2px; background:rgba(3,18,25,.88); color:#eafbfd; box-shadow:0 6px 16px rgba(0,0,0,.24); text-align:left; white-space:nowrap; pointer-events:none; transform-origin:left center; transition:opacity .2s ease,transform .2s ease; }
.map-marker .marker-label { transform:none; font-size:initial; }
.marker-label b,.marker-label small { display:block; font-weight:400; line-height:1.25; }
.marker-label b { font-size:11px; }
.marker-label small { margin-top:2px; color:#8bdce5; font-size:8px; }
.map-marker.alert .marker-label { border-color:rgba(255,118,109,.7); }
.map-marker.alert .marker-label small { color:#ffc0b8; }
.map-marker.label-left .marker-label { left:auto; right:35px; transform-origin:right center; }
.map-marker.offline .marker-icon { background:#5a6d78; box-shadow:none; }
.map-marker.offline .marker-halo { animation:none; opacity:0; }
.map-marker.offline .marker-label { border-color:#5b737b; }
.map-marker.offline .marker-label small { color:#94a9b1; }
.map-marker:hover,.map-marker.selected { z-index:8; filter:brightness(1.15); }
.map-marker:hover .marker-label,.map-marker.selected .marker-label { transform:scale(1.05); border-color:#77edf7; }
.map-marker.highlight-alert .marker-icon { animation:alertBeacon .55s ease-in-out 5; }
.map-marker.highlight-alert .marker-label { background:rgba(91,23,21,.94); border-color:#ff8b7e; }

.live-monitor { position:absolute; z-index:9; top:194px; left:50%; width:min(620px,calc(100vw - 760px)); transform:translateX(-50%); padding:11px 14px 10px; border:1px solid rgba(53,193,214,.42); background:rgba(3,16,23,.9); box-shadow:0 9px 24px rgba(0,0,0,.22); clip-path:polygon(0 8px,8px 0,calc(100% - 8px) 0,100% 8px,100% calc(100% - 8px),calc(100% - 8px) 100%,8px 100%,0 calc(100% - 8px)); }
html.playback-open .live-monitor { visibility:hidden; }
.monitor-heading { display:flex; align-items:center; gap:8px; }
.monitor-heading div { display:flex; align-items:baseline; gap:7px; }
.monitor-heading b { font-size:13px; font-weight:500; }
.monitor-heading small { color:#789ba4; font-size:8px; letter-spacing:1px; }
.monitor-heading em { margin-left:auto; color:#9ad869; font-size:9px; font-style:normal; }
.running-dot { width:7px; height:7px; border-radius:50%; background:#9ad869; box-shadow:0 0 9px #9ad869; animation:runningBlink 1.7s ease-in-out infinite; }
.monitor-controls { position:absolute; right:12px; top:36px; display:flex; gap:5px; }
.monitor-button { padding:4px 8px; border:1px solid rgba(82,180,196,.28); background:rgba(8,37,47,.75); color:#86aeb6; cursor:pointer; font-size:9px; }
.monitor-button.active,.monitor-button:hover { border-color:#27cfe5; color:#dffcff; background:rgba(31,169,190,.2); }
.monitor-button:disabled { opacity:.45; cursor:default; }
.monitor-telemetry { display:flex; width:60%; gap:5px; margin:8px 0 7px; }
.monitor-telemetry span { flex:1; padding:4px 7px; border-left:2px solid rgba(40,212,238,.7); background:rgba(35,139,157,.1); color:#7e9ca4; font-size:8px; }
.monitor-telemetry b { display:block; margin-top:1px; color:#e7fbfd; font-size:12px; font-weight:500; }
.live-feed { border-top:1px solid rgba(116,198,211,.14); padding-top:6px; }
.feed-title { display:block; margin-bottom:3px; color:#4bdbea; font-size:8px; letter-spacing:.8px; }
.live-event { display:grid; grid-template-columns:54px minmax(0,1fr) auto; align-items:center; gap:7px; min-height:18px; border-top:1px solid rgba(116,198,211,.08); color:#adc4ca; font-size:9px; }
.live-event span,.live-event b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.live-event time { color:#63868f; font-variant-numeric:tabular-nums; }
.live-event b { color:#71cdd8; font-weight:400; text-align:right; }
.live-event.alert span,.live-event.alert b { color:#ffaaa0; }
.live-event.offline span,.live-event.offline b { color:#b9c3c6; }
.live-event.recovery span,.live-event.recovery b { color:#a8dc83; }
.live-event.new { animation:eventArrive .8s ease-out; }

.alert-ribbon.alert-arrived { animation:ribbonArrive .85s ease-out; }
.alert-ribbon { left:max(29%,360px); right:max(29%,360px); padding:0 31px 0 13px; justify-content:flex-start; font-size:14px; }
.alert-ribbon.recovered { background:rgba(18,105,96,.94); box-shadow:0 0 18px rgba(40,212,198,.22); }
.alert-icon { flex-shrink:0; }
.alert-time { margin-left:auto; font-size:10px; white-space:nowrap; }
#alertText { flex:1; min-width:0; border:0; padding:0; background:transparent; color:inherit; font-weight:inherit; text-align:left; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.metric-ring { position:relative; }
.metric-ring::after { content:""; position:absolute; inset:-7px; border:1px solid transparent; border-top-color:rgba(82,230,244,.65); border-bottom-color:rgba(82,230,244,.22); border-radius:50%; animation:ringOrbit 10s linear infinite; pointer-events:none; }
.metric-updated { animation:numberFlash .85s ease-out; }
.row-updated { animation:rowUpdate 1.2s ease-out; }
.row-alert { animation:rowAlert 1.2s ease-out; }
.site-fence.fence-alert { stroke:#ff776d; fill:rgba(255,118,109,.09); }
.status-tag.warning { color:#ffafa5; background:rgba(255,118,109,.15); }
.tiny-offline { padding:4px 6px; font-size:10px; color:#a8b6bd; background:rgba(94,114,125,.28); white-space:nowrap; }
.popover-state.alert { color:var(--coral); }
.popover-state.alert i { background:var(--coral); box-shadow:0 0 8px var(--coral); }
.popover-state.offline { color:#a5b5bd; }
.popover-state.offline i { background:#8399a4; box-shadow:none; }
#alertText { cursor:pointer; }
.mini-table tbody tr { cursor:pointer; }
.data-table-wrap { overflow:auto; max-height:calc(100vh - 240px); border:1px solid rgba(120,192,206,.16); }
.data-table { min-width:635px; }
.data-table th,.data-table td { white-space:nowrap; }
.filter-button[hidden] { display:none; }
.vehicle-row { width:100%; border-right:0; border-left:0; border-bottom:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.vehicle-row:hover { background:rgba(40,212,238,.07); }
.table-locate { padding:4px 7px; border:1px solid rgba(40,212,238,.45); background:rgba(40,212,238,.08); color:#8feaf2; cursor:pointer; white-space:nowrap; }
.table-locate:hover { border-color:#28d4ee; color:#fff; }

.map-toolbar button:nth-last-child(-n+2) { width:47px; font-size:11px; }
.map-toolbar { bottom:28px; }
.map-legend { bottom:74px; transform:translateX(50%); }
.network-note { top:auto; bottom:112px; flex-direction:row; align-items:center; min-width:unset; }
.network-note small { margin-left:7px; }

.route-overlay .history-route,.route-overlay .history-progress { fill:none; stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.route-overlay .history-route { stroke:rgba(107,229,240,.36); stroke-width:6; stroke-dasharray:none; animation:none; }
.route-overlay .history-progress { stroke:#52e6f4; stroke-width:6; stroke-dasharray:none; animation:none; filter:drop-shadow(0 0 6px rgba(72,225,241,.75)); }
.route-overlay .history-point { fill:#06171e; stroke:#91f5fb; stroke-width:3; vector-effect:non-scaling-stroke; }
.route-overlay .playback-head { fill:#ffca52; stroke:#fff; stroke-width:3; vector-effect:non-scaling-stroke; filter:drop-shadow(0 0 7px #ffca52); }
.trajectory-card { width:min(590px,calc(100vw - 760px)); top:194px; bottom:auto; visibility:hidden; }
.trajectory-card.open { visibility:visible; }
.playback-controls { display:flex; align-items:center; gap:6px; margin:2px 0 10px; }
.playback-controls>button { padding:5px 8px; border:1px solid rgba(40,212,238,.42); background:rgba(40,212,238,.1); color:#a8edf4; cursor:pointer; font-size:9px; white-space:nowrap; }
.playback-controls>button:hover { border-color:#28d4ee; color:#fff; }
.playback-scrub { flex:1; display:grid; grid-template-columns:46px 1fr auto; align-items:center; gap:6px; color:#79949c; font-size:8px; }
.playback-scrub input { min-width:70px; accent-color:#31d7e9; }
.playback-scrub b { color:#bfe8ec; font-size:8px; font-weight:400; font-variant-numeric:tabular-nums; }
.trajectory-list li button { flex:1; padding:0; border:0; background:transparent; color:inherit; cursor:pointer; text-align:left; }
.trajectory-list li { opacity:.48; transition:opacity .2s ease,transform .2s ease; }
.trajectory-list li.active { opacity:1; transform:translateX(2px); }
.trajectory-list li.visited { opacity:.76; }
.trajectory-list li.active>i { background:#51e0ef; box-shadow:0 0 8px #51e0ef; }
.route-overlay .history-point.active { fill:#5ce6f3; stroke:#fff; }

html.simulation-paused .map-scan,html.simulation-paused .marker-halo,html.simulation-paused .live-trail,html.simulation-paused .running-dot,html.simulation-paused .site-fence,html.simulation-paused .restricted-fence,html.simulation-paused .metric-ring::after,
html.reading-mode .map-scan,html.reading-mode .marker-halo,html.reading-mode .live-trail,html.reading-mode .site-fence,html.reading-mode .restricted-fence { animation-play-state:paused!important; }

@keyframes mapScan { from{transform:translateY(0)} to{transform:translateY(680%)} }
@keyframes fenceMarch { to{stroke-dashoffset:-64} }
@keyframes trailFlow { to{stroke-dashoffset:-75} }
@keyframes locatorHalo { 0%{transform:scale(.65);opacity:.9} 80%,100%{transform:scale(2.4);opacity:0} }
@keyframes alertBeacon { 0%,100%{transform:scale(1)} 50%{transform:scale(1.35);box-shadow:0 0 28px rgba(255,118,109,1)} }
@keyframes runningBlink { 50%{opacity:.38;transform:scale(.72)} }
@keyframes eventArrive { from{opacity:0;transform:translateX(15px);background:rgba(40,212,238,.2)} to{opacity:1;transform:none;background:transparent} }
@keyframes ribbonArrive { 0%{filter:brightness(1);transform:scaleX(1)} 35%{filter:brightness(1.4);transform:scaleX(1.02)} 100%{filter:none;transform:scaleX(1)} }
@keyframes ringOrbit { to{transform:rotate(360deg)} }
@keyframes numberFlash { 40%{color:#fff;filter:drop-shadow(0 0 8px #38e3ef);transform:scale(1.13)} }
@keyframes rowUpdate { from{background:rgba(40,212,238,.32)} to{background:transparent} }
@keyframes rowAlert { from{background:rgba(255,118,109,.3)} to{background:transparent} }

@media (max-width:1450px) {
  .marker-label { min-width:76px; }
  .marker-label b { font-size:10px; }
}
@media (max-height:820px) {
  .live-monitor { top:185px; padding-top:8px; }
  .monitor-telemetry { margin:5px 0; }
  .live-event { min-height:15px; }
  .trajectory-card { top:185px; }
  .playback-controls { flex-wrap:wrap; }
  .playback-scrub { flex-basis:100%; }
  .monitor-heading small { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  .map-scan,.marker-halo,.live-trail,.site-fence,.restricted-fence,.running-dot,.metric-ring::after { animation:none!important; }
  .map-marker { transition:none; }
}

@media (min-height:981px) {
  .panel-equipment,.panel-people { height:calc((100vh - 160px)*.52); }
  .panel-vehicles,.panel-project { height:calc((100vh - 160px)*.48); }
}
@media (min-height:821px) and (max-height:980px) {
  .panel-equipment,.panel-people { height:calc((100vh - 225px)*.54); }
  .panel-vehicles,.panel-project { height:calc((100vh - 225px)*.46); }
}
@media (max-height:820px) {
  .panel-equipment,.panel-people { height:calc((100vh - 225px)*.61); }
  .panel-vehicles,.panel-project { height:calc((100vh - 225px)*.39); }
}
