/* ===== 数据大屏样式（从 bigscreen.html 拆分）===== */
:root {
  --bg-color: #020814;
  --panel-bg: rgba(4, 18, 42, 0.8);
  --border-color: #0d4b8c;
  --border-glow: #00e5ff;
  --text-main: #7badd6;
  --text-white: #ffffff;
  --highlight: #00e5ff;
  --warning: #f5a623;
  --danger: #ff4d4f;
  --success: #52c41a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-color);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(0, 229, 255, .06) 0%, transparent 60%);
  color: var(--text-main);
  height: 100vh; overflow: hidden;
}

/* ===== 顶栏 ===== */
header {
  height: 96px; display: flex; flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, rgba(0, 229, 255, .08) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
}
.header-top {
  height: 62px; flex-shrink: 0; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: relative;
}
.header-left { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-white); font-weight: 600; }
.header-left .logo { font-size: 22px; }
.header-title {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 23px; font-weight: 700; color: var(--text-white); letter-spacing: 3px;
  text-shadow: 0 0 15px rgba(0, 229, 255, .6), 0 0 30px rgba(0, 229, 255, .3);
  white-space: nowrap;
}
.header-right { display: flex; align-items: center; gap: 14px; font-size: 14px; }

/* 管理导航菜单（对齐对标平台 nav-tabs） */
.nav-tabs {
  display: flex; gap: 4px; height: 34px; flex-shrink: 0;
  justify-content: center; align-items: stretch; padding: 0 24px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs div {
  padding: 0 18px; cursor: pointer; font-size: 13.5px; color: #5c8bb0;
  position: relative; transition: all .3s; display: flex; align-items: center;
  white-space: nowrap; user-select: none;
}
.nav-tabs div:hover { color: #9dc9e8; }
.nav-tabs div.active { color: var(--highlight); text-shadow: 0 0 10px var(--highlight); font-weight: 700; }
.nav-tabs div.active::before {
  content: ''; position: absolute; bottom: 0; left: 10%; width: 80%; height: 100%;
  background: linear-gradient(0deg, rgba(0, 229, 255, .2) 0%, transparent 100%);
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}
.nav-tabs div.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 40px; height: 2px; background: var(--highlight);
  box-shadow: 0 0 10px var(--highlight);
}
#clock { color: var(--highlight); font-variant-numeric: tabular-nums; font-size: 15px; }
.alert-bell { color: var(--warning); position: relative; }
.alert-bell .dot {
  position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px;
  background: var(--danger); color: #fff; border-radius: 8px; font-size: 10px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.header-btn {
  color: var(--highlight); text-decoration: none; font-size: 13px;
  border: 1px solid var(--border-color); padding: 4px 12px; border-radius: 4px;
  transition: all .2s;
}
.header-btn:hover { background: rgba(0, 229, 255, .12); border-color: var(--highlight); }

/* ===== 三栏布局 ===== */
.container {
  flex: 1; display: flex; padding: 12px; gap: 12px;
  height: calc(100vh - 96px);
}
.side-panel { width: 26%; display: flex; flex-direction: column; gap: 12px; }
.center-panel {
  width: 48%; position: relative;
  background: rgba(4, 18, 42, 0.4);
  border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0, 229, 255, .05);
}

/* 科技感盒子 */
.tech-box {
  background: var(--panel-bg); border: 1px solid var(--border-color);
  position: relative; padding: 12px 14px; display: flex; flex-direction: column;
  box-shadow: inset 0 0 20px rgba(0, 229, 255, .05); border-radius: 2px;
  flex: 1; min-height: 0;
}
.tech-box::before, .tech-box::after {
  content: ''; position: absolute; width: 12px; height: 12px;
  border: 2px solid var(--border-glow); opacity: .8;
}
.tech-box::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.tech-box::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.box-title {
  font-size: 14px; color: var(--text-white); font-weight: 600;
  margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between;
  letter-spacing: .5px; text-shadow: none; flex-shrink: 0;
}
.box-title .sub { font-size: 11px; color: var(--text-main); font-weight: 400; letter-spacing: 0; }
.box-body { flex: 1; min-height: 0; display: flex; gap: 10px; }

