/* ============================================================================
   枢衡 AxisGauge · 造船分段制造车间大屏
   ----------------------------------------------------------------------------
   设计原则（老板在看，不是工程师在调）：
   1. 一屏不滚动，四块内容：KPI 条 / 主视觉 / 右栏 / 底部告警
   2. 颜色只做语义：青=正常态、绿=达成、黄=关注、红=异常。不做装饰性用色
   3. 数字等宽（tabular-nums），刷新时位数不跳
   4. 层级靠留白与 1px 边框，不靠阴影堆叠
   ========================================================================== */

:root {
  --bg: #060b14;
  --bg-2: #08111e;
  --panel: #0a1524;
  --panel-2: #0d1a2c;
  --line: #16273d;
  --line-soft: #101d2f;

  --txt: #d7e5f5;
  --txt-2: #9fb6cf;
  --dim: #6b84a0;
  --faint: #47607c;

  --cyan: #22d3ee;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;

  --r: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--txt);
  font-family: "Microsoft YaHei", "PingFang SC", "Source Han Sans SC", system-ui, sans-serif;
  font-size: 13px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  /* 极弱的网格底纹：给暗场一个"仪表盘"的质感，不干扰读数 */
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(34, 211, 238, .055), transparent 62%),
    linear-gradient(rgba(22, 39, 61, .30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 39, 61, .30) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
}

[v-cloak] { display: none; }

