/* ==========================================================================
   DAI 站点自有样式（唯一入口）
   --------------------------------------------------------------------------
   工程化约定（契约见 docs/spec/CSS工程化规范.md）：
   1. 全站自定义样式**只写在本文件**，按「// === 区块名 ===」分区；模板里禁止再写 <style>
   2. 颜色**只准**用：Bootstrap 变量（--bs-*）或本文件 :root 定义的 --dq-* token；
      禁止在规则里直接写 hex/rgb（token 定义处除外）
   3. 暗黑适配统一在文件末尾 [data-bs-theme="dark"] 段覆盖 token 或个别规则
   4. 组件外观优先用 Bootstrap 类；本文件只放「 Bootstrap 表达不了的站点级样式」
   ========================================================================== */

:root {
  /* ---- 等级色（紧急/告警/预警/正常 + 离线）---- */
  --dq-lv-critical: #f53f3f;
  --dq-lv-major: #ff7d00;
  --dq-lv-minor: #f7ba1e;
  --dq-lv-normal: #00b42a;
  --dq-lv-offline: #86909c;
  /* ---- 值班总览（/devices/dashboard/，固定浅色工业风）---- */
  --dq-dash-bg: #f5f6f8;
  --dq-dash-card: #ffffff;
  --dq-dash-border: #e5e6eb;
  --dq-dash-text: #1d2129;
  --dq-dash-muted: #86909c;
  --dq-dash-nav: #1d2129;
  --dq-dash-nav-hover: #2a2f3a;
  --dq-dash-radius: 10px;
  --dq-dash-shadow: 0 1px 3px rgba(0, 0, 0.06);
  --dq-primary: #165dff;        /* 主色调：深蓝 */

  /* ---- 设计 token（全站颜色唯一来源）---- */
  --dq-auth-from: #0f172a;      /* 登录/注册品牌面板渐变起 */
  --dq-auth-mid: #1e293b;       /* 渐变中 */
  --dq-auth-to: #334155;        /* 渐变止 */
  --dq-auth-accent: #93c5fd;    /* 品牌面板点缀（光点/虚线环） */
  --dq-auth-btn-from: #2563eb;  /* 主按钮渐变起 */
  --dq-auth-btn-to: #1d4ed8;    /* 主按钮渐变止 */
  --dq-hero-from: rgba(13, 110, 253, 0.10);  /* 首页欢迎区渐变起 */
  --dq-hero-to: rgba(108, 117, 125, 0.10);   /* 首页欢迎区渐变止 */
  --dq-danger: #dc2626;         /* 错误文字 */
  --dq-muted-text: #64748b;     /* 弱化文字（补充 --bs-secondary-color） */
  --dq-menu-active-bg: #eff6ff; /* 用户中心菜单选中底 */
  --dq-menu-active-text: #1d4ed8;
  --dq-dashed-border: #cbd5e1;  /* 说明区虚线边框（浅色） */
  --dq-demo-bg: #f8fafc;        /* 说明区底色（浅色） */
}

[data-bs-theme="dark"] {
  --dq-hero-from: rgba(13, 110, 253, 0.16);
  --dq-hero-to: rgba(255, 255, 255, 0.06);
  --dq-menu-active-bg: var(--bs-tertiary-bg);
  --dq-menu-active-text: var(--bs-primary);
  --dq-dashed-border: var(--bs-border-color);
  --dq-demo-bg: var(--bs-tertiary-bg);
}

/* === 通用 === */
.hero-gradient { background: linear-gradient(135deg, var(--dq-hero-from) 0%, var(--dq-hero-to) 100%); }
.demo-card { min-height: 100%; }
.doc-tree a { text-decoration: none; }
.doc-tree .sub { padding-left: 1.1rem; }
.md-content img { max-width: 100%; height: auto; }
footer { margin-top: auto; }
.field-error { color: var(--dq-danger); font-size: 0.82rem; margin: 0.15rem 0 0.1rem; }

/* === 工具类（收敛模板内联 style：同类样式只在这里定义一次，模板挂 class）=== */
.dq-img-cover { height: 160px; object-fit: cover; }        /* 产品列表封面 */
.dq-img-thumb { height: 64px; object-fit: cover; }         /* 售后图片等小缩略图 */
.dq-img-preview { max-height: 80px; object-fit: contain; } /* 后台封面预览 */
.dq-img-avatar { width: 96px; height: 96px; object-fit: cover; } /* 用户中心头像 */
.dq-avatar-96 { width: 96px; height: 96px; font-size: 2.4rem; }  /* 头像占位（配合 uc-avatar） */
.dq-pre-wrap { white-space: pre-wrap; }                    /* 快递路径等长文本预格式 */
.dq-min-w-0 { min-width: 0; }                               /* flex 子项可收缩（Bootstrap 无此工具类）*/
.dq-search-inline { width: 180px; }                        /* 顶部搜索框（列表页） */
.dq-file-inline { max-width: 320px; }                      /* 头像/文件选择框 */
.dq-th-col { width: 140px; }                               /* 资料表首列宽度 */