/* 设备总览 */
.overview-chart { width: 42%; height: 100%; min-height: 90px; }
.overview-stats {
  width: 58%; display: grid; grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr; gap: 6px; align-content: center;
}
.stat-item {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  font-size: 11px; background: rgba(0, 229, 255, .03);
  border: 1px solid rgba(0, 229, 255, .1); border-radius: 3px; padding: 4px;
}
.stat-item .num { font-size: 19px; font-weight: 700; color: var(--highlight); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-item .num.green { color: var(--success); }
.stat-item .num.red { color: var(--danger); }
.stat-item .num.orange { color: var(--warning); }
.stat-item .lbl { color: var(--text-main); font-size: 10px; margin-top: 2px; }

/* 图表容器 */
.chart-wrap { flex: 1; position: relative; min-height: 0; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* 报警总览圆形 */
.alert-circles { display: flex; justify-content: space-around; align-items: center; flex: 1; }
.alert-circle {
  width: 100px; height: 100px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
}
.alert-circle::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255, 77, 79, .35); animation: pulse 2s infinite;
}
.alert-circle.today::before { border-color: rgba(255, 77, 79, .5); }
.alert-circle.month::before { border-color: rgba(245, 166, 35, .45); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.05); opacity: .5; }
}
.alert-circle .num { font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.alert-circle.today .num { color: var(--danger); text-shadow: 0 0 12px rgba(255,77,79,.6); }
.alert-circle.month .num { color: var(--warning); text-shadow: 0 0 12px rgba(245,166,35,.6); }
.alert-circle .label { font-size: 12px; color: var(--text-main); margin-top: 4px; }

/* 实时报警列表 */
.alert-list { flex: 1; overflow-y: auto; margin: -4px -4px 0; }
.alert-list::-webkit-scrollbar { width: 4px; }
.alert-list::-webkit-scrollbar-thumb { background: rgba(0,229,255,.25); border-radius: 2px; }
.alert-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px;
  border-bottom: 1px solid rgba(13, 75, 140, .3); font-size: 12px;
}
.alert-item:last-child { border-bottom: none; }
.alert-item .icon { flex-shrink: 0; font-size: 12px; }
.alert-item .body { flex: 1; min-width: 0; }
.alert-item .msg { color: #cfe4f5; line-height: 1.4; word-break: break-all; }
.alert-item .time { color: #4a6b8a; font-size: 10px; margin-top: 2px; }
.alert-item.critical { background: rgba(255, 77, 79, .06); }
.alert-item.warning { background: rgba(245, 166, 35, .05); }

/* 中间：楼层分布 + 设备信息 */
.center-col {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  gap: 10px; padding: 12px;
}
.floor-block, .device-block { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.floor-block .box-title, .device-block .box-title { margin-bottom: 8px; font-size: 13px; }
.floor-map {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px; align-content: start; padding-right: 4px;
}
.floor-map::-webkit-scrollbar, .device-table-wrap::-webkit-scrollbar { width: 4px; }
.floor-map::-webkit-scrollbar-thumb, .device-table-wrap::-webkit-scrollbar-thumb { background: rgba(0,229,255,.25); border-radius: 2px; }

/* 设备信息表格 */
.device-table-wrap { flex: 1; min-height: 0; overflow-y: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  position: sticky; top: 0; z-index: 2;
  background: rgba(4, 18, 42, .97); color: #5c8bb0; font-weight: 500;
  padding: 6px 8px; text-align: left; font-size: 11px;
  border-bottom: 1px solid rgba(13, 75, 140, .6); white-space: nowrap;
}
.data-table td {
  padding: 6px 8px; border-bottom: 1px solid rgba(13, 75, 140, .22);
  color: #cfe4f5; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.data-table tr:hover td { background: rgba(0, 229, 255, .05); }
.data-table .td-empty { text-align: center; color: #3d5a75; padding: 18px; }
.dot-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.dot-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4a6b8a; }
.dot-status.online { color: var(--success); }
.dot-status.online::before { background: var(--success); box-shadow: 0 0 6px var(--success); }
.dot-status.alarm { color: var(--danger); }
.dot-status.alarm::before { background: var(--danger); box-shadow: 0 0 6px var(--danger); }
.dot-status.offline { color: #6b8299; }
.floor-card {
  background: rgba(0, 229, 255, .04); border: 1px solid rgba(0, 229, 255, .18);
  border-radius: 4px; padding: 12px; position: relative; transition: all .2s;
}
.floor-card:hover { background: rgba(0, 229, 255, .09); border-color: var(--highlight); box-shadow: 0 0 16px rgba(0,229,255,.2); }
.floor-card .fname { font-size: 13px; color: var(--text-white); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.floor-card .fname::before { content: ''; width: 6px; height: 6px; background: var(--highlight); border-radius: 50%; box-shadow: 0 0 8px var(--highlight); }
.floor-card .frow { display: flex; justify-content: space-between; font-size: 12px; margin: 4px 0; }
.floor-card .frow .k { color: var(--text-main); }
.floor-card .frow .v { color: var(--highlight); font-weight: 600; font-variant-numeric: tabular-nums; }
.floor-card .frow .v.green { color: var(--success); }
.floor-card .frow .v.red { color: var(--danger); }

/* 中心浮动面板 */
.center-float-panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(2, 12, 30, .92); border: 2px solid rgba(0, 229, 255, .3);
  box-shadow: 0 0 40px rgba(0, 229, 255, .2), inset 0 0 30px rgba(0, 229, 255, .06);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 5; pointer-events: none;
}
.center-float-panel .cf-num {
  font-size: 40px; font-weight: 700; color: var(--highlight); line-height: 1;
  text-shadow: 0 0 20px rgba(0, 229, 255, .7); font-variant-numeric: tabular-nums;
}
.center-float-panel .cf-lbl { font-size: 12px; color: var(--text-main); margin-top: 4px; letter-spacing: 1px; }
.center-float-panel .cf-sub { font-size: 11px; color: var(--success); margin-top: 6px; }

/* 载入/空态 */
.loading { display: flex; align-items: center; justify-content: center; height: 100%; color: #3d5a75; font-size: 13px; }

/* ===== 大屏内模块视图（不跳转） ===== */
.view { height: calc(100vh - 96px); }
.data-panel {
  margin: 12px; height: calc(100vh - 96px - 24px);
  background: var(--panel-bg); border: 1px solid var(--border-color);
  position: relative; padding: 14px 16px; display: flex; flex-direction: column;
  box-shadow: inset 0 0 20px rgba(0, 229, 255, .05); border-radius: 2px;
}
.data-panel::before, .data-panel::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--border-glow); opacity: .8;
}
.data-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.data-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.data-panel .box-title { cursor: default; }
.data-toolbar { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.data-toolbar select, .data-toolbar button, .data-toolbar input {
  background: rgba(0, 229, 255, .06); border: 1px solid var(--border-color);
  color: #cfe4f5; padding: 5px 10px; border-radius: 3px; font-size: 12px;
  cursor: pointer; outline: none; transition: all .2s;
}
.data-toolbar button:hover, .data-toolbar select:focus { border-color: var(--highlight); background: rgba(0, 229, 255, .12); }
.data-toolbar .tb-label { font-size: 12px; color: var(--text-main); }
.data-body { flex: 1; min-height: 0; overflow: auto; }
.data-body::-webkit-scrollbar { width: 5px; height: 5px; }
.data-body::-webkit-scrollbar-thumb { background: rgba(0,229,255,.25); border-radius: 3px; }
.data-body .chart-area { height: 100%; min-height: 300px; }
.msg-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; gap: 14px; color: var(--text-main); font-size: 14px;
}
.msg-card .big-ico { font-size: 46px; opacity: .8; }
.msg-card a {
  color: var(--highlight); border: 1px solid var(--border-color);
  padding: 7px 20px; border-radius: 4px; text-decoration: none; font-size: 13px;
}
.msg-card a:hover { background: rgba(0, 229, 255, .12); border-color: var(--highlight); }

@media (max-width: 1600px) {
  .header-title { font-size: 20px; letter-spacing: 2px; }
  .tech-box { padding: 9px 11px; }
  .box-title { font-size: 13px; margin-bottom: 7px; }
  .alert-circle { width: 84px; height: 84px; }
  .alert-circle .num { font-size: 24px; }
  .center-float-panel { width: 150px; height: 150px; }
  .center-float-panel .cf-num { font-size: 32px; }
  .floor-card { padding: 9px; }
}
/* 窄屏（<1100）才降级为纵向滚动 */
@media (max-width: 1100px) {
  body { height: auto; overflow-y: auto; }
  header { height: auto; padding-bottom: 4px; }
  .header-title { font-size: 16px; letter-spacing: 1px; }
  .nav-tabs { justify-content: flex-start; padding: 0 12px; }
  .container { flex-direction: column; height: auto; }
  .view { height: auto; }
  .data-panel { height: auto; min-height: 70vh; }
  .side-panel, .center-panel { width: 100%; }
  .center-panel { min-height: 380px; }
  .tech-box { min-height: 170px; }
  .floor-block, .device-block { min-height: 220px; }
}

/* ===== 线框图标（无 emoji，偏真实产品） ===== */
.ico {
  display: inline-block; width: 16px; height: 16px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  opacity: .85;
}
.i-monitor { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='12' rx='1.5'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='12' rx='1.5'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
.i-device { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
.i-data { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M22 19H2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M4 19V9M10 19V5M16 19v-7M22 19H2'/%3E%3C/svg%3E"); }
.i-alarm,.i-bell { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M6 9a6 6 0 1 1 12 0c0 7 3 7 3 7H3s3 0 3-7'/%3E%3Cpath d='M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M6 9a6 6 0 1 1 12 0c0 7 3 7 3 7H3s3 0 3-7'/%3E%3Cpath d='M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.i-system,.i-set { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.i-dash { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='3' width='8' height='8' rx='1'/%3E%3Crect x='13' y='3' width='8' height='5' rx='1'/%3E%3Crect x='13' y='10' width='8' height='11' rx='1'/%3E%3Crect x='3' y='13' width='8' height='8' rx='1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='3' width='8' height='8' rx='1'/%3E%3Crect x='13' y='3' width='8' height='5' rx='1'/%3E%3Crect x='13' y='10' width='8' height='11' rx='1'/%3E%3Crect x='3' y='13' width='8' height='8' rx='1'/%3E%3C/svg%3E"); }
.i-list { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01'/%3E%3C/svg%3E"); }
.i-map { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 21s7-5.3 7-11a7 7 0 1 0-14 0c0 5.7 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M12 21s7-5.3 7-11a7 7 0 1 0-14 0c0 5.7 7 11 7 11z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E"); }
.i-table { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5'/%3E%3Cpath d='M3 9h18M3 14h18M9 9v11M15 9v11'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5'/%3E%3Cpath d='M3 9h18M3 14h18M9 9v11M15 9v11'/%3E%3C/svg%3E"); }
.i-chart { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 20h18M5 16l4-5 3 3 5-7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 20h18M5 16l4-5 3 3 5-7'/%3E%3C/svg%3E"); }
.i-user { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20c1.5-3.5 4-5 7-5s5.5 1.5 7 5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20c1.5-3.5 4-5 7-5s5.5 1.5 7 5'/%3E%3C/svg%3E"); }

.brand-mark {
  width: 10px; height: 10px; border-radius: 2px;
  background: #3d8fd1;
  box-shadow: 4px 0 0 #2a6fa8, 0 4px 0 #2a6fa8, 4px 4px 0 #1e5478;
  margin-right: 4px;
}

/* ===== 顶栏一级菜单 ===== */
.nav-cards {
  display: flex; gap: 6px; height: 44px; flex-shrink: 0;
  justify-content: center; align-items: center; padding: 0 20px 10px;
  overflow-x: auto; scrollbar-width: none;
}
.nav-cards::-webkit-scrollbar { display: none; }
.nav-card {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px; cursor: pointer; user-select: none;
  color: #7a9bb8; transition: color .15s, background .15s, border-color .15s;
}
.nav-card:hover {
  color: #d6e6f5;
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
.nav-card.active {
  color: #e8f3fc;
  background: rgba(61, 143, 209, .14);
  border-color: rgba(61, 143, 209, .45);
}
.nav-card .ico { color: inherit; opacity: 1; width: 15px; height: 15px; }
.nav-card-title {
  font-size: 13px; font-weight: 500; letter-spacing: .3px;
  white-space: nowrap;
}
.nav-card.active .nav-card-title { font-weight: 600; }

/* 主体：左侧二级 + 内容 */
.bs-body {
  flex: 1; min-height: 0; display: flex; width: 100%;
}
.bs-sidebar {
  width: 168px; flex-shrink: 0;
  background: rgba(6, 16, 32, .96);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column;
  padding: 14px 8px;
}
.side-head {
  padding: 4px 12px 12px;
  font-size: 11px; font-weight: 600; color: #5c7a94;
  letter-spacing: 1.5px; text-transform: none;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 10px;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 3px; cursor: pointer;
  color: #8aa4bc; font-size: 13px; transition: background .15s, color .15s;
  border-left: 2px solid transparent;
}
.side-item:hover { background: rgba(255,255,255,.04); color: #d6e6f5; }
.side-item.active {
  background: rgba(61, 143, 209, .12);
  color: #dceaf8;
  border-left-color: #3d8fd1;
  font-weight: 500;
}
.side-item .ico { color: inherit; opacity: .9; }
.side-item-txt { white-space: nowrap; }

.alert-bell { display: inline-flex; align-items: center; position: relative; color: #c4a35a; }
.alert-bell .ico { width: 16px; height: 16px; color: currentColor; }

/* 顶栏高度 */
header { height: auto; min-height: 96px; }
.header-left .logo { display: none; }
.header-title {
  text-shadow: none;
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 20px;
}
.bs-main #view-dashboard.container,
.bs-main .dash-view {
  height: calc(100vh - 106px);
}
.bs-body.has-sidebar .bs-content { min-width: 0; }

@media (max-width: 1100px) {
  .nav-cards { justify-content: flex-start; }
  .bs-body.has-sidebar { flex-direction: column; }
  .bs-sidebar {
    width: 100%; border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-direction: row; align-items: center; gap: 8px;
    padding: 8px 12px; overflow-x: auto;
  }
  .side-head { border-bottom: none; margin-bottom: 0; padding: 4px 8px; flex-shrink: 0; }
  .side-nav { flex-direction: row; }
  .side-item { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
  .side-item.active { border-bottom-color: #3d8fd1; }
}

/* ===== 统一大屏：管理组件暗色主题桥接 ===== */
body.scrollable { height: auto; min-height: 100vh; overflow-y: auto; }
.bs-main { display: flex; flex-direction: column; height: 100vh; min-height: 100vh; overflow: hidden; }
.bs-content { flex: 1; min-height: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
body.scrollable .bs-main { height: auto; min-height: 100vh; overflow: visible; }
body.scrollable .bs-content { overflow: visible; padding: 12px 16px 24px; }
.bs-main #view-dashboard.container,
.bs-main .dash-view {
  display: flex;
  flex: 1;
  height: calc(100vh - 96px);
  width: 100%;
  margin: 0;
  padding: 12px;
  box-sizing: border-box;
}
/* 管理模块：确保盖在大屏之上、可滚动可见 */
.bs-main .tab-content {
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: none;
  max-height: none;
  overflow: visible;
  padding: 4px 8px 20px;
  margin: 0;
  width: 100%;
  background: var(--bg-color);
}
/* ===== 数据分析：全局分析 / 趋势对比 / 数据明细 ===== */
.dc-page { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ga-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 12px 16px;
  background: linear-gradient(160deg, rgba(6, 24, 52, .85), rgba(3, 14, 32, .9));
  border: 1px solid var(--border-color);
}
.ga-title { display: flex; align-items: baseline; gap: 10px; min-width: 200px; }
.ga-title strong { font-size: 16px; color: #e8f4ff; letter-spacing: .06em; }
.ga-title span { font-size: 12px; color: #7badd6; }
.ga-title em {
  font-style: normal; font-size: 11px; padding: 2px 8px;
  border: 1px solid rgba(82,196,26,.5); color: #52c41a;
  background: rgba(82,196,26,.1);
}
.ga-title em.warn {
  border-color: rgba(245,166,35,.55); color: #f5a623;
  background: rgba(245,166,35,.1);
}
.ga-actions { margin-left: auto; }
.ga-actions .btn.on {
  border-color: var(--highlight);
  background: rgba(0, 229, 255, .15);
  color: #fff;
}
.rp-chart-tall { min-height: 280px; }
.dc-filter {
  background: linear-gradient(160deg, rgba(6, 24, 52, .75), rgba(3, 14, 32, .8));
  border: 1px solid var(--border-color);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.dc-filter-row {
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: flex-end;
}
.dc-field { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.dc-field-grow { flex: 1; min-width: 240px; }
.dc-label {
  font-size: 11px; letter-spacing: .12em; color: #8eb8d8; text-transform: none;
}
.dc-field select,
.dc-datetime input[type="datetime-local"] {
  height: 34px; min-width: 140px;
  padding: 0 10px;
  background: rgba(0, 229, 255, .06);
  border: 1px solid var(--border-color);
  color: #cfe4f5; border-radius: 2px; outline: none;
  font-family: inherit; font-size: 13px;
}
.dc-field select:focus,
.dc-datetime input:focus { border-color: var(--highlight); }
.dc-field select option { background: #04122a; }
.dc-datetime { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dc-sep { color: #5c8bb0; font-size: 12px; }
.dc-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-preset {
  height: 30px; padding: 0 12px;
  border: 1px solid var(--border-color);
  background: rgba(0, 229, 255, .04);
  color: #9dc9e8; border-radius: 2px; cursor: pointer;
  font-size: 12px; font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.dc-preset:hover { border-color: rgba(0, 229, 255, .45); color: #fff; }
.dc-preset.on {
  background: rgba(0, 229, 255, .2);
  border-color: var(--highlight); color: #fff;
}
.dc-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 88px; overflow-y: auto;
  padding: 2px 0;
}
.dc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 1px solid rgba(13, 75, 140, .8);
  background: rgba(0, 229, 255, .04);
  color: #9dc9e8; border-radius: 2px; cursor: pointer;
  font-size: 12px; user-select: none;
}
.dc-chip input { display: none; }
.dc-chip.on {
  background: rgba(0, 229, 255, .18);
  border-color: var(--highlight); color: #fff;
}
.dc-hint { font-size: 12px; color: #5c8bb0; }
.dc-metrics { display: flex; gap: 12px; align-items: center; height: 34px; }
.dc-metric {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #cfe4f5; cursor: pointer;
}
.dc-metric input { accent-color: var(--highlight); }
.dc-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.dc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.dc-stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dc-stats-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dc-stat {
  background: rgba(0, 229, 255, .05);
  border: 1px solid rgba(13, 75, 140, .7);
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.dc-stat .k { font-size: 11px; color: #7badd6; letter-spacing: .06em; }
.dc-stat .v {
  font-size: 14px; color: #e8f4ff; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dc-stat .v small { font-size: 11px; font-weight: 400; color: #7badd6; margin-left: 4px; }
.dc-stat .v.warn { color: #ff8a8c; }
.dc-stat .v.ok { color: #52c41a; }
.dc-link {
  border: none; background: none; color: var(--highlight);
  font-size: 11px; cursor: pointer; padding: 0 4px; font-family: inherit;
}
.dc-link:hover { text-decoration: underline; }
.rp-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
}
.rp-grid-2x2 {
  grid-template-columns: 1.2fr 1fr;
}
.rp-panel {
  background: rgba(4, 18, 42, .7);
  border: 1px solid var(--border-color);
  padding: 10px 12px 8px;
  min-height: 280px;
  display: flex; flex-direction: column;
}
.rp-panel.rp-wide { grid-column: 1 / -1; min-height: 300px; }
.rp-head {
  font-size: 13px; color: #e8f4ff; font-weight: 600;
  margin-bottom: 8px; letter-spacing: .04em;
}
.rp-chart { flex: 1; min-height: 220px; position: relative; }
.rp-empty { padding: 40px 12px !important; }
.rp-table-title {
  padding: 10px 14px 0; font-size: 13px; color: #e8f4ff; font-weight: 600;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.rp-table-title span { font-weight: 400; color: #5c8bb0; font-size: 12px; margin-left: 0; }
.rp-sort {
  margin-left: auto; font-size: 12px; font-weight: 400; color: #7badd6;
  display: inline-flex; align-items: center; gap: 6px;
}
.rp-sort select {
  height: 28px; padding: 0 8px;
  background: rgba(0, 229, 255, .06);
  border: 1px solid var(--border-color);
  color: #cfe4f5; border-radius: 2px; outline: none;
  font-family: inherit; font-size: 12px;
}
.dc-table .ops { white-space: nowrap; }
.dc-table .ops .btn { margin-right: 4px; }
.dc-table .ok { color: #52c41a; }
.cell-warn { color: #ff8a8c !important; font-weight: 600; }
@media (max-width: 1200px) {
  .dc-stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dc-stats-8 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rp-grid, .rp-grid-2x2 { grid-template-columns: 1fr 1fr; }
  .rp-panel.rp-wide { grid-column: 1 / -1; }
}
@media (max-width: 800px) {
  .dc-stats-6, .dc-stats-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-grid, .rp-grid-2x2 { grid-template-columns: 1fr; }
}
.dc-chart-wrap {
  flex: 1;
  min-height: 360px;
  height: calc(100vh - 340px);
  background: rgba(0, 229, 255, .03);
  border: 1px solid var(--border-color);
  padding: 12px 10px 8px;
}
.dc-table-card { display: flex; flex-direction: column; min-height: 0; }
.dc-table-scroll {
  max-height: calc(100vh - 360px);
  overflow: auto;
}
.dc-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.dc-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: rgba(4, 28, 58, .96) !important;
}
.dc-table th.num, .dc-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dc-table td, .dc-table th { padding: 8px 12px; font-size: 12px; }
.dc-jump {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 8px; font-size: 12px; color: #7badd6;
}
.dc-jump input {
  width: 56px; height: 28px; padding: 0 6px;
  background: rgba(0, 229, 255, .06);
  border: 1px solid var(--border-color);
  color: #cfe4f5; border-radius: 2px; outline: none;
}
@media (max-width: 1100px) {
  .dc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-actions { margin-left: 0; width: 100%; }
  .dc-chart-wrap { height: 320px; }
}

/* 地图页：填满内容区；浮层勿挡拖拽（与 ECS 大屏约定一致） */
.bs-main .tab-content.map-tab {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 140px);
}
#deviceMap.map-fill {
  flex: 1;
  min-height: 480px;
  border: 1px solid #0d4b8c;
  border-radius: 8px;
  background: #04122a;
}
.map-tab .map-hint { font-size: 11px; color: #5c8bb0; margin-top: 6px; flex-shrink: 0; }
.map-tab .toolbar { flex-shrink: 0; }
.header-user { color: #9dc9e8; font-size: 13px; white-space: nowrap; }
.header-right .header-btn { cursor: pointer; }

/* ===== 登录页：全幅工业风（品牌优先，单构图）===== */
#loginPage.login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(ellipse 80% 55% at 15% 20%, rgba(0, 180, 220, .16) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(13, 75, 140, .35) 0%, transparent 50%),
    linear-gradient(165deg, #01060f 0%, #041528 45%, #020814 100%);
  color: var(--text-main);
}
.login-atmosphere {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.login-grid {
  position: absolute; inset: -20%;
  background-image:
    linear-gradient(rgba(0, 229, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(600px) rotateX(58deg) translateY(-12%);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 85%);
  animation: loginGridDrift 28s linear infinite;
}
.login-orb {
  position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55;
}
.login-orb-a {
  width: 42vw; height: 42vw; max-width: 520px; max-height: 520px;
  left: -8%; top: -12%;
  background: radial-gradient(circle, rgba(0, 229, 255, .35) 0%, transparent 70%);
  animation: loginOrbA 14s ease-in-out infinite alternate;
}
.login-orb-b {
  width: 36vw; height: 36vw; max-width: 420px; max-height: 420px;
  right: -6%; bottom: -10%;
  background: radial-gradient(circle, rgba(45, 120, 200, .4) 0%, transparent 70%);
  animation: loginOrbB 18s ease-in-out infinite alternate;
}
.login-wave {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 18px,
      rgba(0, 229, 255, .04) 18px 19px
    ),
    linear-gradient(180deg, transparent, rgba(0, 40, 80, .35));
  opacity: .7;
}
.login-scan {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, .55), transparent);
  box-shadow: 0 0 18px rgba(0, 229, 255, .35);
  animation: loginScan 7s ease-in-out infinite;
  opacity: .55;
}
.login-shell {
  position: relative; z-index: 1;
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  animation: loginRise .7s ease-out both;
}
.login-hero { min-width: 0; }
.login-brand-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.login-brand-name {
  font-family: 'Chakra Petch', 'Noto Sans SC', sans-serif;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 700;
  letter-spacing: .18em;
  color: #fff;
  text-shadow: 0 0 24px rgba(0, 229, 255, .35);
  line-height: 1.1;
}
.login-product {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: #e8f4ff;
  letter-spacing: .06em;
  line-height: 1.35;
  margin: 0 0 14px;
  max-width: 14em;
}
.login-tagline {
  font-size: 14px;
  color: #7badd6;
  letter-spacing: .08em;
  line-height: 1.7;
  max-width: 28em;
  border-left: 2px solid rgba(0, 229, 255, .55);
  padding-left: 14px;
}
.login-panel {
  background: linear-gradient(160deg, rgba(6, 24, 52, .82), rgba(3, 14, 32, .88));
  border: 1px solid rgba(13, 75, 140, .85);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, .06) inset,
    0 24px 60px rgba(0, 0, 0, .35);
  padding: clamp(28px, 3.5vw, 40px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.login-panel-kicker {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--highlight);
  margin-bottom: 22px;
}
.login-field { display: block; margin-bottom: 16px; }
.login-field-label {
  display: block;
  font-size: 12px;
  color: #8eb8d8;
  letter-spacing: .12em;
  margin-bottom: 8px;
}
.login-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(13, 75, 140, .9);
  border-radius: 2px;
  background: rgba(0, 20, 45, .55);
  color: #e8f4ff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.login-field input::placeholder { color: #4e7ea3; }
.login-field input:hover { border-color: rgba(0, 229, 255, .35); }
.login-field input:focus {
  border-color: var(--highlight);
  background: rgba(0, 40, 70, .45);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, .12);
}
.login-error {
  color: #ff8a8c;
  font-size: 13px;
  margin: -4px 0 14px;
  min-height: 1.2em;
}
.login-submit {
  width: 100%;
  height: 50px;
  margin-top: 4px;
  border: 1px solid rgba(0, 229, 255, .55);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(0, 229, 255, .22), rgba(0, 140, 180, .18));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .18em;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, box-shadow .2s, transform .15s;
}
.login-submit:hover {
  background: linear-gradient(180deg, rgba(0, 229, 255, .34), rgba(0, 160, 200, .28));
  box-shadow: 0 0 24px rgba(0, 229, 255, .2);
}
.login-submit:active { transform: translateY(1px); }
.login-foot {
  position: absolute;
  z-index: 1;
  left: 0; right: 0; bottom: 18px;
  text-align: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  letter-spacing: .32em;
  color: rgba(123, 173, 214, .45);
}
@keyframes loginRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes loginScan {
  0%, 100% { top: 18%; opacity: .15; }
  50% { top: 72%; opacity: .55; }
}
@keyframes loginOrbA {
  from { transform: translate(0, 0); }
  to { transform: translate(6%, 8%); }
}
@keyframes loginOrbB {
  from { transform: translate(0, 0); }
  to { transform: translate(-8%, -6%); }
}
@keyframes loginGridDrift {
  from { background-position: 0 0; }
  to { background-position: 0 56px; }
}
@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
    width: min(440px, calc(100% - 32px));
    gap: 28px;
  }
  .login-product { max-width: none; }
  .login-tagline { max-width: none; }
  .login-foot { bottom: 12px; letter-spacing: .18em; }
}
@media (prefers-reduced-motion: reduce) {
  .login-grid, .login-orb-a, .login-orb-b, .login-scan, .login-shell { animation: none; }
}

/* 面板 / 统计 / 图表 */
.bs-main .panel,
.bs-main .settings-form,
.bs-main .chart-container,
.bs-main .data-table-card,
.bs-main .stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  box-shadow: inset 0 0 20px rgba(0, 229, 255, .04);
  color: var(--text-main);
}
.bs-main .panel-head { border-bottom-color: rgba(13, 75, 140, .6); }
.bs-main .panel-title { color: var(--text-white); text-shadow: 0 0 8px rgba(0, 229, 255, .4); }
.bs-main .panel-sub { color: var(--text-main); }
.bs-main .stat-card .stat-label { color: var(--text-main); }
.bs-main .stat-card .stat-foot { color: #5c8bb0; font-size: 11px; margin-top: 4px; }
.bs-main .stat-card.stat-total .stat-num { color: var(--highlight); }
.bs-main .stat-card.stat-online .stat-num { color: var(--success); }
.bs-main .stat-card.stat-alarm .stat-num { color: var(--danger); }
.bs-main .stat-card.stat-rate .stat-num { color: var(--warning); }
.bs-main .empty-hint { color: #5c8bb0; text-align: center; padding: 24px; }
.bs-main .empty-state {
  background: var(--panel-bg); border: 1px solid var(--border-color);
  color: #7badd6; box-shadow: none;
}

/* 告警列表 */
.bs-main .alarm-list { background: transparent; box-shadow: none; }
.bs-main .alarm-item { border-bottom-color: rgba(13, 75, 140, .5); }
.bs-main .alarm-item:hover { background: rgba(0, 229, 255, .06); }
.bs-main .alarm-msg { color: #cfe4f5; }
.bs-main .alarm-time { color: #5c8bb0; }
.bs-main .alarm-item.level-critical { background: rgba(255, 77, 79, .08); }
.bs-main .alarm-item.level-warning { background: rgba(245, 166, 35, .08); }

/* 等级 / 状态标签：低饱和，避免浅色药丸刺眼 */
.bs-main .status-tag,
.bs-main .level-tag {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.12);
}
.bs-main .status-online {
  color: #6fbf8a !important;
  border-color: rgba(111, 191, 138, .35);
  background: rgba(111, 191, 138, .08) !important;
}
.bs-main .status-alarm {
  color: #d08888 !important;
  border-color: rgba(208, 136, 136, .35);
  background: rgba(208, 136, 136, .08) !important;
}
.bs-main .status-offline {
  color: #7a8fa3 !important;
  border-color: rgba(122, 143, 163, .3);
  background: rgba(122, 143, 163, .08) !important;
}
.bs-main .level-critical {
  color: #c97a7a !important;
  border-color: rgba(201, 122, 122, .35);
  background: rgba(201, 122, 122, .08) !important;
}
.bs-main .level-warning {
  color: #c4a35a !important;
  border-color: rgba(196, 163, 90, .35);
  background: rgba(196, 163, 90, .08) !important;
}
.bs-main .level-info {
  color: #7aa3c4 !important;
  border-color: rgba(122, 163, 196, .35);
  background: rgba(122, 163, 196, .08) !important;
}

/* 设备卡片 */
.bs-main .device-card {
  background: rgba(4, 18, 42, .7); border-color: var(--border-color);
  color: #cfe4f5; box-shadow: none;
}
.bs-main .device-card:hover { box-shadow: 0 0 12px rgba(0, 229, 255, .2); }
.bs-main .card-name { color: var(--text-white); }
.bs-main .card-temp { color: var(--highlight); font-size: 22px; font-weight: 700; }
.bs-main .card-hum { color: var(--success); font-size: 15px; }
.bs-main .card-floor { color: #5c8bb0; font-size: 12px; margin-top: 4px; }
.bs-main .device-grid::-webkit-scrollbar-thumb { background: rgba(0, 229, 255, .25); }

/* 工具栏 */
.bs-main .toolbar .search-input,
.bs-main .toolbar select,
.bs-main .toolbar input {
  background: rgba(0, 229, 255, .06); border: 1px solid var(--border-color);
  color: #cfe4f5; outline: none;
}
.bs-main .toolbar .search-input:focus,
.bs-main .toolbar select:focus { border-color: var(--highlight); }
.bs-main .toolbar select option { background: #04122a; color: #cfe4f5; }
.bs-main .page-info { color: #7badd6; }

/* 按钮 */
.bs-main .btn {
  background: rgba(0, 229, 255, .1); color: #cfe4f5;
  border: 1px solid var(--border-color);
}
.bs-main .btn:hover { background: rgba(0, 229, 255, .18); border-color: var(--highlight); }
.bs-main .btn-primary {
  background: rgba(0, 229, 255, .22); color: #fff;
  border-color: var(--highlight);
}
.bs-main .btn-primary:hover { background: rgba(0, 229, 255, .35); }
.bs-main .btn-secondary {
  background: rgba(123, 173, 214, .08); color: #9dc9e8;
  border-color: var(--border-color);
}
.bs-main .btn-danger {
  background: rgba(255, 77, 79, .2); color: #ff8a8c;
  border-color: rgba(255, 77, 79, .45);
}
.bs-main .btn-warn {
  background: rgba(245, 166, 35, .2); color: #f5a623;
  border-color: rgba(245, 166, 35, .45);
}
.bs-main .btn:disabled { opacity: .4; cursor: default; }

/* 表格 */
.bs-main .table {
  background: rgba(4, 18, 42, .6); color: #cfe4f5;
  box-shadow: none; border: 1px solid var(--border-color);
}
.bs-main .table th {
  background: rgba(0, 229, 255, .08); color: #9dc9e8;
  border-bottom: 1px solid var(--border-color);
}
.bs-main .table td { border-top-color: rgba(13, 75, 140, .45); color: #cfe4f5; }
.bs-main .table tr:hover { background: rgba(0, 229, 255, .06); }
.bs-main .sn-text, .bs-main .time-text { color: #7badd6; }
.bs-main .cell-temp { color: var(--highlight); }
.bs-main .cell-hum { color: var(--success); }

/* 分页 */
.bs-main .pagination button,
.bs-main .page-num {
  background: rgba(0, 229, 255, .06); border-color: var(--border-color); color: #cfe4f5;
}
.bs-main .pagination button:hover:not(:disabled),
.bs-main .page-num:hover {
  background: rgba(0, 229, 255, .14); border-color: var(--highlight); color: var(--highlight);
}
.bs-main .page-num.active {
  background: rgba(0, 229, 255, .28); border-color: var(--highlight); color: #fff;
  box-shadow: 0 0 8px rgba(0, 229, 255, .3);
}
.bs-main .data-table-card .pagination {
  background: rgba(0, 229, 255, .04); border-top-color: var(--border-color);
}

/* 表单 / 设置 */
.bs-main .settings-form { max-width: 640px; }
.bs-main .settings-form h3 { color: var(--text-white); }
.bs-main .form-group label { color: #9dc9e8; }
.bs-main .form-group input,
.bs-main .form-group select,
.bs-main .settings-form input,
.bs-main .settings-form select,
.bs-main .settings-form textarea {
  background: rgba(0, 229, 255, .06); border: 1px solid var(--border-color);
  color: #cfe4f5;
}
.bs-main .form-group input:focus,
.bs-main .form-group select:focus {
  border-color: var(--highlight); outline: none;
}
.bs-main .form-group input::placeholder { color: #5c8bb0; }
.bs-main .form-group select option { background: #04122a; color: #cfe4f5; }

/* 弹窗 */
.bs-main .modal { background: rgba(0, 8, 20, .72); }
.bs-main .modal-content::-webkit-scrollbar { width: 5px; }
.bs-main .modal-content::-webkit-scrollbar-track { background: transparent; }
.bs-main .modal-content::-webkit-scrollbar-thumb { background: rgba(0,229,255,.25); border-radius: 3px; }
.bs-main .modal-content::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,.4); }
.bs-main .modal-content { scrollbar-width: thin; scrollbar-color: rgba(0,229,255,.25) transparent; }
.bs-main .modal-content {
  background: #04122a; border: 1px solid var(--border-color);
  color: #cfe4f5; box-shadow: 0 0 40px rgba(0, 229, 255, .15);
}
.bs-main .modal-content h3,
.bs-main .modal-content h4 { color: var(--text-white); }
.bs-main .modal-close { color: #7badd6; }
.bs-main .modal-close:hover { color: var(--highlight); }
.bs-main .detail-header .sn-text { color: #7badd6; }
.bs-main .detail-section { margin-top: 14px; background: rgba(0, 229, 255, .03); border: 1px solid rgba(13, 75, 140, .4); }
.bs-main .detail-section h4 { color: #7badd6; }
.bs-main .big-item { background: rgba(0, 229, 255, .04); border: 1px solid rgba(13, 75, 140, .5); }
.bs-main .big-item:hover { box-shadow: 0 2px 12px rgba(0, 229, 255, .15); }
.bs-main .detail-info-item {
  background: rgba(0, 229, 255, .04); border: 1px solid rgba(13, 75, 140, .5);
  border-radius: 4px; padding: 8px 10px;
}
.bs-main .info-label { color: #5c8bb0; }
.bs-main .info-value { color: #cfe4f5; }
.bs-main .detail-big .big-val { color: var(--highlight); }
.bs-main .detail-big .big-lbl { color: #7badd6; }
.bs-main .chart-container { background: rgba(0, 229, 255, .03); border-color: var(--border-color); }

/* 顶栏标题：覆盖 style.css 的 .header-title */
.bs-main .header-title,
header .header-title {
  font-size: 23px; font-weight: 700; color: var(--text-white); letter-spacing: 3px;
  text-shadow: 0 0 15px rgba(0, 229, 255, .6), 0 0 30px rgba(0, 229, 255, .3);
}
@media (max-width: 1600px) {
  .bs-main .header-title, header .header-title { font-size: 20px; letter-spacing: 2px; }
}
@media (max-width: 1100px) {
  .bs-main .header-title, header .header-title { font-size: 16px; letter-spacing: 1px; }
}


.brand-mark-lg {
  width: 18px; height: 18px;
  box-shadow: 8px 0 0 #2a6fa8, 0 8px 0 #2a6fa8, 8px 8px 0 #1e5478;
  display: inline-block;
  flex-shrink: 0;
}
.login-screen .brand-mark-lg {
  width: 22px; height: 22px;
  box-shadow:
    10px 0 0 #3d8fd1,
    0 10px 0 #2a6fa8,
    10px 10px 0 #1e5478;
  animation: loginMarkPulse 3.2s ease-in-out infinite;
}
@keyframes loginMarkPulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(0, 229, 255, .55)); }
}
@media (prefers-reduced-motion: reduce) {
  .login-screen .brand-mark-lg { animation: none; }
}

