/* 楼宇可视化管理平台 · 共享样式（深色科技大屏 · Desigo Optic 风格） */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: #050b16;
  color: #c9d8e8;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  overflow-x: hidden;
  background-image:
    radial-gradient(1100px 480px at 75% -10%, rgba(0,180,170,.14), transparent 62%),
    radial-gradient(800px 380px at 8% 108%, rgba(30,90,180,.13), transparent 60%),
    linear-gradient(rgba(10,25,45,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,25,45,.35) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}
/* ── 顶部导航 ── */
.dash-head {
  display: flex; align-items: center; gap: 20px;
  height: 62px; padding: 0 24px;
  background: linear-gradient(90deg, rgba(8,22,42,.96), rgba(7,17,32,.9));
  border-bottom: 1px solid rgba(0,190,190,.3);
  box-shadow: 0 2px 24px rgba(0,0,0,.4), 0 1px 0 rgba(0,220,220,.08) inset;
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.dash-logo { display: flex; align-items: center; gap: 11px; }
.dash-logo .mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #00b3b3, #0b5fa5);
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 0 14px rgba(0,200,200,.4);
}
.dash-logo .name { font-size: 16px; font-weight: 700; color: #eaf6ff; letter-spacing: 1.5px; }
.dash-logo .sub { font-size: 9.5px; color: #55809f; letter-spacing: 2.6px; margin-top: 1px; }
.dash-nav { display: flex; gap: 4px; margin-left: 18px; flex-wrap: nowrap; }
.dash-nav a {
  padding: 7px 15px; font-size: 13px; color: #8fb2cc; text-decoration: none;
  border-radius: 7px; border: 1px solid transparent; transition: .2s; position: relative;
  white-space: nowrap; flex: none;
}
.dash-nav a:hover { color: #4fe3e3; background: rgba(0,180,180,.07); }
.dash-nav a.on {
  color: #4fe3e3; border-color: rgba(0,200,200,.45);
  background: linear-gradient(180deg, rgba(0,180,180,.16), rgba(0,140,140,.08));
  box-shadow: 0 0 14px rgba(0,190,190,.18) inset, 0 2px 8px rgba(0,0,0,.3);
}
.dash-time { margin-left: auto; font-size: 12px; color: #55809f; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
/* ── 布局 ── */
.dash-body { padding: 16px 20px 30px; max-width: 1720px; margin: 0 auto; }
.grid { display: grid; gap: 14px; }
/* ── 面板 ── */
.panel {
  background: linear-gradient(165deg, rgba(14,33,58,.94), rgba(9,21,39,.9));
  border: 1px solid rgba(55,125,170,.3);
  border-radius: 12px; padding: 15px 17px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,.28), 0 1px 0 rgba(120,200,230,.05) inset;
  transition: border-color .25s, box-shadow .25s;
}
.panel:hover { border-color: rgba(0,200,200,.4); box-shadow: 0 4px 26px rgba(0,0,0,.34), 0 0 18px rgba(0,180,180,.07); }
.panel::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  background: linear-gradient(#00d8d8, rgba(0,200,200,.05)); border-radius: 2px;
  box-shadow: 0 0 8px rgba(0,210,210,.5);
}
.panel::after {
  content: ""; position: absolute; right: 0; top: 0; width: 26px; height: 26px;
  border-top: 1.5px solid rgba(0,200,200,.35); border-right: 1.5px solid rgba(0,200,200,.35);
  border-top-right-radius: 12px; pointer-events: none;
}
.panel h3 {
  font-size: 14px; font-weight: 600; color: #cdeef6; letter-spacing: 1.2px;
  margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between;
}
.panel h3 .tag { font-size: 11px; font-weight: 400; color: #55809f; letter-spacing: .3px; }
.chart { width: 100%; height: 260px; }
.chart-sm { width: 100%; height: 200px; }
.chart-lg { width: 100%; height: 320px; }
/* ── KPI 卡（图标 + 迷你环 + 数值）── */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: linear-gradient(155deg, rgba(15,36,64,.96), rgba(9,22,40,.92));
  border: 1px solid rgba(55,125,170,.32); border-radius: 12px;
  padding: 14px 14px; position: relative; overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.26);
  transition: transform .2s, border-color .25s, box-shadow .25s;
}
.kpi:hover { transform: translateY(-2px); border-color: rgba(0,200,200,.45); box-shadow: 0 8px 26px rgba(0,0,0,.34), 0 0 20px rgba(0,180,180,.09); }
.kpi::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,210,210,.55), transparent);
}
.kpi::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 96px; height: 96px;
  border-radius: 50%; background: radial-gradient(circle, rgba(0,200,200,.16), transparent 70%);
}
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.kpi .label { font-size: 12px; color: #6f97b5; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .kpi-ico {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(0,180,180,.13); border: 1px solid rgba(0,200,200,.28);
  color: #4fe3e3; box-shadow: 0 0 10px rgba(0,190,190,.12);
}
.kpi .val { font-size: 24px; font-weight: 700; color: #e8fbff; font-variant-numeric: tabular-nums; line-height: 1; text-shadow: 0 0 18px rgba(0,200,220,.25); white-space: nowrap; }
.kpi .val small { font-size: 12px; color: #6f97b5; font-weight: 400; margin-left: 4px; text-shadow: none; }
.kpi .trend { margin-top: 9px; font-size: 11px; }
.kpi .trend.up { color: #ff7a7a; }
.kpi .trend.down { color: #35e0b0; }
.kpi .trend.flat { color: #6f97b5; }
.kpi.accent { border-color: rgba(0,200,200,.42); }
.kpi.accent .val { color: #4fe3e3; }
/* KPI 迷你环形进度（右上角，可选） */
.kpi .ring { position: absolute; right: 14px; bottom: 12px; width: 44px; height: 44px; }
/* ── 表格 ── */
.dtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.dtable th {
  text-align: left; color: #55809f; font-weight: 500; padding: 8px 10px;
  border-bottom: 1px solid rgba(55,125,170,.3); white-space: nowrap;
  letter-spacing: .5px; font-size: 11.5px;
}
.dtable td { padding: 8.5px 10px; border-bottom: 1px solid rgba(55,125,170,.13); color: #b8cfe2; white-space: nowrap; }
.dtable tr:hover td { background: rgba(0,170,170,.07); }
.dtable tr:last-child td { border-bottom: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.g { background: #2fe6a8; box-shadow: 0 0 7px #2fe6a8; animation: dotb 2s infinite; }
.dot.y { background: #ffc658; box-shadow: 0 0 7px #ffc658; }
.dot.r { background: #ff6b6b; box-shadow: 0 0 7px #ff6b6b; animation: dotb 1.2s infinite; }
.dot.b { background: #45a3ff; box-shadow: 0 0 7px #45a3ff; }
@keyframes dotb { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
/* ── 进度条 ── */
.bar { height: 6px; background: rgba(80,140,180,.16); border-radius: 3px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #009999, #4fe3e3); border-radius: 3px; box-shadow: 0 0 6px rgba(0,210,210,.4); transition: width .8s cubic-bezier(.2,.8,.3,1); }
.bar i.warn { background: linear-gradient(90deg, #b8860b, #ffc658); box-shadow: 0 0 6px rgba(255,198,88,.4); }
.bar i.danger { background: linear-gradient(90deg, #a03040, #ff6b6b); box-shadow: 0 0 6px rgba(255,107,107,.4); }
/* ── 告警列表 ── */
.alarm { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px solid rgba(55,125,170,.13); font-size: 12px; align-items: center; animation: alarmIn .4s ease; }
@keyframes alarmIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.alarm:last-child { border-bottom: 0; }
.alarm .lv { padding: 2px 8px; border-radius: 4px; font-size: 11px; flex-shrink: 0; }
.alarm .lv.hi { background: rgba(255,107,107,.16); color: #ff8f8f; box-shadow: 0 0 8px rgba(255,107,107,.15); }
.alarm .lv.mid { background: rgba(255,198,88,.13); color: #ffd07a; }
.alarm .lv.lo { background: rgba(69,163,255,.13); color: #7fc0ff; }
.alarm .txt { color: #b8cfe2; flex: 1; }
.alarm .tm { color: #4f6f8c; font-size: 11px; font-variant-numeric: tabular-nums; }
/* 数值高亮 */
.num { font-variant-numeric: tabular-nums; color: #4fe3e3; font-weight: 600; }
.num.warm { color: #ffc658; }
.num.bad { color: #ff8f8f; }

/* ── LIVE 实时徽章 ── */
.live-badge {
  display: flex; align-items: center; gap: 6px; margin-left: 12px !important;
  font-size: 11px; color: #35e0b0; letter-spacing: 1px;
  padding: 4px 11px; border: 1px solid rgba(53,224,176,.4); border-radius: 20px;
  background: rgba(53,224,176,.09);
  box-shadow: 0 0 12px rgba(53,224,176,.1);
}
.live-badge .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: #35e0b0;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53,224,176,.6); opacity: 1; }
  50% { box-shadow: 0 0 0 6px rgba(53,224,176,0); opacity: .6; }
}
.dash-time { margin-left: 14px; }
/* 数字刷新微闪 */
[data-live] { transition: color .3s; }

/* 公司官网入口链接 */
.site-link { margin-left: auto; padding: 6px 14px; border: 1px solid rgba(0,200,200,.38); border-radius: 7px; color: #4fe3e3; font-size: 12px; text-decoration: none; transition: all .2s; }
.site-link:hover { background: rgba(0,200,200,.13); border-color: rgba(0,200,200,.65); box-shadow: 0 0 12px rgba(0,190,190,.15); }

/* ── 仪表盘（半圆 gauge）容器 ── */
.gauge-wrap { display: flex; align-items: center; justify-content: center; height: 100%; }

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(10,25,45,.4); }
::-webkit-scrollbar-thumb { background: rgba(0,150,150,.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,180,180,.5); }