/* === 配置中心取值演示区（/demo/）=== */
.config-demo {
  background: var(--dq-demo-bg);
  border: 1px dashed var(--dq-dashed-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

/* === 登录 / 注册（accounts/_auth_head 配套）=== */
.auth-wrap { min-height: calc(100vh - 230px); display: flex; align-items: center; }
.auth-card {
  width: 100%; max-width: 960px; margin: 0 auto; border: 0; border-radius: 1.1rem;
  overflow: hidden; box-shadow: 0 1rem 3rem rgba(15, 23, 42, 0.12);
  animation: auth-in 0.5s ease both;
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 3rem 2.6rem;
  display: flex; flex-direction: column; min-height: 100%;
  background: linear-gradient(160deg, var(--dq-auth-from) 0%, var(--dq-auth-mid) 55%, var(--dq-auth-to) 100%);
}
.auth-brand .logo { font-size: 1.7rem; font-weight: 700; letter-spacing: 0.04em; position: relative; z-index: 2; }
.auth-brand .sub { color: rgba(255, 255, 255, 0.72); margin-top: 0.5rem; font-size: 0.92rem; position: relative; z-index: 2; }
.auth-brand ul { list-style: none; padding: 0; margin: auto 0 0; position: relative; z-index: 2; }
.auth-brand li { padding: 0.5rem 0; color: rgba(255, 255, 255, 0.85); font-size: 0.93rem; }
.auth-brand li .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dq-auth-accent); margin-right: 0.6rem; vertical-align: middle;
  box-shadow: 0 0 8px rgba(147, 197, 253, 0.9);
}

/* 背景动效（纯 SVG + CSS，无外部依赖） */
.auth-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fx-blob { filter: blur(2px); animation: fx-drift 16s ease-in-out infinite alternate; transform-origin: center; }
.fx-blob.b2 { animation-duration: 22s; animation-delay: -6s; }
.fx-blob.b3 { animation-duration: 28s; animation-delay: -12s; }
@keyframes fx-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(26px, -20px) scale(1.12); }
  100% { transform: translate(-18px, 16px) scale(0.94); }
}
.fx-wave { animation: fx-wave 9s ease-in-out infinite alternate; }
@keyframes fx-wave {
  from { transform: translateX(-24px); }
  to { transform: translateX(24px); }
}
.fx-grid line { stroke: rgba(148, 163, 184, 0.10); stroke-width: 1; }
.fx-ring { animation: fx-ring 10s linear infinite; transform-origin: center; }
@keyframes fx-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .fx-blob, .fx-wave, .fx-ring, .auth-card { animation: none; }
}

.auth-form { padding: 3rem 2.6rem; animation: auth-in 0.7s 0.1s ease both; }
.form-floating > .form-control { border-radius: 0.6rem; }
.form-floating > label { color: var(--dq-muted-text); }
.auth-title { font-weight: 700; letter-spacing: 0.02em; }
.auth-hint { font-size: 0.85rem; color: var(--bs-secondary-color); }
.btn-auth { background: linear-gradient(135deg, var(--dq-auth-btn-from) 0%, var(--dq-auth-btn-to) 100%); border: 0; }
.btn-auth:hover { filter: brightness(1.08); }

/* === 用户中心（accounts/_layout 配套）=== */
.uc-avatar-mini {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, var(--dq-auth-btn-from), var(--dq-auth-btn-to));
  color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.uc-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--dq-auth-btn-from), var(--dq-auth-btn-to));
  color: #fff; font-size: 1.6rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.uc-menu .list-group-item { border-left: 3px solid transparent; }
.uc-menu .list-group-item.active {
  border-left-color: var(--dq-auth-btn-from);
  background: var(--dq-menu-active-bg);
  color: var(--dq-menu-active-text);
  font-weight: 600;
}
.uc-menu .list-group-item:hover:not(.active) { background: var(--bs-tertiary-bg); }
.uc-menu .list-group-item .uc-icon { width: 1.4em; display: inline-block; text-align: center; }

/* === 演示目录卡片（/demo/）=== */
a.card:hover { transform: translateY(-2px); transition: transform 0.15s ease; }

/* === Element Plus 演示页（/demo/element-plus/）=== */
.ep-block { margin-bottom: 1.25rem; }
.ep-block h6 { color: var(--dq-muted-text); }

/* === Element UI 独立页（/demo/element-ui/）=== */
.eu-wrap { max-width: 960px; margin: 2rem auto; }
.eu-block { margin-bottom: 1.5rem; }
.eu-block h6 { color: var(--dq-muted-text); }

/* === 设备监控页（/devices/，三列：类别 / 指标+曲线+档案 / 告警+操作+工单）=== */
.dq-metric .card-body { padding: 0.85rem 0.9rem; }
.dq-metric-label { font-size: 0.8rem; color: var(--bs-secondary-color); }
.dq-metric-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.dq-metric-unit { font-size: 0.85rem; font-weight: 400; margin-left: 0.15rem; color: var(--bs-secondary-color); }
.dq-metric-sub { font-size: 0.75rem; color: var(--bs-secondary-color); margin-top: 0.15rem; }
.dq-metric-status { font-size: 1rem; }
/* 报警态：温度大数与数值卡左边框变红（暗色下用 Bootstrap danger 变量自适应） */
.dq-metric.is-alarm { border-left: 3px solid var(--bs-danger) !important; }
.dq-metric.is-alarm .dq-metric-value { color: var(--bs-danger); }
/* 左侧导航：类别下嵌设备列表 */
.dq-nav-devices .dq-nav-device { padding: 0.45rem 1rem 0.45rem 1.5rem; font-size: 0.875rem; }
.dq-nav-devices .dq-nav-device.is-current { font-weight: 600; background-color: var(--bs-secondary-bg); }
.dq-nav-devices .dq-nav-device.is-alarm { color: var(--bs-danger); }
.dq-nav-device-meta { display: block; font-size: 0.72rem; color: var(--bs-secondary-color); }
.dq-nav-devices .dq-nav-device.is-alarm .dq-nav-device-meta { color: var(--bs-danger); }
/* 中间列：当前类别设备方块总览（每台设备一个小方块，显示最新数据值） */
.dq-device-status { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dq-device-status-item {
  display: inline-flex; align-items: baseline; gap: 0.25rem;
  padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.8rem;
  border: 1px solid var(--bs-border-color); background: var(--bs-body-bg);
  color: var(--bs-secondary-color);
}
.dq-device-status-item strong { font-size: 1rem; }
.dq-device-status-item.is-normal { border-color: var(--bs-success); color: var(--bs-success); }
.dq-device-status-item.is-abnormal { border-color: var(--bs-danger); color: var(--bs-danger); }
.dq-device-status-item.is-offline { border-color: var(--bs-secondary-color); }
.dq-device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 0.5rem; }
/* 分组竖排：每组一列，顶部「N线」标记，列内一条竖线贯穿（模拟一条总线连多台设备） */
.dq-device-groups { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; justify-content: center; }
.dq-device-group { display: flex; flex-direction: column; align-items: center; }
.dq-device-group-badge {
  padding: 0.1rem 0.6rem; border: 1px solid var(--bs-primary); border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; color: var(--bs-primary); background: var(--bs-body-bg);
  margin-bottom: 0.25rem;
}
.dq-device-group-body {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 0.75rem;
  position: relative;
}
/* 竖线：贯穿列内全部设备（总线），设备方块压在线上 */
.dq-device-group-body::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 2px; transform: translateX(-50%);
  background: var(--bs-border-color); z-index: 0;
}
.dq-device-group-body .dq-device-tile { position: relative; z-index: 1; width: 92px; aspect-ratio: auto; }
.dq-device-tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.15rem;
  aspect-ratio: 1 / 1; padding: 0.45rem 0.5rem;
  border: 1px solid var(--bs-border-color); border-radius: 0.5rem;
  background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dq-device-tile:hover { transform: translateY(-2px); border-color: var(--bs-primary); color: var(--bs-body-color); box-shadow: 0 0.25rem 0.6rem rgba(0, 0, 0, 0.08); }