.num { font-family: Consolas, "JetBrains Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 骨架 */
.shell {
  /* 用 fixed + inset 铺满视口，而不是 height:100vh：
     无头渲染/嵌在 iframe 里时，100vh 与实际可视高度会差一截，
     表现为整页只占了上面 60%，下面一大片空白。 */
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: 50px 40px minmax(0, 1fr);
  padding: 8px 12px 10px;
  gap: 8px;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px; border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 5px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(34, 197, 94, .12));
  border: 1px solid rgba(34, 211, 238, .38);
  color: #9ff0ff; font-size: 13px; font-weight: 700;
}
.brand h1 {
  font-size: 16px; font-weight: 600; letter-spacing: .6px;
  display: flex; align-items: baseline; gap: 8px;
}
.brand h1 em {
  font-style: normal; font-size: 10.5px; font-weight: 400;
  color: var(--dim); letter-spacing: .3px;
}
.brand h1 b {
  font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 3px;
  background: rgba(34, 211, 238, .10); border: 1px solid rgba(34, 211, 238, .30);
  color: #7fe6f7; letter-spacing: .4px;
}
.top-right { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--dim); }
.top-right .sep { width: 1px; height: 14px; background: var(--line); }
.pill {
  padding: 2px 8px; border-radius: 3px; font-size: 10.5px;
  border: 1px solid var(--line); background: #0b1727; color: var(--txt-2);
}
.pill.ok { border-color: rgba(34, 197, 94, .34); color: #6ee7a0; background: rgba(34, 197, 94, .07); }
.pill.sim { border-color: rgba(245, 158, 11, .30); color: #e9b949; background: rgba(245, 158, 11, .07); }
.pill.bad { border-color: rgba(239, 68, 68, .34); color: #ff9b9b; background: rgba(239, 68, 68, .07); }
.clock { font-family: Consolas, monospace; color: var(--txt-2); letter-spacing: .4px; }

/* Tab 条（顶部横向，下方指示线） */
.tabs {
  display: flex; align-items: stretch; gap: 2px;
  border-bottom: 1px solid var(--line);
  padding-left: 2px;
}
.tab {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 0 14px; font-size: 12.5px; color: var(--txt-2);
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; letter-spacing: .3px;
  transition: color .15s, background .15s;
}
.tab:hover { color: var(--txt); background: rgba(34, 211, 238, .05); }
.tab.on { color: #d9f7ff; }
.tab.on::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), rgba(34, 211, 238, .25));
  border-radius: 2px 2px 0 0;
}
.tab i {
  font-style: normal; font-size: 10px; color: var(--faint);
  font-family: Consolas, monospace;
}
.tab.on i { color: var(--cyan); }
.tab .badge {
  min-width: 16px; height: 15px; padding: 0 4px; border-radius: 8px;
  font-size: 9.5px; line-height: 15px; text-align: center;
  background: rgba(239, 68, 68, .18); color: #ffb4b4;
}

/* 主内容区 */
.main { min-height: 0; display: flex; flex-direction: column; }
/* 视图根节点必须显式撑满：只靠 flex:1 时，若组件根节点没有 flex 上下文，
   整页会停在内容高度（表现为下方大片空白、右栏被压扁）。 */
.main > * { flex: 1 1 auto; min-height: 0; height: 100%; }
.view { display: none; flex: 1; min-height: 0; }
.view-body { flex: 1; min-height: 0; height: 100%; display: flex; flex-direction: column; gap: 8px; }
.view.on { display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- 通用卡片 */
.card {
  background: linear-gradient(180deg, var(--panel), #081120);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  position: relative;
}
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px 6px; flex: 0 0 auto;
}
.card-h h3 {
  font-size: 12.5px; font-weight: 600; color: #cfe0f2; letter-spacing: .5px;
  display: flex; align-items: center; gap: 7px;
}
.card-h h3::before {
  content: ""; width: 2px; height: 12px; border-radius: 1px;
  background: linear-gradient(180deg, var(--cyan), rgba(34, 211, 238, .15));
}
.card-h .hint { font-size: 10.5px; color: var(--faint); }
.card-b { flex: 1; min-height: 0; padding: 0 12px 10px; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- KPI 条 */
.kpi-row {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px; flex: 0 0 auto;
}
.kpi {
  position: relative; overflow: hidden;
  padding: 9px 13px 10px;
  background: linear-gradient(180deg, #0c1a2b, #081120);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .16s, transform .16s;
}
.kpi:hover { border-color: #24405d; transform: translateY(-1px); }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px;
  border-radius: 0 2px 2px 0; background: var(--cyan); opacity: .8;
}
.kpi.t-ok::before { background: var(--green); }
.kpi.t-warn::before { background: var(--amber); }
.kpi.t-bad::before { background: var(--red); }
.kpi.t-blue::before { background: var(--blue); }
.kpi-label { font-size: 11px; color: var(--dim); letter-spacing: .2px; }
.kpi-val {
  display: flex; align-items: baseline; gap: 3px; margin: 3px 0 1px;
  font-family: Consolas, monospace; font-variant-numeric: tabular-nums;
  font-size: clamp(21px, 1.42vw, 27px); font-weight: 600; color: #e8f6ff; line-height: 1.15;
}
.kpi.t-ok .kpi-val { color: #86efac; }
.kpi.t-warn .kpi-val { color: #fbbf24; }
.kpi.t-bad .kpi-val { color: #ff9b9b; }
.kpi.t-blue .kpi-val { color: #93c5fd; }
.kpi-unit { font-size: 11px; color: var(--dim); font-family: inherit; }
.kpi-sub { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- 总览布局 */
.ov {
  flex: 1 1 auto;
  /* 兜底高度：flex 在部分无头/嵌入环境下算不出剩余高度，
     整页会停在内容高度（下方大片空白）。用 vh 直接给一个下界，
     正常浏览器下 flex:1 会覆盖它，异常环境下也不至于塌。 */
  min-height: calc(100vh - 206px);
  display: grid;
  grid-template-columns: 1fr 316px;
  grid-template-rows: 1fr 176px;
  gap: 8px;
}
.ov-main { grid-row: 1; grid-column: 1; }
.ov-side {
  grid-row: 1 / -1; grid-column: 2;
  /* 右栏用 grid 两行而不是 flex：flex 下 min-height:0 的卡片会被压到内容高度，
     监控 2×2 会缩成四个小方块。auto 给船号卡，剩下的全给监控。 */
  display: grid; grid-template-rows: auto minmax(230px, 1fr); gap: 8px;
  min-height: 0;
}
.ov-alarm { grid-row: 2; grid-column: 1; }

/* 三维区 */
.scene-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 0 0 var(--r) var(--r); }
.scene-wrap canvas { display: block; width: 100% !important; height: 100% !important; }
.scene-legend {
  position: absolute; left: 12px; bottom: 10px; display: flex; gap: 12px; align-items: center;
  font-size: 10.5px; color: var(--txt-2);
  background: rgba(6, 11, 20, .72); border: 1px solid var(--line-soft);
  border-radius: 4px; padding: 4px 10px; pointer-events: none;
}
.scene-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.scene-legend .tip { color: var(--faint); border-left: 1px solid var(--line); padding-left: 10px; }
.scene-tools {
  position: absolute; right: 12px; top: 10px; display: flex; gap: 6px;
}

/* 船号卡 */
.ship-card {
  border: 1px solid var(--line); border-radius: var(--r);
  background: linear-gradient(180deg, #0b1728, #081120);
  padding: 9px 11px 10px; display: flex; flex-direction: column; gap: 6px;
}
.ship-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.ship-no { font-family: Consolas, monospace; font-size: 12px; color: #8ff0ff; letter-spacing: .4px; }
.ship-name { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ship-mid { display: flex; align-items: baseline; gap: 6px; }
.ship-rate { font-family: Consolas, monospace; font-size: 20px; font-weight: 600; }
.ship-mid em { font-style: normal; font-size: 10px; color: var(--faint); }
.ship-bar { height: 4px; border-radius: 2px; background: #0e1e31; overflow: hidden; }
.ship-bar i { display: block; height: 100%; border-radius: 2px; }
.ship-foot { display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); }
.ship-foot b { color: var(--txt-2); font-weight: 500; font-family: Consolas, monospace; }

/* 监控位 */
.cams { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; flex: 1; min-height: 0; }
.cam {
  position: relative; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-soft); background: #04080f; min-height: 0;
}
.cam canvas, .cam img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cam-tag {
  position: absolute; left: 5px; top: 4px; font-size: 9px; letter-spacing: .4px;
  color: #cfd9e6; text-shadow: 0 1px 2px #000; font-family: Consolas, monospace;
}
.cam-tag .live { color: #ff5b5b; }
.cam-sub {
  position: absolute; right: 5px; top: 4px; font-size: 8.5px;
  color: rgba(220, 232, 245, .55); font-family: Consolas, monospace;
}
.cam-name {
  position: absolute; left: 5px; bottom: 4px; font-size: 9.5px; color: #b9cde6;
  text-shadow: 0 1px 3px #000;
}
.cam.sim .cam-tag { color: #fbbf24; }

/* 底部告警流 */
.alarm-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; flex: 1; min-height: 0; }
.al-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-left-width: 2px;
  border-radius: 5px; background: #0a1421;
  padding: 8px 10px; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.al-card:hover { background: #0d1a2b; }
.al-card.lv-红 { border-left-color: var(--red); }
.al-card.lv-橙 { border-left-color: var(--amber); }
.al-card.lv-黄 { border-left-color: #eab308; }
.al-top { display: flex; align-items: center; gap: 6px; }
.al-lv {
  font-size: 9.5px; padding: 0 5px; border-radius: 2px; line-height: 15px;
  background: rgba(239, 68, 68, .16); color: #ffb4b4;
}
.lv-橙 .al-lv { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.lv-黄 .al-lv { background: rgba(234, 179, 8, .14); color: #e5c452; }
.al-code { font-family: Consolas, monospace; font-size: 9.5px; color: var(--faint); }
.al-time { margin-left: auto; font-family: Consolas, monospace; font-size: 9.5px; color: var(--faint); }
.al-title { font-size: 12px; color: var(--txt); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-detail { font-size: 10.5px; color: var(--dim); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.al-foot { margin-top: auto; display: flex; justify-content: space-between; font-size: 9.5px; color: var(--faint); }
.al-foot b { color: var(--txt-2); font-family: Consolas, monospace; font-weight: 500; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  font-family: inherit; font-size: 11.5px; padding: 4px 11px; border-radius: 4px;
  background: rgba(34, 211, 238, .10); border: 1px solid rgba(34, 211, 238, .30);
  color: #8ff0ff; cursor: pointer; transition: background .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn:hover { background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .5); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--txt-2); }
.btn.ghost:hover { border-color: #2a7f96; color: #d8f6ff; }
.btn.sm { font-size: 10.5px; padding: 2px 8px; }

/* ---------------------------------------------------------------- 提示 */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 900; max-width: 640px; padding: 9px 16px; border-radius: 5px;
  font-size: 12.5px; background: #12233a; border: 1px solid #24425f; color: #d8e8f8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: tIn .18s ease-out;
}
.toast.ok { border-color: #2c6b46; color: #a9f0c6; background: #0f2a1e; }
.toast.bad { border-color: #7f2a2a; color: #ffc0c0; background: #25121a; }
@keyframes tIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 空态 / 加载 */
.empty { display: grid; place-items: center; height: 100%; color: var(--faint); font-size: 11.5px; }
.skel {
  background: linear-gradient(90deg, #0b1727 25%, #12233a 37%, #0b1727 63%);
  background-size: 400% 100%; animation: sk 1.2s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 启动遮罩 */
.splash {
  position: fixed; inset: 0; z-index: 999; display: grid; place-items: center;
  background: radial-gradient(900px 480px at 50% 18%, #10263f, transparent 62%), #060b14;
  transition: opacity .4s ease, visibility .4s;
}
.splash.gone { opacity: 0; visibility: hidden; }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.splash h2 {
  font-size: 24px; letter-spacing: 2px; font-weight: 600;
  background: linear-gradient(90deg, #d8f0ff, #7fe6f7 55%, #6ee7a0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.splash p { font-size: 12px; color: var(--dim); letter-spacing: 1.1px; }
.splash .bar { width: 240px; height: 3px; border-radius: 2px; background: #14243a; overflow: hidden; margin-top: 12px; }
.splash .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green)); transition: width .3s; }
.splash small { font-size: 10.5px; color: var(--faint); font-family: Consolas, monospace; }

@media (max-width: 1500px) {
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov { grid-template-columns: 1fr 280px; grid-template-rows: 1fr 150px; }
  .alarm-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ================================================================
   运行参数页
   ================================================================ */
.param-bar { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.mini {
  display: flex; align-items: baseline; gap: 5px;
  padding: 7px 12px; border-radius: var(--r);
  background: linear-gradient(180deg, #0c1a2b, #081120);
  border: 1px solid var(--line); border-left: 2px solid var(--cyan);
}
.mini.t-ok { border-left-color: var(--green); }
.mini.t-warn { border-left-color: var(--amber); }
.mini.t-bad { border-left-color: var(--red); }
.mini .ml { font-size: 11px; color: var(--dim); }
.mini b { font-size: 19px; font-weight: 600; color: #e8f6ff; }
.mini.t-bad b { color: #ff9b9b; }
.mini.t-warn b { color: #fbbf24; }
.mini em { font-style: normal; font-size: 10px; color: var(--faint); }

.switch { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--txt-2); cursor: pointer; }
.switch input { accent-color: var(--cyan); }

.param-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 300px; gap: 8px; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-weight: 600; font-size: 10.5px; color: var(--dim);
  padding: 7px 10px; background: #0b1727; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl th i { font-style: normal; color: var(--faint); font-weight: 400; font-size: 9.5px; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: 5px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: rgba(34, 211, 238, .05); }
.tbl tbody tr.sel { background: rgba(34, 211, 238, .09); box-shadow: inset 2px 0 0 var(--cyan); }
.tbl tbody tr.over td { background: rgba(239, 68, 68, .035); }
.tbl td.dim { color: var(--dim); }
.tbl td.ch-over { color: #ff9b9b; font-weight: 600; }
.dotcell { padding-left: 12px !important; }
.dev-code { font-family: Consolas, monospace; font-size: 11px; color: var(--txt-2); letter-spacing: .3px; }
.dev-nm { font-size: 11.5px; color: var(--txt); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }

.lv { font-size: 9.5px; padding: 1px 5px; border-radius: 2px; line-height: 15px; display: inline-block; }
.lv-正常 { background: rgba(34, 197, 94, .13); color: #6ee7a0; }
.lv-关注 { background: rgba(34, 211, 238, .13); color: #67e8f9; }
.lv-预警 { background: rgba(245, 158, 11, .15); color: #fbbf24; }
.lv-严重 { background: rgba(239, 68, 68, .16); color: #ff9b9b; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.d-ok { background: var(--green); }
.d-watch { background: var(--cyan); }
.d-warn { background: var(--amber); }
.d-bad { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, .6); }

/* 右侧详情 */
.param-side { min-height: 0; }
.pd { gap: 12px; overflow: auto; }
.pd-score { display: flex; align-items: baseline; gap: 8px; }
.pd-score b { font-size: 30px; font-weight: 700; line-height: 1; }
.pd-rul { margin-left: auto; font-size: 10.5px; color: var(--dim); }
.pd-block { display: flex; flex-direction: column; gap: 5px; }
.pd-title {
  font-size: 11px; color: var(--dim); display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px dashed var(--line-soft); padding-bottom: 4px;
}
.pd-title span { font-size: 9.5px; color: var(--faint); }
.bar-row { display: grid; grid-template-columns: 34px 1fr 30px; gap: 7px; align-items: center; font-size: 11px; }
.bar-row .bl { color: var(--txt-2); }
.bar-row .bt { height: 5px; border-radius: 3px; background: #0d1c2e; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; border-radius: 3px; }
.bar-row b { text-align: right; color: var(--txt); font-size: 11px; }
.kv { display: flex; align-items: baseline; gap: 6px; font-size: 11px; }
.kv span { color: var(--dim); flex: 0 0 78px; }
.kv b { color: var(--txt); font-weight: 500; }
.kv em { margin-left: auto; font-style: normal; font-size: 10px; color: var(--faint); }
.pd-note { font-size: 10.5px; color: var(--faint); line-height: 1.6; }

/* ================================================================
   告警中心
   ================================================================ */
.filter-bar { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.segbtn {
  font-family: inherit; font-size: 11.5px; padding: 4px 12px; cursor: pointer;
  background: #0a1524; color: var(--txt-2); border: 0; border-right: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 5px;
}
.segbtn:last-child { border-right: 0; }
.segbtn:hover { background: #0e1e31; color: var(--txt); }
.segbtn.on { background: rgba(34, 211, 238, .13); color: #d8f6ff; }
.segbtn em {
  font-style: normal; font-size: 9.5px; padding: 0 4px; border-radius: 7px;
  background: rgba(255, 255, 255, .08); color: var(--txt-2);
}
.fhint { font-size: 10.5px; color: var(--faint); }

.alarm-page { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 400px; gap: 8px; }
.al-list-wrap { min-height: 0; }
.al-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--line-soft);
  border-left: 2px solid transparent; cursor: pointer; transition: background .12s;
}
.al-row:hover { background: rgba(34, 211, 238, .05); }
.al-row.sel { background: rgba(34, 211, 238, .09); border-left-color: var(--cyan); }
.al-row.lv-红 { border-left-color: rgba(239, 68, 68, .75); }
.al-row.lv-橙 { border-left-color: rgba(245, 158, 11, .75); }
.al-row.lv-黄 { border-left-color: rgba(234, 179, 8, .6); }
.al-left { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.al-main { min-width: 0; }
.al-t { font-size: 12.5px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-s { font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-right { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--faint); flex: 0 0 auto; }
.chip {
  font-size: 9.5px; padding: 0 5px; border-radius: 2px; line-height: 15px;
  background: rgba(255, 255, 255, .05); color: var(--txt-2);
}
.chip.done { background: rgba(34, 197, 94, .12); color: #6ee7a0; }

.al-detail { min-height: 0; }
.ad { gap: 12px; overflow: auto; }
.ad-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 11px; }
.ad-meta div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 4px; }
.ad-meta span { color: var(--dim); }
.ad-meta b { color: var(--txt); font-weight: 500; }
.ad-desc { font-size: 12px; color: var(--txt-2); line-height: 1.7; }
.ad-actions { display: flex; gap: 8px; }

.ai-card { border: 1px solid #1b3a52; border-radius: 5px; background: #08192a; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-h { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: #8ff0ff; }
.ai-h em { font-style: normal; font-size: 9.5px; color: var(--faint); font-family: Consolas, monospace; }
.ai-h em.fb { color: #fbbf24; }
.ai-sec h4 { font-size: 10.5px; color: var(--dim); font-weight: 500; margin-bottom: 5px; letter-spacing: .3px; }
.ai-cause { margin-bottom: 7px; }
.ai-cause b { font-size: 11.5px; color: var(--txt); font-weight: 500; line-height: 1.5; display: block; }
.ai-cause p { font-size: 10.5px; color: var(--txt-2); line-height: 1.55; margin-top: 2px; }
.ai-cause p span {
  font-size: 9px; color: var(--cyan); background: rgba(34, 211, 238, .1);
  padding: 0 4px; border-radius: 2px; margin-right: 5px;
}
.ai-list { padding-left: 16px; font-size: 11px; color: var(--txt-2); line-height: 1.75; }
.ai-empty { font-size: 11px; color: var(--faint); line-height: 1.8; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 5px; }

@media (max-width: 1500px) {
  .param-grid { grid-template-columns: 1fr 260px; }
  .alarm-page { grid-template-columns: 1fr 340px; }
}

/* 作业区标牌（三维叠层）：小窗里靠几何分辨六个区太难，文字最直接 */
.as-areas { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.as-area {
  position: absolute; left: 0; top: 0; display: none;
  padding: 1px 8px; border-radius: 3px; white-space: nowrap;
  font-size: 11px; letter-spacing: .6px; color: #cfe9ff;
  background: rgba(8, 20, 34, .80); border: 1px solid #2a5a7d;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

/* ================================================================
   三维设备标签层（必须绝对定位：canvas 是块级元素，普通流的标签层会被压到画布下方）
   ================================================================ */
.as-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.as-label {
  position: absolute; left: 0; top: 0; display: none;
  padding: 0 5px; border-radius: 3px; white-space: nowrap;
  font-size: 11.5px; line-height: 1.65; color: #d8e8f8;
  background: rgba(6, 14, 26, .88); border: 1px solid #2c4d6e;
  backdrop-filter: blur(2px); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.as-label b { font-family: Consolas, monospace; color: #eaf6ff; font-weight: 700; letter-spacing: .3px; }
.as-label i { font-style: normal; margin-left: 5px; font-family: Consolas, monospace; font-weight: 700; }
.as-label.lv-正常 { border-color: #2c6b46; }
.as-label.lv-正常 i { color: #4ade80; }
.as-label.lv-关注 { border-color: #1f6a78; }
.as-label.lv-关注 i { color: #67e8f9; }
.as-label.lv-预警 { border-color: #7a5a1c; }
.as-label.lv-预警 i { color: #fbbf24; }
.as-label.lv-严重 { border-color: #7f2a2a; background: rgba(40, 10, 12, .85); }
.as-label.lv-严重 i { color: #ff8080; }

/* 首页三维是主视觉，应该占大头：与底部告警条按 2.2 : 1 分剩余高度，
   并给一个下界，避免窗口偏矮时把三维压成一条 */
.ov { flex: 1.32 1 auto; min-height: min(34vh, 320px); }

/* 视图主体必须显式撑满视口剩余高度：只靠 flex:1 时，组件根节点在
   某些布局路径下会停在内容高度（表现为整页只占上半屏、下方大片空白）。 */
.view-body { min-height: calc(100vh - 196px); }

/* 网格行必须显式 1fr：隐式行是 auto，卡片会按内容高度塌陷，
   表现为"三维只占上半、下面一大片空"。 */
.ov { grid-template-rows: minmax(0, 1fr); }
.ov-main { display: flex; flex-direction: column; min-height: 0; }
.ov-main .scene-wrap { flex: 1 1 auto; min-height: 220px; }

/* .ov 是两行网格（三维 / 告警条）。只写一行 1fr 时，第 2 行是隐式 auto，
   会被上一行挤到只剩几十像素——告警卡就只露出标题。显式给第 2 行下限。 */
.ov { grid-template-rows: minmax(0, 1fr) minmax(126px, auto); }
.ov-alarm { min-height: 126px; }

/* 品牌副名："枢衡 —— 造船分段车间管控大屏"。
   英文代号已去掉：评委第一眼要能看懂"这是什么东西"，而不是猜缩写。 */
.brand-zh {
  font-size: 13px; font-weight: 500; letter-spacing: .6px;
  color: #8fb6d8; margin-left: 9px;
}

/* ================================================================
   v4 新增四页：船号分段 / 质量 / 安全环境 / 能源
   ================================================================ */

/* ---------------- 船号分段（泳道） ---------------- */
.blk-bar {
  display: flex; align-items: center; gap: 14px; flex: 0 0 auto;
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: linear-gradient(180deg, #0b1727, #081120);
}
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-group .chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; }
.chip-group .chip em { font-style: normal; font-size: 10px; color: var(--faint); }
.chip-group .chip.on em { color: #9fd9e8; }
.blk-sum { margin-left: auto; display: flex; gap: 16px; }
.bs-item { display: flex; flex-direction: column; gap: 1px; }
.bs-k { font-style: normal; font-size: 10px; color: var(--dim); }
.bs-item b { font-family: Consolas, monospace; font-size: 15px; color: #dff1ff; }

.blk-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 296px; gap: 8px; }
.blk-left { min-height: 0; }
.blk-right { min-height: 0; }
.blk-filters { display: flex; gap: 4px; }

.blk-head {
  display: grid; grid-template-columns: 168px 1fr 132px; gap: 10px;
  padding: 5px 12px; font-size: 10px; color: var(--faint);
  border-bottom: 1px solid var(--line); background: #0a1524; flex: 0 0 auto;
}
.bh-steps { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.bh-step { text-align: center; font-size: 9.5px; color: #55708f; position: relative; }
.bh-step.hot { color: #fbbf24; }
.bh-step i {
  font-style: normal; margin-left: 2px; font-size: 9px; color: #fbbf24;
  background: rgba(245, 158, 11, .16); border-radius: 6px; padding: 0 4px;
}
.bh-tail { text-align: right; }

.blk-list { flex: 1; min-height: 0; overflow-y: auto; }
.blk-row {
  display: grid; grid-template-columns: 168px 1fr 132px; gap: 10px;
  align-items: center; padding: 6px 12px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft); border-left: 2px solid transparent;
}
.blk-row:hover { background: rgba(34, 211, 238, .05); }
.blk-row.sel { background: rgba(34, 211, 238, .09); border-left-color: var(--cyan); }
.blk-row.late { border-left-color: rgba(239, 68, 68, .7); }
.blk-seg { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.blk-seg b { font-family: Consolas, monospace; font-size: 11.5px; color: #cfe3f7; }
.blk-seg span { font-size: 9.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.blk-steps { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.st { height: 14px; border-radius: 2px; background: #12203a; border: 1px solid #1b2f49; }
.st-done { background: #1d5c3c; border-color: #2c7a52; }
.st-doing { background: #a97a10; border-color: #e0a828; box-shadow: 0 0 7px rgba(245, 158, 11, .55); }
.st-todo { background: #0f1a2b; }

.blk-tail { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.blk-prog { width: 92px; height: 4px; background: #0d1c2e; border-radius: 2px; overflow: hidden; }
.blk-prog i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #4ade80); }
.blk-tail b { font-size: 9.5px; padding: 0 5px; border-radius: 2px; }
.s-ok { color: #6ee7a0; background: rgba(34, 197, 94, .12); }
.s-do { color: #67e8f9; background: rgba(34, 211, 238, .12); }
.s-idle { color: #7f97b4; background: rgba(255, 255, 255, .05); }
.s-bad { color: #ff9b9b; background: rgba(239, 68, 68, .14); }
.blk-tail em { font-style: normal; font-size: 9.5px; color: var(--faint); }
.blk-tail em.bad { color: #ff8080; }

.blk-kv { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; }
.blk-kv div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line-soft); padding-bottom: 4px; gap: 8px; }
.blk-kv span { color: var(--dim); flex: 0 0 66px; }
.blk-kv b { color: var(--txt); font-weight: 500; text-align: right; }

.blk-flow { display: flex; flex-direction: column; gap: 0; }
.bf-title { font-size: 10.5px; color: var(--dim); margin-bottom: 6px; }
.bf-item { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 2px; position: relative; }
.bf-item::before {
  content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: #1b2f49;
}
.bf-item:first-child::before { top: 50%; }
.bf-item:last-child::before { bottom: 50%; }
.bf-dot { width: 9px; height: 9px; border-radius: 50%; background: #12203a; border: 1px solid #24425f; z-index: 1; }
.f-done .bf-dot { background: #2c7a52; border-color: #4ade80; }
.f-doing .bf-dot { background: #e0a828; border-color: #fbbf24; box-shadow: 0 0 7px rgba(245, 158, 11, .7); }
.bf-name { flex: 1; font-size: 11.5px; color: var(--txt-2); }
.f-doing .bf-name { color: #ffd48a; }
.bf-state { font-style: normal; font-size: 9.5px; color: var(--faint); }
.blk-note { font-size: 10.5px; color: var(--faint); line-height: 1.7; }

/* ---------------- 质量看板 ---------------- */
.qc-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; flex: 0 0 auto; }
.qc-range { display: flex; gap: 4px; }
.qc-note { font-size: 10px; color: var(--faint); padding: 0 12px 8px; line-height: 1.6; }
.qc-table-wrap { flex: 1; min-height: 0; overflow: auto; }

/* ---------------- 安全环境 ---------------- */
.env-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 0 0 auto; }
.env-card { min-width: 0; }
.env-flag { font-size: 10px; padding: 1px 7px; border-radius: 2px; }
.env-flag.ok { color: #6ee7a0; background: rgba(34, 197, 94, .12); }
.env-flag.bad { color: #ff9b9b; background: rgba(239, 68, 68, .16); }
.env-metric { display: flex; flex-direction: column; gap: 3px; }
.em-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--txt-2); }
.em-head b { font-family: Consolas, monospace; font-size: 15px; }
.em-head b i { font-style: normal; font-size: 9.5px; color: var(--faint); margin-left: 2px; }
.em-bar { height: 5px; background: #0d1c2e; border-radius: 3px; overflow: hidden; }
.em-bar i { display: block; height: 100%; border-radius: 3px; }
.b-ok { background: linear-gradient(90deg, #22c55e, #4ade80); }
.b-warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.b-bad { background: linear-gradient(90deg, #ef4444, #ff8080); }
.em-foot { font-size: 9.5px; color: var(--faint); }
.env-th { display: flex; gap: 14px; font-size: 11px; color: var(--dim); border-top: 1px dashed var(--line-soft); padding-top: 6px; }
.env-th b { color: var(--txt); font-family: Consolas, monospace; margin-left: 3px; }
.env-note { font-size: 9.5px; color: var(--faint); line-height: 1.6; }

.permit-board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 8px 10px 10px; overflow: hidden; }
.permit-col { display: flex; flex-direction: column; min-width: 0; background: #08111e; border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
.pc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 9px; font-size: 11px; border-bottom: 1px solid var(--line-soft); background: #0b1727;
}
.pc-head em { font-style: normal; font-size: 10px; color: var(--faint); font-family: Consolas, monospace; }
.pc-head.t-bad { color: #ff9b9b; }
.pc-head.t-warn { color: #fbbf24; }
.pc-head.t-ok { color: #6ee7a0; }
.pc-head.t-idle { color: #7f97b4; }
.pc-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.permit-card {
  border: 1px solid var(--line); border-left-width: 2px; border-radius: 4px;
  background: #0b1626; padding: 6px 8px; display: flex; flex-direction: column; gap: 3px;
}
.permit-card.t-bad { border-left-color: var(--red); }
.permit-card.t-warn { border-left-color: var(--amber); }
.permit-card.t-ok { border-left-color: var(--green); }
.permit-card.t-idle { border-left-color: #24425f; opacity: .72; }
.pc-top { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
.pc-type { color: #cfe3f7; }
.pc-area { color: var(--faint); }
.pc-risk { font-size: 9px; padding: 0 4px; border-radius: 2px; margin-left: auto; }
.pc-risk.r-高 { color: #ff9b9b; background: rgba(239, 68, 68, .16); }
.pc-risk.r-中 { color: #fbbf24; background: rgba(245, 158, 11, .14); }
.pc-risk.r-低 { color: #7f97b4; background: rgba(255, 255, 255, .05); }
.pc-no { font-family: Consolas, monospace; font-size: 9.5px; color: var(--faint); }
.pc-time { font-size: 9.5px; color: var(--txt-2); font-family: Consolas, monospace; }
.pc-foot { display: flex; justify-content: space-between; font-size: 9px; color: var(--faint); }

/* ---------------- 能源 ---------------- */
.en-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; }
.en-area { display: flex; flex-direction: column; gap: 3px; }
.ea-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--txt-2); }
.ea-head b { font-family: Consolas, monospace; font-size: 13px; color: #dff1ff; }
.ea-head b i { font-style: normal; font-size: 9.5px; color: var(--faint); margin-left: 3px; }
.ea-bar { height: 6px; background: #0d1c2e; border-radius: 3px; overflow: hidden; }
.ea-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #3b82f6); border-radius: 3px; }
.ea-foot { font-size: 9.5px; color: var(--faint); }
.en-mix { border-top: 1px solid var(--line-soft); padding-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.mix-bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; }
.mix-bar i { display: block; height: 100%; }
.mix-legend { display: flex; gap: 14px; font-size: 10px; color: var(--txt-2); }
.mix-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

@media (max-width: 1500px) {
  .blk-main { grid-template-columns: 1fr 262px; }
  .env-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qc-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   运行参数（分组卡片版）
   ================================================================ */
.pm-bar { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; flex-wrap: wrap; }
.pm-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: inherit; font-size: 11.5px; padding: 4px 12px; cursor: pointer;
  background: #0d1929; border: 1px solid var(--line); border-left-width: 2px;
  color: var(--txt-2); border-radius: 3px;
}
.pm-chip em { font-style: normal; font-family: Consolas, monospace; font-size: 12px; color: #cfe3f7; }
.pm-chip.on { background: rgba(34, 211, 238, .12); border-color: #2a7f96; color: #d8f6ff; }
.pm-chip.c-bad { border-left-color: var(--red); }
.pm-chip.c-warn { border-left-color: var(--amber); }
.pm-chip.c-watch { border-left-color: var(--cyan); }
.pm-chip.c-ok { border-left-color: var(--green); }
.pm-note { margin-left: auto; font-size: 10.5px; color: var(--faint); }

.pm-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 302px; gap: 8px; }
.pm-scroll { min-height: 0; overflow-y: auto; padding-right: 2px; display: flex; flex-direction: column; gap: 8px; }
.pm-side { min-height: 0; }

.pm-group { display: flex; flex-direction: column; gap: 6px; }
.pm-gh {
  display: flex; align-items: center; gap: 9px; padding: 5px 10px;
  border-radius: 4px; background: #0a1524; border: 1px solid var(--line);
  border-left-width: 3px;
}
.pm-gh.t-bad { border-left-color: var(--red); }
.pm-gh.t-warn { border-left-color: var(--amber); }
.pm-gh.t-watch { border-left-color: var(--cyan); }
.pm-gh.t-ok { border-left-color: var(--green); }
.pm-gname { font-size: 12px; color: #dff1ff; letter-spacing: .5px; }
.pm-gh.t-bad .pm-gname { color: #ff9b9b; }
.pm-gh.t-warn .pm-gname { color: #fbbf24; }
.pm-gn { font-family: Consolas, monospace; font-size: 11px; color: var(--dim); }
.pm-ghr { flex: 1; height: 1px; background: var(--line); }
.pm-gtip { font-size: 9.5px; color: var(--faint); }

.pm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 6px; }
.pm-card {
  border: 1px solid var(--line); border-left-width: 3px; border-radius: 5px;
  background: linear-gradient(180deg, #0c1a2b, #0a1421);
  padding: 7px 9px; display: flex; flex-direction: column; gap: 6px; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.pm-card:hover { border-color: #2a5f7f; transform: translateY(-1px); }
.pm-card.lv-严重 { border-left-color: var(--red); }
.pm-card.lv-预警 { border-left-color: var(--amber); }
.pm-card.lv-关注 { border-left-color: var(--cyan); }
.pm-card.sel { border-color: #22d3ee; box-shadow: 0 0 0 1px rgba(34, 211, 238, .35) inset; }

.pcd-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pcd-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.d-bad { background: var(--red); box-shadow: 0 0 6px rgba(239, 68, 68, .7); }
.d-warn { background: var(--amber); }
.d-watch { background: var(--cyan); }
.d-ok { background: var(--green); }
.pcd-head b { font-size: 11.5px; color: var(--txt); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcd-code { font-family: Consolas, monospace; font-size: 9.5px; color: var(--faint); }
.pcd-area { margin-left: auto; font-size: 9.5px; color: var(--dim); }

.pcd-body { display: grid; grid-template-columns: 74px 1fr; gap: 8px; align-items: center; }
.pcd-score { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.pcd-score b { font-family: Consolas, monospace; font-size: 24px; line-height: 1; }
.pcd-unit { font-size: 9px; color: var(--faint); }
.pcd-rul { font-size: 9px; color: var(--dim); margin-top: 2px; }
.pcd-chs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.pcd-ch { display: flex; flex-direction: column; gap: 0; padding: 2px 4px; border-radius: 3px; background: #0e1c2e; }
.pcd-ch.over { background: rgba(239, 68, 68, .12); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .35); }
.pcd-ch span { font-size: 9px; color: var(--dim); }
.pcd-ch b { font-family: Consolas, monospace; font-size: 13px; color: var(--txt); }
.pcd-ch b i { font-style: normal; font-size: 8.5px; color: var(--faint); margin-left: 1px; }
.pcd-ch em { font-style: normal; font-size: 8.5px; color: #6ee7a0; }
.pcd-ch em.up { color: #ff9b9b; }

.pcd-sub { display: flex; gap: 10px; font-size: 9px; color: var(--faint); border-top: 1px dashed var(--line-soft); padding-top: 4px; }

.pm-ok-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px; }
.pm-ok {
  display: grid; grid-template-columns: 1fr auto; gap: 0 8px;
  padding: 5px 9px; border: 1px solid var(--line-soft); border-left: 2px solid var(--green);
  border-radius: 4px; background: #0a1524; cursor: pointer;
}
.pm-ok:hover { background: #0e1c2e; }
.pm-ok.sel { border-color: #22d3ee; }
.pm-ok b { font-size: 11px; color: var(--txt-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-ok-h { font-family: Consolas, monospace; font-size: 13px; color: #6ee7a0; }
.pm-ok-code { font-family: Consolas, monospace; font-size: 9px; color: var(--faint); }
.pm-ok-p { grid-column: 1 / -1; font-family: Consolas, monospace; font-size: 9.5px; color: var(--faint); }

/* ================================================================
   告警中心（分组流）
   ================================================================ */
.al-bar { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; flex-wrap: wrap; }
.al-page { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 404px; gap: 8px; }
.al-list-card { min-height: 0; }
.al-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 6px; }
.al-group { display: flex; flex-direction: column; }
.al-gh {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 9px; padding: 5px 12px;
  background: #0b1727; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  border-left-width: 3px; border-left-style: solid;
}
.al-gh.t-bad { border-left-color: var(--red); }
.al-gh.t-warn { border-left-color: var(--amber); }
.al-gh.t-watch { border-left-color: #eab308; }
.al-gh-lv { font-size: 11.5px; color: #dff1ff; }
.al-gh.t-bad .al-gh-lv { color: #ff9b9b; }
.al-gh.t-warn .al-gh-lv { color: #fbbf24; }
.al-gh-n { font-family: Consolas, monospace; font-size: 10.5px; color: var(--dim); }
.al-gh-open {
  font-size: 9.5px; color: #ff9b9b; background: rgba(239, 68, 68, .14);
  padding: 0 6px; border-radius: 2px;
}
.al-row {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 7px 12px; border-bottom: 1px solid var(--line-soft);
  border-left: 2px solid transparent; cursor: pointer;
}
.al-row:hover { background: rgba(34, 211, 238, .05); }
.al-row.sel { background: rgba(34, 211, 238, .09); border-left-color: var(--cyan); }
.al-row.lv-红 { border-left-color: rgba(239, 68, 68, .6); }
.al-row.lv-橙 { border-left-color: rgba(245, 158, 11, .55); }
.al-row.lv-黄 { border-left-color: rgba(234, 179, 8, .5); }
.al-row.done { opacity: .62; }
.al-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.al-main2 { min-width: 0; }
.ar-right { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--faint); flex: 0 0 auto; }
.al-time { font-family: Consolas, monospace; }
.chip.open { background: rgba(239, 68, 68, .14); color: #ff9b9b; }
.ad-title { font-size: 13.5px; color: #e6f2ff; line-height: 1.5; font-weight: 600; }
.al-side { min-height: 0; }

/* 告警详情元信息：右侧栏只有 404 宽，两列会把长值挤到相邻列上重叠 */
.al-side .ad-meta { grid-template-columns: 1fr; gap: 4px; }
.al-side .ad-meta div { align-items: baseline; }
.al-side .ad-meta b { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- ICP / 公安备案（页脚，固定右下，不占大屏布局） ---- */
.beian{position:fixed;right:14px;bottom:8px;z-index:60;display:flex;gap:14px;
  font-size:11px;line-height:1;opacity:.55;pointer-events:auto}
.beian a{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.beian a:hover{opacity:.85;text-decoration:underline}
.beian img{width:12px;height:12px;display:inline-block}
