* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #0a1a2f; color: #cfe3f7; font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; min-height: 100vh; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; border-bottom: 1px solid #16324f; background: linear-gradient(90deg, #0d2036, #102a44); }
.header h1 { font-size: 22px; color: #e8f4ff; letter-spacing: 2px; }
.header .sub { font-size: 12px; color: #6d92b5; margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 14px 28px; }
.kpi { background: #0d2036; border: 1px solid #1c3d5f; border-radius: 8px; padding: 12px 16px; }
.kpi .label { font-size: 12px; color: #6d92b5; }
.kpi .value { font-size: 26px; font-weight: 700; color: #ffd666; margin-top: 4px; }
.kpi .note { font-size: 12px; color: #8fb3d4; margin-top: 4px; }
.layout { display: grid; grid-template-columns: 2.2fr 1fr; gap: 14px; padding: 0 28px 14px; }
.panel { background: #0d2036; border: 1px solid #1c3d5f; border-radius: 8px; padding: 12px 14px; }
.panel h3 { font-size: 14px; color: #9fd0ef; margin-bottom: 8px; border-left: 3px solid #2f7fd6; padding-left: 8px; }
/* 面板纵向弹性布局：表格滚动区自动撑满面板剩余高度，消除Grid等高拉伸时的底部空白 */
.panel-flex { display: flex; flex-direction: column; }
.panel-flex .scroll.fill { flex: 1 1 auto; max-height: none; min-height: 300px; }
#osmmap { width: 100%; height: 440px; border-radius: 6px; background: #0d2036; z-index: 1; flex: none; touch-action: none; }
#anomalyChart { width: 100%; flex: none; }
.ranklist { flex: none; }
.ranklist table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ranklist td { padding: 4px 6px; border-bottom: 1px solid #16324f; }
.rk1 { color: #ff4d4f; font-weight: 700; }
.rk2 { color: #ff9f6e; font-weight: 700; }
.rk3 { color: #ffd666; font-weight: 700; }
.num { text-align: right; }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; color: #b9d4ea; }
table.data th { background: #122c49; color: #8fb3d4; padding: 6px 8px; text-align: left; position: sticky; top: 0; }
table.data td { padding: 5px 8px; border-bottom: 1px solid #122c49; }
.tag-warm { color: #ff7875; font-weight: 600; }
.tag-cool { color: #69c0ff; font-weight: 600; }
.scroll { max-height: 300px; overflow: auto; }
.footer { text-align: center; color: #557a9e; font-size: 11px; padding: 10px 0 18px; }
.loadfail { color: #88aabb; text-align: center; padding: 40px 0; font-size: 13px; }
/* 地图底图来源角标 */
.tilebadge { font-size: 10px; color: #6d92b5; margin-top: 4px; flex: none; }
/* Leaflet OpenStreetMap 深色主题适配 */
.leaflet-container { background: #0d2036; font-family: inherit; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0d2036; color: #cfe3f7; border: 1px solid #2f7fd6; box-shadow: 0 0 14px rgba(0,0,0,.6); }
.leaflet-popup-content { margin: 10px 14px; line-height: 1.6; }
.leaflet-popup-close-button { color: #8fb3d4 !important; }
.leaflet-control-attribution { background: rgba(13,32,54,.75) !important; color: #6d92b5 !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: #69c0ff !important; }
.leaflet-bar a { background: #122c49; color: #9fd0ef; border-bottom-color: #1c3d5f; }
.leaflet-bar a:hover { background: #1c3d5f; }

/* ============ 地图交互丝滑优化（v4） ============ */
/* 补齐本地精简版leaflet.css缺失的官方动画规则：缩放/平移改为GPU合成的transform过渡 */
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform 0.35s cubic-bezier(0, 0, 0.25, 1); }
.leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile { transition: none; }
.leaflet-zoom-anim .leaflet-zoom-hide { visibility: hidden; }
/* 弹窗淡入淡出 */
.leaflet-fade-anim .leaflet-popup { opacity: 0; transition: opacity 0.2s linear; }
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; }
/* 气温标签：缩放结束后淡入，消除动画尾期的碎片化闪烁 */
.leaflet-marker-icon { transition: opacity 0.12s linear; }
/* 缩放按钮hover反馈 */
.leaflet-control-zoom a { transition: background-color 0.15s ease; }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, 1fr); } .layout { grid-template-columns: 1fr; } }