.dq-device-tile.is-current { border-color: var(--bs-primary); box-shadow: inset 0 0 0 1px var(--bs-primary); }
.dq-device-tile-name { font-size: 0.75rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-device-tile-value { font-size: 1.05rem; font-weight: 700; line-height: 1.1; text-align: center; }
.dq-device-tile-unit { font-size: 0.65rem; font-weight: 400; margin-left: 0.1rem; color: var(--bs-secondary-color); }
.dq-device-tile-time { font-size: 0.65rem; color: var(--bs-secondary-color); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-device-tile.is-alarm { border-color: var(--bs-danger); }
.dq-device-tile.is-alarm .dq-device-tile-value,
.dq-device-tile.is-alarm .dq-device-tile-time { color: var(--bs-danger); }
.dq-device-tile.is-offline { border-style: dashed; opacity: 0.65; }
.dq-device-tile.is-offline .dq-device-tile-value,
.dq-device-tile.is-offline .dq-device-tile-time { color: var(--bs-secondary-color); }
/* 右列：当前类别设备告警小列表 */
.dq-alarm-list .list-group-item { padding: 0.4rem 0.75rem; }
.dq-alarm-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Vue 应用：挂载前隐藏原始模板 */
[v-cloak] { display: none; }
/* 设备详情弹窗：占大半屏（宽 94vw、内容高约 86vh，图表吃掉剩余高度） */
.dq-device-modal { max-width: min(94vw, 1680px); }
@media (max-width: 991.98px) { .dq-device-modal { max-width: calc(100vw - 1rem); } }
.dq-device-modal .modal-content { height: calc(100vh - 2rem); }
.dq-device-modal .modal-body { display: flex; flex-direction: column; overflow: hidden; }
.dq-device-modal .dq-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 1rem;
  flex: 1 1 auto;
  min-height: 0;
}
.dq-device-modal .dq-modal-main { min-height: 0; overflow: hidden; }
.dq-device-modal .dq-modal-side { min-height: 0; overflow: hidden; }
.dq-device-modal .dq-modal-chart { flex: 1 1 auto; height: auto; min-height: 240px; }
.dq-device-modal .dq-modal-alarm-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; }
.dq-device-modal .dq-modal-tickets { max-height: 118px; overflow-y: auto; }
@media (max-width: 991.98px) {
  .dq-device-modal .modal-content { height: auto; }
  .dq-device-modal .modal-body { overflow-y: auto; }
  .dq-device-modal .dq-modal-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .dq-device-modal .dq-modal-chart { flex: none; height: 50vh; }
  .dq-device-modal .dq-modal-alarm-list { flex: none; max-height: 240px; }
}
/* 弹窗时间范围按钮（1 小时 … 30 天）+ 右侧「图表/列表」模式切换 */
.dq-range-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
/* 列表模式：搜索 + 分页表格（表格区域内部滚动，锁定弹窗高度） */
.dq-device-modal .dq-data-view { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dq-device-modal .dq-data-table-wrap { flex: 0 1 auto; min-height: 0; overflow: auto; }
.dq-device-modal .dq-data-table-wrap thead th { position: sticky; top: 0; z-index: 1; }
.dq-data-time { max-width: 190px; }
.dq-data-message { max-width: 320px; }
@media (max-width: 991.98px) {
  .dq-device-modal .dq-data-view { flex: none; }
  .dq-device-modal .dq-data-table-wrap { max-height: 60vh; }
  .dq-data-time { max-width: 160px; }
  .dq-data-message { max-width: 180px; }
}
/* 弹窗右下角：设置图标 */
.dq-settings-btn { display: inline-flex; align-items: center; justify-content: center; width: 31px; height: 31px; padding: 0; }
/* 设备设置对话框（叠加在设备弹窗内，z-index 高于 Bootstrap modal 1055） */
.dq-settings-overlay {
  position: fixed; inset: 0; z-index: 1060;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(0, 0, 0, 0.5);
}
.dq-settings-dialog {
  width: min(92vw, 460px); max-height: calc(100vh - 2rem); overflow-y: auto;
  background: var(--bs-body-bg); color: var(--bs-body-color);
  border-radius: 0.6rem; box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}
.dq-settings-header, .dq-settings-footer {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem;
}
.dq-settings-header { justify-content: space-between; border-bottom: 1px solid var(--bs-border-color); }
.dq-settings-footer { justify-content: flex-end; border-top: 1px solid var(--bs-border-color); }
.dq-settings-body { padding: 1rem; }
.dq-act-input { max-width: 170px; }
.dq-act-select { max-width: 130px; }
/* 设备档案信息（首列标签弱化） */
.dq-info-label { font-size: 0.75rem; color: var(--bs-secondary-color); }
.dq-info-value { font-size: 0.9rem; font-weight: 500; word-break: break-all; }
table.table .dq-info-label-cell { font-weight: 400; color: var(--bs-secondary-color); white-space: nowrap; }
/* 右侧工单列表 + 节点时间线 */
.dq-ticket + .dq-ticket { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px dashed var(--bs-border-color); }
.dq-timeline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; font-size: 0.72rem; margin-top: 0.2rem; }
.dq-node { color: var(--bs-secondary-color); opacity: 0.65; }
.dq-node.is-done { opacity: 0.9; color: var(--bs-body-color); }
.dq-node.is-current { opacity: 1; color: var(--bs-primary); font-weight: 600; }
.dq-node-arrow { color: var(--bs-secondary-color); opacity: 0.5; }

