/* ============ 数据大屏 ============ */
.dash {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 50% -8%, #14304f 0%, transparent 62%),
    linear-gradient(180deg, #060c16 0%, #070d18 55%, #060b14 100%);
  padding: 0 0 18px;
}

.dash-top {
  position: relative;
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px;
  background: linear-gradient(180deg, rgba(20, 48, 82, .75), rgba(8, 16, 28, .2));
  border-bottom: 1px solid rgba(60, 110, 170, .32);
}
.dash-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, #ff6b3d, #ffb04d, #ff6b3d, transparent);
  opacity: .8;
}
.dash-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dash-logo {
  width: 38px; height: 40px; flex: none; object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 180, 77, .5));
}
.dash-title { min-width: 0; }
.dash-title h1 {
  margin: 0; font-size: 19px; font-weight: 800; letter-spacing: 1.4px;
  background: linear-gradient(90deg, #fff, #ffd7b8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-title p { margin: 1px 0 0; font-size: 11.5px; color: var(--sub); letter-spacing: .6px; }

.dash-top-right { display: flex; align-items: center; gap: 14px; }
.dash-clock { text-align: right; line-height: 1.35; }
.dash-clock .t { font-size: 20px; font-weight: 700; color: #cfe6ff; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.dash-clock .d { font-size: 11.5px; color: var(--sub); }

.dash-body {
  display: grid;
  grid-template-columns: 300px 1fr 320px;
  gap: 13px;
  padding: 13px 15px 0;
  align-items: start;
}
.dash-col { display: flex; flex-direction: column; gap: 13px; }

/* KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 11px;
  padding: 13px 15px 0;
}
.kpi {
  position: relative; overflow: hidden;
  padding: 12px 14px;
  background: linear-gradient(160deg, rgba(24, 48, 82, .78), rgba(12, 24, 42, .9));
  border: 1px solid var(--line);
  border-radius: 10px;
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--kc, #ff6b3d);
}
.kpi::after {
  content: ""; position: absolute; right: -18px; top: -18px;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--kc, #ff6b3d); opacity: .1;
}
.kpi .label { font-size: 12px; color: var(--sub); letter-spacing: .5px; }
.kpi .val {
  margin-top: 3px; font-size: 26px; font-weight: 800; line-height: 1.1;
  color: var(--kc, #ff6b3d); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px color-mix(in srgb, var(--kc, #ff6b3d) 45%, transparent);
}
.kpi .val small { font-size: 12px; font-weight: 600; color: var(--sub); margin-left: 3px; text-shadow: none; }

/* 图表区 */
.chart-box { height: 168px; }
.chart-box.tall { height: 210px; }
.legend { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 8px; font-size: 12px; color: var(--txt-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.hyd-total { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 6px; }
.hyd-total .ht-num { font-size: 26px; font-weight: 800; color: #dce8f7; line-height: 1; }
.hyd-total .ht-label { font-size: 12px; color: var(--txt-2); }

/* 重点单位数据统计（按支队/大队展示各级数量） */
.level-by-org { padding: 2px 0; }
.lbo-row { padding: 8px 2px; border-bottom: 1px dashed rgba(60, 100, 150, .18); }
.lbo-row:last-child { border-bottom: 0; }
.lbo-top { display: flex; align-items: center; gap: 8px; }
.lbo-tag {
  flex: none; font-size: 10.5px; line-height: 1; padding: 2px 6px; border-radius: 4px;
  background: rgba(255, 202, 40, .16); color: #ffd97a; border: 1px solid rgba(255, 202, 40, .38);
}
.lbo-tag.b { background: rgba(77, 139, 255, .16); color: #9bbcff; border-color: rgba(77, 139, 255, .38); }
.lbo-name {
  flex: 1; min-width: 0; font-size: 12.5px; color: var(--txt);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lbo-cnts { flex: none; display: flex; gap: 8px; font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lbo-cnts .c1 { color: #ff6b81; }
.lbo-cnts .c2 { color: #ffbe5e; }
.lbo-cnts .c3 { color: #6fe0ef; }
.lbo-cnts .ct { color: #ffca28; font-weight: 700; }
.lbo-bar { display: flex; height: 9px; margin-top: 6px; background: rgba(255,255,255,.05); border-radius: 5px; overflow: hidden; }
.lbo-bar i { display: block; height: 100%; transition: width .4s ease; }
.lbo-bar .s1 { background: #ff3b5c; }
.lbo-bar .s2 { background: #ffa726; }
.lbo-bar .s3 { background: #4dd0e1; }

/* 地图 */
.map-wrap { height: 520px; position: relative; }
.map-layers {
  position: absolute; left: 10px; top: 10px; z-index: 6;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.map-layers button {
  padding: 4px 11px; font-size: 12px; border-radius: 14px; cursor: pointer;
  background: rgba(10, 20, 36, .88); border: 1px solid var(--line-2); color: var(--sub);
  display: inline-flex; align-items: center; gap: 5px;
}
.map-layers button i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.map-layers button.on { color: #fff; border-color: currentColor; background: rgba(30, 60, 100, .9); }
.map-stat {
  position: absolute; right: 10px; bottom: 10px; z-index: 6;
  background: rgba(8, 16, 30, .9); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 8px 12px; font-size: 12px; color: var(--txt-2);
  display: flex; gap: 14px;
}
.map-stat b { color: #fff; font-size: 14px; margin-left: 4px; }

/* 地图模块内容区：原左下角「类别和数量」移入此处 */
.map-foot {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding: 10px 14px; border-top: 1px solid var(--line);
  background: rgba(12, 24, 42, .5); font-size: 12px; color: var(--txt-2);
}
.map-foot .mf-item { display: inline-flex; align-items: center; gap: 6px; }
.map-foot .mf-item i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.map-foot .mf-item b { color: #fff; font-size: 14px; margin-left: 2px; }
.map-foot .mf-item.warn b { color: #ff8095; }

/* 地图图层按钮：可展开的多级菜单（重点单位按等级 / 消防水源按类型） */
.layer-group { position: relative; display: inline-flex; align-items: center; }
.layer-menu {
  position: absolute; top: 100%; left: 0; margin-top: 6px; z-index: 12;
  display: none; flex-direction: column; gap: 4px; padding: 8px;
  background: rgba(10, 20, 36, .96); border: 0; border-radius: 8px;
  min-width: 128px; box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
}
.layer-menu.open { display: flex; }
/* 下拉选项：无描边（去掉深蓝 #263d61 视觉黑边），选中态用背景色区分 */
.layer-menu .sub-layer {
  padding: 5px 11px; font-size: 12px; border-radius: 8px; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .06); border: 0; color: var(--sub);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.layer-menu .sub-layer i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc, currentColor); display: inline-block; }
.layer-menu .sub-layer:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.layer-menu .sub-layer.on {
  color: #fff;
  background: color-mix(in srgb, var(--acc, #2ec5ce) 26%, transparent);
}

/* 地图标记基本信息浮层（点击 重点单位 / 消防水源 / 消防站 / 消防大队 图标后展示） */
.map-info {
  position: absolute; top: 14px; right: 14px; width: 250px; max-width: calc(100% - 28px);
  background: linear-gradient(180deg, rgba(14, 30, 52, .96), rgba(8, 18, 34, .96));
  border: 1px solid rgba(80, 140, 210, .45); border-radius: 10px;
  padding: 12px 14px; color: #dbe7f6; z-index: 30;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease;
  visibility: hidden; pointer-events: auto;
}
.map-info.show { opacity: 1; transform: none; visibility: visible; }
.map-info .mi-close {
  position: absolute; top: 7px; right: 8px; width: 22px; height: 22px; line-height: 20px;
  text-align: center; border: none; background: transparent; color: #9fb6d2;
  font-size: 19px; cursor: pointer; border-radius: 4px;
}
.map-info .mi-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.map-info .mi-badge {
  display: inline-block; font-size: 11px; padding: 1px 9px; border-radius: 10px;
  margin-bottom: 5px; letter-spacing: .5px;
}
.map-info .mi-badge.u { background: rgba(255, 107, 61, .18); color: #ff9d7d; border: 1px solid rgba(255, 107, 61, .4); }
.map-info .mi-badge.h { background: rgba(46, 197, 206, .18); color: #6fd8de; border: 1px solid rgba(46, 197, 206, .4); }
.map-info .mi-badge.o { background: rgba(255, 202, 40, .18); color: #ffd97a; border: 1px solid rgba(255, 202, 40, .4); }
.map-info .mi-title {
  font-size: 15px; font-weight: 700; margin-bottom: 8px; color: #fff;
  line-height: 1.35; word-break: break-all;
}
.map-info .mi-row { display: flex; gap: 8px; font-size: 12.5px; margin: 3px 0; line-height: 1.45; }
.map-info .mi-k { flex: none; color: #8aa3c2; min-width: 56px; }
.map-info .mi-v { color: #dbe7f6; word-break: break-all; }
.map-info .mi-brief { font-size: 12px; color: #a9bcd4; margin-top: 6px; line-height: 1.5; }
.map-info .mi-nav {
  display: block; margin-top: 11px; padding: 8px 10px;
  text-align: center; font-size: 12.5px; text-decoration: none; cursor: pointer;
  color: #cfe6ff; background: rgba(46, 197, 206, .14);
  border: 1px solid rgba(46, 197, 206, .42); border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.map-info .mi-nav:hover { background: rgba(46, 197, 206, .26); color: #fff; }
.map-info .mi-link { color: #6fd8de; text-decoration: none; border-bottom: 1px dashed rgba(111, 216, 222, .6); }
.map-info .mi-link:hover { color: #fff; border-bottom-color: #fff; }

/* 滚动列表 */
.roll-list { max-height: 232px; overflow: hidden; position: relative; }
.roll-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 4px; border-bottom: 1px dashed rgba(60, 100, 150, .22);
  font-size: 12.5px;
}
.roll-item:last-child { border-bottom: 0; }
.roll-item .idx {
  width: 18px; height: 18px; flex: none; border-radius: 4px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: rgba(255, 107, 61, .18); color: #ff9b6b;
}
.roll-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); }
.roll-item .mt { color: var(--sub); font-size: 11.5px; flex: none; }

/* 排行 */
.rank-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; }
.rank-row .rn {
  width: 20px; flex: none; text-align: center; font-weight: 700; font-size: 11.5px;
  color: var(--sub);
}
.rank-row:nth-child(1) .rn { color: #ffca28; }
.rank-row:nth-child(2) .rn { color: #cfd8e6; }
.rank-row:nth-child(3) .rn { color: #e0913f; }
.rank-row .rname { width: 92px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt-2); }
.rank-row .rbar { flex: 1; height: 9px; background: rgba(255, 255, 255, .06); border-radius: 5px; overflow: hidden; }
.rank-row .rbar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #2f6fe0, #4dc3ff); }
.rank-row .rnum { width: 32px; flex: none; text-align: right; color: #8fc4ff; font-weight: 700; font-variant-numeric: tabular-nums; }

.dash-foot {
  margin: 13px 15px 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 24, 42, .6);
  font-size: 11.5px; color: var(--sub);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* 底部「技术支持 · 骚包授权」入口。
   与 .dash-foot 同字号、同基线，只靠主色描边 + hover 提亮来突出，
   不额外撑高底栏（贴近授权站的品牌观感）。 */
.dash-foot .powered-by {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  border: 1px solid rgba(255, 107, 61, .34);
  border-radius: 999px;
  background: rgba(255, 107, 61, .07);
  color: var(--txt-2); text-decoration: none; white-space: nowrap;
  transition: border-color .18s, background .18s, color .18s;
}
.dash-foot .powered-by b { color: var(--acc-2); font-weight: 600; letter-spacing: .3px; }
.dash-foot .powered-by em {
  font-style: normal; color: var(--sub);
  padding-left: 6px; border-left: 1px solid var(--line-2);
}
.dash-foot .powered-by .pb-ico { width: 13px; height: 13px; color: var(--acc); flex: none; }
.dash-foot .powered-by .pb-arrow {
  width: 11px; height: 11px; flex: none;
  opacity: .55; transition: opacity .18s, transform .18s;
}
.dash-foot .powered-by:hover {
  border-color: rgba(255, 107, 61, .72);
  background: rgba(255, 107, 61, .14);
  color: var(--txt);
}
.dash-foot .powered-by:hover .pb-arrow { opacity: 1; transform: translate(1px, -1px); }
.dash-foot .powered-by:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
/* 窄屏下省掉三个能力词，只留品牌名，避免底栏换行过多 */
@media (max-width: 900px) {
  .dash-foot .powered-by em { display: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 1500px) {
  .dash-body { grid-template-columns: 268px 1fr 288px; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1180px) {
  .dash-body { grid-template-columns: 1fr 1fr; }
  .dash-col.center { grid-column: 1 / -1; order: -1; }
  .map-wrap { height: 420px; }
}
@media (max-width: 768px) {
  .dash-top { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .dash-title h1 { font-size: 15px; white-space: normal; }
  .dash-clock .t { font-size: 16px; }
  .dash-body { grid-template-columns: 1fr; padding: 10px 10px 0; gap: 10px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); padding: 10px 10px 0; gap: 9px; }
  .kpi { padding: 10px 11px; }
  .kpi .val { font-size: 21px; }
  .map-wrap { height: 320px; }
  .chart-box { height: 150px; }
  .dash-foot { margin: 10px 10px 0; font-size: 11px; }
}