/* ==========================================================================
   皮肤（5 套）：dark 由上方 [data-bs-theme="dark"] 段 + Bootstrap 原生支持；
   以下为 tech / chinese / krjp 三套自定义皮肤（html[data-skin] 驱动，
   JS 会同步设置 data-bs-theme=light/dark，Bootstrap 组件变量在此覆盖）。
   ========================================================================== */

/* ---- 科技蓝（暗色系）---- */
html[data-bs-theme="dark"][data-skin="tech"] {
  --bs-body-bg: #0a1930;
  --bs-body-color: #dbeafe;
  --bs-emphasis-color: #f8fafc;
  --bs-secondary-color: #93c5fd;
  --bs-secondary-bg: #112544;
  --bs-tertiary-bg: #0f2140;
  --bs-border-color: #1e3a5f;
  --bs-primary: #38bdf8;
  --bs-primary-rgb: 56, 189, 248;
  --bs-link-color: #7dd3fc;
  --bs-link-color-rgb: 125, 211, 252;
  /* 站点 token */
  --dq-auth-from: #071528;
  --dq-auth-mid: #0a1930;
  --dq-auth-to: #112544;
  --dq-auth-accent: #38bdf8;
  --dq-auth-btn-from: #0ea5e9;
  --dq-auth-btn-to: #2563eb;
  --dq-hero-from: rgba(56, 189, 248, 0.12);
  --dq-hero-to: rgba(14, 165, 233, 0.06);
}

/* ---- 中国风（宣纸底 + 朱砂红 + 墨色）---- */
html[data-skin="chinese"] {
  --bs-body-bg: #f7f3e9;
  --bs-body-color: #3d3a34;
  --bs-emphasis-color: #26241f;
  --bs-secondary-color: #8a8378;
  --bs-secondary-bg: #efe8d8;
  --bs-tertiary-bg: #f0e9da;
  --bs-border-color: #ddd3bd;
  --bs-primary: #b03a2e;
  --bs-primary-rgb: 176, 58, 46;
  --bs-link-color: #a93226;
  --bs-link-color-rgb: 169, 50, 38;
  /* 站点 token */
  --dq-auth-from: #2f2b26;
  --dq-auth-mid: #4a443c;
  --dq-auth-to: #6b6257;
  --dq-auth-accent: #d4a373;
  --dq-auth-btn-from: #b03a2e;
  --dq-auth-btn-to: #8e2f25;
  --dq-hero-from: rgba(176, 58, 46, 0.08);
  --dq-hero-to: rgba(120, 113, 98, 0.08);
  --dq-danger: #a93226;
  --dq-muted-text: #8a8378;
  --dq-menu-active-bg: #f3e6d8;
  --dq-menu-active-text: #8e2f25;
  --dq-dashed-border: #ddd3bd;
  --dq-demo-bg: #faf6ec;
}

/* ---- 韩日风（极简白灰 + 低饱和雾蓝/灰粉）---- */
html[data-skin="krjp"] {
  --bs-body-bg: #faf9f7;
  --bs-body-color: #43464d;
  --bs-emphasis-color: #2b2e35;
  --bs-secondary-color: #9aa0a8;
  --bs-secondary-bg: #f1f0ed;
  --bs-tertiary-bg: #f4f3f0;
  --bs-border-color: #e4e2dd;
  --bs-primary: #8e9aaf;
  --bs-primary-rgb: 142, 154, 175;
  --bs-link-color: #7c8aa0;
  --bs-link-color-rgb: 124, 138, 160;
  /* 站点 token */
  --dq-auth-from: #3c414c;
  --dq-auth-mid: #4d5462;
  --dq-auth-to: #646d7d;
  --dq-auth-accent: #c9b8d4;
  --dq-auth-btn-from: #8e9aaf;
  --dq-auth-btn-to: #6f7c94;
  --dq-hero-from: rgba(142, 154, 175, 0.10);
  --dq-hero-to: rgba(201, 184, 212, 0.08);
  --dq-muted-text: #9aa0a8;
  --dq-menu-active-bg: #eeecf2;
  --dq-menu-active-text: #6f7c94;
  --dq-dashed-border: #e4e2dd;
  --dq-demo-bg: #f6f5f2;
}

/* ==========================================================================
   值班总览仪表盘（/devices/dashboard/）
   布局：左侧深色导航（150px）+ 顶部标题栏 + 三行主内容网格
   排版/字号/状态色见契约 docs/spec/母线温度监测值班总览.md §2 / §7 / §8
   ========================================================================== */

/* ---- 页面骨架 ---- */
.dq-dash {
  display: flex; align-items: stretch; gap: 0.75rem;
  background: var(--dq-dash-bg); color: var(--dq-dash-text);
  font-size: 13px; line-height: 1.5;
}
.dq-dash-main { flex: 1; min-width: 0; display: grid; gap: 0.75rem; align-content: start; }
.dq-dash-body { display: grid; gap: 0.75rem; }
.dq-sec { display: grid; gap: 0.6rem; }

/* ---- 左侧深色导航（150px）---- */
.dq-dash-nav {
  flex: 0 0 150px; width: 150px; background: var(--dq-dash-nav); color: #c9cdd4;
  border-radius: var(--dq-dash-radius); padding: 0.8rem 0.6rem;
  display: flex; flex-direction: column; min-height: 340px;
}
.dq-dash.is-kiosk .dq-dash-nav { display: none; }
/* 品牌区：150px 窄侧栏里 logo 与文字上下堆叠（横向排会挤成单字竖列） */
.dq-dash-brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem;
  color: #fff; padding: 0.1rem 0.3rem 0.75rem; min-width: 0;
}
.dq-dash-brand-logo { display: block; height: 24px; width: auto; max-width: 100%; }
.dq-dash-brand-name { font-size: 13px; font-weight: 600; line-height: 1.35; }
.dq-dash-brand-name, .dq-dash-brand-sub {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dq-dash-brand-sub { font-size: 12px; color: #86909c; line-height: 1.35; }
.dq-dash-menu { display: flex; flex-direction: column; gap: 0.65rem; flex: 1; }
.dq-dash-menu-group { display: grid; gap: 0.1rem; }
.dq-dash-menu-title { font-size: 12px; color: #7b838f; padding: 0.1rem 0.45rem; }
.dq-dash-menu a {
  display: flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.45rem;
  color: #c9cdd4; text-decoration: none; border-radius: 6px; font-size: 13px;
}
.dq-dash-menu a:hover { background: var(--dq-dash-nav-hover); color: #fff; }
.dq-dash-menu a.is-active { background: var(--dq-primary); color: #fff; font-weight: 600; }
.dq-dash-ico { width: 1rem; text-align: center; opacity: 0.85; }
.dq-dash-nav-foot {
  font-size: 12px; color: #86909c; padding: 0.45rem 0.3rem 0;
  display: flex; align-items: center; gap: 0.35rem;
}
.dq-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--dq-lv-normal);
  display: inline-block; animation: dq-pulse 2s infinite;
}
@keyframes dq-pulse {
  70% { box-shadow: 0 0 0 6px rgba(0, 180, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 180, 42, 0); }
}

/* ---- 顶部标题栏 ---- */
.dq-dash-top {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.75rem; background: var(--dq-dash-card); border: 1px solid var(--dq-dash-border);
  border-radius: var(--dq-dash-radius); box-shadow: var(--dq-dash-shadow);
  padding: 0.7rem 1rem;
}
.dq-dash-title { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.3; }
.dq-dash-sub { margin: 0.1rem 0 0; font-size: 12px; color: var(--dq-dash-muted); }
.dq-dash-updated { margin-left: 0.6rem; }
.dq-dash-live { margin-left: 0.6rem; color: var(--dq-lv-major); }
.dq-dash-clock { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dq-dash-clock-date { font-size: 12px; color: var(--dq-dash-muted); }

/* ---- 通用卡片 ---- */
.dq-dash .dq-card {
  background: var(--dq-dash-card); border: 1px solid var(--dq-dash-border);
  border-radius: var(--dq-dash-radius); box-shadow: var(--dq-dash-shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.dq-dash .dq-card-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--dq-dash-border);
}
.dq-dash .dq-card-title { font-size: 16px; font-weight: 700; margin: 0; color: var(--dq-dash-text); }
.dq-dash .dq-card-note { font-size: 12px; color: var(--dq-dash-muted); }
.dq-dash .dq-card-body { padding: 0.75rem 0.85rem; }

/* ---- KPI 卡：小标题 + 28px 主数值 + 12px 补充 ---- */
.dq-kpi { padding: 0.75rem 0.85rem; }
.dq-kpi-label { font-size: 12px; color: var(--dq-dash-muted); }
.dq-kpi-value {
  font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 0.15rem;
  font-variant-numeric: tabular-nums; color: var(--dq-dash-text);
}
.dq-kpi-sub { font-size: 12px; color: var(--dq-dash-muted); margin-top: 0.25rem; }
.dq-unit { font-size: 13px; font-weight: 500; margin-left: 0.15rem; color: var(--dq-dash-muted); }

/* ---- 等级标签 ---- */
.dq-lv-tag {
  display: inline-block; padding: 0.05rem 0.4rem; border-radius: 4px;
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: rgba(134, 144, 156, 0.14); color: var(--dq-lv-offline);
}
.dq-lv-tag.is-critical { background: var(--dq-lv-critical); color: #fff; }
.dq-lv-tag.is-major { background: var(--dq-lv-major); color: #fff; }
.dq-lv-tag.is-minor { background: var(--dq-lv-minor); color: #fff; }
.dq-lv-tag.is-normal { background: var(--dq-lv-normal); color: #fff; }
.dq-lv-tag.is-offline { background: rgba(134, 144, 156, 0.16); color: var(--dq-lv-offline); }
.dq-lv-sep { color: var(--dq-dash-border); }
.dq-up { color: var(--dq-lv-normal); font-weight: 600; }
.dq-mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* ---- 异常清单表格 ---- */
.dq-ex-table { font-size: 13px; margin: 0; }
.dq-ex-table thead th {
  font-weight: 500; font-size: 12px; color: var(--dq-dash-muted);
  border-bottom: 1px solid var(--dq-dash-border); white-space: nowrap;
}
.dq-ex-table tbody tr { cursor: pointer; border-bottom: 1px solid var(--dq-dash-border); }
.dq-ex-table tbody tr:last-child { border-bottom: 0; }
.dq-ex-table tbody tr:hover { background: rgba(134, 144, 156, 0.08); }
.dq-ex-table tbody tr.is-active { background: rgba(22, 93, 255, 0.06); }
.dq-ex-table td { border: 0; }

/* ---- 设备状态条 ---- */
.dq-status .dq-card-body { padding: 0.65rem 0.85rem; }
.dq-statusbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.dq-chip {
  display: inline-flex; align-items: center; gap: 0.35rem; font-size: 12px;
  background: rgba(134, 144, 156, 0.10); border-radius: 999px; padding: 0.1rem 0.55rem;
  color: var(--dq-dash-text);
}
.dq-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--dq-lv-offline); }
.dq-dot.is-critical { background: var(--dq-lv-critical); }
.dq-dot.is-major { background: var(--dq-lv-major); }
.dq-dot.is-minor { background: var(--dq-lv-minor); }
.dq-dot.is-normal { background: var(--dq-lv-normal); }
.dq-dot.is-offline { background: var(--dq-lv-offline); }
.dq-status-rate { margin-left: auto; font-size: 12px; color: var(--dq-dash-muted); }

/* ---- 趋势区指标 ---- */
.dq-trend-metrics { gap: 0.5rem; }
.dq-tm-label { font-size: 12px; color: var(--dq-dash-muted); }
.dq-tm-value {
  font-size: 18px; font-weight: 700; line-height: 1.2;
  font-variant-numeric: tabular-nums; color: var(--dq-dash-text);
}

/* ---- 图表高度：桌面默认，窄屏逐级压缩 ---- */
.dq-chart { width: 100%; }
.dq-chart-trend { height: 300px; }
.dq-chart-dist { height: 240px; }
@media (max-width: 1199.98px) {
  .dq-chart-trend { height: 260px; }
  .dq-chart-dist { height: 220px; }
  .dq-dash-title { font-size: 18px; }
  .dq-dash-clock { font-size: 20px; }
}
@media (max-width: 991.98px) {
  .dq-dash { padding-bottom: 3.75rem; }   /* 让出底部操作条 */
}
@media (max-width: 767.98px) {
  .dq-chart-trend { height: 220px; }
  .dq-chart-dist { height: 200px; }
  .dq-kpi-value { font-size: 24px; }
  .dq-kpi { padding: 0.6rem 0.7rem; }
}

/* ---- 详情卡：步骤条 ---- */
.dq-detail-header { display: flex; align-items: center; gap: 0.5rem; }
.dq-detail-point { font-size: 12px; color: var(--dq-dash-muted); margin: 0.25rem 0 0.7rem; }
.dq-flow { display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.dq-step { display: flex; align-items: center; gap: 0.3rem; font-size: 12px; color: var(--dq-lv-offline); }
.dq-step-dot {
  width: 18px; height: 18px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px;
  background: rgba(134, 144, 156, 0.18); color: var(--dq-lv-offline);
}
.dq-step-line { width: 14px; height: 1px; background: var(--dq-dash-border); }
.dq-step.is-done { color: var(--dq-dash-text); }
.dq-step.is-done .dq-step-dot { background: var(--dq-primary); color: #fff; }
.dq-step.is-current { color: var(--dq-primary); font-weight: 600; }
.dq-step.is-current .dq-step-dot { box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.16); }

/* ---- 键值说明 ---- */
.dq-kv { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; font-size: 13px; margin: 0; }
.dq-kv dt { color: var(--dq-dash-muted); white-space: nowrap; }
.dq-kv dd { margin: 0; text-align: right; }

/* ---- TOP5 排行 ---- */
.dq-rank-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; font-size: 13px; }
.dq-rank-no {
  width: 20px; height: 20px; border-radius: 4px; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(134, 144, 156, 0.14); color: var(--dq-dash-muted);
}
.dq-rank-name { width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-rank-bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(134, 144, 156, 0.12); overflow: hidden; }
.dq-rank-bar i { display: block; height: 100%; border-radius: 999px; background: var(--dq-lv-offline); }
.dq-rank-bar i.is-critical { background: var(--dq-lv-critical); }
.dq-rank-bar i.is-major { background: var(--dq-lv-major); }
.dq-rank-bar i.is-minor { background: var(--dq-lv-minor); }
.dq-rank-bar i.is-normal { background: var(--dq-lv-normal); }
.dq-rank-bar i.is-offline { background: var(--dq-lv-offline); }
.dq-rank-value { width: 3.4rem; text-align: right; }
.dq-rank-row.is-top3 .dq-rank-value { font-weight: 700; }
.dq-rank-row.is-top3 .dq-rank-no { background: var(--dq-primary); color: #fff; }

/* ---- 核查清单 ---- */
.dq-check { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.dq-check li { display: flex; gap: 0.55rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--dq-dash-border); }
.dq-check li:last-child { border-bottom: 0; }
.dq-check-box {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--dq-dash-border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; flex: 0 0 18px;
}
.dq-check li.is-done .dq-check-box { background: var(--dq-lv-normal); border-color: var(--dq-lv-normal); }
.dq-check li.is-done .dq-check-label { color: var(--dq-dash-muted); text-decoration: line-through; }
.dq-check-label { display: block; }
.dq-check-note { display: block; font-size: 12px; color: var(--dq-dash-muted); }

/* ---- 详情卡说明文字 ---- */
.dq-detail-text { font-size: 13px; color: var(--bs-secondary-color); margin-bottom: 0.5rem; }

/* ---- 操作提示 ---- */
.dq-toast {
  font-size: 12px; color: var(--dq-primary); opacity: 0;
  transition: opacity 0.25s ease; min-height: 1rem;
}
.dq-toast.is-show { opacity: 1; }

/* ---- 处理状态标签（描边小标签）---- */
.dq-st-tag {
  display: inline-block; padding: 0 0.45rem; border-radius: 4px;
  border: 1px solid var(--dq-dash-border); color: var(--dq-dash-muted);
  font-size: 12px; line-height: 1.6; white-space: nowrap; background: transparent;
}
.dq-st-tag.is-unconfirmed { border-color: var(--dq-lv-critical); color: var(--dq-lv-critical); }
.dq-st-tag.is-confirmed { border-color: var(--dq-primary); color: var(--dq-primary); }
.dq-st-tag.is-processing { border-color: var(--dq-lv-normal); color: var(--dq-lv-normal); }
.dq-st-tag.is-recovered { border-color: var(--dq-lv-offline); color: var(--dq-lv-offline); }

/* ---- 区块标题（信息层级标识）---- */
.dq-sec-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem; padding: 0 0.25rem;
}
.dq-sec-eyebrow {
  font-size: 12px; color: var(--dq-dash-muted);
  border: 1px solid var(--dq-dash-border); border-radius: 999px; padding: 0.05rem 0.5rem;
}
.dq-sec-head .dq-sec-title { font-size: 16px; font-weight: 700; color: var(--dq-dash-text); }

/* ---- 设备状态条（堆叠占比条）---- */
.dq-statusbar-chips { display: inline-flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; }
.dq-statusbar-track {
  display: flex; height: 6px; overflow: hidden; border-radius: 999px;
  background: rgba(134, 144, 156, 0.14); margin: 0 0.85rem 0.75rem;
}
.dq-statusbar-bar { display: block; height: 100%; background: var(--dq-lv-offline); }
.dq-statusbar-bar.is-critical { background: var(--dq-lv-critical); }
.dq-statusbar-bar.is-major { background: var(--dq-lv-major); }
.dq-statusbar-bar.is-minor { background: var(--dq-lv-minor); }
.dq-statusbar-bar.is-normal { background: var(--dq-lv-normal); }
.dq-statusbar-bar.is-offline { background: var(--dq-lv-offline); }
/* ---- 移动端异常卡片（<1200px 显示，桌面用表格）---- */
.dq-ex-cards { display: grid; gap: 0.5rem; }
.dq-ex-card {
  width: 100%; text-align: left; background: var(--dq-dash-card);
  border: 1px solid var(--dq-dash-border); border-radius: 8px; padding: 0.55rem 0.7rem;
}
.dq-ex-card.is-active {
  border-color: var(--bs-primary); box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.12);
}
.dq-ex-card-top {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 13px;
}
.dq-ex-card-status { margin-left: auto; color: var(--dq-dash-muted); font-size: 12px; }
.dq-ex-card-meta {
  display: flex; justify-content: space-between; gap: 0.5rem;
  margin-top: 0.25rem; font-size: 12px; color: var(--dq-dash-muted);
}

/* ---- 移动端底部吸附操作条（<1200px 显示）---- */
.dq-actionbar {
  position: sticky; bottom: 0.5rem; z-index: 1020; display: none; gap: 0.5rem;
  padding: 0.55rem 0.75rem; background: var(--dq-dash-card);
  border: 1px solid var(--dq-dash-border); border-radius: var(--dq-dash-radius);
  box-shadow: var(--dq-dash-shadow);
}
@media (max-width: 1199.98px) { .dq-actionbar { display: flex; } }
/* ---- 温度 TOP 5 排行容器 ---- */
.dq-rank { display: grid; gap: 0.15rem; }
/* ---- 移动端导航抽屉 / 标题标签 / 说明文字 ---- */
.dq-dash-offcanvas { width: 200px; background: var(--dq-dash-nav); color: #c9cdd4; }
.dq-dash-txt { white-space: nowrap; }
.dq-sec-note { font-size: 12px; color: var(--dq-dash-muted); }
.dq-step-label { white-space: nowrap; }
/* ==========================================================================
   智能楼宇管理系统首页（/）
   纯 CSS 楼宇主视觉：楼体 + 呼吸窗 + 传感数据浮标，点击进入 /devices/
   颜色仅用 --bs-* / --dq-* token，天然兼容 5 套皮肤（light/dark/tech/chinese/krjp）
   ========================================================================== */
.dq-bms-eyebrow {
  letter-spacing: 0.35em; font-size: 0.72rem; font-weight: 600;
  color: var(--bs-secondary-color);
}
.dq-bms-sub { max-width: 34rem; }

/* ---- 场景容器：渐变底（复用 hero token）+ 虚线点缀 ---- */
.dq-bms-scene { color: var(--bs-body-color); border-radius: 1rem; }
.dq-bms-scene:hover .dq-bms-cta { filter: brightness(1.08); }
.dq-bms-scene:hover .dq-bms-tower { border-color: var(--bs-primary); }
.dq-bms-city {
  position: relative; width: min(520px, 92vw); height: 300px;
  background: linear-gradient(160deg, var(--dq-hero-from) 0%, var(--dq-hero-to) 100%);
  border: 1px solid var(--bs-border-color); border-radius: 1rem;
  overflow: hidden;
}

/* ---- 楼体 ---- */
.dq-bms-tower {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-58%);
  width: 130px; height: 210px; z-index: 2;
  background: var(--bs-tertiary-bg);
  border: 2px solid var(--bs-border-color); border-bottom: 0;
  border-radius: 6px 6px 0 0;
  transition: border-color 0.2s ease;
}
.dq-bms-tower-side {
  left: 50%; transform: translateX(6%); width: 86px; height: 130px; z-index: 1;
  opacity: 0.85;
}
.dq-bms-roof { position: relative; height: 26px; border-bottom: 2px solid var(--bs-border-color); }
.dq-bms-antenna {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 2px; height: 34px; background: var(--bs-border-color);
}
.dq-bms-signal {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--dq-lv-normal);
  animation: dq-bms-pulse 2s ease-out infinite;
}
@keyframes dq-bms-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--dq-lv-normal) 55%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---- 楼层与窗（窗呼吸明暗，错峰）---- */
.dq-bms-floors {
  height: calc(100% - 28px); display: flex; flex-direction: column;
  justify-content: space-evenly; padding: 0.35rem 0.5rem;
}
.dq-bms-floor { display: flex; justify-content: space-evenly; gap: 0.3rem; }
.dq-bms-win {
  width: 20px; height: 12px; border-radius: 2px;
  background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color);
}
.dq-bms-win-1, .dq-bms-win-3 { animation: dq-bms-glow 3.2s ease-in-out infinite; }
.dq-bms-win-2 { animation: dq-bms-glow 3.2s 1.1s ease-in-out infinite; }
.f-1 .dq-bms-win-2, .f-3 .dq-bms-win-1 { animation-delay: 1.6s; }
@keyframes dq-bms-glow {
  0%, 100% { background: var(--bs-secondary-bg); }
  50% { background: color-mix(in srgb, var(--bs-primary) 30%, var(--bs-secondary-bg)); }
}
.dq-bms-door-row { justify-content: center; }
.dq-bms-door {
  width: 30px; height: 18px; border-radius: 4px 4px 0 0;
  background: var(--bs-primary); opacity: 0.85;
}

/* ---- 传感数据浮标（上下浮动，错峰）---- */
.dq-bms-tag {
  position: absolute; z-index: 3;
  padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); color: var(--bs-secondary-color);
  animation: dq-bms-float 3.6s ease-in-out infinite;
  white-space: nowrap;
}
.dq-bms-tag b { color: var(--bs-body-color); font-size: 0.8rem; }
.dq-bms-tag-1 { top: 56px; left: 8%; animation-delay: 0s; }
.dq-bms-tag-2 { top: 30px; right: 9%; animation-delay: 0.9s; }
.dq-bms-tag-3 { top: 128px; right: 14%; animation-delay: 1.8s; }
@keyframes dq-bms-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---- 地面 ---- */
.dq-bms-ground {
  position: absolute; bottom: 0; left: 0; right: 0; height: 34px; z-index: 0;
  border-top: 2px solid var(--bs-border-color);
  background: linear-gradient(180deg, var(--bs-tertiary-bg), transparent);
}

/* ---- 主 CTA 与能力点 ---- */
.dq-bms-cta { letter-spacing: 0.05em; }
.dq-bms-feat {
  height: 100%; padding: 0.9rem 0.8rem; text-align: center;
  border: 1px solid var(--bs-border-color); border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
  display: flex; flex-direction: column; gap: 0.2rem; align-items: center;
}
.dq-bms-feat-ico { font-size: 1.4rem; }
.dq-bms-feat small { color: var(--bs-secondary-color); }

/* ---- 降低动效偏好 ---- */
@media (prefers-reduced-motion: reduce) {
  .dq-bms-signal, .dq-bms-win, .dq-bms-tag { animation: none; }
}

/* ==========================================================================
   监控总览（/devices/ 未选类别时）：KPI（监控点/总线）+ 今日/本周/本月最高最低温
   ========================================================================== */
.dq-ov-top { display: flex; justify-content: center; gap: 2.5rem; }
.dq-ov-kpi { display: flex; flex-direction: column; align-items: center; }
.dq-ov-kpi-num { font-size: 2rem; font-weight: 700; line-height: 1.1; color: var(--bs-primary); }
.dq-ov-kpi-label { font-size: 0.85rem; color: var(--bs-secondary-color); }
.dq-ov-period {
  height: 100%; padding: 0.85rem 1rem;
  border: 1px solid var(--bs-border-color); border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}
.dq-ov-period-title { font-weight: 600; }
.dq-ov-period-title small { font-weight: 400; color: var(--bs-secondary-color); }
.dq-ov-hilo { display: flex; gap: 1.25rem; margin-top: 0.4rem; }
.dq-ov-hilo span { font-size: 1.05rem; font-weight: 700; }
.dq-ov-hilo i { font-style: normal; font-size: 0.72rem; font-weight: 400; margin-right: 0.3rem; }
.dq-ov-hi { color: var(--dq-lv-critical); }
.dq-ov-lo { color: var(--bs-primary); }

/* ==========================================================================
   温度数据查询页（/devices/data-query/）：筛选区 + 位置多选 + 数据列表
   ========================================================================== */
.dq-q-cats { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.dq-q-cat {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border: 1px solid var(--bs-border-color);
  border-radius: 999px; font-size: 0.82rem; cursor: pointer;
  background: var(--bs-body-bg); user-select: none;
}
.dq-q-cat.is-sub { padding-left: 1.4rem; position: relative; }
.dq-q-cat.is-sub::before { content: "└"; position: absolute; left: 0.5rem; color: var(--bs-secondary-color); }
.dq-q-cat:hover { border-color: var(--bs-primary); }
.dq-q-cat.is-on { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.dq-q-cat.is-on::before { color: rgba(255, 255, 255, 0.8); }
.dq-q-msg { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 数据查询页定位入口：?device=<id> 高亮设备与所在总线线 ---- */
.dq-device-tile.is-highlight {
  border: 2px solid var(--dq-lv-critical);
  background: color-mix(in srgb, var(--dq-lv-critical) 12%, var(--bs-body-bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dq-lv-critical) 25%, transparent);
}
.dq-device-tile.is-highlight .dq-device-tile-name,
.dq-device-tile.is-highlight .dq-device-tile-value { color: var(--dq-lv-critical); font-weight: 700; }
.dq-device-group.is-highlight .dq-device-group-body::before { background: var(--dq-lv-critical); width: 3px; }
.dq-device-group.is-highlight .dq-device-group-badge {
  border-color: var(--dq-lv-critical); color: var(--dq-lv-critical); font-weight: 700;
}
