/**
 * 全局设计令牌（第三版）：在第二版基础上做「去污」——去掉全屏/卡片的纹理与 blend，
 * 简化背景渐变与阴影层数，避免叠灰、叠噪带来的脏感。
 */
:root {
  --bg-deep: #061528;
  --bg-mid: #0c2748;
  --bg-panel: rgba(12, 40, 76, 0.93);
  --bg-panel-top: rgba(32, 78, 128, 0.62);
  --cyan: #5efff4;
  --cyan-soft: #b4fff8;
  --cyan-dim: rgba(94, 255, 244, 0.52);
  --cyan-glow: rgba(94, 255, 244, 0.24);
  --cyan-edge: rgba(150, 255, 248, 0.42);
  --text: #f4f9ff;
  --text-heading: #ffffff;
  --muted: #a8cae8;
  --muted-deep: #7498bc;
  /* 与顶部统计卡 .stat-card.ok / .fault / .warn / .off 数字色一致；机台卡色带渐变以其为中心展开 */
  --ok: #52f0c4;
  --warn: #ffe494;
  --fault: #ff9ca2;
  --fleet-stop-mid: #8cb4d4;
  --grid-line: rgba(120, 230, 255, 0.2);
  --grid-line-strong: rgba(140, 248, 255, 0.38);
  --rim-light: rgba(255, 255, 255, 0.28);
  --rim-deep: rgba(0, 8, 24, 0.38);
  --shadow-elev: 0 16px 40px rgba(0, 8, 24, 0.38);
  --shadow-soft: 0 8px 24px rgba(0, 8, 28, 0.26);
  --shadow-lift: 0 20px 56px rgba(0, 10, 30, 0.42);
  --shadow-inset-deep: inset 0 2px 4px rgba(0, 0, 0, 0.28);
  --panel-border-outer: rgba(100, 210, 255, 0.28);
  --panel-border-inner: rgba(255, 255, 255, 0.16);
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 16px;
  --radius-xl: 18px;
  /* 孪生区内容底色：与选中 Tab 底边同色，形成「标签贴在内容区上」的接缝 */
  --twin-inner-bg: #071a2e;
  /* 机台卡「生产进度条」填充：青蓝横向渐变（仅进度条，状态色带用绿/红/黄/灰） */
  --wb-prog-fill-grad: linear-gradient(
    90deg,
    #045a8c 0%,
    #0a7ec4 18%,
    #12a8e8 40%,
    #22c4f5 62%,
    #4ee8ff 82%,
    #d0fcff 100%
  );
  /* 系统字体优先：Segoe UI Variable 在 Win11 上字重与可读性更好 */
  --font: system-ui, "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Noto Sans SC", sans-serif;
  --font-tight: 0.02em;
  --ease-out-soft: cubic-bezier(0.25, 0.9, 0.35, 1);
}

* {
  box-sizing: border-box;
}

::selection {
  background: rgba(94, 255, 244, 0.32);
  color: var(--text-heading);
}

html,
body {
  margin: 0;
  height: 100%;
  background-color: var(--bg-deep);
  /* 仅保留两层：顶侧柔光 + 垂直底色，避免多枚径向渐变边缘叠出灰带 */
  background-image:
    radial-gradient(ellipse 110% 65% at 50% -12%, rgba(64, 150, 240, 0.28) 0%, transparent 55%),
    linear-gradient(180deg, #0b2a4e 0%, var(--bg-mid) 42%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.52;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

/**
 * 全屏纹理已关闭：任何 repeating-gradient + mix-blend 都会在深色底上产生可感知的脏点/灰雾。
 */
body::after {
  content: none;
  display: none;
}

#app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr minmax(184px, calc(var(--vh, 1vh) * 22)) auto;
  height: calc(var(--vh, 1vh) * 100);
  gap: 12px 18px;
  padding: 14px 18px 10px;
  max-width: calc(var(--vw, 1vw) * 100);
  box-sizing: border-box;
  isolation: isolate;
}

#app.app--odd-detail {
  grid-template-rows: auto 1fr minmax(300px, calc(var(--vh, 1vh) * 40)) auto;
}

#app::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: 18px;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(90, 200, 255, 0.14);
}

header.top-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 14px;
  /* 左右贴边与右侧末张统计卡一致，勿再加大左内边距 */
  padding: 12px 10px;
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden; /* 防整页撑破；统计卡在 .stats-row 内横滑 */
  background: linear-gradient(
    165deg,
    rgba(28, 72, 118, 0.88) 0%,
    rgba(12, 40, 72, 0.94) 45%,
    rgba(6, 22, 44, 0.98) 100%
  );
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 var(--panel-border-inner),
    var(--shadow-soft);
  backdrop-filter: blur(12px) saturate(1.12);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
}

header.top-bar::before {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 0;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(94, 255, 244, 0.22) 18%,
    var(--cyan-soft) 50%,
    rgba(94, 255, 244, 0.22) 82%,
    transparent 100%
  );
  opacity: 0.88;
  filter: drop-shadow(0 0 10px rgba(94, 255, 244, 0.28));
  pointer-events: none;
}

header.top-bar::after {
  content: none;
  display: none;
}

.title-block h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-heading);
}

.title-block .sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.title-block .sub--hud {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.title-block .sub--hud strong {
  color: var(--cyan);
}

.status-legend--header {
  margin-top: 8px;
  justify-content: flex-start;
}

/* 页眉：Logo + 系统全称贴左边框（间距≈右侧末张统计卡到右边框）；时钟在底栏 */
.title-block--brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  min-width: 0;
  margin: 0;
  padding: 0;
  justify-self: start;
}

.title-block--brand .app-brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.title-block--brand .app-brand-logo-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  line-height: 0;
  position: relative;
}

.title-block--brand .app-brand-logo-btn:focus-visible {
  outline: 2px solid var(--cyan-dim, rgba(94, 255, 244, 0.7));
  outline-offset: 2px;
}

.title-block--brand .app-brand-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-right: 0;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 0 10px rgba(94, 255, 244, 0.32)) drop-shadow(0 0 18px rgba(232, 196, 120, 0.18));
  user-select: none;
  pointer-events: none;
}

.logo-brief-tip {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  max-width: min(420px, calc(var(--vw, 1vw) * 70));
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(94, 255, 244, 0.35);
  background: rgba(6, 24, 44, 0.96);
  color: #eaf6ff;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.logo-brief-tip[hidden] {
  display: none !important;
}

#modalLogoBrief .modal.modal--logo-brief {
  width: min(920px, calc(var(--vw, 1vw) * 96));
  max-height: min(calc(var(--vh, 1vh) * 84), 860px);
}

.logo-brief-body {
  padding: 8px 4px 12px;
  color: #cfe6f7;
  font-size: 13px;
  line-height: 1.55;
}

.logo-brief-body h4 {
  margin: 14px 0 8px;
  color: #eaf6ff;
  font-size: 14px;
}

.logo-brief-body p {
  margin: 0 0 8px;
}

.logo-brief-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.logo-brief-kpis span {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 112px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(150, 206, 230, 0.22);
  background: rgba(6, 24, 44, 0.7);
}

.logo-brief-kpis strong {
  font-size: 15px;
  color: #eaf6ff;
}

.logo-brief-kpis em {
  font-style: normal;
  font-size: 11px;
  color: #8fb4cc;
}

.logo-brief-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.logo-brief-body th,
.logo-brief-body td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(150, 206, 230, 0.16);
  text-align: left;
  vertical-align: top;
}

.logo-brief-body th {
  color: #8fb4cc;
  font-weight: 600;
}

.title-block--brand .app-brand-title {
  margin: 0;
  font-size: clamp(16px, calc(var(--vw, 1vw) * 1.7), 26px);
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--text-heading);
  line-height: 1.28;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 32px var(--cyan-glow);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(calc(var(--vw, 1vw) * 42), 28em);
}

.title-block--brand .app-brand-mark {
  color: var(--cyan);
  font-weight: 700;
  text-shadow: 0 0 18px var(--cyan-glow);
}

.title-block--brand .app-brand-sep {
  margin: 0 0.28em;
  color: rgba(180, 214, 236, 0.72);
  font-weight: 500;
}

/*
 * 两组 wrapper 使用 display:contents，十张卡在同一 flex 行内。
 * 不用 justify-content:flex-end：溢出时左侧会被裁切且滚不到（flex 经典坑）。
 * 改用 ::before 弹性垫片：空间够时把卡顶到右侧；不够时垫片收为 0，从左起可完整横滑。
 */
.stats-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  padding-bottom: 0;
}

.stats-row::before {
  content: "";
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  height: 0;
  pointer-events: none;
  order: -1;
}

.stats-row::-webkit-scrollbar {
  height: 6px;
}

.stats-row::-webkit-scrollbar-track {
  background: rgba(8, 28, 52, 0.55);
  border-radius: 999px;
}

.stats-row::-webkit-scrollbar-thumb {
  background: rgba(94, 255, 244, 0.42);
  border-radius: 999px;
}

.stats-row::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 255, 244, 0.62);
}

.stats-row.stats-row--scrolling {
  cursor: grab;
}

.stats-row.stats-row--scrolling:active {
  cursor: grabbing;
}

.stats-row__group {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: stretch;
}

.stats-row__group.stat-merge {
  flex-direction: row;
  align-items: center;
  gap: 10px 14px;
  padding: 6px 12px 7px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(26, 62, 102, 0.92) 0%, rgba(8, 28, 52, 0.96) 100%);
  border: 1px solid var(--grid-line-strong);
  box-shadow: inset 0 1px 0 var(--panel-border-inner), 0 4px 16px rgba(0, 8, 24, 0.22);
  overflow: hidden;
}

.stat-merge__lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 92px;
  padding-right: 12px;
  margin-right: 2px;
  border-right: 1px solid rgba(120, 230, 255, 0.18);
  flex: 0 0 auto;
}

.stat-merge__kicker {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.stat-merge__total .num {
  font-size: 18px;
  font-weight: 800;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px var(--cyan-glow);
}

.stat-merge__total .unit {
  margin-left: 3px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.stat-merge__items {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
}

.stat-merge__item {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 2px 4px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
}

.stat-merge__item[data-fleet-filter] {
  cursor: pointer;
}

.stat-merge__item[data-fleet-filter]:hover,
.stat-merge__item[data-fleet-filter]:focus {
  border-color: rgba(94, 255, 244, 0.35);
  outline: none;
}

.stat-merge__item.is-active,
.stat-merge__lead.is-active {
  border-color: rgba(94, 255, 244, 0.85);
  background: rgba(20, 70, 110, 0.7);
  box-shadow: inset 0 0 0 1px rgba(94, 255, 244, 0.45);
}
.stat-merge__lead[data-fleet-filter] { cursor: pointer; }

.stat-merge__item .label {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-merge__item .value {
  display: block;
  margin-top: 1px;
}

.stat-merge__item .num {
  font-size: 16px;
  font-weight: 800;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.stat-merge__item .unit {
  margin-left: 2px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

.stat-merge__item.ok .num { color: var(--ok); }
.stat-merge__item.fault .num { color: var(--fault); text-shadow: 0 0 12px rgba(255, 120, 130, 0.35); }
.stat-merge__item.human .num { color: #ffcf7a; }
.stat-merge__item.warn .num { color: var(--warn); }
.stat-merge__item.off .num { color: #8cb4d4; }

.stat-merge--throughput .stat-merge__lead {
  min-width: 64px;
}


.stats-row .stat-card {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 7px 7px;
}

.stats-row .stat-card .label {
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
  letter-spacing: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-row .stat-card .value .num {
  font-size: 16px;
  letter-spacing: 0;
}

.stats-row .stat-card .value .unit {
  font-size: 10px;
  margin-left: 2px;
}

.stat-card {
  min-width: 128px;
  padding: 11px 15px 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(26, 62, 102, 0.92) 0%, rgba(8, 28, 52, 0.96) 100%);
  border: 1px solid var(--grid-line-strong);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 var(--panel-border-inner), 0 4px 16px rgba(0, 8, 24, 0.22);
  text-align: center;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(94, 255, 244, 0.12);
}

.stat-card .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
  text-align: center;
}

/* 数字与单位同一行内联排版（与早期 flex 换行版观感一致）；整段过长时按行宽自然换行，避免被卡片 overflow 裁切 */
.stat-card .value {
  display: block;
  text-align: center;
  font-size: 0;
  line-height: 1.25;
}

.stat-card .value .num,
.stat-card .value .unit {
  display: inline;
  font-size: 21px;
  font-weight: 800;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 0 16px var(--cyan-glow);
  vertical-align: baseline;
}

.stat-card .value .unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-shadow: none;
  margin-left: 4px;
}

.stat-card.warn .value .num {
  color: var(--warn);
}

.stat-card.fault .value .num {
  color: var(--fault);
}

.stat-card.human .value .num {
  color: #ffb7c5;
  text-shadow: 0 0 14px rgba(255, 160, 176, 0.4);
}

.stat-card.ok .value .num {
  color: var(--ok);
}

.stat-card.off .value .num {
  color: var(--fleet-stop-mid);
  text-shadow: 0 0 14px rgba(147, 180, 212, 0.25);
}

.stat-card.stat-card--fleet {
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.stat-card.stat-card--fleet:hover {
  border-color: rgba(46, 252, 235, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 6px 20px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--cyan-glow);
  transform: translateY(-1px);
}

.stat-card.stat-card--fleet.stat-card--active {
  border-color: rgba(46, 252, 235, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(46, 252, 235, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 20px var(--cyan-glow);
}

.stat-card.stat-card--fleet.stat-card--active .label {
  color: #c8f0fa;
}

main.mid {
  display: grid;
  grid-template-columns: 1fr minmax(300px, calc(var(--vw, 1vw) * 24));
  gap: 14px 16px;
  min-height: 0;
  align-items: stretch;
}

.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(22, 56, 96, 0.92) 0%, rgba(8, 26, 48, 0.97) 100%);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius-lg);
  padding: 15px 17px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  box-shadow: inset 0 1px 0 var(--panel-border-inner), var(--shadow-soft);
}

.panel h2 {
  position: relative;
  margin: 0 0 13px;
  padding-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--cyan-soft);
  letter-spacing: 0.12em;
  text-shadow: 0 0 18px var(--cyan-glow);
}

.panel h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(140px, 48%);
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan) 0%, rgba(77, 255, 244, 0.35) 55%, transparent 100%);
  opacity: 0.85;
  box-shadow: 0 0 14px rgba(77, 255, 244, 0.35);
}

.panel .scroll {
  overflow: auto;
  flex: 1;
  padding-right: 4px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--cyan-dim);
  color: var(--cyan-soft);
  background: rgba(12, 48, 72, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.twin-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--grid-line-strong);
  background-color: var(--twin-inner-bg);
  background-image: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(40, 110, 190, 0.32) 0%, transparent 58%);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  box-shadow: inset 0 1px 0 var(--panel-border-inner), var(--shadow-elev);
}

/* F1/F2 厂区切换：底轨凹槽 + 未选标签「压入」+ 选中标签「抬起」并与机台区同色底衔接，形成实体 Tab 页观感 */
.plant-tabs {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 0;
  min-height: 50px;
  border-bottom: 1px solid rgba(120, 235, 255, 0.22);
  background: linear-gradient(180deg, rgba(10, 32, 56, 0.98) 0%, rgba(5, 18, 36, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* 弹性垫片：把「机台状态」推到机台墙右边框附近，与 DR-4F/DR-5F 分开 */
.plant-tabs-spacer {
  flex: 1 1 auto;
  min-width: 28px;
  pointer-events: none;
}

.plant-tab--wall-status {
  flex: 0 0 auto;
  width: auto;
  margin-left: 0;
  margin-right: 2px;
  align-self: flex-end;
  /* 只对齐默认高度与 DR-5F（含台数徽章），宽度随文字，不必同宽 */
  min-height: 42px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  padding-left: 18px;
  padding-right: 18px;
}

.plant-tab--wall-status .plant-tab-label {
  justify-content: center;
  width: 100%;
}

.plant-tab--wall-status .plant-tab-name {
  display: block;
  width: 100%;
  text-align: center;
}

.plant-tab--wall-status.plant-tab--view-on {
  color: #eaf6ff;
  border-color: rgba(94, 255, 244, 0.55);
  box-shadow: 0 -2px 12px rgba(20, 184, 166, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.twin-wrap.wall-view--status .machine-card-grid {
  display: none;
}

.wall-status-pane {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
}

/* display:flex 会压过 UA 的 [hidden]{display:none}，切走机台状态时必须显式隐藏 */
.wall-status-pane[hidden] {
  display: none !important;
}

.wall-status-tip {
  position: absolute;
  z-index: 20;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(94, 255, 244, 0.35);
  background: rgba(6, 24, 44, 0.96);
  color: #eaf6ff;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.downtime-legend button.dl-chip.is-sort {
  border-color: rgba(94, 255, 244, 0.55);
  box-shadow: 0 0 0 1px rgba(94, 255, 244, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.downtime-legend button.dl-chip .dl-chip-label {
  line-height: 1.2;
}

.downtime-legend button.dl-chip .mini-sort-arrows {
  margin-left: 2px;
}

.downtime-legend button.dl-chip .mini-sort-up,
.downtime-legend button.dl-chip .mini-sort-down {
  color: rgba(170, 205, 230, 0.42);
}

.downtime-legend button.dl-chip .mini-sort-up.is-on,
.downtime-legend button.dl-chip.is-sort-asc .mini-sort-up,
.downtime-legend button.dl-chip .mini-sort-down.is-on,
.downtime-legend button.dl-chip.is-sort-desc .mini-sort-down {
  color: #7ee7ff;
  text-shadow: 0 0 6px rgba(126, 231, 255, 0.55);
}

.wall-status-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wall-machine-query {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.wall-mq-panel {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wall-mq-input {
  /* 刚好盖住机台号（如 DR-5F-226）+ 下拉；文字居中 */
  width: 9.6em;
  min-width: 9.6em;
  max-width: 9.6em;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(150, 206, 230, 0.35);
  background: rgba(6, 24, 44, 0.88);
  color: #eaf6ff;
  font-size: 12px;
  text-align: center;
  outline: none;
}

.wall-mq-input::placeholder {
  color: rgba(143, 180, 204, 0.72);
  text-align: center;
}

.wall-mq-input:focus {
  border-color: rgba(94, 255, 244, 0.55);
  box-shadow: 0 0 0 1px rgba(94, 255, 244, 0.2);
}

.wall-mq-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(220px, calc(var(--vw, 1vw) * 70));
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  z-index: 40;
  border-radius: 10px;
  border: 1px solid rgba(94, 255, 244, 0.28);
  background: rgba(6, 24, 44, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.wall-mq-menu li {
  margin: 0;
}

.wall-mq-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eaf6ff;
  font-size: 12px;
  cursor: pointer;
}

.wall-mq-item:hover,
.wall-mq-item.is-on {
  background: rgba(20, 184, 166, 0.22);
  color: #7ee7ff;
}

.wall-mq-empty {
  padding: 8px 10px;
  color: #8fb4cc;
  font-size: 12px;
}

.wall-mq-item--clear {
  color: #8fb4cc;
  border-bottom: 1px solid rgba(150, 206, 230, 0.18);
  border-radius: 6px 6px 0 0;
  margin-bottom: 2px;
}

.wall-status-title {
  font-size: 13px;
  font-weight: 700;
  color: #eaf6ff;
  letter-spacing: 0.04em;
}

.wall-status-note {
  flex: 1 1 auto;
  font-size: 12px;
  color: #8fb4cc;
}

.wall-status-gantt {
  flex: 1 1 auto;
  max-height: none;
  min-height: 220px;
}

.plant-tabs::before {
  content: none;
  display: none;
}

.plant-tab {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 7px 16px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  cursor: pointer;
  border: 1px solid rgba(40, 100, 140, 0.45);
  border-bottom: none;
  border-radius: 11px 11px 0 0;
  background: linear-gradient(180deg, rgba(16, 40, 72, 0.88) 0%, rgba(6, 20, 40, 0.95) 100%);
  box-shadow: inset 0 2px 5px rgba(0, 8, 24, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(4px);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    padding 0.2s ease,
    z-index 0s linear;
}

.plant-tab:hover:not(.plant-tab--active) {
  color: var(--text);
  border-color: rgba(46, 252, 235, 0.22);
  background: linear-gradient(180deg, rgba(20, 44, 78, 0.65) 0%, rgba(6, 16, 34, 0.94) 100%);
  transform: translateY(3px);
}

.plant-tab.plant-tab--active:hover {
  color: #f4fffe;
  border-color: rgba(94, 255, 244, 0.55);
}

.plant-tab-label,
.alert-plant-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}

.plant-tab-name,
.alert-plant-name {
  position: relative;
  z-index: 1;
}

.plant-tab-desc,
.alert-plant-desc {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.plant-tab.plant-tab--active .plant-tab-desc {
  color: rgba(232, 255, 252, 0.72);
}

/* 产线机台数：实心底六边形（观感对齐告警红圈醒目度）；4F 钢青 / 5F 浅紫，不用红 */
.plant-count {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 30px;
  min-width: 30px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: #0d9488;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  -webkit-clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  filter: drop-shadow(0 0 6px rgba(13, 148, 136, 0.55));
  text-shadow: 0 1px 1px rgba(0, 20, 24, 0.35);
  transition: filter 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.plant-count--5f {
  background: #7c3aed;
  filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.55));
}

.plant-count.is-zero {
  opacity: 0.45;
}

/* 未选中也保持实心底，仅略压亮度，仍一眼可读 */
.plant-tab:not(.plant-tab--active) .plant-count--4f {
  background: #0f766e;
  filter: drop-shadow(0 0 4px rgba(15, 118, 110, 0.4));
}

.plant-tab:not(.plant-tab--active) .plant-count--5f {
  background: #6d28d9;
  filter: drop-shadow(0 0 4px rgba(109, 40, 217, 0.4));
}

.plant-tab.plant-tab--active .plant-count--4f {
  background: #14b8a6;
  filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.65));
}

.plant-tab.plant-tab--active .plant-count--5f {
  background: #8b5cf6;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.65));
}

.plant-tab:focus-visible {
  outline: 2px solid var(--cyan-dim);
  outline-offset: 2px;
}

.plant-tab.plant-tab--active {
  z-index: 4;
  color: #e8fffc;
  padding-top: 10px;
  padding-bottom: 11px;
  border-color: rgba(45, 212, 191, 0.65);
  border-bottom-color: var(--twin-inner-bg);
  margin-bottom: -1px;
  transform: translateY(0);
  /* 主体偏深，顶部由 ::before 铺「选中色块」，层次清晰 */
  background: linear-gradient(
    180deg,
    rgba(6, 36, 44, 0.92) 0%,
    rgba(5, 26, 42, 0.96) 38%,
    var(--twin-inner-bg) 100%
  );
  box-shadow:
    inset 0 -1px 0 rgba(45, 212, 191, 0.12),
    0 -4px 14px rgba(0, 8, 22, 0.22),
    0 0 20px rgba(45, 212, 191, 0.18);
  text-shadow: 0 1px 2px rgba(0, 10, 22, 0.55);
}

/* 选中 Tab 头部：整块青绿高光带，一眼区分 F1 / F2 */
.plant-tab.plant-tab--active::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 48%;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(
    180deg,
    rgba(45, 212, 191, 0.88) 0%,
    rgba(20, 184, 166, 0.42) 58%,
    transparent 100%
  );
  pointer-events: none;
}

.plant-tab.plant-tab--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(46, 252, 235, 0.35), transparent);
  pointer-events: none;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  pointer-events: none;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* 中部机台区：更强透视 + preserve-3d，卡片「浮在」背板之上 */
.machine-card-grid {
  --card-gap-x: 20px;
  --card-gap-y: 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  padding: 14px 16px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(208px, calc((100% - 4 * var(--card-gap-x)) / 5)), 1fr));
  /* 卡片 overflow:hidden 会让 auto 行高按 0 起算，必须按内容定高 */
  grid-auto-rows: max-content;
  gap: var(--card-gap-y) var(--card-gap-x);
  align-content: start;
  align-items: start;
  perspective: 2400px;
  perspective-origin: 50% 36%;
  transform-style: preserve-3d;
}

/**
 * 精细指针设备：仅当鼠标悬停在卡片网格上时才允许出现滚动条/滚轮卷动，
 * 避免在右侧告警等区域操作时误滚卡片墙；触控/无 hover 设备保持始终可滚。
 */
.machine-card-grid:focus-visible {
  outline: 2px solid var(--cyan-dim);
  outline-offset: 2px;
}

/* 单张机台卡：数据区专用 token，避免半透明白边与重底晕在深蓝底上发灰 */
.machine-card {
  --mc-line: rgba(100, 190, 235, 0.32);
  --mc-line-soft: rgba(100, 190, 235, 0.16);
  --mc-surface: #0a1f38;
  --mc-surface-raised: #0e2744;
  --mc-key-bg: rgba(8, 30, 56, 0.98);
  --mc-val-bg: rgba(14, 46, 78, 0.92);
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-width: 0;
  border: 1px solid rgba(130, 210, 255, 0.42);
  border-radius: var(--radius-md);
  background-color: var(--mc-surface);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 26%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 22px rgba(0, 6, 18, 0.28);
  overflow: hidden;
  cursor: pointer;
  transform: translateZ(0) rotateX(1.1deg);
  transform-origin: 50% 100%;
  filter: none;
  transition:
    box-shadow 0.3s var(--ease-out-soft),
    transform 0.3s var(--ease-out-soft),
    border-color 0.28s ease,
    filter 0.28s ease;
}

.machine-card::before {
  content: none;
  display: none;
}

/* 外沿极轻倒角高光，避免多层深色 inset 叠灰 */
.machine-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  opacity: 1;
}

.machine-card > * {
  position: relative;
  z-index: 1;
}

.machine-card:hover {
  border-color: rgba(94, 255, 244, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 14px 36px rgba(0, 8, 22, 0.38),
    0 0 24px rgba(94, 255, 244, 0.12);
  transform: translateZ(12px) rotateX(0deg) translateY(-8px) scale(1.018);
  filter: saturate(1.06);
}

/* 选中态仅用描边与光晕区分，透视与默认卡一致，避免切换 F1/F2 后自动落到首台时卡片「被抬高」 */
.machine-card.selected {
  border-color: rgba(94, 255, 244, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(94, 255, 244, 0.35),
    0 12px 32px rgba(0, 8, 22, 0.4),
    0 0 28px rgba(94, 255, 244, 0.2);
  transform: translateZ(0) rotateX(1.1deg);
  filter: saturate(1.05);
}

.machine-card.selected:hover {
  transform: translateZ(12px) rotateX(0deg) translateY(-8px) scale(1.018);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(94, 255, 244, 0.45),
    0 16px 40px rgba(0, 8, 22, 0.42),
    0 0 32px rgba(94, 255, 244, 0.22);
}

/* —— 大圆机监控卡：色带头白字、产品号/客单号表、今日产量 + 生产进度条（浅蓝填充） —— */
.machine-card .card-head.wb-card-head {
  position: relative;
  z-index: 2;
  padding: 7px 8px 8px;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  border-radius: 11px 11px 0 0;
  overflow: hidden;
}

.machine-card .wb-card-eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0.88;
  line-height: 1.2;
  color: #fff;
}

.machine-card .wb-card-status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.machine-card .wb-card-machine-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.machine-card .wb-card-machine-id {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: #fff;
}

.machine-card .wb-card-model-sub {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.92;
  line-height: 1.3;
  color: #fff;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.machine-card .wb-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
}

.machine-card .wb-card-status {
  font-size: clamp(12px, calc(var(--vw, 1vw) * 1.2), 16px);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 1px;
  color: #fff;
  line-height: 1.15;
  text-align: center;
}

.machine-card .wb-card-op {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  gap: 6px;
}

.machine-card .wb-card-op-lbl {
  flex: 0 0 auto;
  opacity: 0.95;
}

.machine-card .wb-card-op-name {
  flex: 1 1 auto;
  text-align: right;
  font-weight: 700;
  min-width: 0;
  word-break: break-all;
}

.machine-card .wb-card-body {
  position: relative;
  z-index: 2;
  padding: 8px 8px 8px;
  font-size: 10px;
  color: var(--text);
  background: var(--mc-surface-raised);
  border-radius: 0 0 11px 11px;
  border-top: 1px solid var(--mc-line);
  box-shadow: none;
}

.machine-card .wb-kv-table {
  border: 1px solid var(--mc-line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

/* 目标圈数、实时圈数、转速、剩余/停机时长（与产品号/客单号块分离） */
.machine-card .wb-card-live-kv {
  margin-top: 6px;
  font-size: 10px;
}

.machine-card .wb-card-live-kv .wb-row .wb-v {
  min-height: 2em;
}

.machine-card .wb-row {
  display: grid;
  grid-template-columns: minmax(64px, 22%) 1fr;
  gap: 0;
  padding: 0;
  margin: 0;
  font-size: 10px;
  line-height: 1.35;
  align-items: stretch;
  border-bottom: 1px solid var(--mc-line-soft);
}

.machine-card .wb-row:last-child {
  border-bottom: none;
}

.machine-card .wb-row .wb-k {
  padding: 5px 6px;
  font-weight: 600;
  color: #d4e8fb;
  background: var(--mc-key-bg);
  border-right: 1px solid var(--mc-line-soft);
  display: flex;
  align-items: flex-start;
}

.machine-card .wb-row .wb-v {
  padding: 5px 6px;
  font-weight: 600;
  color: #f5f9ff;
  background: var(--mc-val-bg);
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  display: flex;
  align-items: flex-start;
  min-height: 2.2em;
}

.machine-card .wb-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 8px;
  align-items: stretch;
}

.machine-card .wb-out-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 0;
  grid-column: 1 / -1;
}

/* 今日产量：标签单独一行，数字与「匹」同一行、基线对齐 */
.machine-card .wb-out {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 6px;
  row-gap: 6px;
  align-items: baseline;
}

.machine-card .wb-out-num {
  grid-column: 1;
  grid-row: 2;
  font-size: clamp(19px, 3.5vmin, 24px);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  justify-self: start;
}

.machine-card .wb-prog {
  min-width: 0;
}

.machine-card .wb-out-unit {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0;
  font-size: clamp(11px, 1.8vmin, 13px);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}

.machine-card .wb-prog-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.machine-card .wb-prog-scale {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 9px;
  color: #b8daf5;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

.machine-card .wb-prog .prog-bar {
  height: 9px;
  border-radius: 6px;
  background: rgba(0, 12, 28, 0.35);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--mc-line-soft);
}

.machine-card .wb-prog .prog-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.35s ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, transparent 45%),
    var(--wb-prog-fill-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.machine-card .wb-prog-foot {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #e8f4ff;
}

.machine-card .wb-prog-foot--detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(44px, auto);
  gap: 4px 4px;
  align-items: end;
}

.machine-card .wb-prog-metric {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.machine-card .wb-prog-metric-lbl {
  font-size: 9px;
  color: var(--muted);
  font-weight: 600;
}

.machine-card .wb-prog-metric-val {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.machine-card .wb-prog-metric--pct {
  align-items: flex-end;
  justify-content: flex-end;
}

.machine-card .wb-prog-foot .wb-pct {
  font-weight: 800;
  color: #fff;
  font-size: 11px;
}

/* 机台卡状态色带：少色阶、避免拖尾到近白/粉（减轻「脏灰」感）；与 #machineCardGrid 规则保持一致 */
.st-run .card-head,
.st-running .card-head,
.st-normal .card-head,
.st-processing .card-head,
.st-debug .card-head,
.st-first .card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(152deg, #0f766e 0%, #14b8a6 46%, #2dd4bf 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.st-fault .card-head,
.st-repair .card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 36%),
    linear-gradient(152deg, #b91c1c 0%, #dc2626 42%, #ef4444 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.st-idle .card-head,
.st-maint .card-head,
.st-standby .card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 36%),
    linear-gradient(152deg, #b88a06 0%, #d9a40a 44%, #f4c430 100%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.st-offline .card-head,
.st-stop .card-head,
.st-shutdown .card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
    linear-gradient(152deg, #334155 0%, #475569 52%, #64748b 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

footer.bottom {
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* 底栏状态栏：左操作说明 · 中版权 · 右时间 */
.status-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(10, 32, 58, 0.92) 0%, rgba(6, 22, 42, 0.96) 100%);
  border: 1px solid rgba(100, 190, 230, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.status-bar > p {
  margin: 0;
}

.status-bar__hint {
  justify-self: start;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.status-bar__copy {
  justify-self: center;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.status-bar__clock {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.status-bar .hdr-clock {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-shadow: none;
}

.ai-explain {
  max-height: 420px;
  overflow: auto;
  padding: 8px 12px 10px;
  border-radius: var(--radius-md);
  background: rgba(8, 28, 52, 0.88);
  border: 1px solid rgba(126, 231, 255, 0.35);
}

.ai-explain[hidden] {
  display: none;
}

.ai-explain header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-explain h2 {
  margin: 0;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0;
  color: var(--cyan);
  text-shadow: none;
}

.ai-explain h2::after {
  content: none;
}

.ai-explain p,
.ai-explain li {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #d5e8f8;
}

.ai-explain ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.ai-explain .ai-sec {
  list-style: none;
  margin: 8px 0 0 -18px;
  font-weight: 700;
  color: var(--cyan);
}

.ai-explain .ai-report h3 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 650;
  color: var(--cyan);
}

.ai-explain .ai-report .risk-block {
  margin: 0 0 32px;
}

.explain-actions {
  display: flex;
  align-items: center;
  gap: 36px;
  flex: 0 0 auto;
}

.explain-exports {
  display: flex;
  align-items: center;
  gap: 8px;
}

.explain-exports--end {
  margin-left: auto;
  justify-content: flex-end;
}

.head-exports {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

#insightTabs .dist-tab,
#distTabs .dist-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.insight-live-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.insight-live-count.is-zero,
.insight-live-count[hidden] {
  display: none;
}

.guide-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.index-guide--tabs > [data-guide-panel] {
  min-width: 0;
}

.head-exports .link,
.explain-actions .link {
  padding: 5px 8px;
  letter-spacing: 0;
}

#histExports {
  margin-left: 0;
}

#histExports[hidden] {
  display: none;
}

.risk-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.risk-result article {
  min-width: 0;
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: rgba(10, 32, 58, 0.72);
  border: 1px solid rgba(140, 196, 220, 0.16);
  text-align: center;
}

.risk-result--wide {
  grid-column: 1 / -1;
}

.risk-result--line {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.risk-result--line article {
  padding: 7px 8px 6px;
  border-radius: 10px;
}

.risk-result--line span {
  font-size: 11px;
  letter-spacing: 0.04em;
}

.risk-result--line strong {
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.2;
}

.risk-result span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #8eafc8;
}

.risk-result strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: #f7fbff;
}

.risk-stage {
  display: grid;
  gap: 18px;
}

.risk-figure {
  margin: 0;
  padding: 14px 16px 10px;
  border-radius: 16px;
  background: rgba(6, 22, 42, 0.42);
  border: 1px solid rgba(140, 196, 220, 0.12);
}

.risk-figure figcaption {
  margin: 0 0 2px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #9ec3dc;
}

.risk-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.risk-factor-chart {
  height: 240px;
  margin: 0;
}

.risk-figure--radar .risk-factor-chart {
  height: 300px;
}

.risk-read {
  display: grid;
  gap: 14px;
}

.risk-read h4 {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: #d7eef8;
}

.risk-read p,
.risk-read li {
  margin: 0;
}

.risk-read ol {
  margin: 0;
  padding-left: 18px;
}

.risk-sheet {
  padding: 8px 8px 4px;
  border-radius: 16px;
  background: rgba(6, 22, 42, 0.42);
  border: 1px solid rgba(140, 196, 220, 0.12);
}

.ai-explain .risk-glossary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ai-explain .risk-glossary li {
  margin: 0;
}

.risk-glossary li {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 14px 14px 12px;
  border-radius: 12px;
  background: rgba(8, 28, 52, 0.55);
  border: 1px solid rgba(140, 196, 220, 0.1);
  color: #d5e4f0;
}

.risk-glossary strong {
  font-size: 13px;
  color: #f4f8ff;
}

.risk-glossary span {
  font-size: 12px;
  line-height: 1.5;
  color: #9ec3dc;
}

.ai-explain .ai-report p,
.ai-explain .ai-report li {
  margin: 0;
  line-height: 1.6;
}

.risk-audit ul {
  margin: 0;
  padding: 14px 16px 14px 32px;
  border-radius: 14px;
  background: rgba(6, 22, 42, 0.42);
  border: 1px solid rgba(140, 196, 220, 0.12);
}

.ai-explain .ai-report .risk-audit li + li {
  margin-top: 8px;
}

.risk-factor-chart {
  width: 100%;
}

.risk-frame {
  margin: 0 0 8px;
  color: #c5dff3;
  font-size: 12px;
  line-height: 1.45;
}

.risk-eval {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  margin: 0;
}

.risk-eval th,
.risk-eval td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(140, 200, 220, 0.14);
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.risk-eval th {
  color: #8eafc8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.risk-jump {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #ffe0a3;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.risk-tip,
.risk-detail {
  position: fixed;
  z-index: 40;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(12, 32, 56, 0.97);
  border: 1px solid rgba(255, 183, 197, 0.55);
  color: #f4f8ff;
  box-shadow: 0 12px 28px rgba(0, 8, 24, 0.45);
}

.risk-tip {
  pointer-events: none;
  font-size: 12px;
  line-height: 1.45;
}

.risk-detail {
  padding: 12px 14px 14px;
}

.risk-detail h4 {
  margin: 0 28px 8px 0;
  font-size: 14px;
}

.risk-detail p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: #d5e4f0;
}

.risk-detail p:last-child {
  margin-bottom: 0;
}

.risk-detail strong {
  display: inline-block;
  margin-right: 6px;
  color: #ffb7c5;
}

.risk-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #ffb7c5;
  cursor: pointer;
  font-size: 12px;
}

.risk-glossary li.risk-glossary--hit {
  border-color: rgba(255, 224, 163, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 224, 163, 0.45), 0 0 16px rgba(255, 214, 140, 0.28);
}

.risk-mean {
  color: #8eafc8;
  font-size: 11px;
  font-weight: 400;
}

.ai-explain summary {
  cursor: pointer;
  color: #9fd4ee;
}

.bottom-charts {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: stretch;
}

.bottom-charts > .panel {
  padding: 16px 14px 14px 18px;
  background:
    linear-gradient(180deg, rgba(18, 48, 82, 0.94) 0%, rgba(6, 20, 40, 0.98) 100%);
  border-color: rgba(150, 210, 230, 0.22);
  min-width: 0;
}

.bottom-side-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  padding: 0 8px;
  box-sizing: border-box;
  min-height: 0;
  align-self: stretch;
}

.side-rail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 100%;
  min-height: 56px;
  padding: 10px 8px;
  box-sizing: border-box;
  text-align: center;
  writing-mode: horizontal-tb;
  font-size: 13px;
  letter-spacing: 0.06em;
  line-height: 1.35;
  white-space: pre-line;
  border-radius: 10px;
  text-decoration: none;
}

.side-rail-btn--slot,
.side-rail-btn--slot:disabled {
  opacity: 1;
  color: var(--cyan-soft);
  -webkit-text-fill-color: var(--cyan-soft);
  cursor: not-allowed;
}

.side-rail-btn--slot:hover,
.side-rail-btn--slot:disabled:hover {
  border-color: var(--cyan-dim);
  color: var(--cyan-soft);
  -webkit-text-fill-color: var(--cyan-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transform: none;
}

.chart-box--risk .insight-strip {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.chart-box--risk .insight-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

#riskPanel.risk-panel--detail > .dist-head,
#riskPanel.risk-panel--detail > #insightStrip {
  display: none;
}

#riskPanel.risk-panel--detail > #aiExplain:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 0 2px 8px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#riskPanel.risk-panel--detail > #aiExplain header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 28, 52, 0.96);
}

#oddList,
#oddDetailBar {
  display: none;
}

#distPanel.dist-panel--list > #chartBox,
#distPanel.dist-panel--list > #distFlags {
  display: none;
}

#distPanel.dist-panel--list > #oddList {
  display: flex;
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  overflow: auto;
}

#distPanel.dist-panel--detail > .dist-head,
#distPanel.dist-panel--detail > #distFlags {
  display: none;
}

#distPanel.dist-panel--detail > #oddList {
  display: block;
  flex: 0 0 104px;
  max-height: 104px;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: 0;
}

#distPanel.dist-panel--detail > #oddDetailBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

#distPanel.dist-panel--detail > #oddDetailBar h2 {
  margin: 0;
  padding: 0;
  font-size: 14px;
}

#distPanel.dist-panel--detail > #oddDetailBar h2::after {
  content: none;
}

#distPanel.dist-panel--detail > #chartBox {
  display: block;
  order: 3;
  flex: 1 1 0;
  min-height: 200px;
  margin-top: 8px;
  padding: 8px 8px 4px;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(94, 210, 255, 0.16), transparent 46%),
    linear-gradient(180deg, rgba(28, 72, 118, 0.96) 0%, rgba(6, 22, 44, 0.98) 100%);
  border: 1px solid rgba(150, 210, 230, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -18px 28px rgba(0, 8, 20, 0.28),
    0 16px 28px rgba(0, 10, 24, 0.36);
}

#distPanel.dist-panel--detail > #oddDetailBar {
  order: 1;
  padding-right: 118px;
}

#distPanel.dist-panel--detail > #oddReadout {
  display: grid;
  order: 2;
}

#distPanel.dist-panel--detail > #oddList {
  order: 4;
}

#oddReadout {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.odd-stat {
  min-width: 0;
  padding: 8px 10px 7px;
  border-radius: 14px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(22, 58, 96, 0.92), rgba(7, 22, 42, 0.96));
  border: 1px solid rgba(150, 206, 230, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 16px rgba(0, 8, 20, 0.28);
}

.odd-stat span,
.odd-stat em {
  display: block;
  color: #9ec3dc;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.odd-stat strong {
  display: block;
  margin: 2px 0 1px;
  color: #f4fbff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.odd-stat--low strong { color: #ffd0d6; }
.odd-stat--high strong { color: #ffe7a3; }
.odd-stat--now strong { color: #f5c542; }

#distPanel.dist-panel--detail .odd-board {
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  min-height: 0;
  padding: 8px 2px 2px;
  overflow-x: auto;
}

#distPanel.dist-panel--detail .odd-cols {
  display: none;
}

#distPanel.dist-panel--detail .odd-card {
  flex: 0 0 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  grid-template-columns: none;
}

.odd-card--on {
  border-color: rgba(94, 255, 244, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 0 1px rgba(94, 255, 244, 0.4),
    0 14px 24px rgba(0, 16, 36, 0.42);
}

.odd-gap {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.odd-gap--low { color: #ffd0d6; }
.odd-gap--high { color: #ffe7a3; }

.odd-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  padding: 4px 6px 10px;
}

.odd-cols,
.odd-card {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 172px 100px minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  column-gap: 12px;
  text-align: center;
}

.odd-cols {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(8, 28, 52, 0.98), rgba(8, 24, 44, 0.94));
  color: #9ec3dc;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
}

.odd-cols span,
.odd-card span {
  width: 100%;
  text-align: center;
}

.odd-card {
  position: relative;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(150, 206, 230, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, rgba(24, 64, 104, 0.88), rgba(7, 22, 42, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 18px rgba(0, 8, 20, 0.32);
  color: #e7f4ff;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  cursor: pointer;
  animation: odd-in 0.42s ease both;
  animation-delay: calc(var(--i, 0) * 36ms);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.odd-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 255, 244, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 16px 28px rgba(0, 16, 36, 0.42),
    0 0 0 1px rgba(94, 255, 244, 0.28);
}

.odd-card:active {
  transform: translateY(-1px) scale(0.992);
}

.odd-card:focus-visible {
  outline: 2px solid #7ee7ff;
  outline-offset: 2px;
}

.odd-time {
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.odd-id {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-weight: 700;
  color: #f4fbff;
  cursor: pointer;
}

.odd-id--pin {
  color: #042033 !important;
  background: #c9f7f3;
  border-color: rgba(94, 255, 244, 0.75);
  box-shadow: 0 0 0 1px rgba(94, 255, 244, 0.35);
}

.odd-note {
  color: #d5e8f8;
}

@keyframes odd-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .odd-card { animation: none; transition: none; }
}

.dist-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin: 0 0 12px;
  width: 100%;
  box-sizing: border-box;
}

#distPanel > .dist-head > [data-index-guide="portrait"] {
  margin-left: auto;
}

#riskPanel > .dist-head {
  padding-right: 8px;
}

#riskPanel > .dist-head .head-exports {
  margin-left: auto;
  margin-right: 0;
  flex: 0 0 auto;
}

#riskPanel > .dist-head #indexGuides {
  margin-left: 0;
}

.dist-clear {
  padding: 4px 10px;
  font-size: 12px;
}

.modal--confirm {
  width: min(560px, calc(var(--vw, 1vw) * 96));
}

.clear-learned-copy {
  color: #d5e6f2;
  font-size: 14px;
  line-height: 1.65;
}

.clear-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  cursor: pointer;
}

.clear-check input {
  margin-top: 4px;
  flex: 0 0 auto;
}

.clear-learned-copy li + li {
  margin-top: 4px;
}

.clear-learned-error {
  color: #ffb4b4;
}

.clear-learned-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.dist-clear--danger {
  border-color: rgba(255, 140, 140, 0.55);
  color: #ffd0d0;
}

.modal--data {
  width: min(640px, calc(var(--vw, 1vw) * 96));
}

.modal--site-cfg {
  width: min(920px, calc(var(--vw, 1vw) * 96));
}

.modal--stats {
  width: min(1280px, calc(var(--vw, 1vw) * 98));
}

#modalBackendAdmin .modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#modalBackendAdmin .modal.modal--stats {
  width: min(1280px, calc(var(--vw, 1vw) * 98));
}

#modalBackendAdmin .site-cfg-body--scroll {
  flex: 1 1 auto;
  min-height: 0;
}

#backendPaneStats,
#backendPaneData {
  min-height: 0;
}

.reserved-feature-body {
  padding: 8px 4px 12px;
}

.reserved-feature-body p {
  margin: 0 0 8px;
  color: #cfe6f7;
  font-size: 13px;
  line-height: 1.55;
}

.stats-report-tabs {
  flex-wrap: wrap;
  gap: 6px;
}

.stats-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stats-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
}

.stats-filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #9ec3dc;
  font-size: 12px;
}

.stats-filters select,
.stats-filters input {
  min-width: 140px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(150, 206, 230, 0.28);
  background: rgba(6, 22, 42, 0.85);
  color: #eaf6ff;
  font-size: 13px;
}

.stats-note {
  margin: 0;
  color: #8fb4cc;
  font-size: 12px;
  line-height: 1.45;
}

.stats-kpi-host {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.stats-kpi {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(150, 206, 230, 0.22);
  background: rgba(6, 22, 42, 0.72);
}

.stats-kpi-label {
  display: block;
  color: #8fb4cc;
  font-size: 11px;
}

.stats-kpi-value {
  display: block;
  margin-top: 2px;
  color: #eaf6ff;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.stats-chart-host {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  min-height: 0;
}

.stats-chart-box {
  height: 260px;
  border-radius: 8px;
  border: 1px solid rgba(150, 206, 230, 0.22);
  background: rgba(6, 22, 42, 0.55);
}

.downtime-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #cfe6f5;
  font-size: 12px;
}

.downtime-legend button.dl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 206, 230, 0.28);
  background: linear-gradient(180deg, rgba(18, 48, 78, 0.95), rgba(8, 28, 52, 0.92));
  color: #eaf6ff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.downtime-legend button.dl-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 255, 244, 0.45);
}

.downtime-legend button.dl-chip.is-off {
  opacity: 0.38;
  filter: grayscale(0.35);
}

.downtime-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  vertical-align: middle;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.dl-run { background: #22c55e; }
.dl-offline { background: #3b82f6; }
.dl-other { background: #ec4899; }
.dl-wait { background: #eab308; }
/* 三种停机色刻意拉开：总=琥珀、人为=金铜、故障=焰红（与失联紫区分） */
.dl-stop {
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 6px rgba(245, 158, 11, 0.45);
}
.dl-stop-human {
  background: linear-gradient(90deg, #f5e0b8, #c9893e);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 6px rgba(201, 137, 62, 0.4);
}
.dl-stop-nonhuman {
  background: linear-gradient(90deg, #ff8f5a, #e11d48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 0 6px rgba(225, 29, 72, 0.45);
}
.dl-stop-mixed { background: #a78bfa; }
.dl-idle { background: #94a3b8; }
.dl-unlinked { background: #a855f7; }

.stats-detail-bar {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(94, 255, 244, 0.28);
  background: linear-gradient(135deg, rgba(12, 42, 68, 0.95), rgba(8, 28, 52, 0.9));
  color: #eaf6ff;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.downtime-gantt {
  max-height: calc(var(--vh, 1vh) * 54);
  overflow: auto;
  border: 1px solid rgba(150, 206, 230, 0.22);
  border-radius: 12px;
  background: rgba(4, 18, 36, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: grab;
  overscroll-behavior: contain;
}

.downtime-gantt.is-panning {
  cursor: grabbing;
  user-select: none;
}

.dg-canvas {
  min-width: 100%;
  width: max-content;
}

.downtime-gantt-head,
.downtime-gantt-row {
  display: grid;
  grid-template-columns: 128px var(--dg-track-w, minmax(640px, 1fr));
  gap: 0;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
}

.downtime-gantt-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(8, 28, 52, 0.96);
  border-bottom: 1px solid rgba(150, 206, 230, 0.25);
  color: #9ec3dc;
  font-size: 11px;
}

.dg-label--sort {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.dg-date {
  flex: 0 0 auto;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #eaf6ff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-bottom: 0;
  text-align: center;
}
.dg-sort {
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: var(--muted, #94a3b8);
  font-size: 11px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.dg-sort.is-on,
.dg-sort:hover {
  color: #e2e8f0;
  border-color: rgba(20, 184, 166, 0.75);
  background: rgba(20, 184, 166, 0.18);
}
.downtime-gantt-head .dg-label,
.downtime-gantt-row .dg-label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-right: 1px solid rgba(150, 206, 230, 0.18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: rgba(8, 28, 52, 0.98);
}

.downtime-gantt-row .dg-label {
  background: rgba(6, 22, 42, 0.96);
}

.downtime-gantt-row:nth-child(even) .dg-label {
  background: rgba(10, 28, 50, 0.98);
}

.downtime-gantt-row .dg-label:hover {
  color: #5efff4;
}

.downtime-gantt-row {
  border-bottom: 1px solid rgba(150, 206, 230, 0.12);
}

.downtime-gantt-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.downtime-gantt-row.is-dim {
  opacity: 0.28;
}

.dg-track {
  position: relative;
  width: var(--dg-track-w, 100%);
  height: 30px;
  margin: 6px 0;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(20, 48, 78, 0.75), rgba(10, 28, 50, 0.7));
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(150, 206, 230, 0.12);
}

.dg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.dg-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: rgba(158, 195, 220, 0.12);
}

.dg-tick.is-medium {
  background: rgba(158, 195, 220, 0.28);
}

.dg-tick.is-major {
  background: rgba(158, 195, 220, 0.48);
}

.dg-now {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, #5efff4, #14b8a6);
  box-shadow: 0 0 6px rgba(94, 255, 244, 0.55);
  z-index: 2;
}

.dg-future {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(8, 20, 40, 0.35),
    rgba(8, 20, 40, 0.35) 4px,
    rgba(15, 40, 70, 0.2) 4px,
    rgba(15, 40, 70, 0.2) 8px
  );
  border-left: 1px dashed rgba(94, 255, 244, 0.35);
  z-index: 0;
}

.dg-seg {
  position: absolute;
  top: 2px;
  bottom: 2px;
  z-index: 1;
  border-radius: 4px;
  min-width: 2px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.1s ease, filter 0.1s ease, opacity 0.12s ease;
}

.dg-seg:hover,
.dg-seg.is-on {
  transform: translateY(-1px) scaleY(1.08);
  filter: brightness(1.12);
  z-index: 2;
}

.dg-seg.is-off {
  opacity: 0.12;
  box-shadow: none;
}

.dg-seg[data-kind="run"] { background: linear-gradient(180deg, #4ade80, #16a34a); }
.dg-seg[data-kind="offline"] { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.dg-seg[data-kind="other"] { background: linear-gradient(180deg, #f472b6, #db2777); }
.dg-seg[data-kind="wait"] { background: linear-gradient(180deg, #facc15, #ca8a04); }
/* 无类别旧停机段用总停机琥珀 */
.dg-seg[data-kind="stop"] { background: linear-gradient(180deg, #fcd34d, #d97706); box-shadow: inset 0 0 0 1px rgba(255, 236, 180, 0.35); }
.dg-seg[data-kind="stop"][data-category="human"] { background: linear-gradient(180deg, #f5e0b8, #c9893e); box-shadow: inset 0 0 0 1px rgba(255, 240, 210, 0.4); }
/* 混合并入故障焰红，避免与人为金铜、失联紫混淆 */
.dg-seg[data-kind="stop"][data-category="mixed"],
.dg-seg[data-kind="stop"][data-category="nonhuman"] { background: linear-gradient(180deg, #ff8f5a, #e11d48); box-shadow: inset 0 0 0 1px rgba(255, 200, 180, 0.35); }
.dg-seg[data-kind="idle"] { background: linear-gradient(180deg, #cbd5e1, #64748b); }
.dg-seg[data-kind="unlinked"] { background: linear-gradient(180deg, #c084fc, #7e22ce); box-shadow: inset 0 0 0 1px rgba(233, 213, 255, 0.3); }

.dg-axis {
  position: relative;
  width: var(--dg-track-w, 100%);
  min-height: 34px;
  padding: 4px 0 0;
  box-sizing: border-box;
}

.dg-hours {
  position: relative;
  height: 18px;
  font-variant-numeric: tabular-nums;
}

.dg-hour {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #9ec3dc;
  font-size: 11px;
  line-height: 1.2;
  pointer-events: none;
}

.dg-hour.is-start {
  transform: translateX(0);
}

.dg-hour.is-end {
  transform: translateX(-100%);
}

.dg-hour.is-day {
  color: #5efff4;
  font-weight: 700;
}

.dg-tick.is-day {
  width: 2px;
  margin-left: -1px;
  background: rgba(94, 255, 244, 0.55);
}

.dg-tick-rail {
  position: relative;
  height: 10px;
  margin-top: 2px;
}

.dg-tick-rail .dg-tick {
  top: 4px;
  bottom: 0;
  height: auto;
}

.dg-tick-rail .dg-tick.is-medium {
  top: 2px;
  background: rgba(158, 195, 220, 0.4);
}

.dg-tick-rail .dg-tick.is-major {
  top: 0;
  background: rgba(158, 195, 220, 0.65);
}

.stats-table-wrap {
  max-height: calc(var(--vh, 1vh) * 54);
  overflow: auto;
  border: 1px solid rgba(150, 206, 230, 0.22);
  border-radius: 12px;
  background: rgba(4, 18, 36, 0.7);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  font-size: 12px;
  color: #eaf6ff;
}

.stats-table th,
.stats-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(150, 206, 230, 0.12);
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.stats-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 28, 52, 0.96);
  color: #9ec3dc;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.stats-table th:hover,
.stats-table th.is-sort {
  color: #5efff4;
}

.stats-table th .sort-ind {
  margin-left: 4px;
  opacity: 0.55;
}

.stats-table th.is-sort .sort-ind {
  opacity: 1;
}

.stats-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.stats-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.stats-table tbody tr:hover,
.stats-table tbody tr.is-on {
  background: rgba(20, 184, 166, 0.12);
}

.stats-table .cat-human { color: #e7c29a; }
.stats-table .cat-mixed { color: #5eead4; }
.stats-table .cat-nonhuman { color: #fb923c; }

.site-cfg-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* display:flex 会压过 UA 的 [hidden]，后台 Tab 必须真正只显示当前页 */
.site-cfg-body[hidden] {
  display: none !important;
}

.site-cfg-body--scroll {
  max-height: min(calc(var(--vh, 1vh) * 78), 820px);
  overflow: auto;
  padding-right: 4px;
}

.site-cfg-actions {
  flex-wrap: wrap;
}

.site-cfg-confirm-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-cfg-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.site-cfg-remap-guide {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(245, 181, 66, 0.35);
  background: rgba(60, 40, 8, 0.35);
  color: #f3e6c8;
  font-size: 12px;
  line-height: 1.55;
}

.site-cfg-remap-guide__title {
  margin: 0 0 8px;
  color: #f5c542;
  font-size: 13px;
  font-weight: 600;
}

.site-cfg-remap-guide ul {
  margin: 0;
  padding-left: 1.2em;
}

.site-cfg-remap-guide li + li {
  margin-top: 4px;
}

.site-cfg-remap-guide code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: #ffe8a8;
}

.site-cfg-remap-run {
  border-color: rgba(245, 181, 66, 0.55) !important;
  color: #f5c542 !important;
}

.site-cfg-short-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.site-cfg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cfe6f5;
  font-size: 13px;
}

.site-cfg-field input,
.site-cfg-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(150, 206, 230, 0.28);
  background: rgba(6, 22, 42, 0.85);
  color: #eaf6ff;
  font-size: 13px;
}

.site-cfg-plants-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f4fbff;
  font-size: 14px;
}

.site-cfg-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(var(--vh, 1vh) * 42);
  overflow: auto;
}

.site-cfg-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr 0.7fr 0.8fr 1.1fr auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(150, 206, 230, 0.22);
  background: rgba(8, 28, 52, 0.4);
}

.site-cfg-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #9ec3dc;
  font-size: 11px;
}

.site-cfg-order-btns {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 2px;
}

.site-cfg-order-btns .link {
  min-width: 28px;
  padding: 2px 6px;
  font-size: 12px;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .site-cfg-short-row,
  .site-cfg-row {
    grid-template-columns: 1fr 1fr;
  }
}

.data-manage-tabs {
  margin: 2px 0 16px;
}

.data-manage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data-manage-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(150, 206, 230, 0.24);
  background: rgba(8, 28, 52, 0.45);
}

.data-manage-list strong {
  display: block;
  color: #f4fbff;
  font-size: 15px;
  font-weight: 650;
}

.data-manage-list span {
  display: block;
  margin-top: 2px;
  color: #9ec3dc;
  font-size: 12px;
}

.dist-head h2 {
  margin: 0;
  padding-bottom: 0;
  font-size: 15px;
  letter-spacing: 0.14em;
}

.dist-head h2::after {
  content: none;
}

/* 标题在上、产线标签在下；标签相对标题水平居中 */
.dist-title-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
  text-align: center;
}

/* 标题正下方：当前机台墙选中的产线（与顶栏 Tab 同步） */
.panel-plant-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: #14b8a6;
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.35), 0 0 10px rgba(20, 184, 166, 0.28);
  user-select: none;
}

.panel-plant-tag--5f {
  background: #8b5cf6;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 0 10px rgba(139, 92, 246, 0.28);
}

.dist-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(4, 16, 32, 0.62);
  border: 1px solid rgba(150, 196, 220, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dist-tab {
  border: 0;
  background: transparent;
  color: #8eafc8;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.dist-tab:hover {
  color: #e7f6ff;
}

.dist-tab--on {
  color: #f7fbff;
  background: linear-gradient(180deg, rgba(120, 214, 228, 0.34), rgba(28, 96, 140, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.chart-box--risk .insight-list,
#oddList {
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.chart-box--risk .insight-list::-webkit-scrollbar,
#oddList::-webkit-scrollbar,
.chart-box .chart::-webkit-scrollbar {
  width: 8px;
}

.chart-box--risk .insight-list::-webkit-scrollbar-thumb,
#oddList::-webkit-scrollbar-thumb,
.chart-box .chart::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(150, 196, 220, 0.35);
  border: 2px solid transparent;
  background-clip: padding-box;
}

#distFlags {
  flex: 0 0 auto;
  justify-content: center;
  align-items: center;
  min-height: 0;
  max-height: 56px;
  overflow: hidden;
  flex-wrap: wrap;
  padding-left: 0;
  box-sizing: border-box;
}

.cluster-flags {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.cluster-flag-stamp {
  flex: 0 0 auto;
  margin-left: auto;
  color: #9eb6cc;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
  text-align: right;
}

.cluster-flag-rows {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  row-gap: 4px;
  column-gap: 0;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.cluster-flag {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  column-gap: 5px;
  align-items: baseline;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
}

.cluster-flag-sep {
  flex: 0 0 auto;
  align-self: center;
  width: 3px;
  height: 1.15em;
  margin: 0 12px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(126, 231, 255, 0.15) 0%,
    rgba(158, 198, 220, 0.95) 45%,
    rgba(245, 197, 66, 0.85) 55%,
    rgba(126, 231, 255, 0.15) 100%
  );
  box-shadow: 0 0 8px rgba(126, 231, 255, 0.45);
  user-select: none;
}

.cluster-flag-name,
.cluster-flag-count,
.cluster-flag-center {
  min-width: 0;
}

.insight-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-height: 32px;
  max-height: 132px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  background: rgba(8, 28, 52, 0.72);
  border: 1px solid var(--grid-line);
  overflow: hidden;
}

.insight-strip-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.insight-list {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.insight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  text-align: left;
  color: #d5e8f8;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(140, 176, 210, 0.15);
  font-size: 12px;
  padding: 3px 0;
}

.insight-row--hist {
  grid-template-columns: 72px minmax(0, 1fr) auto;
}

.insight-row--head {
  color: #7fa3c7;
  font-size: 11px;
}

.risk-deg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid rgba(255, 156, 162, 0.45);
  background: linear-gradient(180deg, rgba(92, 24, 34, 0.55), rgba(42, 10, 16, 0.72));
  color: #ffd0d4;
  border-radius: 8px;
  padding: 4px 5px;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  white-space: normal;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.risk-deg:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 196, 200, 0.85);
  box-shadow: 0 6px 16px rgba(80, 8, 18, 0.35);
}

.risk-deg:focus-visible {
  outline: 2px solid #7ee7ff;
  outline-offset: 2px;
}

.risk-deg--mid {
  border-color: rgba(255, 214, 120, 0.5);
  background: linear-gradient(180deg, rgba(92, 68, 16, 0.5), rgba(42, 30, 8, 0.72));
  color: #ffe7a8;
}

.risk-deg--on {
  box-shadow: 0 0 0 1px #7ee7ff, 0 8px 18px rgba(8, 40, 70, 0.35);
}

.risk-meter {
  flex: 0 0 auto;
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.risk-meter > span {
  display: block;
  height: 100%;
  width: calc(var(--p) * 1%);
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb4bc, #ff5d6c);
}

.risk-deg--mid .risk-meter > span {
  background: linear-gradient(90deg, #ffe7a3, #f5b942);
}

.risk-deg-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.risk-deg-lab {
  letter-spacing: 0.02em;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
}

.risk-deg-pct {
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0.92;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.risk-deg--low {
  border-color: rgba(140, 196, 220, 0.45);
  background: linear-gradient(180deg, rgba(18, 48, 78, 0.55), rgba(8, 24, 44, 0.72));
  color: #d5e8f8;
}

.risk-deg--low .risk-meter > span {
  background: linear-gradient(90deg, #9fd4ee, #5eb0d4);
}

.risk-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 2px 8px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

.risk-board-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 0 8px;
  color: #8eafc8;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.risk-batch-h .risk-board-meta {
  padding: 0;
}

.risk-batch-h {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  box-sizing: border-box;
  margin: 0 0 4px;
  padding: 4px 8px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(8, 24, 44, 0.96), rgba(8, 24, 44, 0.88));
  color: #9ec3dc;
  font-size: 11px;
}

.risk-cols,
.risk-line {
  /* 按最长文案定列：机台号 DR-4F-xxx · 状态「30-急停/安全回路断开」· 风险「圈数与转速不符 99.9%」 */
  display: grid;
  grid-template-columns: minmax(78px, 0.78fr) minmax(0, 1.35fr) minmax(0, 1.2fr);
  align-items: center;
  justify-items: stretch;
  column-gap: 6px;
}

.risk-cols {
  margin: 0;
  padding: 0;
  color: #8eafc8;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: center;
}

.risk-cols-id,
.risk-cols-code,
.risk-id,
.risk-code,
.risk-batch-n {
  justify-self: stretch;
  text-align: center;
}

.risk-cols-id,
.risk-id {
  width: 100%;
}

.risk-cols-code {
  box-sizing: border-box;
  width: 100%;
  padding: 0 8px;
  border: 1px solid transparent;
  letter-spacing: 0.14em;
}

.risk-batch-n {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0;
  border: 0;
  font-size: 12px;
  letter-spacing: 0;
}

.risk-batch-n > span {
  letter-spacing: 0.04em;
}

.risk-batch-h time {
  display: block;
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: center;
}

.risk-line {
  box-sizing: border-box;
  margin: 0 0 6px;
  padding: 5px 6px;
  border: 1px solid rgba(140, 196, 220, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(16, 44, 74, 0.72), rgba(8, 24, 44, 0.88));
  animation: risk-in 0.42s ease both;
  animation-delay: calc(var(--i, 0) * 32ms);
}

.risk-line:hover {
  border-color: rgba(94, 255, 244, 0.4);
  background: linear-gradient(180deg, rgba(22, 62, 98, 0.88), rgba(10, 32, 56, 0.94));
}

.risk-cols--pair,
.risk-line--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  align-items: center;
  text-align: center;
}

.risk-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
  row-gap: 6px;
  align-items: start;
  padding: 0 8px 8px;
}

.risk-split--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.risk-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 24, 44, 0.98), rgba(8, 24, 44, 0.94));
}

.risk-batch-h > .risk-split,
.risk-sticky > .risk-split {
  padding: 2px 0 0;
}

.risk-split > .risk-cols {
  box-sizing: border-box;
  margin: 0;
  padding: 2px 8px 4px;
}

.risk-split > .risk-line,
.risk-split > .risk-batch {
  min-width: 0;
  margin: 0;
}

.risk-split .risk-batch-h {
  position: static;
}

.risk-split .risk-cols,
.risk-split .risk-line {
  grid-template-columns: minmax(72px, 0.7fr) minmax(0, 1.4fr) minmax(0, 1.25fr);
  column-gap: 4px;
}

.risk-split .risk-cols--pair,
.risk-split .risk-line--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  align-items: center;
  text-align: center;
}

.risk-split .risk-cols {
  letter-spacing: 0.02em;
}

.risk-split .risk-deg {
  gap: 3px;
  padding: 3px 4px;
  font-size: 10px;
}

.risk-split .risk-meter {
  width: 22px;
  height: 4px;
}

.risk-split .risk-deg-lab {
  font-size: 10px;
}

.risk-split .risk-deg-pct {
  font-size: 8.5px;
}

.risk-split .risk-id,
.risk-split .risk-code {
  font-size: 10px;
}

.risk-split .risk-code {
  padding: 2px 3px;
}

.risk-split button.risk-id time,
.risk-split .risk-id time {
  font-size: 9px;
}

.risk-id {
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  color: #f4f8ff;
  min-width: 0;
  overflow-wrap: anywhere;
}

button.risk-id,
button.risk-cols-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

button.risk-id {
  padding: 0;
}

button.risk-id time,
.risk-id time {
  display: block;
  margin-top: 1px;
  color: #9ec3dc;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
}

button.risk-id:hover,
button.risk-cols-btn:hover,
button.risk-cols-btn--on {
  color: #7ee7ff;
}

button.risk-cols-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  text-decoration: none;
}

button.risk-cols-btn .mini-sort-arrows {
  font-size: 8px;
}

button.risk-cols-btn--on .mini-sort-up,
button.risk-cols-btn--on .mini-sort-down {
  color: rgba(126, 231, 255, 0.28);
}

button.risk-cols-btn--asc .mini-sort-up,
button.risk-cols-btn--desc .mini-sort-down {
  color: #7ee7ff;
  text-shadow: 0 0 6px rgba(126, 231, 255, 0.55);
}

button.risk-batch-n.risk-cols-btn {
  gap: 4px;
}

.hist-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-tail {
  display: contents;
}

.risk-code {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid rgba(140, 196, 220, 0.22);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  background: rgba(8, 28, 52, 0.55);
  color: #e7f4ff;
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.risk-code--fault {
  color: #ffd0d4;
  border-color: rgba(255, 156, 162, 0.45);
  background: rgba(80, 16, 24, 0.35);
}

.risk-code[data-wall-pin-machine],
.risk-id[data-wall-pin-machine] {
  cursor: pointer;
  user-select: none;
}

.risk-code--pin,
button.risk-id--pin {
  color: #042033 !important;
  background: #c9f7f3;
  border-radius: 8px;
  border: 1px solid rgba(94, 255, 244, 0.75);
  box-shadow: 0 0 0 1px rgba(94, 255, 244, 0.35);
  padding: 4px 8px;
}

button.risk-id--pin time {
  color: #0a4a52;
}

@keyframes risk-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .risk-line { animation: none; }
  .risk-deg { transition: none; }
}

.ai-when {
  margin: 0 0 6px;
  color: #9fd4ee;
}

.insight-strip-k {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.health-sort {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.health-score {
  min-width: 64px;
  padding: 4px 10px;
  border: 1px solid rgba(140, 196, 220, 0.35);
  border-radius: 999px;
  background: rgba(8, 28, 52, 0.55);
  color: #d5e4f0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.health-score--good { color: var(--ok); }
.health-score--mid { color: var(--warn); }
.health-score--bad { color: var(--fault); }
.health-score--learn { color: var(--muted); cursor: default; }
.health-score--on { box-shadow: 0 0 0 1px rgba(255, 183, 197, 0.7); }

.insight-strip-msg {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.6;
}

.insight-strip-msg--guide {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  white-space: normal;
}

.cluster-flag {
  color: #9eb6cc;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.cluster-flag-center {
  overflow: hidden;
  text-overflow: ellipsis;
}

.cluster-diff-guide {
  margin-left: 2px;
  white-space: nowrap;
}

.cluster-num {
  color: var(--tone, var(--cyan-soft));
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px var(--tone, var(--cyan));
}

.insight-chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.insight-chip {
  flex: 0 0 auto;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 156, 162, 0.45);
  background: rgba(80, 16, 24, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  padding: 2px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.insight-chip--mid {
  border-color: rgba(255, 228, 148, 0.55);
  background: rgba(80, 60, 10, 0.35);
}

.wb-insight-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  min-height: 18px;
}

.wb-insight-demo {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--warn);
}

.wb-insight {
  font-size: 11px;
  line-height: 1.3;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.wb-insight--high {
  color: var(--fault);
}

.wb-insight--mid {
  color: var(--warn);
}

.wb-insight--low {
  color: var(--ok);
}

.wb-insight--learn {
  color: var(--muted);
}

.insight-contrib {
  width: 100%;
  height: 168px;
  margin: 0 0 8px;
}

.insight-contrib-note {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.chart-box {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chart-box .chart {
  flex: 1 1 auto;
  margin-top: 4px;
  padding: 10px 8px 8px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(20, 56, 96, 0.9) 0%, rgba(6, 22, 42, 0.96) 100%);
  border: 1px solid var(--grid-line-strong);
  box-shadow: inset 0 1px 0 var(--panel-border-inner);
}

.chart {
  width: 100%;
  height: 100%;
  min-height: 120px;
  border-radius: 6px;
}

table.mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

table.mini th,
table.mini td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(120, 200, 255, 0.12);
  text-align: left;
}

table.mini tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.025);
}

table.mini tbody tr:hover td {
  background: rgba(77, 255, 244, 0.04);
}

table.mini th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 24, 48, 0.22) 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

#clusterModalBody table.mini th,
#clusterModalBody table.mini td {
  text-align: center;
  vertical-align: middle;
}

#clusterModalBody table.mini th {
  padding: 0;
  white-space: nowrap;
}

.cluster-diff-table-wrap {
  max-height: min(calc(var(--vh, 1vh) * 58), 560px);
  overflow: auto;
  border: 1px solid rgba(120, 220, 255, 0.14);
  border-radius: 10px;
  background: rgba(6, 24, 42, 0.35);
}

#clusterModalBody table.mini--cluster-diff {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#clusterModalBody table.mini--cluster-diff thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(10, 36, 60, 0.96);
  border-bottom: 1px solid rgba(120, 220, 255, 0.2);
  font-size: 12px;
  white-space: nowrap;
}

#clusterModalBody table.mini--cluster-diff tbody td {
  padding: 9px 8px;
  border-bottom: 1px solid rgba(120, 220, 255, 0.08);
  font-size: 13px;
  vertical-align: middle;
}

#clusterModalBody table.mini--cluster-diff tbody tr:nth-child(even) td {
  background: rgba(8, 32, 56, 0.28);
}

#clusterModalBody table.mini--cluster-diff tbody tr:hover td {
  background: rgba(20, 60, 96, 0.35);
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-machine {
  font-weight: 650;
  color: #e8f7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-score {
  font-weight: 700;
  text-align: center;
  vertical-align: middle;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-score.score-on {
  color: #fbbf24;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-score.score-in,
#clusterModalBody table.mini--cluster-diff .cluster-diff-in-fence {
  color: rgba(160, 210, 230, 0.92);
  font-weight: 600;
  font-size: 12px;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-score-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  line-height: 1.2;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-dir,
.cluster-fence-note .cluster-diff-dir {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-arrow,
.cluster-fence-note .cluster-diff-arrow {
  display: inline-block;
  font-family: "Segoe UI Symbol", "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
  flex: 0 0 auto;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-dir--high,
.cluster-fence-note .cluster-diff-dir--high {
  color: #ef4444;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-dir--low,
.cluster-fence-note .cluster-diff-dir--low {
  color: #22c55e;
}

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-reason {
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  line-height: 1.45;
  color: rgba(220, 240, 255, 0.95);
}

#clusterModalBody table.mini--cluster-diff col,
#clusterModalBody table.mini--cluster-diff th:nth-child(1),
#clusterModalBody table.mini--cluster-diff td:nth-child(1) { width: 7%; }
#clusterModalBody table.mini--cluster-diff th:nth-child(2),
#clusterModalBody table.mini--cluster-diff td:nth-child(2) { width: 16%; }
#clusterModalBody table.mini--cluster-diff th:nth-child(3),
#clusterModalBody table.mini--cluster-diff td:nth-child(3),
#clusterModalBody table.mini--cluster-diff th:nth-child(4),
#clusterModalBody table.mini--cluster-diff td:nth-child(4) { width: 9%; }
#clusterModalBody table.mini--cluster-diff th:nth-child(5),
#clusterModalBody table.mini--cluster-diff td:nth-child(5) { width: 10%; }
#clusterModalBody table.mini--cluster-diff th:nth-child(6),
#clusterModalBody table.mini--cluster-diff td:nth-child(6) { width: 18%; }
#clusterModalBody table.mini--cluster-diff th:nth-child(7),
#clusterModalBody table.mini--cluster-diff td:nth-child(7) { width: 12%; }
#clusterModalBody table.mini--cluster-diff th:nth-child(8),
#clusterModalBody table.mini--cluster-diff td:nth-child(8) { width: 19%; }

#clusterModalBody table.mini--cluster-diff .cluster-diff-td-fence {
  font-variant-numeric: tabular-nums;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
}

.cluster-fence-note {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(120, 220, 255, 0.16);
  border-radius: 10px;
  background: rgba(6, 28, 48, 0.5);
}

.cluster-fence-note h4 {
  margin: 0 0 8px;
  color: #7ee7ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cluster-fence-note p,
.cluster-fence-note li {
  margin: 0;
  color: rgba(210, 236, 255, 0.9);
  font-size: 12.5px;
  line-height: 1.55;
}

.cluster-fence-note ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.cluster-fence-note li + li {
  margin-top: 4px;
}

#clusterModalBody button.mini-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-align: center;
}

#clusterModalBody button.mini-sort:hover,
#clusterModalBody button.mini-sort--on {
  color: #7ee7ff;
}

.mini-sort-label {
  flex: 0 1 auto;
}

.mini-sort-arrows {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  line-height: 0.72;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  transform: translateY(0.5px);
}

.mini-sort-up,
.mini-sort-down {
  display: block;
  color: rgba(170, 205, 230, 0.45);
}

#clusterModalBody button.mini-sort:hover .mini-sort-up,
#clusterModalBody button.mini-sort:hover .mini-sort-down {
  color: rgba(126, 231, 255, 0.65);
}

#clusterModalBody button.mini-sort--on .mini-sort-up,
#clusterModalBody button.mini-sort--on .mini-sort-down {
  color: rgba(126, 231, 255, 0.28);
}

#clusterModalBody button.mini-sort--asc .mini-sort-up,
#clusterModalBody button.mini-sort--desc .mini-sort-down {
  color: #7ee7ff;
  text-shadow: 0 0 6px rgba(126, 231, 255, 0.55);
}

/* 实时告警表：列多、略放大字号以便扫视 */
table.mini.mini--alerts {
  font-size: 12px;
  table-layout: fixed;
  width: 100%;
}

table.mini.mini--alerts th,
table.mini.mini--alerts td {
  padding: 5px 8px;
  word-wrap: break-word;
  text-align: center;
  vertical-align: middle;
}

/* 告警表交替行底色：提高“告警信息/处理信息”逐行扫视效率 */
table.mini.mini--alerts tbody tr:nth-child(odd) td {
  background: rgba(255, 255, 255, 0.02);
}

table.mini.mini--alerts tbody tr:nth-child(even) td {
  background: rgba(42, 132, 190, 0.12);
}

table.mini.mini--alerts tbody tr:hover td {
  background: rgba(77, 255, 244, 0.08);
}

/* 新告警入场特效：10 秒内高亮脉冲，之后由 JS 自动移除 class */
@keyframes alertRowNewPulse {
  0% {
    box-shadow: inset 0 0 0 999px rgba(255, 82, 108, 0.3), 0 0 0 rgba(255, 82, 108, 0);
    border-bottom-color: rgba(255, 148, 148, 0.55);
  }
  50% {
    box-shadow: inset 0 0 0 999px rgba(255, 82, 108, 0.14), 0 0 14px rgba(255, 82, 108, 0.25);
    border-bottom-color: rgba(255, 148, 148, 0.42);
  }
  100% {
    box-shadow: inset 0 0 0 999px rgba(255, 82, 108, 0.26), 0 0 0 rgba(255, 82, 108, 0);
    border-bottom-color: rgba(255, 148, 148, 0.5);
  }
}

table.mini.mini--alerts tbody tr.alert-row-new td {
  animation: alertRowNewPulse 1.2s ease-in-out infinite;
}

/* 列序：告警时间 | 机台 | 告警类型 | 挡车工 | 派单时间 | 状态 */
table.mini.mini--alerts th:nth-child(1),
table.mini.mini--alerts td:nth-child(1) {
  min-width: 5.75rem;
  white-space: nowrap;
}

table.mini.mini--alerts th:nth-child(2),
table.mini.mini--alerts td:nth-child(2) {
  width: 14%;
  min-width: 0;
}

table.mini.mini--alerts th:nth-child(3),
table.mini.mini--alerts td:nth-child(3) {
  width: 22%;
  min-width: 0;
}

/* 实时告警：Tab + 时间排序工具条 */
.alert-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

/* 实时告警导航：F1/F2 文件夹式高低页签（选中抬高、未选中压低并叠在后面），类别在页签下方。 */
.alert-nav {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  gap: 0;
}

.alert-plant-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 0 2px;
  border-bottom: 0;
  background: transparent;
}

.alert-plant-tab {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 30px;
  margin: 0 -10px 0 0;
  padding: 6px 16px 8px;
  border: 1px solid rgba(110, 148, 178, 0.42);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #1a2f48 0%, #0c1828 100%);
  color: #e8f2fa;
  font-family: "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease, min-height 0.18s ease, padding 0.18s ease, border-color 0.15s ease, box-shadow 0.15s ease, margin 0.18s ease;
}

.alert-plant-tab:last-child {
  margin-right: 0;
}

.alert-plant-tab:hover:not(.alert-plant-tab--active) {
  color: #ffffff;
  background: linear-gradient(180deg, #243a56 0%, #122033 100%);
  border-color: rgba(150, 198, 224, 0.5);
}

.alert-plant-tab:focus-visible {
  outline: 2px solid var(--cyan-dim);
  outline-offset: 1px;
}

.alert-plant-tab--active {
  min-height: 46px;
  margin-bottom: 0;
  padding: 11px 16px 10px;
  color: #ffffff;
  z-index: 3;
}

.alert-nav--f1 .alert-plant-tab--active {
  background: linear-gradient(180deg, #2ec4c0 0%, #148a9a 38%, #0a4a5c 72%, #061820 100%);
  border-color: #5efff4;
  box-shadow:
    0 0 0 1px rgba(94, 255, 244, 0.35),
    inset 0 1px 0 rgba(200, 255, 250, 0.45),
    0 -2px 10px rgba(46, 196, 192, 0.25);
}

.alert-nav--f1 .alert-kind-bar {
  background: linear-gradient(180deg, #061820 0%, #0a3040 45%, #0c3a4e 100%);
  border-color: rgba(46, 160, 170, 0.45);
}

.alert-nav--f2 .alert-plant-tab--active {
  background: linear-gradient(180deg, #9b7ae8 0%, #6a4cbc 38%, #3a2878 72%, #1a1038 100%);
  border-color: #c4a8ff;
  box-shadow:
    0 0 0 1px rgba(196, 168, 255, 0.35),
    inset 0 1px 0 rgba(230, 210, 255, 0.4),
    0 -2px 10px rgba(155, 122, 232, 0.25);
}

.alert-nav--f2 .alert-kind-bar {
  background: linear-gradient(180deg, #1a1038 0%, #2a1c58 45%, #322064 100%);
  border-color: rgba(140, 110, 200, 0.45);
}

.alert-plant-name {
  font-variant-numeric: tabular-nums;
}

.alert-plant-count,
.alert-plant-tab:not(.alert-plant-tab--active) .alert-plant-count,
.alert-plant-count.is-zero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 22px;
  height: 22px;
  margin: 0;
  padding: 0 6px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.alert-plant-count.is-zero {
  opacity: 0.45;
}

/* 人为 / 故障：字号小于厂区页签，不用色块当按钮。钢青是设备，黄铜是人手，红色不参与分类。 */
.alert-kind-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(150, 198, 224, 0.22);
  border-radius: 0 0 10px 10px;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 2;
}

.alert-kind-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8aa4bb;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.alert-kind-tab + .alert-kind-tab {
  border-left: 1px solid rgba(150, 198, 224, 0.1);
}

.alert-kind-tab::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f93a6;
  flex: 0 0 auto;
}

.alert-kind-tab--human::before {
  background: #8a7d62;
}

.alert-kind-tab--mixed::before {
  background: #7f97b3;
}

.alert-kind-tab:hover:not(.is-on) {
  color: #d5e8f6;
}

.alert-kind-tab:focus-visible {
  outline: 2px solid var(--cyan-dim);
  outline-offset: -2px;
}

.alert-kind-tab--fault,
.alert-kind-tab--human {
  color: #8aa4bb;
}

.alert-kind-tab--fault.is-on {
  color: #d5eef6;
  font-weight: 600;
  background: transparent;
  box-shadow: inset 0 -2px 0 #7ec8e3;
}

.alert-kind-tab--fault.is-on::before {
  background: #7ec8e3;
}

.alert-kind-tab--human.is-on {
  color: #f0e6d2;
  font-weight: 600;
  background: transparent;
  box-shadow: inset 0 -2px 0 #d4c09a;
}

.alert-kind-tab--human.is-on::before {
  background: #d4c09a;
}

.alert-kind-tab--mixed.is-on {
  color: #e7f1fb;
  font-weight: 600;
  background: transparent;
  box-shadow: inset 0 -2px 0 #8eb4d4;
}

.alert-kind-tab--mixed.is-on::before {
  background: #8eb4d4;
}

.alert-kind-count,
.alert-kind-tab--fault .alert-kind-count,
.alert-kind-tab--human .alert-kind-count,
.alert-kind-tab--fault.is-on .alert-kind-count,
.alert-kind-tab--human.is-on .alert-kind-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #102033;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.alert-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.alert-tab {
  flex: 1 1 auto;
  min-width: 72px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(30, 60, 100, 0.35) 0%, rgba(0, 0, 0, 0.32) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.alert-tab:hover {
  color: var(--text);
  border-color: rgba(46, 252, 235, 0.2);
}

.alert-tab.is-active {
  color: var(--cyan);
  border-color: var(--cyan-dim);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(46, 252, 235, 0.2),
    0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.alert-tab-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #9cc7e6;
}

.alert-tab.is-active .alert-tab-count {
  color: var(--cyan);
}

/* 处置阶段 Tab 未选中：底色提示与卡片墙四态一致 */
.alert-tab--fault {
  color: #f0b4b8;
  border-color: rgba(255, 90, 95, 0.22);
  background: linear-gradient(180deg, rgba(90, 20, 24, 0.35) 0%, rgba(0, 0, 0, 0.32) 100%);
}

.alert-tab--maint {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.22);
  background: linear-gradient(180deg, rgba(90, 70, 10, 0.35) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.alert-tab--normal {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.22);
  background: linear-gradient(180deg, rgba(12, 74, 50, 0.38) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.alert-tab.alert-tab--fault.is-active {
  color: #fff;
  border-color: rgba(255, 90, 95, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 90, 95, 0.35),
    0 4px 18px rgba(255, 60, 70, 0.28);
  transform: translateY(-1px);
}

.alert-tab.alert-tab--fault.is-active .alert-tab-count {
  color: #ffe4e6;
}

/* 选中态用浅色字，避免深棕字压在深色渐变上对比度不足 */
.alert-tab.alert-tab--maint.is-active {
  color: #fffbeb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  border-color: rgba(250, 204, 21, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 0 0 1px rgba(250, 204, 21, 0.35),
    0 4px 18px rgba(250, 200, 20, 0.22);
  transform: translateY(-1px);
}

.alert-tab.alert-tab--maint.is-active .alert-tab-count {
  color: #fde68a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.alert-tab.alert-tab--normal.is-active {
  color: #fff;
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(52, 211, 153, 0.3),
    0 4px 18px rgba(34, 197, 94, 0.22);
  transform: translateY(-1px);
}

.alert-tab.alert-tab--normal.is-active .alert-tab-count {
  color: #d1fae5;
}

.alert-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.alert-sort-label {
  margin-right: 4px;
}

.alert-sort-btn {
  padding: 5px 11px;
  font-size: 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(24, 50, 86, 0.4) 0%, rgba(0, 0, 0, 0.28) 100%);
  color: var(--muted);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.alert-sort-btn:hover {
  border-color: rgba(46, 252, 235, 0.2);
  color: var(--text);
}

.alert-sort-btn.is-active {
  color: var(--cyan);
  border-color: var(--cyan-dim);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 12px var(--cyan-glow);
}

.alert-empty {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted-deep);
}

.alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.alert-card {
  padding: 10px 12px 12px;
  border-radius: 8px;
  border: 1px solid rgba(150, 190, 220, 0.14);
  background: #0c2240;
}

.alert-list > .alert-card:nth-child(odd) {
  background: #0c2240;
}

.alert-list > .alert-card:nth-child(even) {
  background: #163656;
}

.alert-card--new {
  animation: alertRowNewPulse 1.2s ease-in-out infinite;
}

.alert-card--door,
.alert-card--safety {
  border-color: rgba(255, 156, 162, 0.28);
}

.alert-list > .alert-card--safety:nth-child(odd),
.alert-list > .alert-card--door:nth-child(odd) {
  background: #3a1820;
}

.alert-list > .alert-card--safety:nth-child(even),
.alert-list > .alert-card--door:nth-child(even) {
  background: #5c3038;
}

.alert-card--safety .alert-card-type,
.alert-card--door .alert-card-type {
  color: #f6e4e6;
}

.alert-card--human {
  border-color: rgba(212, 192, 154, 0.2);
}

.alert-list > .alert-card--human:nth-child(odd) {
  background: #2a2216;
}

.alert-list > .alert-card--human:nth-child(even) {
  background: #463820;
}

.alert-card--human .alert-card-type {
  color: #f4efe4;
}

.alert-card--mixed {
  border-color: rgba(126, 168, 204, 0.28);
}

.alert-list > .alert-card--mixed:nth-child(odd) {
  background: #0c2240;
}

.alert-list > .alert-card--mixed:nth-child(even) {
  background: #163656;
}

.alert-card--mixed .alert-card-machine {
  border-left-color: #7ec8e3;
}

.alert-cause {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #d5e8f8;
}

.alert-cause b {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
}

.alert-origin--mixed {
  color: #d4eef6;
  background: rgba(90, 150, 176, 0.22);
  box-shadow: none;
}

.alert-card--reserved {
  border-color: rgba(148, 163, 184, 0.22);
}

.alert-list > .alert-card--reserved:nth-child(odd) {
  background: #16202c;
}

.alert-list > .alert-card--reserved:nth-child(even) {
  background: #243444;
}

.alert-card--reserved .alert-card-type {
  color: #d5e2ee;
}

.alert-card-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
}

.alert-card-machine {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 1px 0 1px 8px;
  border: 0;
  border-left: 3px solid #7ec8e3;
  border-radius: 0;
  background: transparent;
  color: #f4f8fb;
  font: inherit;
  font-family: "Cascadia Mono", Consolas, "Microsoft YaHei UI", monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.alert-card-machine:hover {
  border-left-color: #e8fdff;
  color: #fff;
}

.alert-card-machine--pin {
  color: #042033;
  background: #c9f7f3;
  border-left-color: #042033;
}

.alert-card--human .alert-card-machine {
  border-left-color: #d4c09a;
}

.alert-card--safety .alert-card-machine,
.alert-card--door .alert-card-machine {
  border-left-color: #ff9ca2;
}

.alert-card--reserved .alert-card-machine {
  border-left-color: #8cb4d4;
}

.alert-origin {
  display: inline-flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 2px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.alert-origin--fault {
  color: #d4eef6;
  background: rgba(90, 150, 176, 0.22);
  box-shadow: none;
}

.alert-origin--human {
  color: #f0e6d2;
  background: rgba(180, 156, 104, 0.2);
  box-shadow: none;
}

.alert-card-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: #e8f1f8;
}

.alert-code-name {
  min-width: 0;
}

.alert-m {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: 4px;
  background: #7ee7ff;
  color: #042033;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.alert-cat,
.alert-human-tag {
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.alert-cat {
  color: #d7f6ff;
  background: rgba(14, 70, 96, 0.72);
}

.alert-human-tag {
  color: #3b1020;
  background: #f6c4cc;
}

.alert-meaning,
.alert-primary,
.alert-note,
.alert-caution,
.alert-more {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.45;
}

.alert-meaning {
  color: #c5d6e6;
}

.alert-primary {
  color: #ffe08a;
}

.alert-note {
  color: #b9d4e8;
}

.alert-caution {
  color: #ffd0a8;
  font-weight: 700;
}

.alert-more {
  color: #9ec3dc;
}

.guide-label {
  margin: 10px 0 4px;
  font-size: 13px;
  color: #7ee7ff;
}

.alert-causes {
  margin: 0 0 6px;
  padding-left: 18px;
  color: #d5e8f8;
  font-size: 12px;
  line-height: 1.5;
}

.alert-steps {
  margin: 4px 0 6px;
  padding-left: 18px;
  color: #d5e8f8;
  font-size: 12px;
  line-height: 1.45;
}

.alert-guide-link {
  border: 0;
  background: transparent;
  color: #7ee7ff;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.modal--guide {
  width: min(760px, calc(var(--vw, 1vw) * 94));
}

.modal--index {
  width: min(1120px, calc(var(--vw, 1vw) * 96));
}

.index-guide-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #d5e8f8;
}

.index-formula {
  margin: 8px auto 12px;
  max-width: 640px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(140, 196, 220, 0.36);
  background: rgba(10, 32, 58, 0.72);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  color: #e7f6ff;
  text-align: left;
}

.index-formula-eqs {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.index-formula-eqs > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0 8px;
  margin: 0 0 8px;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  text-align: left;
}

.index-formula-eqs > li:last-child {
  margin-bottom: 0;
}

.index-formula-label {
  flex: 0 0 auto;
  text-align: left;
  font-weight: 600;
  color: #d5e8f8;
}

.index-formula-sep {
  flex: 0 0 auto;
  text-align: left;
  font-weight: 600;
  color: #7ee7ff;
}

.index-formula-body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.index-formula-note {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(140, 196, 220, 0.22);
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: #c5dceb;
  text-align: left;
}

.ai-pipe {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 4px;
}

.ai-pipe-node {
  flex: 1 1 120px;
  min-width: 108px;
  padding: 8px 8px 7px;
  border-radius: 10px;
  border: 1px solid rgba(94, 255, 244, 0.45);
  background: linear-gradient(180deg, rgba(16, 64, 92, 0.72), rgba(8, 28, 52, 0.9));
  box-shadow: 0 0 12px rgba(94, 255, 244, 0.16);
}

.ai-pipe-node b,
.ai-pipe-node small {
  display: block;
  text-align: center;
}

.ai-pipe-node b {
  color: #b4fff8;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-pipe-node small {
  margin-top: 3px;
  color: #9ec3dc;
  font-size: 11px;
}

.ai-pipe-arrow {
  align-self: center;
  color: #5efff4;
  font-size: 16px;
  text-shadow: 0 0 8px rgba(94, 255, 244, 0.8);
}

.ai-frame {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 12px;
}

.ai-frame-card {
  margin: 0;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 28%),
    rgba(6, 22, 42, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ai-frame-card--name {
  border: 1px solid rgba(126, 231, 255, 0.35);
}

.ai-frame-card--ml {
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.ai-frame-card--dl {
  border: 1px solid rgba(167, 139, 250, 0.45);
}

.ai-frame-label {
  margin: 0 0 12px;
  text-align: center;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: #7ee7ff;
}

.ai-frame-card--ml .ai-frame-label {
  color: #ffe7a8;
}

.ai-frame-card--dl .ai-frame-label {
  color: #ddd6fe;
}

.ai-pipe--row {
  flex-wrap: nowrap;
}

.ai-pipe--row .ai-pipe-node {
  flex: 1 1 0;
  min-width: 0;
}

.ai-pipe--arch {
  flex-wrap: nowrap;
  justify-content: center;
}

.ai-pipe--arch .ai-pipe-node {
  flex: 0 0 92px;
  min-width: 72px;
}

.keep {
  white-space: nowrap;
}

.ai-frame-card .index-guide-note {
  margin: 12px 0 0;
  text-align: left;
}

.ai-pipe-node--name {
  border-color: rgba(140, 196, 220, 0.55);
}

.ai-pipe-node--ml {
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.16);
}

.ai-pipe-node--dl {
  border-color: rgba(167, 139, 250, 0.7);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.18);
}

.ai-pipe-node--ml b {
  color: #ffe7a8;
}

.ai-pipe-node--dl b {
  color: #ddd6fe;
}

.odd-model {
  grid-column: 1 / -1;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: #d5e8f8;
  border: 1px solid rgba(167, 139, 250, 0.4);
  background: rgba(18, 28, 58, 0.72);
}

.index-guide-lead {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.65;
  text-align: center;
  color: #e7f6ff;
}

.index-bands,
.index-health-scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.index-band,
.index-health-scale article {
  margin: 0;
  padding: 14px 12px 12px;
  border-radius: 14px;
  text-align: center;
}

.index-band h4,
.index-guide h4 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: 0.12em;
}

.index-guide h4 {
  margin: 16px 0 8px;
  text-align: center;
  font-size: 13px;
  color: var(--cyan);
}

.index-band p,
.index-health-scale span {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  text-wrap: pretty;
  line-break: strict;
}

.index-band p + p {
  margin-top: 8px;
}

.index-band--high {
  border: 1px solid rgba(255, 156, 162, 0.45);
  background: linear-gradient(180deg, rgba(92, 24, 34, 0.55), rgba(42, 10, 16, 0.72));
  color: #ffd0d4;
}

.index-band--mid {
  border: 1px solid rgba(255, 214, 120, 0.5);
  background: linear-gradient(180deg, rgba(92, 68, 16, 0.5), rgba(42, 30, 8, 0.72));
  color: #ffe7a8;
}

.index-band--low {
  border: 1px solid rgba(140, 196, 220, 0.45);
  background: linear-gradient(180deg, rgba(18, 48, 78, 0.55), rgba(8, 24, 44, 0.72));
  color: #d5e8f8;
}

.index-health-scale article {
  border: 1px solid rgba(140, 196, 220, 0.28);
  background: rgba(10, 32, 58, 0.72);
  color: #d5e8f8;
}

.index-health-scale strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #7ee7ff;
}

.index-guide ul {
  margin: 0 auto;
  max-width: 640px;
  padding-left: 1.2em;
  line-height: 1.65;
}

.index-guide table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

/* 各说明弹层表格：表头与单元格一律上下左右居中 */
.index-guide th,
.index-guide td,
.odd-guide th,
.odd-guide td,
.ai-frame-card th,
.ai-frame-card td {
  padding: 8px 6px;
  border: 1px solid rgba(140, 196, 220, 0.22);
  text-align: center;
  vertical-align: middle;
}

.index-guide th,
.odd-guide th,
.ai-frame-card th {
  color: #9fd4ee;
  font-weight: 650;
}

/* 说明表第一列：单行不折行，上下左右居中（避免「本机 20% 分位」被拆成两行） */
.index-guide th:first-child,
.index-guide td:first-child,
.odd-guide th:first-child,
.odd-guide td:first-child,
.ai-frame-card th:first-child,
.ai-frame-card td:first-child {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  width: 1%;
  padding-left: 10px;
  padding-right: 10px;
}

.index-guide table.guide-table--compare td:first-child {
  white-space: nowrap;
}

/* 差异群指标说明：表格上下左右居中；两表共用列宽 */
.diff-guide .index-guide-lead {
  text-align: left;
}

.diff-guide .diff-guide-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.diff-guide .diff-col-reason {
  width: 34%;
}

.diff-guide .diff-col-detail {
  width: 66%;
}

.diff-guide .diff-guide-table th,
.diff-guide .diff-guide-table td {
  text-align: center;
  vertical-align: middle;
  padding: 10px 12px;
  line-height: 1.55;
  border-color: rgba(140, 196, 220, 0.28);
}

@media (max-width: 720px) {
  .index-bands,
  .index-health-scale {
    grid-template-columns: 1fr;
  }
}

.alert-knowledge {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.alert-knowledge-k {
  color: #9cc7e6;
  letter-spacing: 0.04em;
}

.alert-knowledge-steps {
  margin: 0;
  padding-left: 1.2em;
  color: #e8f4ff;
}

.alert-knowledge-steps li + li {
  margin-top: 2px;
}

.alert-knowledge-src {
  color: #fde68a;
  text-decoration: none;
}

.badge {
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.badge.ok {
  background: linear-gradient(180deg, rgba(74, 232, 176, 0.22) 0%, rgba(46, 229, 157, 0.12) 100%);
  color: #b8ffe4;
  border-color: rgba(74, 232, 176, 0.35);
}

.badge.warn {
  background: linear-gradient(180deg, rgba(255, 216, 120, 0.24) 0%, rgba(246, 199, 68, 0.14) 100%);
  color: #fff3c4;
  border-color: rgba(255, 200, 80, 0.38);
}

.badge.fault {
  background: linear-gradient(180deg, rgba(255, 138, 142, 0.22) 0%, rgba(255, 90, 95, 0.14) 100%);
  color: #ffd4d6;
  border-color: rgba(255, 120, 125, 0.4);
}

button.link {
  background: linear-gradient(180deg, rgba(28, 78, 120, 0.55) 0%, rgba(6, 22, 44, 0.85) 100%);
  border: 1px solid var(--cyan-dim);
  color: var(--cyan-soft);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

button.link:hover {
  border-color: var(--cyan);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 16px rgba(77, 255, 244, 0.2),
    0 3px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 24, 0.72);
  backdrop-filter: blur(8px) saturate(1.02);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(960px, calc(var(--vw, 1vw) * 96));
  max-height: calc(var(--vh, 1vh) * 90);
  overflow: auto;
  background: linear-gradient(180deg, rgba(24, 60, 100, 0.97) 0%, rgba(8, 28, 52, 1) 100%);
  border: 1px solid var(--grid-line-strong);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: inset 0 1px 0 var(--panel-border-inner), var(--shadow-lift);
}

.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(120, 220, 255, 0.18);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.modal h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow);
}

#mini3d {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  background: radial-gradient(ellipse 100% 80% at 50% 0%, rgba(40, 100, 150, 0.48) 0%, #061220 65%);
  border: 1px solid var(--grid-line-strong);
  box-shadow:
    inset 0 2px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px var(--panel-border-outer);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal.modal--wide {
  width: min(1080px, calc(var(--vw, 1vw) * 98));
}

.modal.modal--wide .grid-2 {
  grid-template-columns: minmax(200px, 30%) 1fr;
}

.modal-scroll-body {
  max-height: calc(var(--vh, 1vh) * 72);
  overflow: auto;
  padding-right: 6px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
}

.modal--erp {
  width: min(560px, calc(var(--vw, 1vw) * 94));
}

table.mini.mini--erp th {
  width: 38%;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  vertical-align: top;
}

table.mini.mini--detail th {
  width: 32%;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  vertical-align: top;
}

.modal-detail-scroll {
  max-height: min(calc(var(--vh, 1vh) * 68), 720px);
  overflow: auto;
  padding-right: 6px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
}

.modal-sec-title {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px var(--cyan-glow);
}

.modal-sec-title:first-child {
  margin-top: 0;
}

.modal-flow-list {
  margin: 0 0 0 1.1em;
  padding: 0;
  color: #dbe8f5;
}

.modal-flow-list li {
  margin-bottom: 6px;
}

.machine-card .wb-work-order-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: #f2f8ff;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(24, 240, 231, 0.45);
  text-underline-offset: 2px;
  text-align: left;
}

.machine-card .wb-work-order-btn:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

.machine-card .wb-product-no-btn {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: #f2f8ff;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(24, 240, 231, 0.45);
  text-underline-offset: 2px;
  text-align: left;
  max-width: 100%;
}

.machine-card .wb-product-no-btn:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
}

.modal--wip {
  width: min(920px, calc(var(--vw, 1vw) * 96));
}

.wip-detail-layout {
  display: grid;
  grid-template-columns: minmax(260px, 38%) 1fr;
  gap: 16px 20px;
  align-items: start;
}

@media (max-width: 720px) {
  .wip-detail-layout {
    grid-template-columns: 1fr;
  }
}

.wip-sample-frame {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--grid-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.35);
  background: rgba(4, 14, 32, 0.9);
}

.wip-sample-img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.wip-process-text {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(8, 28, 52, 0.85);
  border: 1px solid rgba(24, 240, 231, 0.12);
  color: #dbe8f5;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.wip-remark {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

/* —— 大屏缩窗 / 笔记本（仍横排页眉，统计卡横滑）—— */
@media (max-width: 1480px) {
  header.top-bar {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: 10px 12px;
  }

  .title-block--brand .app-brand-title {
    max-width: min(calc(var(--vw, 1vw) * 36), 22em);
    letter-spacing: 0.05em;
  }

  .stat-card {
    min-width: 100px;
    padding: 9px 12px 10px;
  }

  .stat-card .value .num,
  .stat-card .value .unit {
    font-size: 18px;
  }

  .stat-card .value .unit {
    font-size: 10px;
  }

  .stat-card .label {
    font-size: 10px;
  }
}

/* —— 平板竖屏 / 小笔记本：页眉上下叠，主栏改单列 —— */
@media (max-width: 1100px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #app {
    height: auto;
    min-height: calc(var(--vh, 1vh) * 100);
    min-height: calc(var(--vh, 1dvh) * 100);
    grid-template-rows: auto auto auto auto;
    overflow: visible;
    padding: 12px;
    gap: 12px;
  }

  header.top-bar {
    grid-template-columns: 1fr;
    justify-items: stretch;
    overflow: visible;
  }

  .title-block--brand {
    width: 100%;
  }

  .title-block--brand .app-brand-row {
    gap: 8px;
    width: 100%;
  }

  .title-block--brand .app-brand-logo {
    width: 40px;
    height: 40px;
  }

  .title-block--brand .app-brand-title {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .status-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    text-align: center;
    padding: 6px 10px;
  }

  .status-bar__hint,
  .status-bar__copy,
  .status-bar__clock {
    justify-self: center;
    text-align: center;
    white-space: normal;
  }

  /* 平板：统计卡可换行铺满；空间仍不够时保留横滑兜底 */
  .stats-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .stats-row::before {
    display: none;
  }

  .stats-row .stat-card {
    flex: 1 1 calc(25% - 10px);
    min-width: 120px;
  }

  main.mid {
    grid-template-columns: 1fr;
  }

  .twin-wrap,
  .machine-card-grid {
    min-height: calc(var(--vh, 1vh) * 48);
  }

  main.mid > .panel {
    min-height: 280px;
  }

  footer.bottom {
    overflow: visible;
  }

  .bottom-charts {
    grid-template-columns: 1fr;
  }

  .bottom-side-rail {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    padding: 0 0 4px;
  }

  .side-rail-btn {
    flex: 1 1 calc(50% - 6px);
    min-height: 40px;
  }

  .bottom-charts > .panel {
    min-height: 280px;
  }

  .chart {
    min-height: 240px;
  }

  .risk-result,
  .risk-charts,
  .ai-explain .risk-glossary {
    grid-template-columns: 1fr 1fr;
  }

  .risk-result--line {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .machine-card {
    width: calc((100% - var(--card-gap-x)) / 2);
  }
}

/* —— 手机 / 窄 Pad：两列统计卡 + 机台卡单列 —— */
@media (max-width: 700px) {
  #app {
    padding: max(10px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .title-block--brand .app-brand-title {
    font-size: 16px;
    letter-spacing: 0.04em;
    white-space: normal;
  }

  .title-block--brand .app-brand-logo {
    width: 34px;
    height: 34px;
  }

  .stats-row {
    gap: 8px;
  }

  .stats-row .stat-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 8px 10px 9px;
  }

  .stat-card .label {
    font-size: 10px;
  }

  .stat-card .value .num {
    font-size: 17px;
  }

  .machine-card {
    width: 100%;
  }

  .plant-tabs {
    padding-left: 10px;
    padding-right: 10px;
  }

  .odd-cols,
  .odd-card {
    grid-template-columns: 156px 64px minmax(0, 1fr);
    column-gap: 6px;
    padding: 8px;
  }

  #distPanel.dist-panel--detail > #oddReadout {
    grid-template-columns: 1fr 1fr;
  }

  .risk-cols,
  .risk-line,
  .risk-split .risk-cols,
  .risk-split .risk-line {
    grid-template-columns: minmax(70px, 0.72fr) minmax(0, 1.35fr) minmax(0, 1.2fr);
    column-gap: 4px;
  }

  .risk-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .risk-meter {
    width: 28px;
  }

  .ai-explain header,
  .explain-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .explain-actions {
    gap: 10px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal {
    width: 100%;
    max-height: calc(var(--vh, 1vh) * 92);
    padding: 14px;
  }

  button.link,
  .dist-tab,
  .plant-tab {
    min-height: 36px;
  }
}

/* —— 超窄手机 —— */
@media (max-width: 420px) {
  .stats-row .stat-card {
    flex: 1 1 100%;
  }

  .side-rail-btn {
    flex: 1 1 100%;
  }
}

/* 卡片墙色带：与 .st-* 一致；顶光略弱、主色带收窄色域，避免发灰发污 */
#machineCardGrid .machine-card[data-status-tone="normal"] .card-head.wb-card-head,
#machineCardGrid .machine-card[data-status-tone="running"] .card-head.wb-card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(152deg, #0f766e 0%, #14b8a6 46%, #2dd4bf 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#machineCardGrid .machine-card[data-status-tone="fault"] .card-head.wb-card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 36%),
    linear-gradient(152deg, #b91c1c 0%, #dc2626 42%, #ef4444 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#machineCardGrid .machine-card[data-status-tone="door"] .card-head.wb-card-head,
#machineCardGrid .machine-card[data-status-tone="human"] .card-head.wb-card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 36%),
    linear-gradient(152deg, #c75b6e 0%, #e98998 48%, #f6c4cc 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(90, 20, 32, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

#machineCardGrid .machine-card[data-status-tone="maint"] .card-head.wb-card-head,
#machineCardGrid .machine-card[data-status-tone="idle"] .card-head.wb-card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 36%),
    linear-gradient(152deg, #b88a06 0%, #d9a40a 44%, #f4c430 100%);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

#machineCardGrid .machine-card[data-status-tone="stop"] .card-head.wb-card-head,
#machineCardGrid .machine-card[data-status-tone="offline"] .card-head.wb-card-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
    linear-gradient(152deg, #334155 0%, #475569 52%, #64748b 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

/* 主区域滚动条：细轨道 + 青蓝拇指，与全局 HUD 一致 */
.panel .scroll,
.machine-card-grid,
.modal-scroll-body,
.modal-detail-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 253, 240, 0.38) rgba(0, 0, 0, 0.3);
}

.panel .scroll::-webkit-scrollbar,
.machine-card-grid::-webkit-scrollbar,
.modal-scroll-body::-webkit-scrollbar,
.modal-detail-scroll::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.panel .scroll::-webkit-scrollbar-track,
.machine-card-grid::-webkit-scrollbar-track,
.modal-scroll-body::-webkit-scrollbar-track,
.modal-detail-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.panel .scroll::-webkit-scrollbar-thumb,
.machine-card-grid::-webkit-scrollbar-thumb,
.modal-scroll-body::-webkit-scrollbar-thumb,
.modal-detail-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(62, 253, 240, 0.4) 0%, rgba(24, 100, 140, 0.5) 100%);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.panel .scroll::-webkit-scrollbar-thumb:hover,
.machine-card-grid::-webkit-scrollbar-thumb:hover,
.modal-scroll-body::-webkit-scrollbar-thumb:hover,
.modal-detail-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(62, 253, 240, 0.55) 0%, rgba(30, 130, 170, 0.6) 100%);
  background-clip: padding-box;
}


.ai-scenes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-scene-card {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(150, 206, 230, 0.22);
  background: rgba(6, 22, 42, 0.72);
}

.ai-scene-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.ai-scene-head strong {
  color: #eaf6ff;
  font-size: 14px;
}

.ai-scene-module,
.ai-scene-status {
  color: #8fb4cc;
  font-size: 12px;
}

.ai-scene-status {
  color: #52f0c4;
}

.ai-scene-card p {
  margin: 6px 0 0;
  color: #cfe6f7;
  font-size: 12px;
  line-height: 1.45;
}

.ai-scene-card p span {
  color: #8fb4cc;
}


/* ---- 统计报表导出 ---- */
.stats-export {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.stats-export .link {
  font-size: 12px;
}

/* ---- 工艺参数控制 ---- */
.modal--process {
  width: min(980px, calc(var(--vw, 1vw) * 96));
  max-height: calc(var(--vh, 1vh) * 92);
  background: linear-gradient(180deg, #163a62 0%, #0b2744 55%, #081b30 100%);
  border: 1px solid rgba(94, 255, 244, 0.28);
}
.process-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 4px;
}
.process-head h3 {
  margin: 0;
  color: #5efff4;
  font-size: 18px;
  font-weight: 700;
}
.process-close {
  min-width: 64px;
}
.process-layout {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 14px;
  padding: 8px 14px 16px;
  min-height: 0;
}
.process-main { min-width: 0; }
.process-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  margin-bottom: 10px;
  background: #c44b4b;
  color: #fff;
}
.process-banner--run { background: #1a8a6a; }
.process-banner--human { background: #c47a2a; }
.process-banner--idle { background: #8a7a2a; }
.process-banner--off { background: #4a5a6a; }
.process-banner--fault { background: #c44b4b; }
.process-gauges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.process-gauge, .process-time {
  background: rgba(6, 22, 44, 0.72);
  border: 1px solid rgba(120, 230, 255, 0.2);
  border-radius: 10px;
  padding: 10px 12px 12px;
}
.process-gauge h4, .process-time h4, .process-side h4 {
  margin: 0 0 6px;
  color: #d7ecfa;
  font-size: 13px;
}
.process-live { margin: 0 0 8px; color: #9ec3dc; font-size: 12px; }
.process-live b { color: #ffe494; font-size: 14px; }
.process-speed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.process-speed-value {
  font-size: 42px;
  font-weight: 800;
  color: #eaf6ff;
  min-width: 80px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.process-step {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(94, 255, 244, 0.3);
  background: rgba(20, 60, 100, 0.5);
  color: #5efff4;
  cursor: not-allowed;
  opacity: 0.55;
}
.process-caption, .process-note { color: #8cb4d4; font-size: 11px; margin: 6px 0 0; }
.process-target { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #9ec3dc; font-size: 12px; }
.process-target input {
  width: 110px;
  text-align: center;
  background: #12304e;
  border: 1px solid #2a6a8a;
  color: #5efff4;
  border-radius: 6px;
  padding: 4px 6px;
  font-weight: 700;
}
.process-yarn {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.process-yarn-item {
  background: rgba(8, 28, 52, 0.7);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  color: #9ec3dc;
  font-size: 12px;
}
.process-yarn-item b { display: block; margin-top: 4px; color: #cfe6f7; }
.process-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.process-time--stop { border-color: rgba(255, 207, 122, 0.45); }
.process-time--stop p { color: #ffcf7a; font-size: 22px; font-weight: 800; margin: 0; text-align: center; }
.process-time--remain { border-color: rgba(94, 255, 244, 0.35); }
.process-time--remain p { color: #5efff4; font-size: 22px; font-weight: 800; margin: 0; text-align: center; }
.process-orders { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.process-order {
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(94, 255, 244, 0.3);
  background: rgba(16, 48, 80, 0.7);
  color: #cfe6f7;
  font-size: 12px;
}
.process-order.is-on { border-color: #5efff4; color: #5efff4; }
.process-order.is-empty { opacity: 0.45; }
.process-action {
  display: block;
  width: 60%;
  margin: 8px auto 0;
  padding: 8px 16px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(180deg, #2a7cb8, #165888);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.process-side {
  border-left: 1px solid rgba(120, 230, 255, 0.15);
  padding-left: 10px;
  min-height: 0;
}
.process-machine-list {
  overflow: auto;
  max-height: calc(var(--vh, 1vh) * 58);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.process-machine {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #cfe6f7;
  font-size: 12px;
  cursor: pointer;
}
.process-machine:hover { background: rgba(30, 80, 120, 0.45); }
.process-machine.is-on { background: rgba(20, 90, 130, 0.7); color: #5efff4; }

/* ---- 今日排机排班 ---- */
.modal--schedule {
  width: min(1180px, calc(var(--vw, 1vw) * 96));
  max-height: calc(var(--vh, 1vh) * 92);
}
.schedule-body { padding: 8px 16px 16px; overflow: auto; max-height: calc(calc(var(--vh, 1vh) * 92) - 56px); }
.schedule-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.schedule-drop {
  border: 1px dashed rgba(94, 255, 244, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
  background: rgba(8, 28, 52, 0.4);
  margin-bottom: 10px;
}
.schedule-drop.is-over { border-color: #5efff4; background: rgba(20, 70, 110, 0.45); }
.schedule-gen {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-bottom: 10px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(94, 255, 244, 0.25); background: rgba(8, 28, 52, 0.35);
}
.schedule-gen-title { font-size: 14px; }
.schedule-gen-field { display: inline-flex; align-items: center; gap: 6px; }
.schedule-gen-field select, .schedule-gen-field input { height: 30px; padding: 0 8px; border-radius: 6px; }
.schedule-gen .site-cfg-hint { flex-basis: 100%; margin: 0; }
body.is-admin-page .admin-main .schedule-gen { border-color: #d6e0f5; background: #f5f8ff; }
body.is-admin-page .admin-main .schedule-gen-title { color: #1f3a8a; }
body.is-admin-page .admin-main .schedule-gen-field select,
body.is-admin-page .admin-main .schedule-gen-field input { border: 1px solid #c9d3e3; background: #fff; color: #1e293b; }
body.is-admin-page .admin-main .schedule-gen-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 8px;
  background: #1f5eff; color: #fff !important; font-weight: 600; text-decoration: none;
}
.schedule-file-link { color: #5efff4; cursor: pointer; text-decoration: underline; }
.schedule-msg { margin: 0 0 8px; color: #ffcf7a; }
.schedule-msg.is-ok { color: #52f0c4; }
.schedule-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.schedule-board, .schedule-mobile, .schedule-orders, .schedule-edit {
  background: rgba(8, 28, 52, 0.45);
  border: 1px solid rgba(120, 230, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
}
.schedule-board h4, .schedule-mobile h4, .schedule-orders h4, .schedule-edit h4 {
  margin: 0 0 8px;
  color: #eaf6ff;
}
.schedule-row {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 230, 255, 0.1);
  font-size: 13px;
  color: #cfe6f7;
}
.schedule-row button { font-size: 11px; }
.schedule-machines { line-height: 1.45; }
.schedule-chip {
  display: inline-block;
  margin: 0 3px 3px 0;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(20, 60, 90, 0.7);
}
.schedule-chip.ok { color: #52f0c4; }
.schedule-chip.fault { color: #ff9ca2; }
.schedule-chip.human { color: #ffcf7a; }
.schedule-chip.off { color: #8cb4d4; }
.schedule-lower { display: grid; grid-template-columns: 280px 1fr; gap: 12px; margin-top: 12px; }
.schedule-qr-wrap { display: flex; gap: 12px; align-items: flex-start; }
.schedule-urls { margin: 0; padding-left: 18px; color: #9ec3dc; font-size: 12px; word-break: break-all; }
.schedule-edit { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.schedule-edit h4 { width: 100%; }

@media (max-width: 1440px) {
  .stat-merge__lead { min-width: 80px; padding-right: 8px; }
  .stat-merge__item .num { font-size: 15px; }
}

/* ===== t30-t35: guides, shorter cards, header, wall status, schedule tabs, kanban, logo brief ===== */
.algo-frame { margin: 0 0 8px; }
.algo-pipe { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.algo-step {
  min-width: 88px;
  max-width: 160px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(12,36,64,0.92) 40%, #0a2340 100%);
  border: 1px solid rgba(130,210,255,0.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 8px 16px rgba(0,8,20,0.28);
  color: #eaf6ff;
}
.algo-step b { display: block; font-size: 12px; }
.algo-step span { display: block; margin-top: 2px; font-size: 10px; color: #9ec3dc; }
.algo-arrow { color: #7ed8ff; font-size: 16px; font-weight: 700; }
.index-guide-lead { margin: 0; font-size: 12px; line-height: 1.55; color: #d5e8f8; }

.head-exports--edge { margin-left: auto; justify-content: flex-end; }

.wb-card-op-health {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  grid-column: 1 / -1;
  padding: 0 2px 1px;
}
.wb-card-op-health .wb-card-op { flex: 1 1 auto; min-width: 0; }
.wb-card-op-health .wb-insight {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 10px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
}
#machineCardGrid .machine-card .wb-card-head { padding: 5px 6px 4px; }
#machineCardGrid .machine-card .wb-card-body { padding: 4px 6px 6px; }
#machineCardGrid .machine-card .wb-row { padding: 1px 4px; }
#machineCardGrid .machine-card .wb-split { margin-top: 4px; }
#machineCardGrid .machine-card .wb-kv-table { margin-bottom: 3px; }

.stats-row__group.stat-merge {
  display: flex;
  align-items: stretch;
  min-height: 74px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 38%),
    linear-gradient(180deg, #102a48 0%, #0b1d33 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    inset 0 -2px 0 rgba(0,0,0,0.25),
    0 10px 22px rgba(0,6,16,0.38);
  border: 1px solid rgba(130,210,255,0.35);
  transform: translateZ(0);
}
.stat-merge__lead,
.stat-merge__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 0;
}
.stat-merge__item .value {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
  gap: 2px;
}
.stat-merge__item .num { white-space: nowrap; }
.stat-merge__item .unit {
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: 1px;
}
.stat-merge__item.ok { box-shadow: inset 0 -3px 0 #22c55e; }
.stat-merge__item.ok .num { color: #52f0c4; text-shadow: 0 0 10px rgba(82,240,196,0.35); }
.stat-merge__item.fault { box-shadow: inset 0 -3px 0 #ef4444; }
.stat-merge__item.fault .num { color: #ff9ca2; text-shadow: 0 0 10px rgba(239,68,68,0.35); }
.stat-merge__item.human { box-shadow: inset 0 -3px 0 #e98998; }
.stat-merge__item.human .num { color: #f6c4cc; }
.stat-merge__item.warn { box-shadow: inset 0 -3px 0 #f4c430; }
.stat-merge__item.warn .num { color: #ffe494; }
.stat-merge__item.off { box-shadow: inset 0 -3px 0 #64748b; }
.stat-merge__item.off .num { color: #8cb4d4; }

.dl-chip { display: inline-flex; align-items: center; gap: 5px; }
.dl-ico {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  flex: 0 0 14px;
  position: relative;
}
.dl-ico-run { background: #22c55e; clip-path: polygon(18% 8%, 92% 50%, 18% 92%); }
.dl-ico-stop_human { background: #e98998; border-radius: 50% 50% 40% 40%; }
.dl-ico-stop_nonhuman { background: #ef4444; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.dl-ico-unlinked { background: #7dd3fc; border-radius: 50%; box-shadow: inset 0 0 0 3px #0b1d33, inset 0 1px 0 rgba(255,255,255,0.35); }
.dl-ico-offline { background: #64748b; }
.dl-ico-idle { background: #f4c430; border-radius: 2px; }
.dl-sort {
  margin-left: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(8,24,44,0.55);
  color: #d5e8f8;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
}
.dl-sort.is-on, .dl-chip.is-exclusive .dl-sort { border-color: #5efff4; color: #5efff4; }
.wall-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  margin: 0 0 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(8,24,44,0.8));
  border: 1px solid rgba(130,210,255,0.28);
}
.wall-sum-title { font-size: 11px; color: #9ec3dc; margin-right: 6px; }
.wall-sum-item { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 8px; background: rgba(8,24,44,0.7); font-size: 11px; color: #eaf6ff; }
.wall-sum-item.is-on { outline: 1px solid #5efff4; }
.wall-status-tip { max-width: 280px; padding: 8px 10px; line-height: 1.45; }
.wall-status-tip strong { display: block; margin-bottom: 2px; }
.wall-status-tip span { display: block; color: #d5e8f8; font-size: 11px; }

.schedule-tabs { display: flex; gap: 8px; padding: 8px 14px 0; }
.schedule-tab {
  flex: 1 1 0;
  min-height: 40px;
  border: 1px solid rgba(130,210,255,0.35);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), #0d2744);
  color: #d5e8f8;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 8px 16px rgba(0,0,0,0.25);
  cursor: pointer;
}
.schedule-tab.is-on { color: #062016; background: linear-gradient(180deg, #9ff6dd, #52f0c4); border-color: #52f0c4; }
.schedule-pane-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.schedule-card {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(8,24,44,0.9));
  border: 1px solid rgba(130,210,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 20px rgba(0,0,0,0.25);
}
.schedule-pane[hidden], .wall-status-summary[hidden] { display: none !important; }

.modal--kanban { width: min(1180px, calc(var(--vw, 1vw) * 96)); max-height: calc(var(--vh, 1vh) * 92); }
.modal--kanban header { display: flex; align-items: center; gap: 10px; }
.kanban-plants { display: flex; gap: 6px; margin-left: auto; }
.kanban-plant, .kanban-headline { color: #d5e8f8; }
.kanban-plant {
  border: 1px solid rgba(130,210,255,0.35);
  border-radius: 8px;
  background: #0d2744;
  padding: 4px 10px;
  cursor: pointer;
}
.kanban-plant.is-on { background: linear-gradient(180deg, #9ff6dd, #52f0c4); color: #062016; font-weight: 700; }
.kanban-headline { margin: 8px 14px; font-size: 13px; }
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  padding: 8px 14px 16px;
  overflow: auto;
}
.kanban-tile {
  border-radius: 12px;
  padding: 8px 10px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 10px 18px rgba(0,0,0,0.28);
  min-height: 112px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kanban-tile header { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.kanban-id { font-size: 14px; letter-spacing: 0.02em; white-space: nowrap; }
.kanban-st { font-size: 11px; opacity: 0.95; }
.kanban-shift { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.kanban-shift span { opacity: 0.85; }
.kanban-tile footer { margin-top: auto; font-size: 11px; opacity: 0.9; }
.kanban-tile.tone-ok, .kanban-tile.tone-running, .kanban-tile.tone-normal {
  background: linear-gradient(152deg, #15803d 0%, #22c55e 55%, #4ade80 100%);
}
.kanban-tile.tone-fault { background: linear-gradient(152deg, #b91c1c 0%, #dc2626 42%, #ef4444 100%); }
.kanban-tile.tone-human, .kanban-tile.tone-door { background: linear-gradient(152deg, #c75b6e 0%, #e98998 48%, #f6c4cc 100%); color: #3b1020; }
.kanban-tile.tone-idle, .kanban-tile.tone-maint { background: linear-gradient(152deg, #b88a06 0%, #d9a40a 44%, #f4c430 100%); color: #2a1c00; }
.kanban-tile.tone-offline, .kanban-tile.tone-stop { background: linear-gradient(152deg, #334155 0%, #475569 52%, #64748b 100%); }
.kanban-empty { margin: 24px; color: #9ec3dc; }

.logo-brief-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.logo-kpi {
  padding: 10px 10px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), #0c2340);
  border: 1px solid rgba(130,210,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 16px rgba(0,0,0,0.25);
  min-width: 0;
}
.logo-kpi-label { display: block; font-size: 11px; color: #9ec3dc; }
.logo-kpi-value { display: block; font-size: 16px; color: #eaf6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-kpi.ok { box-shadow: inset 0 -3px 0 #22c55e, inset 0 1px 0 rgba(255,255,255,0.22); }
.logo-kpi.ok .logo-kpi-value { color: #52f0c4; }
.logo-kpi.fault { box-shadow: inset 0 -3px 0 #ef4444, inset 0 1px 0 rgba(255,255,255,0.22); }
.logo-kpi.fault .logo-kpi-value { color: #ff9ca2; }
.logo-kpi.human { box-shadow: inset 0 -3px 0 #e98998, inset 0 1px 0 rgba(255,255,255,0.22); }
.logo-kpi.warn { box-shadow: inset 0 -3px 0 #f4c430, inset 0 1px 0 rgba(255,255,255,0.22); }
.logo-kpi.warn .logo-kpi-value { color: #ffe494; }
.logo-kpi.off { box-shadow: inset 0 -3px 0 #64748b, inset 0 1px 0 rgba(255,255,255,0.22); }
.logo-floors { display: flex; gap: 8px; margin: 0 0 10px; }
.logo-floor { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(8,24,44,0.8); font-size: 12px; color: #eaf6ff; }
.logo-floor .ok { color: #52f0c4; }
.logo-floor .fault { color: #ff9ca2; }
.logo-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.logo-table th, .logo-table td { padding: 5px 8px; border-bottom: 1px solid rgba(130,210,255,0.16); text-align: left; }
.logo-nowrap { white-space: nowrap; }
.logo-muted, .logo-anom-count { color: #9ec3dc; font-size: 12px; }
.modal--logo-brief { width: min(860px, calc(var(--vw, 1vw) * 94)); }

/* ===== t36-t42: sort control, gantt palette, process, schedule stages, kanban window, header KPIs, plant snapshot ===== */

.dl-chip-wrap {
  display: inline-flex;
  align-items: stretch;
  gap: 5px;
  margin: 0 4px 6px 0;
}
.dl-sort-cycle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 3px 6px 4px;
  border-radius: 8px;
  border: 1px solid rgba(130, 210, 255, 0.35);
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, #0c2748 42%, #081c33 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 6px 12px rgba(0,8,20,0.35);
  color: #eaf6ff;
  cursor: pointer;
  line-height: 1.1;
}
.dl-sort-cycle:hover { border-color: #7ed8ff; color: #fff; }
.dl-sort-cycle.is-on {
  border-color: #5efff4;
  color: #062016;
  background: linear-gradient(180deg, #b8fff0, #52f0c4);
}
.dl-sort-glyph { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.dl-sort-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.dl-sort-bars i {
  width: 3px;
  display: block;
  border-radius: 1px;
  background: currentColor;
}
.dl-sort-glyph[data-mode="machine"] .dl-sort-bars i:nth-child(1) { height: 6px; }
.dl-sort-glyph[data-mode="machine"] .dl-sort-bars i:nth-child(2) { height: 10px; }
.dl-sort-glyph[data-mode="machine"] .dl-sort-bars i:nth-child(3) { height: 8px; }
.dl-sort-glyph[data-mode="desc"] .dl-sort-bars i:nth-child(1) { height: 12px; }
.dl-sort-glyph[data-mode="desc"] .dl-sort-bars i:nth-child(2) { height: 8px; }
.dl-sort-glyph[data-mode="desc"] .dl-sort-bars i:nth-child(3) { height: 4px; }
.dl-sort-glyph[data-mode="asc"] .dl-sort-bars i:nth-child(1) { height: 4px; }
.dl-sort-glyph[data-mode="asc"] .dl-sort-bars i:nth-child(2) { height: 8px; }
.dl-sort-glyph[data-mode="asc"] .dl-sort-bars i:nth-child(3) { height: 12px; }
.dl-sort-mark { font-size: 9px; font-weight: 800; margin-left: 2px; }
.dl-sort-caption { font-size: 10px; font-weight: 700; margin-top: 2px; letter-spacing: 0; white-space: nowrap; }

.wall-status-gantt .dg-track,
#wallStatusGantt .dg-track {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 8px),
    #071422;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
  border: 1px solid rgba(90, 150, 190, 0.22);
}
#wallStatusGantt .dg-seg[data-kind="run"],
.wall-status-gantt .dg-seg[data-kind="run"] {
  background: linear-gradient(180deg, #8ef6d8 0%, #22c55e 48%, #15803d 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 0 0 1px rgba(82,240,196,0.35);
}
#wallStatusGantt .dg-seg[data-kind="idle"],
.wall-status-gantt .dg-seg[data-kind="idle"] {
  background: linear-gradient(180deg, #ffe894 0%, #f4c430 52%, #b8860b 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 1px rgba(244,196,48,0.45);
}
#wallStatusGantt .dg-seg[data-kind="offline"],
.wall-status-gantt .dg-seg[data-kind="offline"] {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 55%, #334155 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 0 1px rgba(140,180,212,0.3);
}
#wallStatusGantt .dg-seg[data-kind="unlinked"],
.wall-status-gantt .dg-seg[data-kind="unlinked"] {
  background: linear-gradient(180deg, #c4b5fd 0%, #8b5cf6 48%, #6d28d9 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 1px rgba(196,181,253,0.4);
}
#wallStatusGantt .dg-seg[data-kind="stop"][data-category="human"],
.wall-status-gantt .dg-seg[data-kind="stop"][data-category="human"] {
  background: linear-gradient(180deg, #f8c9d0 0%, #e98998 50%, #be5464 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 1px rgba(233,137,152,0.45);
}
#wallStatusGantt .dg-seg[data-kind="stop"],
.wall-status-gantt .dg-seg[data-kind="stop"],
#wallStatusGantt .dg-seg[data-kind="stop"][data-category="mixed"],
#wallStatusGantt .dg-seg[data-kind="stop"][data-category="nonhuman"],
.wall-status-gantt .dg-seg[data-kind="stop"][data-category="mixed"],
.wall-status-gantt .dg-seg[data-kind="stop"][data-category="nonhuman"] {
  background: linear-gradient(180deg, #ff9ca2 0%, #ef4444 50%, #b91c1c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 0 1px rgba(239,68,68,0.4);
}

.process-head { align-items: flex-start; }
.process-head-titles { min-width: 0; }
.process-live-hint {
  margin: 4px 0 0;
  color: #9ee9ff;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.modal--process {
  width: min(1080px, calc(var(--vw, 1vw) * 96));
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 28%),
    linear-gradient(180deg, #1a4470 0%, #0b2744 52%, #07182c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 24px 48px rgba(0,0,0,0.45);
  border: 1px solid rgba(130, 230, 255, 0.35);
}
.process-banner {
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 8px 18px rgba(0,0,0,0.28);
  min-height: 48px;
  font-size: 16px;
}
.process-gauge, .process-time, .process-yarn-item, .process-side {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(8,24,44,0.92) 42%, #07182c 100%);
  border: 1px solid rgba(130, 210, 255, 0.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 12px 22px rgba(0,8,20,0.32);
  border-radius: 14px;
}
.process-speed-value {
  font-size: 52px;
  color: #f4fbff;
  text-shadow: 0 2px 0 rgba(255,255,255,0.15), 0 10px 20px rgba(0,0,0,0.35);
}
.process-live b, .process-time p {
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.process-yarn-item b { color: #9ec3dc; font-size: 16px; letter-spacing: 0.04em; }
.process-machine {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(8,24,44,0.65));
}
.process-machine.is-on {
  border-color: rgba(94,255,244,0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 0 0 1px rgba(94,255,244,0.2);
}
.process-order {
  min-height: 40px;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.process-order.is-on { box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 0 1px #5efff4; }
.process-step[disabled] { cursor: not-allowed; }

.schedule-stage-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.schedule-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  min-height: 64px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(130,210,255,0.3);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), #0d2744);
  color: #d5e8f8;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 16px rgba(0,0,0,0.25);
  cursor: pointer;
}
.schedule-stage.is-on {
  color: #062016;
  background: linear-gradient(180deg, #b8fff0, #52f0c4);
  border-color: #52f0c4;
}
.schedule-stage-num {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: rgba(0,0,0,0.18);
}
.schedule-stage-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.schedule-stage-text b { font-size: 14px; }
.schedule-stage-text small { font-size: 11px; opacity: 0.85; }
.schedule-stage-pane[hidden] { display: none !important; }
.schedule-import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.schedule-board, .schedule-edit, .schedule-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 22px rgba(0,0,0,0.28);
}

#modalShopKanban.show {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  padding: 0;
  margin: 0;
  background: #061018;
}
#modalShopKanban.show .modal--kanban {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07) 0%, transparent 20%),
    linear-gradient(180deg, #12345a 0%, #0a1f38 40%, #061018 100%);
  border: 0;
  box-shadow: none;
}
.kanban-window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(130,210,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(8,24,44,0.4));
}
.kanban-window-bar h3 {
  margin: 0;
  color: #f4fbff;
  font-size: 20px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.kanban-window-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.kanban-win-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(130,210,255,0.35);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), #0d2744);
  color: #eaf6ff;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 12px rgba(0,0,0,0.28);
  font-weight: 700;
}
.kanban-win-btn svg { width: 18px; height: 18px; display: block; }
.kanban-win-btn:hover { border-color: #7ed8ff; color: #fff; }
.kanban-win-btn--close { border-color: rgba(255,150,150,0.45); }
.kanban-win-btn--close:hover { background: linear-gradient(180deg, #ffb4b4, #ef4444); color: #3b0a0a; }
.kanban-zoom-label {
  min-width: 48px;
  text-align: center;
  color: #9ee9ff;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.kanban-plant {
  min-height: 36px;
  padding: 4px 14px;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
  font-weight: 700;
}
.kanban-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 16px 8px;
}
.kanban-headline {
  margin: 0;
  font-size: 15px;
  color: #f4fbff;
  font-weight: 700;
}
.kanban-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.kanban-filter {
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(130,210,255,0.3);
  background: rgba(8,24,44,0.75);
  color: #eaf6ff;
  cursor: pointer;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.kanban-filter.is-on { outline: 2px solid #5efff4; color: #fff; }
.kanban-filter[data-kanban-filter="running"].is-on { background: #15803d; }
.kanban-filter[data-kanban-filter="fault"].is-on { background: #b91c1c; }
.kanban-filter[data-kanban-filter="human"].is-on { background: #be5464; }
.kanban-filter[data-kanban-filter="idle"].is-on { background: #b8860b; color: #1c1400; }
.kanban-filter[data-kanban-filter="offline"].is-on { background: #475569; }
.kanban-sort-cycle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 10px;
  border: 1px solid rgba(130,210,255,0.35);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), #0d2744);
  color: #eaf6ff;
  cursor: pointer;
  font-weight: 700;
}
.kanban-sort-glyph { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.kanban-sort-glyph i { width: 3px; background: currentColor; border-radius: 1px; display: block; }
.kanban-sort-glyph i:nth-child(1) { height: 6px; }
.kanban-sort-glyph i:nth-child(2) { height: 10px; }
.kanban-sort-glyph i:nth-child(3) { height: 8px; }
.kanban-stage { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 16px 20px; }
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 0;
  zoom: var(--kanban-zoom, 1);
}
.kanban-tile {
  position: relative;
  min-height: 132px;
  padding: 12px 12px 10px;
  border-radius: 16px;
  overflow: hidden;
  color: #fff;
  transform: translateZ(0);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    inset 0 -2px 0 rgba(0,0,0,0.22),
    0 14px 24px rgba(0,0,0,0.32);
}
.kanban-tile .kanban-accent {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  background: rgba(255,255,255,0.45);
}
.kanban-id { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.kanban-st { font-size: 12px; font-weight: 700; white-space: nowrap; }
.kanban-shift { font-size: 13px; }
.kanban-shift.is-empty b { opacity: 0.75; font-weight: 600; }
.kanban-tile footer { font-size: 12px; font-variant-numeric: tabular-nums; }

.stats-row::before { flex: 0 0 0 !important; width: 0 !important; max-width: 0 !important; min-width: 0 !important; content: none !important; }
.stats-row { overflow-x: hidden !important; }
.stats-row__group.stat-merge {
  min-height: 90px;
  padding: 8px 14px;
}
.stat-merge__lead { min-width: 108px; cursor: pointer; }
.stat-merge__lead:hover, .stat-merge__lead:focus { background: rgba(255,255,255,0.06); }
.stat-merge__kicker {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #eaf6ff !important;
  letter-spacing: 0.03em;
}
.stat-merge__total .num {
  font-size: 28px !important;
  font-weight: 800;
  color: #f4fbff !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25), 0 8px 16px rgba(0,0,0,0.35);
}
.stat-merge__total .unit { font-size: 12px !important; color: #cfe6f7 !important; }
.stat-merge__item {
  padding: 6px 6px 7px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(8,24,44,0.35));
}
.stat-merge__item[data-fleet-filter] { cursor: pointer; }
.stat-merge__item[data-fleet-filter]:hover,
.stat-merge__item:focus {
  border-color: rgba(94,255,244,0.55);
  background: rgba(20,70,110,0.55);
  transform: translateY(-1px);
}
.stat-merge__item .label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #eaf6ff !important;
  overflow: visible;
  text-overflow: clip;
}
.stat-merge__item .value {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap !important;
  margin-top: 2px;
}
.stat-merge__item .num {
  font-size: 22px !important;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.35);
}
.stat-merge__item .unit {
  font-size: 12px !important;
  color: #d5e8f8 !important;
  white-space: nowrap !important;
  flex: 0 0 auto;
}
.stat-merge__item.is-wide .num { font-size: 16px !important; letter-spacing: -0.03em; }
.stat-merge__item.ok .num { color: #52f0c4 !important; text-shadow: 0 0 10px rgba(82,240,196,0.35); }
.stat-merge__item.fault .num { color: #ff9ca2 !important; }
.stat-merge__item.human .num { color: #f6c4cc !important; }
.stat-merge__item.warn .num { color: #ffe494 !important; }
.stat-merge__item.off .num { color: #8cb4d4 !important; }
@media (max-width: 1440px) {
  .stat-merge__item .num { font-size: 18px !important; }
  .stat-merge__item.is-wide .num { font-size: 15px !important; }
  .stat-merge__total .num { font-size: 24px !important; }
}

#modalLogoBrief .modal.modal--logo-brief {
  width: min(1180px, calc(var(--vw, 1vw) * 96));
  max-height: min(calc(var(--vh, 1vh) * 90), 960px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 24%),
    linear-gradient(180deg, #163a62 0%, #0b2744 55%, #07182c 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 24px 48px rgba(0,0,0,0.45);
}
/* t65: restore logo hover tip; visibility is toggled with [hidden] */
.snap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.snap-meter {
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.1), rgba(8,24,44,0.92));
  border: 1px solid rgba(130,210,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 12px 20px rgba(0,0,0,0.28);
  color: #eaf6ff;
  min-height: 108px;
}
.snap-meter span, .snap-meter-label { display: block; font-size: 12px; font-weight: 700; color: #d5e8f8; }
.snap-meter strong { display: block; margin: 6px 0 2px; font-size: 28px; letter-spacing: -0.02em; text-shadow: 0 1px 0 rgba(255,255,255,0.18); }
.snap-meter small { color: #9ec3dc; font-size: 11px; }
.snap-meter.is-empty strong { font-size: 20px; color: #9ec3dc; }
.snap-meter-track { margin-top: 10px; height: 10px; border-radius: 999px; background: rgba(0,0,0,0.35); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
.snap-meter-track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #52f0c4, #7ed8ff); }
.snap-panels { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; margin-bottom: 16px; }
.snap-panel {
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(8,24,44,0.9));
  border: 1px solid rgba(130,210,255,0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 18px rgba(0,0,0,0.25);
}
.snap-panel h4 { margin: 0 0 10px; color: #f4fbff; font-size: 15px; }
.snap-stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: #071422; margin-bottom: 10px; }
.snap-stack i { display: block; height: 100%; }
.snap-legend { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: #d5e8f8; }
.logo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.logo-table th, .logo-table td { padding: 7px 8px; border-bottom: 1px solid rgba(130,210,255,0.16); text-align: left; vertical-align: top; }
.logo-table th { color: #9ec3dc; font-weight: 700; }
.logo-nowrap { white-space: nowrap; }
.logo-muted { color: #9ec3dc; }
@media (max-width: 900px) {
  .snap-grid, .snap-panels, .schedule-import-grid, .schedule-stage-nav { grid-template-columns: 1fr; }
}
/* t42-human-fix */

#wallStatusGantt .dg-seg[data-kind="stop"][data-category="human"],
.wall-status-gantt .dg-seg[data-kind="stop"][data-category="human"] {
  background: linear-gradient(180deg, #f8c9d0 0%, #e98998 50%, #be5464 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 1px rgba(233,137,152,0.45);
}

/* ===== t47-t55: kanban dash, single sort, caption row, gantt params, shorter bottom panes ===== */
.wall-status-title,
#wallStatusNote,
.wall-status-note { display: none !important; }

.downtime-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.dl-sort-cycle--alone {
  margin-left: 28px;
  margin-right: 0;
}
.dl-legend-gap {
  width: 22px;
  flex: 0 0 22px;
  height: 1px;
}

.site-cfg-gantt-params {
  margin: 16px 0 8px;
  padding: 12px 14px 8px;
  border-radius: 10px;
  border: 1px solid rgba(130, 200, 230, 0.25);
  background: linear-gradient(180deg, rgba(18, 48, 82, 0.55), rgba(8, 24, 44, 0.7));
}
.site-cfg-gantt-params strong {
  display: block;
  margin: 0 0 6px;
  color: #e8f6ff;
  font-size: 14px;
}
.site-cfg-gantt-params .site-cfg-field { margin-top: 8px; }
.site-cfg-gantt-params input[type="number"] {
  width: 8em;
  margin-top: 4px;
}

.kanban-dash {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.kanban-dash-card {
  position: relative;
  padding: 12px 14px 14px;
  border-radius: 12px;
  border: 1px solid rgba(140, 210, 240, 0.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(10, 32, 60, 0.55) 38%, rgba(6, 18, 36, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 18px rgba(0,8,20,0.35);
  color: #eaf6ff;
  min-width: 0;
}
.kanban-dash-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #9ed4ef;
  font-weight: 700;
}
.kanban-dash-kpi {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 6px;
}
.kanban-dash-kpi b {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
.kanban-dash-kpi span { font-size: 12px; color: #b9d7ea; }
.kanban-dash-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
  margin: 6px 0 8px;
}
.kanban-dash-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3ee0a4, #18c56a);
  box-shadow: 0 0 8px rgba(62, 224, 164, 0.45);
}
.kanban-dash-bar.is-warn > i { background: linear-gradient(90deg, #ffd36a, #e2a014); }
.kanban-dash-bar.is-bad > i { background: linear-gradient(90deg, #ff8b7a, #e11d48); }
.kanban-dash-meta, .kanban-dash-miss {
  margin: 0;
  font-size: 12px;
  color: #9ec3dc;
  line-height: 1.45;
}
.kanban-dash-miss { color: #8aa0b5; }
.kanban-dash-ex {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 0;
}
.kanban-dash-ex b {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 1100px) {
  .kanban-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== t56: 机台状态默认按 130% 字号/行高重排，不依赖浏览器缩放，不撑出整页横滚 ===== */
#wallStatusPane.wall-status-pane {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  padding: 8px 10px 10px;
  min-width: 0;
}
#wallStatusPane .downtime-legend {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  font-size: 16px;
  gap: 8px 8px;
  align-items: center;
}
#wallStatusPane .wall-status-toolbar {
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
}
#wallStatusPane .wall-status-summary {
  grid-column: 1 / -1;
  grid-row: 2;
  padding: 8px 10px;
  gap: 10px;
}
#wallStatusPane #wallStatusGantt,
#wallStatusPane #wallStatusEmpty {
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  min-height: 0;
}
#wallStatusPane #wallStatusGantt {
  overflow: auto;
}
#wallStatusPane .downtime-legend button.dl-chip {
  padding: 7px 13px;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
}
#wallStatusPane .dl-ico,
#wallStatusPane .downtime-legend i {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
#wallStatusPane .dl-sort-cycle--alone {
  margin-left: 32px;
  min-width: 70px;
  padding: 5px 10px 6px;
}
#wallStatusPane .dl-sort-caption { font-size: 13px; }
#wallStatusPane .dl-sort-mark { font-size: 11px; }
#wallStatusPane .dl-sort-glyph { height: 18px; }
#wallStatusPane .dl-sort-bars { height: 16px; }
#wallStatusPane .dl-sort-bars i { width: 4px; }
#wallStatusPane .wall-mq-input {
  width: 11.2em;
  min-width: 11.2em;
  max-width: 11.2em;
  height: 36px;
  font-size: 15px;
}
#wallStatusPane .wall-mq-btn,
#wallStatusPane #wallStatusRefresh {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
}
#wallStatusPane .wall-sum-title,
#wallStatusPane .wall-sum-item { font-size: 14px; }
#wallStatusPane .wall-sum-item { padding: 5px 10px; }
#wallStatusPane #wallStatusGantt .downtime-gantt-head,
#wallStatusPane #wallStatusGantt .downtime-gantt-row {
  grid-template-columns: 166px var(--dg-track-w, minmax(640px, 1fr));
}
#wallStatusPane #wallStatusGantt .downtime-gantt-head {
  font-size: 14px;
}
#wallStatusPane #wallStatusGantt .dg-date { font-size: 16px; }
#wallStatusPane #wallStatusGantt .dg-sort { font-size: 14px; padding: 3px 8px; }
#wallStatusPane #wallStatusGantt .downtime-gantt-head .dg-label,
#wallStatusPane #wallStatusGantt .downtime-gantt-row .dg-label {
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 700;
}
#wallStatusPane #wallStatusGantt .dg-track {
  height: 39px;
  margin: 8px 0;
  border-radius: 8px;
}
#wallStatusPane #wallStatusGantt .dg-axis { min-height: 44px; }
#wallStatusPane #wallStatusGantt .dg-hours { height: 23px; }
#wallStatusPane #wallStatusGantt .dg-hour { font-size: 14px; }
#wallStatusPane .wall-status-tip { font-size: 15px; max-width: 360px; }
#wallStatusPane .wall-status-tip span { font-size: 14px; }

#wallStatusPane .wall-sum-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  font-size: 14px;
}
#wallStatusPane .wall-sum-title strong {
  color: #5efff4;
  font-size: 16px;
}
#wallStatusPane .wall-sum-hint {
  color: #8fb4cc;
  font-weight: 500;
  font-size: 12px;
}
#wallStatusPane .wall-sum-clear {
  margin-left: auto;
  font-size: 13px;
}
#wallStatusGantt .downtime-gantt-row.is-selected {
  background: linear-gradient(90deg, rgba(94, 255, 244, 0.16), rgba(20, 80, 90, 0.12));
  box-shadow: inset 3px 0 0 #5efff4;
}
#wallStatusGantt .downtime-gantt-row.is-selected .dg-label {
  color: #042016;
  background: linear-gradient(180deg, #b8fff0, #52f0c4);
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
#wallStatusGantt .downtime-gantt-row.is-selected .dg-track {
  box-shadow: inset 0 0 0 2px rgba(94, 255, 244, 0.65), 0 0 12px rgba(94, 255, 244, 0.2);
}
#wallStatusGantt .downtime-gantt-row {
  cursor: pointer;
}



/* ===== t61-t65: cluster frame, wall context menu, gantt ruler labels, logo tip, overview tab ===== */
.algo-frame { width: 100%; }
.index-guide .algo-frame { margin: 0 0 10px; }
.index-guide [data-guide-panel] > h4:first-child { margin-top: 8px; }

.wall-ctx-menu {
  position: fixed;
  z-index: 120;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(130, 210, 255, 0.4);
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, #0c2748 42%, #081c33 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), 0 16px 32px rgba(0,8,20,0.5);
  color: #eaf6ff;
}
.wall-ctx-menu[hidden] { display: none !important; }
.wall-ctx-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eaf6ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.wall-ctx-menu button:hover,
.wall-ctx-menu button:focus {
  background: rgba(94, 255, 244, 0.16);
  color: #fff;
  outline: none;
}
#modalShiftSchedule .is-schedule-focus {
  outline: 1px solid rgba(94, 255, 244, 0.8);
  background: rgba(20, 80, 90, 0.28);
  border-radius: 8px;
}

#wallStatusPane #wallStatusGantt .downtime-gantt-head {
  z-index: 6;
  overflow: visible;
  background: rgba(8, 28, 52, 0.98);
  align-items: end;
  min-height: 76px;
}
#wallStatusPane #wallStatusGantt .dg-axis {
  min-height: 62px;
  padding: 6px 0 10px;
  overflow: visible;
  box-sizing: border-box;
}
#wallStatusPane #wallStatusGantt .dg-tick-rail {
  height: 16px;
  margin: 0 0 6px;
  border-bottom: 1px solid rgba(158, 195, 220, 0.45);
}
#wallStatusPane #wallStatusGantt .dg-hours {
  position: relative;
  height: 28px;
  overflow: visible;
}
#wallStatusPane #wallStatusGantt .dg-hour {
  font-size: 13px;
  line-height: 1.25;
  top: 0;
  z-index: 2;
  color: #d5e8f8;
  text-shadow: 0 1px 2px rgba(0, 8, 20, 0.85);
}
#wallStatusPane #wallStatusGantt .downtime-gantt-row:first-of-type .dg-track {
  margin-top: 10px;
}

.logo-brief-tip {
  display: block;
  pointer-events: none;
}
.logo-brief-tip[hidden] { display: none !important; }

#backendPaneStats .stats-pane--overview .stats-filters,
#backendPaneStats .stats-pane--overview #statsReportNote,
#backendPaneStats .stats-pane--overview #statsKpiHost,
#backendPaneStats .stats-pane--overview #statsChartHost,
#backendPaneStats .stats-pane--overview #statsLegend,
#backendPaneStats .stats-pane--overview #statsDetailBar,
#backendPaneStats .stats-pane--overview #statsGanttHost,
#backendPaneStats .stats-pane--overview #statsTableHost,
#backendPaneStats .stats-pane--overview #statsEmpty {
  display: none !important;
}
#statsOverviewHost {
  padding: 4px 0 16px;
}
#statsOverviewHost .snap-grid,
#statsOverviewHost .snap-panels {
  max-width: 100%;
}



/* t67: header yield strip keeps only today total revolutions */
.stat-merge--throughput {
  flex: 0 1 auto;
  min-width: 240px;
  max-width: 420px;
}
.stat-merge--throughput .stat-merge__items {
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 16px;
  padding-left: 8px;
}
.stat-merge--throughput .stat-merge__item {
  flex: 0 0 auto;
  min-width: 148px;
  padding: 6px 16px 7px;
}
.stat-merge--throughput .stat-merge__lead {
  min-width: 88px;
}


/* t69: cap header status/yield chip size so they do not grow into the title */
header.top-bar {
  column-gap: 20px;
  align-items: center;
}
.stats-row {
  justify-content: flex-end;
  gap: 10px;
  overflow-x: hidden !important;
  flex-wrap: nowrap;
}
.stats-row__group,
.stats-row__group.stat-merge {
  flex: 0 1 auto !important;
  width: auto;
  min-height: 64px;
  max-height: 76px;
  padding: 6px 10px;
}
.stat-merge--fleet {
  max-width: 680px;
}
.stat-merge--fleet .stat-merge__item {
  flex: 0 1 auto;
  max-width: 92px;
  min-width: 64px;
  padding: 4px 8px 5px;
}
.stat-merge--fleet .stat-merge__lead {
  max-width: 118px;
  min-width: 86px;
  padding-right: 10px;
}
.stat-merge--throughput {
  flex: 0 0 auto !important;
  min-width: 200px;
  max-width: 260px;
}
.stat-merge--throughput .stat-merge__item {
  max-width: 168px;
  min-width: 140px;
}


/* t71: duration totals sit under each top-row status chip; date stays in the summary line */
#wallStatusPane.wall-status-pane {
  align-items: start;
}
#wallStatusPane .downtime-legend {
  align-items: flex-start;
  flex-wrap: wrap;
  overflow-x: hidden;
}
#wallStatusPane .dl-chip-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 0;
}
#wallStatusPane .dl-chip-dur {
  display: block;
  min-height: 1.2em;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #eaf6ff;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}
#wallStatusPane .dl-chip-wrap.is-exclusive .dl-chip-dur,
#wallStatusPane .dl-chip-dur.is-on {
  color: #5efff4;
}
#wallStatusPane .dl-sort-cycle--alone {
  align-self: flex-start;
}
#wallStatusPane .wall-status-summary {
  align-items: center;
}


/* t74: unify header chip size to a slightly narrower 今日总圈数 */
header.top-bar {
  column-gap: 22px;
  align-items: center;
}
.stats-row {
  justify-content: flex-end;
  gap: 10px;
  overflow-x: hidden !important;
  flex-wrap: nowrap;
}
.stats-row__group,
.stats-row__group.stat-merge {
  flex: 0 0 auto !important;
  width: auto;
  min-height: 58px;
  max-height: 62px;
  padding: 4px 8px;
}
.stat-merge--fleet .stat-merge__item,
.stat-merge--fleet .stat-merge__lead,
.stat-merge--throughput .stat-merge__item {
  box-sizing: border-box;
  flex: 0 0 108px !important;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  padding: 3px 6px 4px;
  overflow: hidden;
}
.stat-merge--fleet { max-width: none; }
.stat-merge--throughput {
  flex: 0 0 auto !important;
  min-width: 0;
  max-width: none;
}
.stat-merge--throughput .stat-merge__lead {
  box-sizing: border-box;
  flex: 0 0 52px !important;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  padding: 3px 6px 4px 4px;
}
.stat-merge__kicker { font-size: 11px !important; }
.stat-merge__total .num,
.stat-merge--throughput .stat-merge__item .num { font-size: 20px !important; line-height: 1.05; }
.stat-merge__item { display: flex; flex-direction: column; justify-content: center; }

/* t75-t77: kanban restyle, no 未提供, merged KPIs, fill+loop wall */
#modalShopKanban.show .modal--kanban {
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(70, 160, 210, 0.16), transparent 55%),
    linear-gradient(180deg, #0a1c33 0%, #071526 42%, #06101e 100%);
  border: 1px solid rgba(140, 210, 240, 0.28);
  box-shadow: 0 24px 64px rgba(0, 6, 18, 0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}
.kanban-window-bar {
  background: linear-gradient(180deg, rgba(20, 48, 78, 0.95), rgba(8, 24, 44, 0.92));
  border-bottom: 1px solid rgba(130, 200, 230, 0.22);
}
.kanban-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 16px 8px;
}
.kanban-headline {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #e8f6ff;
  letter-spacing: 0.04em;
}
.kanban-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  width: 100%;
  margin: 2px 0 4px;
}
.kanban-dash-card {
  position: relative;
  min-width: 0;
  padding: 14px 16px 16px;
  border-radius: 14px;
  border: 1px solid rgba(150, 210, 240, 0.28);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(12, 36, 64, 0.55) 40%, rgba(6, 18, 36, 0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 10px 22px rgba(0, 8, 20, 0.35);
  color: #eaf6ff;
}
.kanban-dash-card h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #9ed4ef;
  font-weight: 700;
  text-transform: none;
}
.kanban-dash-kpi { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.kanban-dash-kpi b {
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
.kanban-dash-kpi span { font-size: 13px; color: #b9d7ea; }
.kanban-dash-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
  margin: 0 0 8px;
}
.kanban-dash-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3ee0a4, #18c56a);
  box-shadow: 0 0 8px rgba(62, 224, 164, 0.45);
}
.kanban-dash-bar.is-warn > i { background: linear-gradient(90deg, #ffd36a, #e2a014); }
.kanban-dash-bar.is-bad > i { background: linear-gradient(90deg, #ff8b7a, #e11d48); }
.kanban-dash-meta { margin: 0; font-size: 12px; color: #9ec3dc; line-height: 1.45; }
.kanban-dash-miss { display: none !important; }
.kanban-dash-ex { display: flex; flex-wrap: wrap; gap: 8px; }
.kanban-dash-ex b {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.10);
}
.kanban-dash-ex b.is-health { border-color: rgba(255, 196, 80, 0.45); color: #ffe7a8; }
.kanban-dash-ex b.is-risk { border-color: rgba(255, 120, 120, 0.5); color: #ffd0d0; }
.kanban-dash-ex b.is-odd { border-color: rgba(120, 200, 255, 0.45); color: #ccecff; }
.kanban-dash-crew {
  display: flex;
  gap: 18px;
}
.kanban-dash-crew div { display: flex; flex-direction: column; gap: 2px; }
.kanban-dash-crew span { font-size: 12px; color: #9ec3dc; }
.kanban-dash-crew b { font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.kanban-dash-crew em { font-style: normal; font-size: 12px; color: #b9d7ea; }
.kanban-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.kanban-filter {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(150, 206, 230, 0.28);
  background: linear-gradient(180deg, rgba(18, 48, 78, 0.95), rgba(8, 28, 52, 0.92));
  color: #eaf6ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 4px 10px rgba(0,0,0,0.25);
}
.kanban-filter.is-on { outline: 2px solid #5efff4; color: #fff; }
.kanban-filter[data-kanban-filter="running"].is-on { background: #15803d; }
.kanban-filter[data-kanban-filter="fault"].is-on { background: #b91c1c; }
.kanban-filter[data-kanban-filter="human"].is-on { background: #be5464; }
.kanban-filter[data-kanban-filter="idle"].is-on { background: #b8860b; color: #1c1400; }
.kanban-filter[data-kanban-filter="offline"].is-on { background: #475569; }
.kanban-stage {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 16px 16px;
}
.kanban-stage.is-looping { overflow: hidden; }
.kanban-board {
  display: grid;
  gap: var(--kanban-gap, 12px);
  justify-content: start;
  align-content: start;
  zoom: var(--kanban-zoom, 1);
}
.kanban-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 0;
  padding: 14px 14px 12px 16px;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -2px 0 rgba(0,0,0,0.22),
    0 12px 22px rgba(0,0,0,0.32);
}
.kanban-tile .kanban-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: rgba(255,255,255,0.55);
}
.kanban-tile.tone-ok, .kanban-tile.tone-running, .kanban-tile.tone-normal {
  background: linear-gradient(165deg, #147a45 0%, #16a34a 46%, #0f6b38 100%);
}
.kanban-tile.tone-fault {
  background: linear-gradient(165deg, #9f1239 0%, #dc2626 48%, #991b1b 100%);
}
.kanban-tile.tone-human, .kanban-tile.tone-door {
  background: linear-gradient(165deg, #9f4254 0%, #c45c6e 48%, #8a3544 100%);
  color: #fff8f8;
}
.kanban-tile.tone-idle, .kanban-tile.tone-maint {
  background: linear-gradient(165deg, #92640a 0%, #c49212 48%, #7a5208 100%);
  color: #fff8e8;
}
.kanban-tile.tone-offline, .kanban-tile.tone-stop {
  background: linear-gradient(165deg, #2c4a6e 0%, #3d5f86 50%, #24384f 100%);
}
.kanban-id { font-size: 16px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.kanban-st { font-size: 12px; font-weight: 700; white-space: nowrap; opacity: 0.95; }
.kanban-shift { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.kanban-shift.is-empty b { opacity: 0.8; font-weight: 600; }
.kanban-tile footer { margin-top: 4px; font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.92; }
.kanban-tile.is-clone { pointer-events: none; }


/* t79: machine-wall header shows real 生产卡号 / 订单号; yield block removed */
.machine-card .wb-card-ids {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 6px;
}
.machine-card .wb-card-id-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}
.machine-card .wb-card-id-row span {
  flex: 0 0 auto;
  color: rgba(234, 246, 255, 0.78);
  white-space: nowrap;
}
.machine-card .wb-card-id-row b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: #f4fbff;
}
.machine-card .wb-split--prog-only {
  display: block;
}
.machine-card .wb-split--prog-only .wb-prog {
  width: 100%;
}


/* ===== t80-t89 (20261130t99a) ===== */

/* t80: 表格单元格、菜单与页签按钮文字上下居中；不改水平对齐 */
table th,
table td,
.hist-sheet th,
.hist-sheet td,
.risk-eval th,
.risk-eval td,
.data-table th,
.data-table td,
.stats-table-wrap th,
.stats-table-wrap td {
  vertical-align: middle;
}
button,
.link,
.dist-tab,
[role="tab"],
.wall-ctx-menu button,
.toolbar button,
.kanban-filter,
.kanban-toolbar button,
.side-rail-btn,
select,
.menu button,
.dl-chip,
.dl-sort-cycle {
  vertical-align: middle;
  align-items: center;
}

/* t82: 仅机台状态第一排图例块加大间距与边框，不动顶部 KPI */
#wallStatusPane .downtime-legend {
  gap: 14px 28px;
  align-items: flex-start;
  flex-wrap: wrap;
  overflow-x: hidden;
}
#wallStatusPane .dl-chip-wrap {
  gap: 8px;
  padding: 4px 2px 2px;
}
#wallStatusPane .downtime-legend button.dl-chip {
  min-width: 118px;
  min-height: 44px;
  padding: 10px 16px;
  border-width: 2px;
  border-style: solid;
  border-radius: 12px;
  box-sizing: border-box;
  font-size: 15px;
  gap: 8px;
}
#wallStatusPane .dl-chip-dur {
  min-height: 1.25em;
  font-size: 14px;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* t83: 刻度更清晰；标签仍在尺轨下方（t64）不裁切 */
#wallStatusGantt .dg-axis,
#wallStatusPane .dg-axis {
  overflow: visible;
}
#wallStatusGantt .dg-tick,
#wallStatusPane .dg-tick {
  border-color: rgba(180, 220, 240, 0.55);
}
#wallStatusGantt .dg-tick.is-major,
#wallStatusPane .dg-tick.is-major {
  border-color: rgba(220, 245, 255, 0.92);
  border-width: 2px;
}
#wallStatusGantt .dg-tick-lab,
#wallStatusPane .dg-tick-lab,
#wallStatusGantt .dg-axis-label,
#wallStatusPane .dg-axis-label {
  font-size: 11px;
  font-weight: 700;
  color: #e8f6ff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

/* t84: 缩放条，不挡轨道 */
#wallStatusGantt {
  position: relative;
}
#wallStatusGantt .dg-zoom-bar {
  position: sticky;
  left: 0;
  bottom: 0;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(8, 24, 44, 0.92);
  border: 1px solid rgba(140, 210, 240, 0.35);
  pointer-events: auto;
  width: max-content;
  max-width: calc(100% - 16px);
}
#wallStatusGantt .dg-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(140, 210, 240, 0.45);
  background: rgba(20, 52, 84, 0.95);
  color: #eaf6ff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
#wallStatusGantt .dg-zoom-read {
  min-width: 3.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #cfe6f7;
}
#wallStatusGantt .dg-zoom-hint {
  font-size: 11px;
  color: #9ec3dc;
  white-space: nowrap;
}

/* t85: 车间电子看板视觉重标定，不改数据口径 */
#modalShopKanban.show .modal--kanban {
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(64, 180, 220, 0.18), transparent 50%),
    radial-gradient(800px 400px at 96% 0%, rgba(40, 140, 120, 0.12), transparent 46%),
    linear-gradient(180deg, #07182c 0%, #061322 40%, #050e1a 100%);
  border: 1px solid rgba(150, 220, 245, 0.32);
}
.kanban-window-bar {
  background: linear-gradient(180deg, rgba(16, 42, 70, 0.98), rgba(6, 20, 38, 0.96));
  border-bottom: 1px solid rgba(140, 210, 240, 0.28);
}
.kanban-toolbar {
  gap: 12px 18px;
  padding: 12px 20px 10px;
  align-items: center;
}
.kanban-toolbar button,
.kanban-window-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
}
.kanban-headline {
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #f3fbff;
}
.kanban-dash {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 4px 0 8px;
  align-items: stretch;
}
.kanban-dash-card {
  display: flex;
  flex-direction: column;
  min-height: 148px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  border: 1px solid rgba(160, 220, 245, 0.34);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(10, 32, 58, 0.72) 42%, rgba(5, 16, 32, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 12px 24px rgba(0, 8, 20, 0.38);
  overflow: hidden;
}
.kanban-dash-card h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #9ed4ef;
}
.kanban-dash-kpi b { font-size: 36px; letter-spacing: -0.03em; }
.kanban-dash-bar { height: 10px; margin: 0 0 10px; }
.kanban-dash-meta { line-height: 1.5; overflow-wrap: anywhere; }
.kanban-filters {
  gap: 10px 12px;
  padding: 4px 0 8px;
}
.kanban-filter {
  min-height: 34px;
  padding: 7px 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.kanban-stage { padding: 8px 20px 20px; }
.kanban-board { gap: var(--kanban-gap, 14px); }
.kanban-tile {
  padding: 16px 16px 14px 18px;
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    inset 0 -2px 0 rgba(0,0,0,0.22),
    0 14px 26px rgba(0,0,0,0.34);
}
.kanban-id { font-size: 18px; letter-spacing: 0.03em; }
.kanban-st {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  font-size: 12px;
}
.kanban-shift {
  font-size: 13px;
  line-height: 1.45;
  gap: 10px;
}
.kanban-shift span { opacity: 0.88; }
.kanban-tile footer { font-size: 13px; letter-spacing: 0.04em; }
@media (max-width: 1200px) {
  .kanban-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .kanban-dash { grid-template-columns: 1fr; }
}

/* t86: 顶部状态/产量块边框与层次，尤其是设备总数；尺寸仍对齐、不拉满、不侵入系统名 */
header.top-bar {
  column-gap: 24px;
  align-items: center;
}
.stats-row {
  justify-content: flex-end;
  gap: 12px;
  overflow-x: hidden !important;
  flex-wrap: nowrap;
}
.stats-row__group,
.stats-row__group.stat-merge {
  flex: 0 0 auto !important;
  width: auto;
  min-height: 64px;
  max-height: 68px;
  padding: 5px 8px;
  border-radius: 14px;
  border: 1px solid rgba(150, 210, 240, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10);
}
.stat-merge--fleet .stat-merge__item,
.stat-merge--fleet .stat-merge__lead,
.stat-merge--throughput .stat-merge__item {
  box-sizing: border-box;
  flex: 0 0 108px !important;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 4px 7px 5px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(160, 214, 240, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(6, 20, 40, 0.25));
}
.stat-merge--fleet { max-width: none; }
.stat-merge--throughput {
  flex: 0 0 auto !important;
  min-width: 0;
  max-width: none;
}
.stat-merge--throughput .stat-merge__lead {
  box-sizing: border-box;
  flex: 0 0 64px !important;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1px;
}
.stat-merge--fleet .stat-merge__lead {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  padding: 3px 8px 4px;
}
.stat-merge__kicker {
  font-size: 10px !important;
  line-height: 1.15;
  letter-spacing: 0.04em;
  color: #9ec3dc !important;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-merge__caption {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  color: #e8f6ff;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.stat-merge__total {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
}
.stat-merge__total .num,
.stat-merge--throughput .stat-merge__item .num {
  font-size: 20px !important;
  line-height: 1.05;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stat-merge__total .unit,
.stat-merge__item .unit {
  font-size: 11px !important;
  color: #cfe6f7 !important;
}
.stat-merge__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-merge__item .label {
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

/* t87 + t88: 抬高底部体检/画像，右侧入口完整可见可点，避免底边裁切 */
#app {
  grid-template-rows: auto minmax(0, 1fr) minmax(340px, calc(var(--vh, 1vh) * 36)) auto;
}
#app.app--odd-detail {
  grid-template-rows: auto minmax(0, 1fr) minmax(360px, calc(var(--vh, 1vh) * 42)) auto;
}
footer.bottom-charts,
.bottom-charts {
  min-height: 0;
  overflow: visible;
  align-items: stretch;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) 120px;
}
.bottom-charts > .panel {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.bottom-charts > .panel .chart,
.bottom-charts #chartBox,
.bottom-charts .odd-readout,
.bottom-charts .insight-strip {
  min-height: 0;
  flex: 1 1 auto;
}
.bottom-side-rail {
  justify-content: flex-start;
  align-items: stretch;
  gap: 8px;
  padding: 2px 2px 2px 0;
  overflow: visible;
  z-index: 6;
  min-width: 112px;
  max-width: 128px;
}
.side-rail-btn {
  flex: 1 1 auto;
  width: 100%;
  min-height: 58px;
  max-height: none;
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.04em;
  white-space: pre-line;
  text-align: center;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(150, 210, 240, 0.32);
  background: linear-gradient(180deg, rgba(16, 44, 74, 0.96), rgba(6, 22, 42, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 4px 10px rgba(0,0,0,0.25);
}


/* ===== t90-t97 rail / schedule / export / kanban / header ===== */
.stat-merge__lead,
.stat-merge__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 8px 6px;
  box-sizing: border-box;
}
.stat-merge__name {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
  color: #eaf6ff;
}
.stat-merge__total { margin-top: 2px; }
.stat-merge__lead .num,
.stat-merge__item .num { line-height: 1.15; }
.stat-merge__item .base,
.stat-merge__item .lbl,
.stat-merge__item .label {
  padding-top: 2px;
}

/* t94-t97: flyout is position:fixed, flush left of the rail button, click only */
.rail-flyout {
  position: fixed;
  z-index: 6000;
  min-width: 176px;
  margin: 0;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(150, 210, 240, 0.45);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, rgba(16, 44, 74, 0.98), rgba(6, 22, 42, 0.98));
  box-shadow: -8px 6px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.12);
}
.rail-flyout[hidden] { display: none !important; }
.rail-flyout button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  box-sizing: border-box;
  text-align: left;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #eaf6ff;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.rail-flyout button:hover,
.rail-flyout button:focus {
  background: rgba(94, 255, 244, 0.16);
  outline: none;
}
.side-rail-btn.is-open {
  border-color: rgba(94, 255, 244, 0.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 0 1px rgba(94,255,244,0.25);
}
.bottom-side-rail { overflow: visible; z-index: 8; }

.grp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}
.grp-toolbar input[type="text"] { min-width: 200px; flex: 1 1 200px; }
.grp-album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.grp-tile {
  position: relative;
  min-height: 64px;
  padding: 12px 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(120, 230, 255, 0.22);
  background: rgba(8, 28, 52, 0.55);
  color: #eaf6ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.grp-tile.is-on {
  border-color: #5efff4;
  background: rgba(20, 80, 110, 0.7);
  box-shadow: inset 0 0 0 1px rgba(94,255,244,0.35);
}
.grp-check {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1ad4b3;
  color: #04231c;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grp-list { display: grid; gap: 10px; }
.grp-card {
  border: 1px solid rgba(120, 230, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(8, 28, 52, 0.45);
}
.grp-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; color: #eaf6ff; }
.grp-card-actions { display: flex; gap: 8px; margin-top: 8px; }
.schedule-review {
  border: 1px solid rgba(120, 230, 255, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0 12px;
  background: rgba(8, 28, 52, 0.45);
}
.schedule-review-row {
  display: grid;
  grid-template-columns: 88px 64px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(120, 230, 255, 0.1);
  align-items: center;
  color: #cfe6f7;
  font-size: 13px;
}
.schedule-review-actions { display: flex; gap: 8px; margin-top: 8px; }
.schedule-review textarea { width: 100%; margin: 8px 0; box-sizing: border-box; }

/* t92 kanban typography / complete-row stage */
#modalShopKanban.kanban-immersive,
#modalShopKanban .modal--kanban.kanban-immersive {
  position: fixed;
  inset: 0;
  width: calc(var(--vw, 1vw) * 100);
  height: calc(var(--vh, 1vh) * 100);
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  z-index: 5000;
}
#shopKanbanDash, .shop-kanban-dash, .kanban-kpi {
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.kanban-tile {
  font-size: 15px;
}
.kanban-tile .kb-id, .kanban-tile .machine-id {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-cfg-hint .link { margin-left: 8px; }


/* ===== t98-t99 rail menu / machine groups / roster ===== */
#backendAdminTabs.admin-tabbar-hidden,
#statsReportTabs.admin-tabbar-hidden,
#dataManageTabs.admin-tabbar-hidden,
#backendAdminTabs[hidden],
#statsReportTabs[hidden],
#dataManageTabs[hidden] {
  display: none !important;
}
.bottom-side-rail {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  padding: 4px 0;
  box-sizing: border-box;
  min-width: 136px;
  max-width: 152px;
  overflow: visible;
  z-index: 8;
  border-radius: 10px;
  border: 1px solid rgba(150, 210, 240, 0.32);
  background: linear-gradient(180deg, rgba(16, 44, 74, 0.97), rgba(6, 22, 42, 0.97));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 4px 12px rgba(0,0,0,0.28);
}
.bottom-side-rail .side-rail-btn,
.bottom-side-rail .side-rail-btn.link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  width: 100%;
  min-height: 44px;
  max-height: none;
  margin: 0;
  padding: 8px 12px;
  box-sizing: border-box;
  text-align: left;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.03em;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(150, 210, 240, 0.16);
  background: transparent;
  box-shadow: none;
  text-decoration: none;
}
.bottom-side-rail .side-rail-btn:last-child { border-bottom: 0; }
.bottom-side-rail .side-rail-btn:hover,
.bottom-side-rail .side-rail-btn:focus {
  background: rgba(94, 255, 244, 0.12);
  outline: none;
  box-shadow: none;
  transform: none;
}
.bottom-side-rail .side-rail-btn.is-open {
  background: rgba(94, 255, 244, 0.16);
  border-color: rgba(150, 210, 240, 0.16);
  box-shadow: inset 3px 0 0 #5efff4;
}
.rail-flyout { max-width: min(280px, calc(calc(var(--vw, 1vw) * 100) - 16px)); }
.rail-flyout-group {
  padding: 8px 14px 4px;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: rgba(180, 214, 234, 0.62);
  text-align: left;
  user-select: none;
}
.rail-flyout-group:not(:first-child) {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(150, 210, 240, 0.12);
}
.roster-box {
  border: 1px solid rgba(120, 230, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 14px;
  background: rgba(8, 28, 52, 0.45);
}
.roster-box h4 { margin: 0 0 6px; color: #eaf6ff; }
.roster-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.grp-album { touch-action: pan-y; user-select: none; }
.grp-album.is-swiping { touch-action: none; cursor: grabbing; }
.grp-tile { touch-action: none; }

.schedule-qr-page { max-width: 560px; margin: 12px auto; }
.schedule-qr-page .schedule-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.schedule-lan-warn { color: #b42318; background: #fff1f0; border: 1px solid #ffccc7; padding: 8px 10px; border-radius: 8px; }
.site-cfg-passphrase { margin: 16px 0; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; }
.site-cfg-passphrase .site-cfg-field { display: block; margin: 8px 0; }
.site-cfg-pass-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-cfg-pass-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.site-cfg-pass-reset { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(255,255,255,.18); }

/* 后端断线提示条：琥珀色，区别于告警红与分类钢青/黄铜 */
.backend-lost-bar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 66, 0.6);
  background: rgba(30, 22, 6, 0.94);
  color: #fde7a7;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.backend-lost-bar[hidden] { display: none; }
.backend-lost-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5c542;
  animation: backendLostPulse 1.2s ease-in-out infinite;
}
.backend-lost-retry {
  border: 1px solid rgba(245, 197, 66, 0.7);
  background: transparent;
  color: #fde7a7;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
}
.backend-lost-retry:hover { background: rgba(245, 197, 66, 0.18); }
@keyframes backendLostPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .backend-lost-dot { animation: none; } }

/* 指标说明「AI 应用说明」小节标题：与正文同字体，青色细左边条区分层级 */
.index-guide .index-guide-sub {
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--cyan-dim);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan-soft);
  letter-spacing: 0.02em;
  text-align: left;
}
.index-guide [data-guide-panel="ai"] td {
  text-align: left;
  line-height: 1.6;
}
.index-guide [data-guide-panel="ai"] td:first-child {
  text-align: center;
  white-space: nowrap;
}

/* 实时风险正常态 */
.risk-clear {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
}
.risk-clear-head {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #d9f6ff;
}
.risk-clear-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.risk-clear-dot--ok { background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); }
.risk-clear-dot--learn { background: #fbbf24; box-shadow: 0 0 10px rgba(251, 191, 36, 0.6); }
.risk-clear-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.risk-clear-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border-radius: var(--radius-md, 8px);
  border: 1px solid rgba(130, 210, 255, 0.22);
  background: rgba(8, 30, 56, 0.6);
}
.risk-clear-cell b {
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.risk-clear-cell span { font-size: 12px; color: #9fb3c8; }
.risk-clear-cell--ok b { color: #34d399; }
.risk-clear-cell--learn b { color: #fbbf24; }
.risk-clear-cell--idle b { color: #8aa0b2; }
.risk-clear-cell--info b { color: #38bdf8; }
.risk-clear-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #9fb3c8;
}

/* 告警卡的阴影与悬停位移会多出几像素，不应出现横向滚动条 */
#rightPane {
  overflow-x: hidden;
}


/* ===== t100 authoritative layer: header / guides / kanban / admin / groups / modal polish ===== */

/* --- 顶部：设备总数与今日产量两块，随窗口缩放自适应 --- */
header.top-bar {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: clamp(10px, calc(var(--vw, 1vw) * 1.6), 24px);
}
header.top-bar #statsRow.stats-row {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: stretch;
  gap: clamp(6px, calc(var(--vw, 1vw) * 0.8), 12px);
  min-width: 0;
  overflow: hidden !important;
}
#statsRow .stats-row__group.stat-merge {
  min-height: 0;
  max-height: none;
  height: auto;
  padding: 5px 6px;
  border-radius: 14px;
  border: 1px solid rgba(150, 210, 240, 0.30);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(6, 22, 42, 0.55));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 6px 14px rgba(0, 8, 20, 0.30);
}
#statsRow .stat-merge--fleet {
  display: flex;
  flex: 1 1 auto !important;
  min-width: 0;
  max-width: 900px;
  gap: 5px;
}
#statsRow .stat-merge--fleet .stat-merge__items {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 5px;
}
#statsRow .stat-merge--fleet .stat-merge__lead,
#statsRow .stat-merge--fleet .stat-merge__item {
  flex: 1 1 0 !important;
  width: auto;
  min-width: 58px;
  max-width: 132px;
  height: auto;
  min-height: 52px;
  max-height: none;
  padding: 5px clamp(4px, calc(var(--vw, 1vw) * 0.5), 8px);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
#statsRow .stat-merge--fleet .stat-merge__lead {
  flex: 1.25 1 0 !important;
  max-width: 150px;
  background: linear-gradient(180deg, rgba(90, 200, 255, 0.18), rgba(10, 40, 72, 0.45));
  border: 1px solid rgba(120, 210, 250, 0.38);
}
#statsRow .stat-merge__item[data-fleet-filter]:hover,
#statsRow .stat-merge__lead[data-fleet-filter]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}
#statsRow .stat-merge__name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(10px, calc(var(--vw, 1vw) * 0.78), 12px);
  white-space: nowrap;
}
#statsRow .stat-merge__plant {
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  color: #06243c;
  background: linear-gradient(180deg, #8be3ff, #42b8e8);
}
#statsRow .stat-merge__item .label {
  font-size: clamp(10px, calc(var(--vw, 1vw) * 0.78), 12px);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#statsRow .stat-merge__total .num,
#statsRow .stat-merge__item .num {
  font-size: clamp(15px, calc(var(--vw, 1vw) * 1.35), 22px) !important;
  line-height: 1.1;
}
#statsRow .stat-merge__item.is-wide .num { font-size: clamp(13px, calc(var(--vw, 1vw) * 1.1), 18px) !important; }
#statsRow .stat-merge--throughput {
  display: flex;
  flex: 0 1 auto !important;
  flex-direction: column;
  justify-content: center;
  min-width: 112px;
  max-width: 200px;
  padding: 5px 12px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(82, 240, 196, 0.16), rgba(6, 30, 40, 0.55));
  border-color: rgba(82, 240, 196, 0.40);
  transition: transform .15s ease, box-shadow .15s ease;
}
#statsRow .stat-merge--throughput:hover,
#statsRow .stat-merge--throughput:focus-visible {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 8px 18px rgba(0, 30, 30, 0.40);
}
.stat-yield__label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: clamp(10px, calc(var(--vw, 1vw) * 0.78), 12px);
  font-weight: 650;
  color: #d7fff2;
  white-space: nowrap;
}
.stat-yield__go { font-weight: 500; color: #7fe9c9; opacity: .8; }
.stat-yield__value { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.stat-yield__value .num {
  font-size: clamp(16px, calc(var(--vw, 1vw) * 1.45), 24px);
  font-weight: 800;
  color: #52f0c4;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(82, 240, 196, 0.30);
}
.stat-yield__value .unit { font-size: 11px; color: #cfe6f7; }
.stat-yield__sub { font-size: 11px; color: #9fd8c6; white-space: nowrap; }
@media (max-width: 1280px) {
  header.top-bar { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  header.top-bar #statsRow.stats-row { justify-content: stretch; }
  #statsRow .stat-merge--fleet { max-width: none; }
  #statsRow .stat-merge--fleet .stat-merge__item { max-width: none; }
}
#statsRow .stat-merge--fleet .stat-merge__lead { align-items: center; text-align: center; }
#statsRow .stat-merge--fleet .stat-merge__lead .stat-merge__total { justify-content: center; }
@media (max-width: 720px) {
  header.top-bar #statsRow.stats-row { flex-wrap: wrap; }
  #statsRow .stat-merge--fleet { flex-basis: 100% !important; }
  #statsRow .stat-merge--throughput { flex: 1 1 auto !important; max-width: none; }
}

/* --- 指标说明：引导段与表格/卡片之间留白，统一节奏 --- */
.index-guide .index-guide-lead {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
  color: #e7f6ff;
  border-left: 3px solid #38bdf8;
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.02));
}
.index-guide .index-bands,
.index-guide .index-health-scale { margin: 0 0 20px; }
.index-guide > div > h4,
.index-guide [data-guide-panel] > h4,
.index-guide .diff-guide > h4,
.index-guide .odd-guide > h4 {
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(120, 220, 255, 0.14);
}
.index-guide table { margin: 0 0 16px; }
.index-guide table + p,
.index-guide table + ul,
.index-guide p + table,
.index-guide ul + table { margin-top: 12px; }
.index-guide ul { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; }
.index-guide .index-guide-note { margin: 8px 0 12px; }
.guide-ai {
  margin: 26px 0 6px;
  padding: 14px 16px 6px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.36);
  background:
    radial-gradient(600px 160px at 0% 0%, rgba(167, 139, 250, 0.14), transparent 60%),
    rgba(14, 22, 50, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.index-guide .guide-ai .guide-ai__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  text-align: left;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #d9ccff;
}
.guide-ai__tag {
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1b1040;
  background: linear-gradient(180deg, #c4b5fd, #8b5cf6);
}
.guide-ai .index-guide-lead { border-left-color: #a78bfa; background: linear-gradient(90deg, rgba(167, 139, 250, 0.14), transparent); }
.guide-ai h5 {
  margin: 16px 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #c4b5fd;
}
.guide-ai p { margin: 0 0 12px; line-height: 1.7; font-size: 13px; color: #dbe8f5; }
.guide-ai td { text-align: left; }

/* --- 健康 / 查异的可解释说明 --- */
.health-why { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.health-why li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 120px; align-items: center; gap: 10px; font-size: 12px; }
.health-why__bar { display: block; height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.18); overflow: hidden; }
.health-why__bar b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #ef4444); }
.health-why em { font-style: normal; color: #fcd9a6; text-align: right; font-variant-numeric: tabular-nums; }
.odd-why {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #e7f6ff;
  border-radius: 10px;
  border-left: 3px solid #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}
.odd-why b { color: #fcd34d; }

/* --- 后台：二级弹窗内的三级页签 --- */
#modalBackendAdmin .admin-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(120, 210, 250, 0.22);
  background: rgba(4, 16, 32, 0.55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
#modalBackendAdmin .admin-subtabs .dist-tab {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #b9d6ea;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
#modalBackendAdmin .admin-subtabs .dist-tab:hover { background: rgba(90, 200, 255, 0.10); color: #fff; }
#modalBackendAdmin .admin-subtabs .dist-tab.dist-tab--on {
  color: #04213a;
  font-weight: 700;
  background: linear-gradient(180deg, #a5ecff, #4cc4ef);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 3px 8px rgba(30, 150, 210, 0.35);
}

/* --- 机台分组：导入名单 --- */
.grp-import {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(120, 210, 250, 0.34);
  background: rgba(8, 28, 52, 0.45);
}
.grp-import-title { font-size: 12px; font-weight: 700; color: #9fe3ff; letter-spacing: .06em; }
.grp-import input[type="text"] { flex: 1 1 260px; min-width: 200px; }
.grp-import-hint { flex-basis: 100%; font-size: 11px; color: #8fb0c8; }
.grp-tile.is-extra { border-style: dashed !important; border-color: rgba(251, 191, 36, 0.7) !important; }
.grp-tile.is-extra b::after { content: " · 表外"; font-size: 10px; font-weight: 500; color: #fcd34d; }

/* --- 弹窗与菜单统一质感 --- */
.modal-backdrop.show .modal {
  border-radius: 18px;
  border: 1px solid rgba(140, 215, 245, 0.34);
  background:
    radial-gradient(900px 260px at 0% 0%, rgba(64, 180, 230, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(20, 54, 92, 0.98) 0%, rgba(7, 24, 46, 0.99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 24px 60px rgba(0, 6, 18, 0.60),
    0 0 0 1px rgba(0, 0, 0, 0.25);
  animation: t100ModalIn .18s ease-out;
}
@keyframes t100ModalIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop.show .modal { animation: none; }
}
.modal-backdrop.show .modal button.link {
  transition: background .15s ease, box-shadow .15s ease, transform .12s ease;
}
.modal-backdrop.show .modal button.link:hover:not(:disabled) { transform: translateY(-1px); }
.modal-backdrop.show .modal button.link:active:not(:disabled) { transform: translateY(0); }
.modal-backdrop.show .modal input[type="text"],
.modal-backdrop.show .modal input[type="number"],
.modal-backdrop.show .modal input[type="date"],
.modal-backdrop.show .modal input[type="password"],
.modal-backdrop.show .modal select,
.modal-backdrop.show .modal textarea {
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.modal-backdrop.show .modal input:focus-visible,
.modal-backdrop.show .modal select:focus-visible,
.modal-backdrop.show .modal textarea:focus-visible {
  outline: none;
  border-color: #5fd4ff;
  box-shadow: 0 0 0 3px rgba(95, 212, 255, 0.22);
}
.modal-backdrop.show .modal table tbody tr { transition: background .12s ease; }
.modal-backdrop.show .modal table tbody tr:hover { background: rgba(90, 200, 255, 0.06); }
.rail-flyout {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), -10px 14px 30px rgba(0, 6, 18, 0.50);
}
.rail-flyout button {
  position: relative;
  transition: background .15s ease, padding-left .15s ease, color .15s ease;
}
.rail-flyout button:hover,
.rail-flyout button:focus-visible { padding-left: 18px; }
.rail-flyout button::after {
  content: "›";
  position: absolute;
  right: 10px;
  opacity: .45;
}

/* --- 车间电子看板 --- */
#modalShopKanban .kanban-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "head filters sort"
    "dash dash dash";
  align-items: center;
  gap: 10px 16px;
  padding: 12px 20px 8px;
}
#modalShopKanban .kanban-headline { grid-area: head; margin: 0; white-space: nowrap; font-weight: 700; }
#modalShopKanban .kanban-filters { grid-area: filters; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; }
#modalShopKanban .kanban-sort-cycle { grid-area: sort; }
#modalShopKanban .kanban-dash {
  grid-area: dash;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
}
#modalShopKanban .kanban-dash[hidden] { display: none; }
#modalShopKanban .kanban-dash-card {
  min-height: 0;
  padding: 10px 14px;
  border-radius: 14px;
}
#modalShopKanban .kanban-dash-card h4 { margin: 0 0 6px; font-size: 11px; }
#modalShopKanban .kanban-dash-kpi { display: flex; align-items: baseline; gap: 8px; }
#modalShopKanban .kanban-dash-kpi b { font-size: clamp(22px, calc(var(--vw, 1vw) * 2), 30px); line-height: 1.1; }
#modalShopKanban .kanban-dash-bar { height: 6px; margin: 6px 0; }
#modalShopKanban .kanban-dash-meta { margin: 0; font-size: 11px; }
#modalShopKanban .kanban-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(150, 206, 230, 0.26);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(8, 26, 48, 0.75));
  color: #cfe6f7;
  outline: none;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, color .15s ease;
}
#modalShopKanban .kanban-filter b {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
  background: rgba(0, 0, 0, 0.28);
  font-variant-numeric: tabular-nums;
}
#modalShopKanban .kanban-filter-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chip, #8fb0c8);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.10), 0 0 8px var(--chip, transparent);
}
#modalShopKanban .kanban-filter--all { --chip: #7dd3fc; }
#modalShopKanban .kanban-filter--running { --chip: #22c55e; }
#modalShopKanban .kanban-filter--fault { --chip: #ef4444; }
#modalShopKanban .kanban-filter--human { --chip: #f472b6; }
#modalShopKanban .kanban-filter--idle { --chip: #f4c430; }
#modalShopKanban .kanban-filter--offline { --chip: #94a3b8; }#modalShopKanban .kanban-filter:hover { color: #fff; border-color: var(--chip); }
#modalShopKanban .kanban-filter.is-on,
#modalShopKanban .kanban-filter[aria-checked="true"] {
  color: #fff;
  outline: none;
  border-color: var(--chip);
  background: linear-gradient(180deg, color-mix(in srgb, var(--chip) 46%, transparent), color-mix(in srgb, var(--chip) 18%, #061426));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 0 0 2px color-mix(in srgb, var(--chip) 30%, transparent);
}
#modalShopKanban .kanban-stage { padding: 8px 20px 18px; }
#modalShopKanban .kanban-board { justify-content: stretch; align-content: start; }
#modalShopKanban .kanban-tile {
  --tone: #22c55e;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px 12px 16px;
  overflow: hidden;
  border-radius: 14px;
  color: #eaf6ff;
  border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--tone) 30%, transparent) 0%, transparent 46%),
    linear-gradient(165deg, #10294a 0%, #0a1c34 60%, #071528 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -2px 0 rgba(0,0,0,0.30),
    0 10px 22px rgba(0, 4, 14, 0.45),
    0 0 18px color-mix(in srgb, var(--tone) 18%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
#modalShopKanban .kanban-tile:hover { transform: translateY(-2px); }
#modalShopKanban .kanban-tile.tone-ok,
#modalShopKanban .kanban-tile.tone-running,
#modalShopKanban .kanban-tile.tone-normal { --tone: #22c55e; }
#modalShopKanban .kanban-tile.tone-fault { --tone: #ef4444; animation: t100Pulse 2.4s ease-in-out infinite; }
#modalShopKanban .kanban-tile.tone-human,
#modalShopKanban .kanban-tile.tone-door { --tone: #f472b6; }
#modalShopKanban .kanban-tile.tone-idle,
#modalShopKanban .kanban-tile.tone-maint { --tone: #f4c430; }
#modalShopKanban .kanban-tile.tone-offline,
#modalShopKanban .kanban-tile.tone-stop { --tone: #94a3b8; }@keyframes t100Pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 22px rgba(0,4,14,0.45), 0 0 10px rgba(239,68,68,0.25); }
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 10px 22px rgba(0,4,14,0.45), 0 0 26px rgba(239,68,68,0.55); }
}
@media (prefers-reduced-motion: reduce) {
  #modalShopKanban .kanban-tile.tone-fault { animation: none; }
}
#modalShopKanban .kanban-tile .kanban-accent {
  position: absolute;
  left: 0; top: 0; bottom: 0; right: auto;
  width: 5px;
  height: auto;
  background: var(--tone);
  box-shadow: 0 0 12px var(--tone);
}
#modalShopKanban .kanban-tile header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  position: static;
}
#modalShopKanban .kanban-id { font-size: 1.25em; font-weight: 800; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#modalShopKanban .kanban-st {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .8em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  background: color-mix(in srgb, var(--tone) 34%, rgba(0,0,0,0.35));
  border: 1px solid color-mix(in srgb, var(--tone) 70%, transparent);
}
#modalShopKanban .kanban-st i { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); flex: 0 0 auto; }
#modalShopKanban .kanban-progress { display: flex; align-items: center; gap: 8px; }
#modalShopKanban .kanban-progress-bar {
  flex: 1 1 auto;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
#modalShopKanban .kanban-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}
#modalShopKanban .kanban-progress b { font-size: .8em; color: #bfe9ff; font-variant-numeric: tabular-nums; }
#modalShopKanban .kanban-crew {
  display: grid;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}
#modalShopKanban .kanban-shift {
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr);
  gap: 6px;
  font-size: .86em;
  line-height: 1.45;
}
#modalShopKanban .kanban-shift span { color: #8fb6d2; }
#modalShopKanban .kanban-shift b { font-weight: 650; overflow-wrap: anywhere; }
#modalShopKanban .kanban-shift.is-empty b { color: #7d93a8; font-weight: 500; }
#modalShopKanban .kanban-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: .8em;
  letter-spacing: 0;
}
#modalShopKanban .kanban-metrics span { display: inline-flex; align-items: baseline; gap: 3px; white-space: nowrap; }
#modalShopKanban .kanban-metrics em { font-style: normal; color: #8fb6d2; }
#modalShopKanban .kanban-metrics b { font-size: 1.15em; color: #f1f9ff; font-variant-numeric: tabular-nums; }
#modalShopKanban .kanban-metrics i { font-style: normal; color: #8fb6d2; }
#modalShopKanban .kanban-metrics .is-warn b { color: #fcd34d; }
#modalShopKanban .kanban-metrics .is-bad b { color: #fb7185; }
#modalShopKanban .kanban-tile.is-unassigned .kanban-crew { outline: 1px dashed rgba(251, 191, 36, 0.45); }
@media (max-width: 1100px) {
  #modalShopKanban .kanban-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "head sort" "filters filters" "dash dash";
  }
  #modalShopKanban .kanban-filters { justify-content: flex-start; }
  #modalShopKanban .kanban-dash {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 1fr);
    overflow-x: auto;
    scrollbar-width: thin;
  }
}
@media (max-width: 1100px), (max-height: 760px) {
  #modalShopKanban .kanban-dash-meta,
  #modalShopKanban .kanban-dash-bar { display: none; }
  #modalShopKanban .kanban-dash-card { padding: 8px 12px; }
}
@media (max-width: 640px) {
  #modalShopKanban .kanban-window-bar { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  #modalShopKanban .kanban-win-btn span { display: none; }
  #modalShopKanban .kanban-toolbar { padding: 8px 10px 6px; }
  #modalShopKanban .kanban-stage { padding: 6px 10px 10px; }
  #modalShopKanban .kanban-filter { min-height: 28px; padding: 2px 8px; font-size: 12px; }
}
.index-guide .ai-pipe + .index-guide-note,
.index-guide .ai-pipe + p { margin-top: 12px; }
.modal-backdrop .modal,
.modal-backdrop .site-cfg-body--scroll,
.modal-backdrop .index-guide { scrollbar-width: thin; scrollbar-color: rgba(95, 200, 240, 0.45) rgba(4, 16, 32, 0.6); }
.modal-backdrop .modal ::-webkit-scrollbar,
.modal-backdrop .modal::-webkit-scrollbar { width: 8px; height: 8px; }
.modal-backdrop .modal ::-webkit-scrollbar-track,
.modal-backdrop .modal::-webkit-scrollbar-track { background: rgba(4, 16, 32, 0.6); border-radius: 8px; }
.modal-backdrop .modal ::-webkit-scrollbar-thumb,
.modal-backdrop .modal::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #4cc4ef, #2a7fb0); border-radius: 8px; }
/* ===== t101 icons + centered buttons/tables ===== */
.ui-ico {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  vertical-align: -0.2em;
  stroke-width: 1.8;
}
button.has-ui-ico,
a.has-ui-ico,
label.has-ui-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
}
button.link,
a.link,
.dist-tab,
.schedule-tab,
.schedule-file-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
}
.modal-backdrop .modal button.link > .ui-ico { opacity: 0.92; }
.modal-backdrop .modal [id$="Close"].has-ui-ico .ui-ico { width: 1em; height: 1em; }

table th,
table td {
  text-align: center !important;
  vertical-align: middle !important;
}

/* 产线：车间图标 */
.plant-tab[data-plant] .ui-ico--factory,
.plant-tab[data-plant] .ui-ico--floor4,
.plant-tab[data-plant] .ui-ico--floor5,
.alert-plant-tab .ui-ico--factory,
.alert-plant-tab .ui-ico--floor4,
.alert-plant-tab .ui-ico--floor5 {
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 7px;
  color: #bff1ff;
  background: linear-gradient(180deg, rgba(90, 200, 255, 0.30), rgba(20, 80, 130, 0.40));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.ui-ico--floor4,
.ui-ico--floor5 { stroke-width: 2.4; }
.plant-tab[data-plant] .ui-ico--floor4,
.alert-plant-tab .ui-ico--floor4 {
  color: #d9fff8;
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.42), rgba(15, 118, 110, 0.55));
}
.plant-tab[data-plant] .ui-ico--floor5,
.alert-plant-tab .ui-ico--floor5 {
  color: #f3e8ff;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.45), rgba(91, 33, 182, 0.55));
}
.plant-tab--active .ui-ico--factory,
.alert-plant-tab--active .ui-ico--factory {
  color: #04213a;
  background: linear-gradient(180deg, #c7f4ff, #5ccff3);
}
.plant-tab--active .ui-ico--floor4,
.alert-plant-tab--active .ui-ico--floor4 {
  color: #042f2e;
  background: linear-gradient(180deg, #ccfbf1, #5eead4);
}
.plant-tab--active .ui-ico--floor5,
.alert-plant-tab--active .ui-ico--floor5 {
  color: #2e1065;
  background: linear-gradient(180deg, #ede9fe, #c4b5fd);
}
.plant-tab[data-plant].has-ui-ico,
.alert-plant-tab.has-ui-ico { gap: 6px; }
.kanban-plant .ui-ico { width: 16px; height: 16px; }
#statsRow .stat-merge__plant.has-ui-ico { display: inline-flex; align-items: center; gap: 2px; }
#statsRow .stat-merge__plant .ui-ico { width: 10px; height: 10px; stroke-width: 2.2; }

/* 侧栏入口：图标在上，文字在下 */
.bottom-side-rail .side-rail-btn.has-ui-ico {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.bottom-side-rail .side-rail-btn .ui-ico {
  width: 22px;
  height: 22px;
  color: #7fdcff;
  filter: drop-shadow(0 0 6px rgba(95, 212, 255, 0.35));
}
.bottom-side-rail .side-rail-btn.is-open .ui-ico,
.bottom-side-rail .side-rail-btn:hover .ui-ico { color: #e6fbff; }

/* 二级菜单：图标 + 文字 */
.rail-flyout button.has-ui-ico {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
}
.rail-flyout button .ui-ico {
  width: 18px;
  height: 18px;
  padding: 4px;
  border-radius: 8px;
  color: #9fe6ff;
  background: rgba(90, 200, 255, 0.12);
}
.rail-flyout button:hover .ui-ico { color: #04213a; background: linear-gradient(180deg, #a5ecff, #4cc4ef); }

/* 页签里的图标 */
.dist-tab .ui-ico,
.schedule-tab .ui-ico { width: 15px; height: 15px; }
.alert-kind-tab.has-ui-ico { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.alert-kind-tab.has-ui-ico::before { display: none !important; }
.alert-kind-tab .ui-ico { width: 15px; height: 15px; }
.alert-kind-tab--human .ui-ico { color: #f9a8d4; }
.alert-kind-tab--fault .ui-ico { color: #fca5a5; }

/* 工艺参数：设备列表 */
.process-machine.has-ui-ico { justify-content: flex-start; }
.process-machine .ui-ico { width: 16px; height: 16px; color: var(--pm-tone, #7fdcff); }
/* 工艺参数：搜索、状态点、本机关联 */
.process-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 8px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(120, 210, 250, 0.30);
  background: rgba(4, 16, 32, 0.6);
  color: #e7f6ff;
}
.process-machine { position: relative; }
.process-machine-dot {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pm-tone, #7fdcff);
  box-shadow: 0 0 8px var(--pm-tone, transparent);
}
.process-empty { margin: 10px 0; text-align: center; font-size: 12px; color: #8fb0c8; }
.process-relate:empty { display: none; }
.process-relate {
  margin: 12px 0 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(120, 210, 250, 0.26);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(6, 22, 42, 0.55));
}
.process-relate h4 { margin: 0 0 10px; text-align: center; font-size: 13px; letter-spacing: .1em; color: #9fe3ff; }
.process-relate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.process-relate-grid article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 54px;
  padding: 6px;
  text-align: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255,255,255,0.06);
}
.process-relate-grid span { font-size: 11px; color: #8fb6d2; }
.process-relate-grid b { font-size: 14px; color: #eef8ff; overflow-wrap: anywhere; }
.process-relate-grid .is-ok b { color: #52f0c4; }
.process-relate-grid .is-warn b { color: #fcd34d; }
.process-relate-grid .is-bad b { color: #fb7185; }
.process-relate-actions { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.process-relate-actions .ui-ico { width: 15px; height: 15px; }
.process-action:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 760px) { .process-relate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 看板时钟 */
.kanban-clock {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #9fe3ff;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(120, 210, 250, 0.22);
}
#modalShopKanban .kanban-tile[data-machine-id] { cursor: pointer; }
.dist-tab, .schedule-tab, .alert-kind-tab, .plant-tab { white-space: nowrap; }
.dist-tab.has-ui-ico { gap: 4px; }
.dist-tab .ui-ico { width: 14px; height: 14px; }

.process-machine input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.process-machine .ui-ico { width: 18px; height: 18px; }

/* t102: 状态图标统一、紧凑状态条、看板关注、分组列表、参数页签、风险计算链、算法框架、大圆机表盘、排班美化 */
.st-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; margin-right: 6px; color: var(--st, #7dd3fc); background: color-mix(in srgb, var(--st, #7dd3fc) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st, #7dd3fc) 38%, transparent); vertical-align: middle; }
.st-ico .ui-ico { width: 14px; height: 14px; stroke-width: 2.1; }
.st-ico--play { --st: #22c55e; }
.st-ico--hand { --st: #f472b6; }
.st-ico--alert { --st: #ef4444; }
.st-ico--signalOff { --st: #7dd3fc; }
.st-ico--power { --st: #94a3b8; }
.st-ico--hourglass { --st: #facc15; }
.st-ico--fleet { --st: #38bdf8; }

/* 1 & 11 顶部状态条：降高 + 图标 */
#statsRow .stat-merge { min-height: 0 !important; padding-top: 6px !important; padding-bottom: 6px !important; }
#statsRow .stat-merge__lead, #statsRow .stat-merge__item { min-height: 0 !important; padding: 6px 10px !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
#statsRow .stat-merge__item .label, #statsRow .stat-merge__name { display: inline-flex !important; align-items: center; justify-content: center; line-height: 1.2; }
#statsRow .stat-merge__item .value, #statsRow .stat-merge__total { line-height: 1.1 !important; margin: 0 !important; }
#statsRow .stat-merge__item .num, #statsRow .stat-merge__total .num { font-size: 22px !important; }
#statsRow .stat-merge--throughput { cursor: default !important; padding: 6px 12px !important; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
#statsRow .stat-merge--throughput:hover { transform: none !important; }
.stat-yield__label { display: inline-flex !important; align-items: center; gap: 5px; }
.stat-yield__label .ui-ico { width: 16px; height: 16px; color: #5eead4; }
#statsRow .stat-yield__value .num { font-size: 24px !important; }
.stat-yield__done { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #9fb3c8; }
.stat-yield__bar { flex: 1 1 auto; min-width: 46px; height: 6px; border-radius: 99px; background: rgba(148, 163, 184, .2); overflow: hidden; display: block; }
.stat-yield__bar b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22d3ee, #34d399); }
.stat-yield__done strong { color: #e2f3ff; font-size: 13px; }
.stat-yield__done.is-warn .stat-yield__bar b { background: linear-gradient(90deg, #f59e0b, #facc15); }
.stat-yield__done.is-bad .stat-yield__bar b { background: linear-gradient(90deg, #ef4444, #fb7185); }

/* 8 看板：异常关注 / 排班信息 */
.kanban-focus-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.kanban-focus { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid rgba(125, 211, 252, .28); background: rgba(8, 25, 45, .6); color: #d7ecff; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.kanban-focus .ui-ico { width: 15px; height: 15px; }
.kanban-focus b { font-size: 15px; color: #fff; }
.kanban-focus:hover:not(:disabled) { border-color: rgba(125, 211, 252, .7); background: rgba(14, 50, 85, .8); }
.kanban-focus.is-on { border-color: #38bdf8; background: linear-gradient(180deg, rgba(56, 189, 248, .35), rgba(14, 60, 100, .7)); box-shadow: 0 0 0 1px rgba(56, 189, 248, .5), 0 0 12px rgba(56, 189, 248, .35); }
.kanban-focus.is-zero, .kanban-focus:disabled { opacity: .45; cursor: default; }
.kanban-focus--risk .ui-ico { color: #fb7185; }
.kanban-focus--health .ui-ico { color: #f472b6; }
.kanban-focus--diff .ui-ico { color: #fb923c; }
.kanban-focus--odd .ui-ico { color: #facc15; }
.kanban-focus--unassigned { width: 100%; margin-top: 6px; }
.kanban-focus--unassigned .ui-ico { color: #a5b4fc; }
.kanban-crew-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; color: #cfe6fb; }
.kanban-crew-name { font-weight: 700; text-align: center; }
.kanban-crew-bar { height: 7px; border-radius: 99px; background: rgba(148, 163, 184, .2); overflow: hidden; display: block; }
.kanban-crew-bar i { display: block; height: 100%; border-radius: inherit; }
.kanban-crew-row--day .kanban-crew-bar i { background: linear-gradient(90deg, #fbbf24, #fde68a); }
.kanban-crew-row--night .kanban-crew-bar i { background: linear-gradient(90deg, #6366f1, #a5b4fc); }
.kanban-crew-val b { font-size: 16px; color: #fff; margin-right: 1px; }
.kanban-filter .st-ico { width: 18px; height: 18px; margin-right: 2px; }
.kanban-filter .st-ico .ui-ico { width: 12px; height: 12px; }
.kanban-filter--all .st-ico { --st: #38bdf8; }

/* 9 机台状态图例：同一行、与查询按钮等高 */
#wallStatusLegend { gap: 6px 8px !important; align-items: flex-start !important; }
#wallStatusLegend .dl-chip-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 0 0 auto; }
#wallStatusLegend .dl-chip { height: 36px !important; min-height: 36px !important; padding: 0 10px !important; gap: 4px !important; border-radius: 9px !important; font-size: 13px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
#wallStatusLegend .dl-chip .st-ico { margin-right: 2px; }
#wallStatusLegend .dl-chip-dur { font-size: 12px !important; line-height: 1.2; }
#wallStatusLegend .dl-legend-gap { display: none !important; }
#wallStatusLegend .dl-sort-cycle { height: 36px !important; min-height: 36px !important; padding: 0 10px !important; flex-direction: row !important; gap: 6px !important; border-radius: 9px !important; align-self: flex-start; }
#wallStatusLegend .dl-sort-caption { font-size: 13px !important; white-space: nowrap; }

/* 5 机台分组 */
.grp-steps { list-style: none; display: flex; gap: 10px; margin: 0 0 10px; padding: 0; flex-wrap: wrap; }
.grp-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: rgba(14, 40, 70, .7); border: 1px solid rgba(125, 211, 252, .25); color: #d4e9fb; font-size: 13px; }
.grp-steps li b { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #38bdf8, #2563eb); color: #fff; font-size: 12px; }
.grp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.grp-main { min-width: 0; }
.grp-list { position: sticky; top: 0; max-height: calc(var(--vh, 1vh) * 64); overflow: auto; padding: 12px; border-radius: 12px; background: rgba(6, 20, 38, .65); border: 1px solid rgba(125, 211, 252, .22); display: flex; flex-direction: column; gap: 10px; }
.grp-list-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; color: #e6f4ff; }
.grp-list-title .ui-ico { width: 16px; height: 16px; color: #38bdf8; }
.grp-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grp-summary div { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 4px; border-radius: 10px; background: rgba(14, 40, 70, .7); border: 1px solid rgba(125, 211, 252, .2); }
.grp-summary b { font-size: 20px; color: #fff; line-height: 1.1; }
.grp-summary span { font-size: 12px; color: #9fb3c8; }
.grp-summary .is-warn { border-color: rgba(251, 191, 36, .55); }
.grp-summary .is-warn b { color: #fbbf24; }
.grp-summary .is-ok b { color: #34d399; }
.grp-card { padding: 8px 10px; border-radius: 10px; background: rgba(12, 32, 58, .7); border: 1px solid rgba(125, 211, 252, .18); }
.grp-card-head { display: flex; align-items: center; gap: 8px; }
.grp-card-head strong { display: inline-flex; align-items: center; gap: 5px; color: #e6f4ff; font-size: 14px; }
.grp-card-head strong .ui-ico { width: 14px; height: 14px; color: #38bdf8; }
.grp-card-head > span:not(.grp-card-actions) { color: #9fb3c8; font-size: 12px; }
.grp-card-head .grp-card-actions { margin-left: auto; display: inline-flex; gap: 4px; }
.grp-card-head .grp-card-actions .link { height: 24px; padding: 0 8px; font-size: 12px; }
.grp-card-ids { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.grp-card-ids .schedule-chip { font-size: 11px; padding: 1px 6px; }
.grp-card--rest { border-color: rgba(251, 191, 36, .45); }
.grp-card--rest .grp-card-head strong .ui-ico { color: #fbbf24; }
.schedule-chip.is-rest { border-color: rgba(251, 191, 36, .5); color: #fde68a; }
.grp-empty { margin: 0; font-size: 13px; color: #9fb3c8; text-align: center; padding: 6px; }
.grp-empty.is-ok { color: #34d399; }
.grp-tile { display: inline-flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.grp-tile-tag { font-size: 10px; line-height: 1.1; color: #7dd3fc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-tile-tag.is-none { color: #fbbf24; }
.grp-tile.is-grouped:not(.is-on) { opacity: .78; }
@media (max-width: 900px) { .grp-layout { grid-template-columns: 1fr; } .grp-list { position: static; max-height: none; } }

/* 6 参数设定页签 */
.site-cfg-tabs { margin-bottom: 12px; }
.site-cfg-pane { display: flex; flex-direction: column; gap: 10px; }
.site-cfg-pane[hidden] { display: none !important; }
.site-cfg-remap-box, .site-cfg-collect-live { padding: 12px; border-radius: 12px; background: rgba(8, 24, 44, .6); border: 1px solid rgba(125, 211, 252, .2); }
.site-cfg-remap-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.site-cfg-kv { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.site-cfg-kv th, .site-cfg-kv td { padding: 7px 10px; border-bottom: 1px solid rgba(125, 211, 252, .12); }
.site-cfg-kv th { width: 40%; color: #9fb3c8; font-weight: 500; }
.site-cfg-kv td { color: #e6f4ff; font-variant-numeric: tabular-nums; }

/* 3 风险计算链 / 健康公式 */
.risk-chain-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.risk-chain-steps > li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 10px; background: rgba(10, 30, 54, .6); border: 1px solid rgba(125, 211, 252, .16); }
.risk-chain-steps .n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #38bdf8, #6366f1); color: #fff; font-weight: 700; font-size: 13px; }
.risk-chain-steps strong { display: block; color: #e6f4ff; margin-bottom: 2px; }
.risk-chain-steps p { margin: 0; color: #b9d3ea; font-size: 13px; }
.risk-chain-steps p b { color: #fbbf24; }
.risk-chain-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.risk-chain-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; background: rgba(251, 113, 133, .14); border: 1px solid rgba(251, 113, 133, .45); color: #fecdd3; font-size: 12px; }
.risk-chain-chip b { color: #fff; }
.risk-chain-chip.is-fatal { background: rgba(239, 68, 68, .2); border-color: rgba(239, 68, 68, .7); }
.risk-chain-scale { position: relative; display: flex; height: 10px; margin: 14px 0 6px; border-radius: 99px; overflow: visible; }
.risk-chain-scale .seg { display: block; height: 100%; }
.risk-chain-scale .seg--low { background: rgba(148, 163, 184, .35); border-radius: 99px 0 0 99px; }
.risk-chain-scale .seg--mid { background: rgba(251, 191, 36, .75); }
.risk-chain-scale:not(.is-fatal) .seg--mid { border-radius: 0 99px 99px 0; }
.risk-chain-scale .seg--high { background: rgba(239, 68, 68, .85); border-radius: 0 99px 99px 0; }
.risk-chain-scale .mark { position: absolute; top: -6px; transform: translateX(-50%); width: 2px; height: 22px; background: #fff; font-style: normal; }
.risk-chain-scale .mark b { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 12px; color: #fff; white-space: nowrap; }
.health-formula { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 6px; }
.hf-box { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; background: rgba(14, 40, 70, .8); border: 1px solid rgba(125, 211, 252, .25); color: #cfe6fb; font-size: 13px; }
.hf-box b { color: #fff; font-size: 15px; }
.hf-box.is-minus { border-color: rgba(251, 113, 133, .45); }
.hf-box.is-minus b { color: #fb7185; }
.hf-box.is-result { border-color: rgba(52, 211, 153, .6); background: rgba(16, 80, 60, .45); }
.hf-box.is-result b { color: #34d399; }
.hf-op { color: #7dd3fc; font-weight: 700; }
.health-scale { position: relative; display: flex; height: 22px; margin: 22px 0 8px; border-radius: 8px; overflow: visible; }
.health-scale .hs { display: flex; align-items: center; justify-content: center; height: 100%; font-style: normal; }
.health-scale .hs em { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.hs--bad { background: rgba(239, 68, 68, .45); border-radius: 8px 0 0 8px; }
.hs--warn { background: rgba(251, 191, 36, .45); }
.hs--mild { background: rgba(56, 189, 248, .45); }
.hs--ok { background: rgba(52, 211, 153, .55); border-radius: 0 8px 8px 0; }
.hs-mark { position: absolute; top: -18px; transform: translateX(-50%); font-size: 12px; color: #fff; padding: 0 6px; border-radius: 6px; background: #0ea5e9; }
.hs-mark::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 2px; height: 26px; background: #fff; transform: translateX(-50%); }

/* 4 算法框架 */
.guide-algo { margin: 16px 0; padding: 14px; border-radius: 12px; background: linear-gradient(180deg, rgba(14, 40, 72, .7), rgba(8, 22, 40, .6)); border: 1px solid rgba(125, 211, 252, .25); }
.guide-algo .guide-ai__tag { background: linear-gradient(135deg, #6366f1, #a855f7); }
.algo-flow { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; }
.algo-flow li { position: relative; flex: 1 1 0; min-width: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 14px; margin-right: 14px; border-radius: 10px; background: rgba(20, 56, 96, .55); border: 1px solid rgba(125, 211, 252, .3); text-align: center; font-size: 12px; color: #d7ecff; }
.algo-flow li:last-child { margin-right: 0; }
.algo-flow li:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 50%; transform: translateY(-50%); border: 6px solid transparent; border-left-color: #38bdf8; }
.algo-flow li b { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #0ea5e9; color: #fff; font-size: 11px; }
.algo-table td:nth-child(2), .algo-table td:nth-child(3) { text-align: left !important; }
.algo-fam { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; height: 24px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #fff; }
.algo-fam--stat { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.algo-fam--ml { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.algo-fam--dl { background: linear-gradient(135deg, #7c3aed, #c084fc); }

/* 7 大圆机表盘 */
.process-knit { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: radial-gradient(circle at 20% 50%, rgba(14, 60, 100, .55), rgba(6, 18, 34, .7)); border: 1px solid rgba(125, 211, 252, .22); }
.process-dial { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.process-dial-svg { width: 220px; height: 220px; }
.process-dial-svg svg { width: 100%; height: 100%; display: block; }
.pd-needles { transform-origin: 110px 110px; }
.pd-needles.is-spin { animation: pdSpin var(--pd-spin, 4s) linear infinite; }
@keyframes pdSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pd-needles.is-spin { animation: none; } }
.pd-num { font-size: 34px; font-weight: 800; fill: #f0f9ff; font-variant-numeric: tabular-nums; }
.pd-unit { font-size: 12px; fill: #7dd3fc; letter-spacing: .1em; }
.pd-state { font-size: 13px; font-weight: 700; }
.process-dial figcaption { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #9fb3c8; }
.process-dial figcaption b { font-size: 16px; color: #fff; }
.process-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pp-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 8px; border-radius: 12px; background: linear-gradient(180deg, rgba(8, 20, 36, .95), rgba(4, 12, 24, .95)); border: 1px solid rgba(125, 211, 252, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.pp-cell > span { font-size: 12px; color: #8fb3d4; letter-spacing: .04em; }
.pp-cell p { margin: 0; display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; }
.pp-cell p b { font-size: 24px; font-weight: 800; color: #5eead4; font-family: "DIN Alternate", "Bahnschrift", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.pp-cell p em { font-style: normal; font-size: 12px; color: #7dd3fc; }
.pp-cell input { width: 110px; text-align: center; font-size: 22px; font-weight: 800; color: #fde68a; background: transparent; border: 0; font-family: "DIN Alternate", "Bahnschrift", ui-monospace, monospace; }
.pp-cell--rpm p b { color: #4ade80; font-size: 28px; }
.pp-cell--stop p b { color: #fda4af; font-size: 17px; }
.pp-cell--remain p b { color: #93c5fd; font-size: 17px; }
.pp-cell .process-speed { display: inline-flex; align-items: center; gap: 8px; }
.pp-cell .process-step { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .process-knit { grid-template-columns: 1fr; justify-items: center; } }

/* 11 排班美化 */
#modalShiftSchedule .schedule-boards { gap: 14px; }
#modalShiftSchedule .schedule-board { border-radius: 14px; padding: 12px; background: linear-gradient(180deg, rgba(14, 40, 72, .75), rgba(6, 18, 34, .75)); border: 1px solid rgba(125, 211, 252, .22); }
#modalShiftSchedule .schedule-board h4 { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; padding: 6px 0; border-radius: 9px; font-size: 15px; letter-spacing: .1em; }
#scheduleDayTitle { background: linear-gradient(90deg, rgba(251, 191, 36, .28), rgba(251, 191, 36, .08)); color: #fde68a; }
#scheduleNightTitle { background: linear-gradient(90deg, rgba(99, 102, 241, .35), rgba(99, 102, 241, .08)); color: #c7d2fe; }
#scheduleDayTitle::before { content: "☀"; }
#scheduleNightTitle::before { content: "☾"; }
#modalShiftSchedule .schedule-stage { border-radius: 12px; }
#modalShiftSchedule .schedule-stage.is-on { box-shadow: 0 0 0 1px rgba(56, 189, 248, .6), 0 6px 18px rgba(14, 116, 180, .25); }
#modalShiftSchedule .schedule-card { border-radius: 14px; }
#modalShiftSchedule .schedule-qr-wrap img { border-radius: 12px; padding: 8px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
#modalShiftSchedule .schedule-edit { border-radius: 12px; padding: 10px 12px; background: rgba(8, 24, 44, .6); border: 1px dashed rgba(125, 211, 252, .3); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }#statsRow { height: auto !important; min-height: 0 !important; align-items: stretch; }
#statsRow .stats-row__group { height: 76px !important; min-height: 0 !important; max-height: 76px; box-sizing: border-box; }
#statsRow .stat-merge__items { height: 100%; }
#statsRow .stat-merge__lead, #statsRow .stat-merge__item { height: 100% !important; box-sizing: border-box; }
.stat-yield__label { justify-content: flex-start !important; width: 100%; font-size: 13px; }
.stat-yield__month { margin-left: auto; font-size: 11px; color: #8fb3d4; font-weight: 400; }
#statsRow .stat-yield__value { line-height: 1.05 !important; margin: 0 !important; }
#modalShiftSchedule .schedule-tabs[hidden], #scheduleDateToolbar[hidden], #siteCfgActions[hidden] { display: none !important; }
.site-cfg-pane[data-site-pane="collect"] .site-cfg-collect-live { order: -1; }
#rosterBox { padding: 12px; border-radius: 12px; background: rgba(8, 24, 44, .6); border: 1px solid rgba(125, 211, 252, .2); }
#rosterBox h4 { margin: 0 0 4px; }
#rosterBox .roster-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#rosterBox .roster-actions a.link, #rosterBox .roster-actions .schedule-file-link { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(125, 211, 252, .4); background: rgba(14, 50, 85, .7); color: #d7ecff !important; text-decoration: none; font-size: 13px; cursor: pointer; }
#rosterBox .roster-actions a.link:hover, #rosterBox .roster-actions .schedule-file-link:hover { border-color: #38bdf8; background: rgba(20, 70, 115, .85); }
#rosterBox .roster-actions .ui-ico { width: 14px; height: 14px; }#modalShiftSchedule input[type="text"], #modalShiftSchedule input[type="date"], #modalShiftSchedule select, #modalBackendAdmin input[type="text"], #modalBackendAdmin input[type="number"], #modalBackendAdmin input[type="password"] { height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(125, 211, 252, .35); background: rgba(6, 20, 38, .9); color: #e6f4ff; color-scheme: dark; font-size: 13px; box-sizing: border-box; }
#modalShiftSchedule input:focus, #modalShiftSchedule select:focus, #modalBackendAdmin input:focus { outline: none; border-color: #38bdf8; box-shadow: 0 0 0 2px rgba(56, 189, 248, .25); }
#modalShiftSchedule input::placeholder, #modalBackendAdmin input::placeholder { color: #5f7f9d; }
#modalShiftSchedule .schedule-toolbar label, #modalShiftSchedule .schedule-edit label { display: inline-flex; align-items: center; gap: 6px; color: #9fb3c8; font-size: 13px; }
#grpName { flex: 1 1 200px; min-width: 160px; }
#grpPasteIds { flex: 1 1 240px; min-width: 180px; }
.pp-cell input { width: 7ch; }
/* ===== t103 自适应：大屏等比放大 + 上下拖拽分隔条 + 平板/手机 ===== */
:root.ui-scaled {
  --vh: calc(1vh / var(--ui-scale, 1));
  --vw: calc(1vw / var(--ui-scale, 1));
}
:root.ui-scaled body { overflow: hidden; }
:root.ui-scaled #app {
  width: calc(100vw / var(--ui-scale, 1));
  height: calc(100vh / var(--ui-scale, 1)) !important;
  transform: scale(var(--ui-scale, 1));
  transform-origin: 0 0;
}
:root.ui-scaled .modal-backdrop > .modal,
:root.ui-scaled .modal-backdrop > [role="dialog"] {
  transform: scale(var(--ui-scale, 1));
  transform-origin: 50% 50%;
}
:root.ui-scaled #wallContextMenu,
:root.ui-scaled #railFlyout,
:root.ui-scaled .risk-tip,
:root.ui-scaled .risk-detail,
:root.ui-scaled .ana-tip {
  transform: scale(var(--ui-scale, 1));
  transform-origin: 0 0;
}

#app.app--row-sized { grid-template-rows: auto minmax(0, 1fr) var(--bottom-h, 340px) auto; }
footer.bottom { position: relative; }
.row-resizer {
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
  z-index: 30;
  cursor: row-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  outline: none;
}
.row-resizer i {
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 3px;
  background: rgba(94, 200, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(94, 200, 255, 0.12);
  transition: background 0.15s, width 0.15s;
}
.row-resizer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 200, 255, 0.22) 20%, rgba(94, 200, 255, 0.22) 80%, transparent);
  opacity: 0;
  transition: opacity 0.15s;
}
.row-resizer:hover i,
.row-resizer:focus-visible i,
body.row-resizing .row-resizer i { width: 96px; background: rgba(94, 255, 244, 0.85); }
.row-resizer:hover::before,
body.row-resizing .row-resizer::before { opacity: 1; }
body.row-resizing, body.row-resizing * { cursor: row-resize !important; user-select: none !important; }

@media (max-width: 1100px) {
  .row-resizer { display: none; }
  #app.app--row-sized { grid-template-rows: auto auto auto auto; }
}

/* 平板 */
@media (max-width: 1100px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .modal-backdrop { padding: 12px; align-items: flex-start; overflow-y: auto; }
  .modal-backdrop > .modal {
    width: min(100%, 960px) !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 auto;
  }
  .modal table { font-size: 12px; }
  .modal .table-wrap, .modal .report-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* 手机 */
@media (max-width: 640px) {
  :root { font-size: 14px; }
  .modal-backdrop { padding: 6px; }
  .modal-backdrop > .modal { border-radius: 10px; padding: 12px !important; }
  .modal header h3 { font-size: 15px; }
  .modal button { font-size: 14px; min-height: 34px; }
  /* iOS 输入框字号低于 16px 会在聚焦时自动放大页面 */
  input, select, textarea { font-size: 16px !important; }
  .stats-row, .stats-row__group { flex-wrap: wrap; }
}
/* t103b 窄屏：卡片墙与告警限高内部滚动，避免页面被摊成几万像素 */
@media (max-width: 1100px) {
  #machineCardGrid { max-height: min(68vh, 760px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .mid > aside.panel #rightPane { max-height: min(60vh, 640px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .dist-head { flex-wrap: wrap; row-gap: 8px; width: 100%; }
  .dist-head .head-exports { margin-left: auto; }
}
@media (max-width: 640px) {
  .stats-row { overflow: visible !important; height: auto !important; }
  #statsRow .stats-row__group.stat-merge { height: auto !important; min-height: 0 !important; max-height: none !important; flex-wrap: wrap; overflow: visible !important; }
  #statsRow .stat-merge--fleet { align-content: flex-start; row-gap: 6px; }
  #statsRow .stat-merge--fleet .stat-merge__lead,
  #statsRow .stat-merge--fleet .stat-merge__items { height: auto !important; min-height: 0 !important; max-height: none !important; }
  .stat-merge--fleet .stat-merge__lead { flex: 1 1 100%; width: auto !important; max-width: none !important; padding: 6px 10px; }
  .bottom-side-rail { max-width: 100%; box-sizing: border-box; }
  .stat-merge--fleet .stat-merge__items {
    flex: 1 1 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    transform: none !important;
    animation: none !important;
    width: auto !important;
  }
  .stat-merge--fleet .stat-merge__items > * { min-width: 0 !important; width: auto !important; margin: 0 !important; }
  .stat-merge--fleet .stat-merge__items > [aria-hidden="true"], .stat-merge--fleet .stat-merge__items > .is-clone { display: none !important; }
  .stat-merge--throughput { flex-direction: column; align-items: stretch !important; gap: 4px; }
  .stat-merge--throughput .stat-yield__done { position: static !important; width: 100% !important; }
  .plant-tabs { flex-wrap: wrap; row-gap: 6px; height: auto !important; }
  .dist-tabs { flex-wrap: wrap; width: 100%; }
}
/* t103c 窄屏底部：解除桌面行高 340px，体检/画像平板两列、手机一列，入口栏横排 */
@media (max-width: 1100px) {
  #app, #app.app--odd-detail, #app.app--row-sized { grid-template-rows: auto auto auto auto !important; }
  #app footer.bottom { display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important; }
  #app footer.bottom .bottom-charts {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 12px;
  }
  #app footer.bottom .bottom-charts > .chart-box { height: 460px !important; min-height: 0 !important; max-height: none !important; }
  #app footer.bottom .bottom-side-rail {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    flex: none !important;
    padding: 6px !important;
    gap: 6px;
  }
  #app footer.bottom .bottom-side-rail .side-rail-btn {
    min-height: 56px;
    height: auto !important;
    width: auto !important;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
  }
}
@media (max-width: 640px) {
  #app footer.bottom .bottom-charts { grid-template-columns: minmax(0, 1fr) !important; }
  #app footer.bottom .bottom-side-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* t104 顶部 logo：转速表盘 */
.title-block--brand .app-dial-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: initial;
  filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.35)) drop-shadow(0 0 16px rgba(56, 189, 248, 0.18));
}
.app-dial-logo svg { display: block; width: 100%; height: 100%; overflow: visible; }
.app-dial-logo .bd-arc { transition: stroke-dasharray 0.9s ease; }
.app-dial-logo .bd-ticks { transform-origin: 110px 110px; animation: pdSpin var(--bd-spin, 4s) linear infinite; }
.app-dial-logo .bd-core { animation: bdPulse 2.4s ease-in-out infinite; }
.app-dial-logo .bd-num { fill: #fff; font-weight: 800; font-size: 66px; font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif; letter-spacing: -1px; }
.app-dial-logo.is-idle .bd-ticks { stroke: #94a3b8; }
.app-brand-logo-btn:hover .app-dial-logo { filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.6)) drop-shadow(0 0 20px rgba(56, 189, 248, 0.3)); }
@keyframes bdPulse { 0%, 100% { stroke-opacity: 0.25; } 50% { stroke-opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) { .app-dial-logo .bd-ticks, .app-dial-logo .bd-core { animation: none; } }
@media (max-width: 1100px) { .title-block--brand .app-dial-logo { width: 42px; height: 42px; } }
@media (max-width: 640px) { .title-block--brand .app-dial-logo { width: 36px; height: 36px; } }
/* t105 logo 动效：刻度光浪 + 彗星绕行 + 渐变弧 + 反转内轨 + 呼吸光晕 */
.app-dial-logo .bd-ticks { animation: none; }
.app-dial-logo .bd-ticks line {
  stroke-opacity: 0.18;
  animation: bdWave var(--bd-spin, 4s) linear infinite;
  animation-delay: calc(var(--bd-spin, 4s) * var(--k, 0) * -1);
}
.app-dial-logo .bd-ticks line.is-major { stroke-width: 4; }
@keyframes bdWave {
  0% { stroke-opacity: 1; stroke: #d9ffe9; }
  12% { stroke-opacity: 0.75; stroke: #4ade80; }
  45% { stroke-opacity: 0.22; }
  100% { stroke-opacity: 0.16; }
}
.app-dial-logo .bd-comet { transform-origin: 110px 110px; animation: pdSpin var(--bd-orbit, 7s) linear infinite; }
.app-dial-logo .bd-orbit { transform-origin: 110px 110px; animation: pdSpin 18s linear infinite reverse; }
.app-dial-logo .bd-halo { transform-origin: 110px 110px; animation: bdHalo 3.2s ease-in-out infinite; }
@keyframes bdHalo { 0%, 100% { opacity: 0.35; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.03); } }
.app-dial-logo .bd-num { transform-box: fill-box; transform-origin: center; }
.app-dial-logo .bd-num.is-pop { animation: bdPop 0.6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bdPop { 0% { transform: scale(0.6); opacity: 0.2; } 100% { transform: scale(1); opacity: 1; } }
.app-dial-logo.is-idle .bd-comet { display: none; }
.app-dial-logo.is-idle .bd-ticks line { stroke: #94a3b8; }
.app-dial-logo.is-idle .bd-halo { animation: none; opacity: 0.2; }
@media (prefers-reduced-motion: reduce) {
  .app-dial-logo .bd-ticks line, .app-dial-logo .bd-comet, .app-dial-logo .bd-orbit, .app-dial-logo .bd-halo, .app-dial-logo .bd-num.is-pop { animation: none; }
  .app-dial-logo .bd-ticks line { stroke-opacity: 0.7; }
}
/* t106 分隔条：footer 有 overflow:hidden，把手必须在 footer 盒内，借负外边距占住上方间隙 */
#app {
  grid-template-rows: auto minmax(0, 1fr) minmax(260px, calc(var(--vh, 1vh) * 30)) auto;
}
#app.app--odd-detail {
  grid-template-rows: auto minmax(0, 1fr) minmax(300px, calc(var(--vh, 1vh) * 36)) auto;
}
#app footer.bottom { margin-top: -12px; padding-top: 14px; box-sizing: border-box; }
#app footer.bottom > .row-resizer {
  top: 0;
  height: 14px;
}
.row-resizer::before {
  opacity: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 200, 255, 0.35) 8%, rgba(94, 200, 255, 0.35) 92%, transparent);
}
.row-resizer i {
  position: relative;
  width: 64px;
  height: 8px;
  border-radius: 6px;
  background: rgba(10, 32, 56, 0.95);
  box-shadow: 0 0 0 1px rgba(94, 200, 255, 0.45);
  background-image: radial-gradient(circle, rgba(148, 233, 255, 0.9) 1.2px, transparent 1.6px);
  background-size: 9px 8px;
  background-position: center;
  background-repeat: repeat-x;
  background-clip: content-box;
  padding: 0 18px;
  box-sizing: border-box;
}
.row-resizer:hover::before,
body.row-resizing .row-resizer::before {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94, 255, 244, 0.85) 6%, rgba(94, 255, 244, 0.85) 94%, transparent);
  box-shadow: 0 0 8px rgba(94, 255, 244, 0.45);
}
.row-resizer:hover i,
.row-resizer:focus-visible i,
body.row-resizing .row-resizer i {
  width: 88px;
  background-color: rgba(14, 60, 80, 0.98);
  box-shadow: 0 0 0 1px rgba(94, 255, 244, 0.9), 0 0 10px rgba(94, 255, 244, 0.5);
}
@media (max-width: 1100px) {
  #app footer.bottom { margin-top: 0; padding-top: 0; }
}
.row-resizer::before { height: 2px; background: linear-gradient(90deg, transparent, rgba(94, 200, 255, 0.55) 6%, rgba(94, 200, 255, 0.55) 94%, transparent); }

/* t107 底部两块标题行：面板窄时说明按钮只留「指标说明」，不出横向滚动条 */
#riskPanel, #distPanel { container-type: inline-size; overflow-x: hidden !important; }
.dist-head .dist-tabs { min-width: 0; }
@container (max-width: 640px) {
  .dist-head .guide-full { display: none; }
}
@container (max-width: 520px) {
  .dist-head .dist-tab { padding-left: 7px; padding-right: 7px; gap: 4px; }
}
/* t108 车间电子看板：大屏缩放以左上为原点（全屏盒子贴 0,0，按中心放大会向左上溢出被裁） */
:root.ui-scaled .modal-backdrop > .modal.kanban-immersive { transform-origin: 0 0; }
@media (max-width: 1100px) {
  .modal.kanban-immersive { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
  .kanban-immersive .kanban-toolbar,
  .kanban-immersive .kanban-stage,
  .kanban-immersive .kanban-window-bar { flex: none !important; }
  .kanban-immersive .kanban-toolbar { grid-template-columns: minmax(0, 1fr) !important; height: auto !important; max-height: none !important; }
  #modalShopKanban.modal-backdrop .kanban-dash {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
  .kanban-immersive .kanban-dash-card { height: auto !important; min-height: 0 !important; min-width: 0 !important; width: auto !important; }
  .kanban-immersive .kanban-stage { height: auto !important; max-height: none !important; overflow: visible !important; }
  .kanban-immersive .kanban-filters { flex-wrap: wrap; }
  #modalShopKanban .kanban-window-bar { flex-wrap: wrap !important; row-gap: 8px; column-gap: 8px; height: auto !important; }
  #modalShopKanban .kanban-window-bar h3,
  #modalShopKanban .kanban-window-bar .kanban-clock,
  #modalShopKanban .kanban-window-bar button { white-space: nowrap; flex-shrink: 0; }
  #modalShopKanban .kanban-window-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  #modalShopKanban.modal-backdrop .kanban-dash { grid-template-columns: minmax(0, 1fr) !important; }
  #modalShopKanban .kanban-headline { min-width: 0; overflow-wrap: anywhere; }
}
/* t109 按钮与文本框内容统一上下左右居中；菜单项与卡片式按钮（弹出菜单、看板机台卡、排班阶段卡）保留原排版 */
button:not(.rail-flyout button):not(.kanban-tile):not(.schedule-stage):not(.app-brand-logo-btn),
.link.has-ui-ico, .alert-guide-link, .process-action {
  text-align: center !important;
  justify-content: center !important;
  align-items: center !important;
}
.alert-guide-link, .process-action { display: inline-flex !important; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]),
select,
textarea {
  text-align: center !important;
  text-align-last: center;
  vertical-align: middle;
}
input::placeholder, textarea::placeholder { text-align: center; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]) { line-height: normal; }
/* ===== t110 指标说明：标题 # 前缀 + 正文居中 ===== */
.index-guide h4::before,
.index-guide h5::before,
.guide-label::before {
  content: "#";
  margin-right: 6px;
  font-weight: 800;
  color: #38bdf8;
  opacity: .85;
}
.index-guide h5::before { color: #7dd3fc; opacity: .7; }
.index-guide .guide-ai h4::before,
.index-guide .guide-ai h5::before { color: #a78bfa; }
.index-guide h4,
.index-guide h5,
.guide-label { text-align: center !important; }
.index-guide .guide-ai .guide-ai__title { justify-content: center; text-align: center !important; }
.index-guide .index-guide-lead,
.index-guide .index-guide-note,
.index-guide > div > p,
.index-guide [data-guide-panel] p,
.algo-frame .index-guide-lead { text-align: center !important; }
.algo-pipe { justify-content: center; align-items: stretch; }
.algo-step {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center !important;
}
.algo-step b, .algo-step span { text-align: center; }
.algo-arrow { align-self: center; }
.index-guide table th,
.index-guide table td { text-align: center !important; vertical-align: middle !important; }
.dist-tab.has-ui-ico { display: inline-flex; align-items: center; justify-content: center; }
/* ===== t111 机台状态：甘特填满剩余高度 + 图例紧凑同行 + 机台号列收窄 ===== */
#wallStatusPane #wallStatusGantt {
  align-self: stretch !important;
  height: auto !important;
  max-height: 100% !important;
  min-height: 0 !important;
  box-sizing: border-box;
}
#wallStatusPane .downtime-legend button.dl-chip,
#wallStatusLegend .dl-chip {
  min-width: 84px !important;
  padding: 0 8px !important;
  font-size: 13px !important;
}
#wallStatusLegend { gap: 6px !important; }
#wallStatusLegend .dl-chip-wrap { padding: 2px 0 0 !important; }
#wallStatusPane .dl-sort-cycle--alone,
#wallStatusLegend .dl-sort-cycle { margin-left: 4px !important; min-width: 0 !important; padding: 0 9px !important; }
#wallStatusPane #wallStatusGantt .downtime-gantt-head,
#wallStatusPane #wallStatusGantt .downtime-gantt-row {
  grid-template-columns: 118px var(--dg-track-w, minmax(640px, 1fr)) !important;
}
#wallStatusPane #wallStatusGantt .downtime-gantt-head .dg-label,
#wallStatusPane #wallStatusGantt .downtime-gantt-row .dg-label {
  padding: 8px 6px !important;
  font-size: 14px !important;
  justify-content: center;
  text-align: center;
}
#wallStatusPane #wallStatusGantt .dg-date { font-size: 14px !important; }
footer.bottom .bottom-side-rail { overflow-y: auto; scrollbar-width: none; }
footer.bottom .bottom-side-rail::-webkit-scrollbar { display: none; }
/* ===== t112 面板 / 弹窗标题图标 ===== */
h2.has-ui-ico,
h3.has-ui-ico {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
}
h2.has-ui-ico > .ui-ico,
h3.has-ui-ico > .ui-ico {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  color: #5eead4;
  filter: drop-shadow(0 0 4px rgba(94, 234, 212, .45));
}
.guide-algo .index-guide-lead { margin-top: 4px; }.index-guide .algo-table th,
.index-guide .algo-table td,
.index-guide .algo-table td:nth-child(2),
.index-guide .algo-table td:nth-child(3) { text-align: center !important; vertical-align: middle !important; }
.algo-flow li span { word-break: keep-all; overflow-wrap: normal; }
.index-guide .guide-ai .guide-ai__title::before { margin-right: 0; }
/* ===== t113 看板卡片：今日状态甘特条 ===== */
.kanban-gantt { margin: 4px 0 2px; }
.kanban-gantt-track {
  position: relative;
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.10) 0 1px, transparent 1px 25%), rgba(8, 20, 38, .75);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .18);
}
.kanban-gantt-track > i { position: absolute; top: 0; bottom: 0; display: block; }
.kanban-gantt-track > i[data-kind="run"] { background: linear-gradient(180deg, #8ef6d8, #22c55e 55%, #15803d); }
.kanban-gantt-track > i[data-kind="idle"] { background: linear-gradient(180deg, #ffe894, #f4c430 55%, #b8860b); }
.kanban-gantt-track > i[data-kind="offline"] { background: linear-gradient(180deg, #94a3b8, #64748b 55%, #334155); }
.kanban-gantt-track > i[data-kind="unlinked"] { background: linear-gradient(180deg, #c4b5fd, #8b5cf6 55%, #6d28d9); }
.kanban-gantt-track > i[data-kind="stop"] { background: linear-gradient(180deg, #ff9ca2, #ef4444 55%, #b91c1c); }
.kanban-gantt-track > i[data-kind="stop"][data-category="human"] { background: linear-gradient(180deg, #f8c9d0, #e98998 55%, #be5464); }
.kanban-gantt-now { position: absolute; top: -1px; bottom: -1px; width: 2px; margin-left: -1px; background: #5efff4; box-shadow: 0 0 6px #5efff4; }
.kanban-gantt-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #7f9bb5; }
.kanban-gantt-axis { display: flex; justify-content: space-between; margin-top: 1px; font-size: 9px; line-height: 1.1; color: #7f9bb5; font-variant-numeric: tabular-nums; }
/* ===== t114 机台状态排序按钮：小一号 + 排序箭头图标 ===== */
#wallStatusPane #wallStatusLegend .dl-sort-cycle {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 9px !important;
  gap: 4px !important;
  border-width: 1px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  align-self: flex-start;
  margin-top: 3px;
}
#wallStatusPane #wallStatusLegend .dl-sort-caption { font-size: 12px !important; font-weight: 700; }
#wallStatusPane #wallStatusLegend .dl-sort-svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* ===== t117 排班中心：机台登记 / 挡车工 / 班次 / 排班 / 替班 ===== */
:is(#modalRoster, .rs-host) .modal--roster {
  --rs-line: rgba(125, 211, 252, .22);
  --rs-card: linear-gradient(180deg, rgba(16, 38, 66, .9), rgba(7, 19, 36, .94));
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1280px, calc(var(--vw, 1vw) * 97));
  height: min(860px, calc(var(--vh, 1vh) * 94));
  padding: 0;
  overflow: hidden;
  font-size: 13px;
  color: #dbeefc;
}
:is(#modalRoster, .rs-host) .roster-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rs-line);
  background: linear-gradient(90deg, rgba(56, 189, 248, .14), transparent 70%);
}
:is(#modalRoster, .rs-host) .roster-head h3 {
  position: relative;
  margin: 0;
  padding-left: 12px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #e0f7ff;
  white-space: nowrap;
}
:is(#modalRoster, .rs-host) .roster-head h3::before { content: ""; position: absolute; left: 0; top: 15%; bottom: 15%; width: 4px; border-radius: 2px; background: linear-gradient(180deg, #5eead4, #38bdf8); }
:is(#modalRoster, .rs-host) .roster-tabs { display: flex; flex: 1 1 auto; gap: 6px; overflow-x: auto; scrollbar-width: none; }
:is(#modalRoster, .rs-host) .roster-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, .2);
  background: rgba(8, 24, 44, .6);
  color: #a9c8e0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
:is(#modalRoster, .rs-host) .roster-tab .ui-ico { width: 15px; height: 15px; }
:is(#modalRoster, .rs-host) .roster-tab:hover { color: #e0f2fe; border-color: rgba(125, 211, 252, .45); }
:is(#modalRoster, .rs-host) .roster-tab.is-on { color: #04131f; background: linear-gradient(180deg, #5eead4, #22b8cf); border-color: transparent; box-shadow: 0 4px 14px rgba(34, 184, 207, .35); }
:is(#modalRoster, .rs-host) .roster-close { flex: 0 0 auto; }
:is(#modalRoster, .rs-host) .roster-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px 18px 18px; }
:is(#modalRoster, .rs-host) .roster-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: 80%;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  z-index: 5;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
}
:is(#modalRoster, .rs-host) .roster-toast--ok { background: #0f766e; color: #ecfeff; }
:is(#modalRoster, .rs-host) .roster-toast--bad { background: #9f1239; color: #fff1f2; }

/* 通用控件 */
:is(#modalRoster, .rs-host) [hidden] { display: none !important; }
:is(#modalRoster, .rs-host) .rs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
:is(#modalRoster, .rs-host) .rs-spacer { flex: 1 1 auto; }
:is(#modalRoster, .rs-host) .rs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, .32);
  background: linear-gradient(180deg, rgba(22, 56, 92, .9), rgba(10, 30, 54, .9));
  color: #d6ecfb;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s, filter .15s;
}
:is(#modalRoster, .rs-host) .rs-btn:hover { border-color: #38bdf8; filter: brightness(1.12); }
:is(#modalRoster, .rs-host) .rs-btn--primary { border-color: transparent; background: linear-gradient(180deg, #0ea5e9, #0369a1); color: #fff; box-shadow: 0 6px 16px rgba(3, 105, 161, .35); }
:is(#modalRoster, .rs-host) .rs-btn--danger { color: #b91c1c; border-color: #fecaca; background: #fff5f5; }
:is(#modalRoster, .rs-host) .rs-field, :is(#modalRoster, .rs-host) .rs-form label { display: inline-flex; align-items: center; gap: 6px; color: #9fc3dc; font-weight: 600; }
:is(#modalRoster, .rs-host) input, :is(#modalRoster, .rs-host) select, :is(#modalRoster, .rs-host) textarea {
  box-sizing: border-box;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(125, 211, 252, .28);
  background: rgba(2, 10, 22, .6);
  color: #e6f4ff;
  font-size: 13px;
}
:is(#modalRoster, .rs-host) input[type="checkbox"], :is(#modalRoster, .rs-host) input[type="radio"] { height: auto; width: auto; accent-color: #22d3ee; }
:is(#modalRoster, .rs-host) input[type="color"] { width: 40px; padding: 2px; }
:is(#modalRoster, .rs-host) textarea { height: auto; width: 100%; padding: 10px; line-height: 1.7; resize: vertical; text-align: left; }
:is(#modalRoster, .rs-host) .rs-select, :is(#modalRoster, .rs-host) .rs-search { min-width: 120px; text-align: center; }
:is(#modalRoster, .rs-host) .rs-lead { margin: 0 0 12px; color: #9fc3dc; line-height: 1.7; }
:is(#modalRoster, .rs-host) .rs-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
:is(#modalRoster, .rs-host) .rs-steps li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: rgba(8, 28, 50, .7); border: 1px solid var(--rs-line); color: #b9d7ec; }
:is(#modalRoster, .rs-host) .rs-steps b { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #0ea5e9; color: #fff; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-card { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rs-line); background: var(--rs-card); }
:is(#modalRoster, .rs-host) .rs-card h4, :is(#modalRoster, .rs-host) .rs-diff h4 { margin: 0 0 10px; font-size: 14px; color: #e0f2fe; letter-spacing: .06em; }
:is(#modalRoster, .rs-host) .rs-card h4 small { margin-left: 8px; font-weight: 400; color: #8fb3d0; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-empty { padding: 18px; text-align: center; color: #8fb3d0; }
:is(#modalRoster, .rs-host) .rs-warn-text { color: #fcd34d; line-height: 1.7; }
:is(#modalRoster, .rs-host) .sm { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: rgba(8, 28, 50, .8); border: 1px solid var(--rs-line); color: #b9d7ec; }
:is(#modalRoster, .rs-host) .sm b { color: #f0f9ff; font-size: 14px; }
:is(#modalRoster, .rs-host) .sm-ok { border-color: rgba(34, 197, 94, .45); } :is(#modalRoster, .rs-host) .sm-ok b { color: #4ade80; }
:is(#modalRoster, .rs-host) .sm-warn { border-color: rgba(250, 204, 21, .45); } :is(#modalRoster, .rs-host) .sm-warn b { color: #facc15; }
:is(#modalRoster, .rs-host) .sm-bad { border-color: rgba(244, 63, 94, .55); } :is(#modalRoster, .rs-host) .sm-bad b { color: #fb7185; }
:is(#modalRoster, .rs-host) .sm-dirty { border-color: #f59e0b; color: #fbbf24; }

/* 表格 */
:is(#modalRoster, .rs-host) .rs-table-wrap { overflow: auto; border-radius: 12px; border: 1px solid var(--rs-line); }
:is(#modalRoster, .rs-host) .rs-table-wrap--short { max-height: 320px; margin: 10px 0; }
:is(#modalRoster, .rs-host) .rs-table { width: 100%; border-collapse: collapse; }
:is(#modalRoster, .rs-host) .rs-table caption { caption-side: top; padding: 8px; text-align: left; color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-table th { position: sticky; top: 0; z-index: 1; padding: 8px 6px; background: #0d2a48; color: #a5e8ff; font-weight: 700; text-align: center; white-space: nowrap; }
:is(#modalRoster, .rs-host) .rs-table th small, :is(#modalRoster, .rs-host) .rs-grid th small { font-weight: 400; color: #7fa3c2; }
:is(#modalRoster, .rs-host) .rs-table td { padding: 5px 6px; border-top: 1px solid rgba(125, 211, 252, .1); text-align: center; vertical-align: middle; }
:is(#modalRoster, .rs-host) .rs-table tr.is-bad td { background: rgba(159, 18, 57, .18); }
:is(#modalRoster, .rs-host) .rs-table .ok { color: #4ade80; font-weight: 700; } :is(#modalRoster, .rs-host) .rs-table .bad { color: #fb7185; }
:is(#modalRoster, .rs-host) .rs-in { width: 100%; min-width: 70px; text-align: center; background: rgba(2, 10, 22, .35); border-color: transparent; }
:is(#modalRoster, .rs-host) .rs-in:hover { border-color: rgba(125, 211, 252, .3); }
:is(#modalRoster, .rs-host) .rs-in--name { font-weight: 700; color: #f0f9ff; }
:is(#modalRoster, .rs-host) .rs-ops { white-space: nowrap; }
:is(#modalRoster, .rs-host) .rs-op { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 9px; margin: 0 2px; border-radius: 7px; border: 1px solid rgba(125, 211, 252, .3); background: rgba(8, 28, 50, .8); color: #bae6fd; font-size: 12px; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-op:hover { border-color: #38bdf8; color: #fff; }
:is(#modalRoster, .rs-host) .rs-op--del { border-color: rgba(244, 63, 94, .35); color: #fda4af; }
:is(#modalRoster, .rs-host) .rs-op--del:hover { border-color: #fb7185; color: #fff; }
:is(#modalRoster, .rs-host) .rs-status { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 26px; border-radius: 99px; border: 1px solid rgba(34, 197, 94, .5); background: rgba(22, 101, 52, .35); color: #86efac; font-size: 12px; font-weight: 700; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-status.is-left { border-color: rgba(148, 163, 184, .5); background: rgba(51, 65, 85, .5); color: #cbd5e1; }
:is(#modalRoster, .rs-host) .rs-tag { display: inline-flex; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
:is(#modalRoster, .rs-host) .rs-tag--on { background: rgba(34, 197, 94, .2); color: #4ade80; }
:is(#modalRoster, .rs-host) .rs-tag--wait { background: rgba(56, 189, 248, .2); color: #7dd3fc; }
:is(#modalRoster, .rs-host) .rs-tag--end { background: rgba(100, 116, 139, .25); color: #94a3b8; }

/* 排班管理 */
:is(#modalRoster, .rs-host) .rs-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
:is(#modalRoster, .rs-host) .rs-seg-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  background: color-mix(in srgb, var(--c) 10%, rgba(8, 24, 44, .8));
  color: #cfe6f7;
  cursor: pointer;
  line-height: 1.2;
}
:is(#modalRoster, .rs-host) .rs-seg-btn b { font-size: 14px; }
:is(#modalRoster, .rs-host) .rs-seg-btn small { font-size: 11px; opacity: .75; }
:is(#modalRoster, .rs-host) .rs-seg-btn.is-on { background: var(--c); border-color: var(--c); color: #04131f; box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 45%, transparent); }
:is(#modalRoster, .rs-host) .rs-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 0 0 10px; padding: 12px; border-radius: 12px; border: 1px dashed rgba(56, 189, 248, .5); background: rgba(14, 116, 144, .14); color: #bae6fd; text-align: center; }
:is(#modalRoster, .rs-host) .rs-hint span { color: #8fb3d0; }
:is(#modalRoster, .rs-host) .rs-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
:is(#modalRoster, .rs-host) .rs-plan { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
:is(#modalRoster, .rs-host) .rs-grid-wrap { border-radius: 14px; border: 1px solid var(--rs-line); background: var(--rs-card); overflow: hidden; }
:is(#modalRoster, .rs-host) .rs-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
:is(#modalRoster, .rs-host) .rs-grid col.c-idx { width: 44px; } :is(#modalRoster, .rs-host) .rs-grid col.c-name { width: 132px; }
:is(#modalRoster, .rs-host) .rs-grid col.c-count { width: 54px; } :is(#modalRoster, .rs-host) .rs-grid col.c-ops { width: 118px; }
:is(#modalRoster, .rs-host) .rs-grid th { padding: 8px 4px; background: #0d2a48; color: #a5e8ff; font-weight: 700; text-align: center; border-bottom: 1px solid var(--rs-line); }
:is(#modalRoster, .rs-host) .rs-grid td { padding: 0; border-bottom: 1px solid rgba(125, 211, 252, .1); border-right: 1px solid rgba(125, 211, 252, .08); vertical-align: middle; text-align: center; }
:is(#modalRoster, .rs-host) .rs-grid tr { box-shadow: inset 4px 0 0 transparent; }
:is(#modalRoster, .rs-host) .rs-grid tr:has(.rs-cell:not([value=""])) { box-shadow: inset 4px 0 0 var(--pc); }
:is(#modalRoster, .rs-host) .rs-grid tr.is-focus td { background: rgba(56, 189, 248, .1); }
:is(#modalRoster, .rs-host) .rs-grid tr.is-bad td { background: rgba(159, 18, 57, .16); }
:is(#modalRoster, .rs-host) .rs-idx { color: #7fa3c2; font-variant-numeric: tabular-nums; }
:is(#modalRoster, .rs-host) .rs-cell { width: 100%; height: 36px; padding: 0 8px; border: 0; border-radius: 0; background: transparent; color: #f0f9ff; font-size: 14px; text-align: center; }
:is(#modalRoster, .rs-host) .rs-cell:focus { outline: none; background: rgba(14, 165, 233, .16); box-shadow: inset 0 0 0 2px #38bdf8; }
:is(#modalRoster, .rs-host) .rs-cell[data-col="name"] { font-weight: 700; }
.rs-wpick { position: fixed; z-index: 10050; max-height: 260px; overflow-y: auto; padding: 4px; box-sizing: border-box; border-radius: 8px; border: 1px solid rgba(56, 189, 248, .45); background: #0b2440; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); }
.rs-wpick[hidden] { display: none; }
.rs-wpick-item { display: block; width: 100%; height: 30px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; color: #e0f2fe; font-size: 14px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.rs-wpick-item:hover { background: rgba(56, 189, 248, .16); }
.rs-wpick-item.is-active { background: #0ea5e9; color: #fff; }
.rs-wpick-item.is-used { color: #64748b; }
:is(#modalRoster, .rs-host) .rs-cell--nos { font-family: "DIN Alternate", "Bahnschrift", ui-monospace, monospace; letter-spacing: .02em; }
:is(#modalRoster, .rs-host) .rs-cell.is-bad { color: #fda4af; }
:is(#modalRoster, .rs-host) .rs-name-cell { position: relative; }
:is(#modalRoster, .rs-host) .rs-sub-badge { display: block; margin: -4px 0 4px; font-size: 11px; color: #fbbf24; }
:is(#modalRoster, .rs-host) .rs-problem { padding: 0 8px 6px; font-size: 12px; color: #fda4af; line-height: 1.6; }
:is(#modalRoster, .rs-host) .rs-fix { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid #fbbf24; background: rgba(251, 191, 36, .15); color: #fde68a; font-weight: 700; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-note { padding: 0 8px 6px; font-size: 12px; color: #93c5fd; line-height: 1.6; }
:is(#modalRoster, .rs-host) .sm-info { border-color: rgba(96, 165, 250, .5); } :is(#modalRoster, .rs-host) .sm-info b { color: #93c5fd; }
:is(#modalRoster, .rs-host) .rs-table .info { color: #93c5fd; font-weight: 700; }
:is(#modalRoster, .rs-host) .rs-chip.is-offline { border-style: dotted; border-width: 1px; border-color: #93c5fd; }
:is(#modalRoster, .rs-host) .rs-chip.is-offline.is-on { border-style: dotted; }
:is(#modalRoster, .rs-host) .rs-count { font-weight: 800; color: #5eead4; font-variant-numeric: tabular-nums; }
:is(#modalRoster, .rs-host) .rs-tip, :is(#modalRoster, .rs-host) .rs-cover-tip { margin: 0; padding: 8px 10px; color: #7fa3c2; font-size: 12px; text-align: center; }
:is(#modalRoster, .rs-host) .rs-cover { position: sticky; top: 0; padding: 12px; border-radius: 14px; border: 1px solid var(--rs-line); background: var(--rs-card); max-height: calc(var(--vh, 1vh) * 62); overflow: auto; }
:is(#modalRoster, .rs-host) .rs-cover h4 { margin: 0 0 8px; font-size: 14px; color: #e0f2fe; text-align: center; letter-spacing: .1em; }
:is(#modalRoster, .rs-host) .rs-legend { display: flex; justify-content: center; gap: 12px; font-size: 12px; color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-legend .lg::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
:is(#modalRoster, .rs-host) .lg-on::before { background: #38bdf8; } :is(#modalRoster, .rs-host) .lg-free::before { background: transparent; border: 1px dashed #64748b; } :is(#modalRoster, .rs-host) .lg-bad::before { background: #e11d48; } :is(#modalRoster, .rs-host) .lg-off::before { background: transparent; border: 1px dotted #93c5fd; }
:is(#modalRoster, .rs-host) .rs-chip-group { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 4px; padding: 3px 8px; border-radius: 6px; background: rgba(56, 189, 248, .1); color: #a5e8ff; font-weight: 700; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-chip-group small { color: #7fa3c2; font-weight: 400; }
:is(#modalRoster, .rs-host) .rs-chip-row { display: flex; flex-wrap: wrap; gap: 4px; }
:is(#modalRoster, .rs-host) .rs-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 26px; padding: 0 4px; border-radius: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; border: 1px solid transparent; }
:is(#modalRoster, .rs-host) .rs-chip.is-on { background: color-mix(in srgb, var(--pc) 30%, transparent); border-color: color-mix(in srgb, var(--pc) 65%, transparent); color: #f0f9ff; }
:is(#modalRoster, .rs-host) .rs-chip.is-free { background: transparent; border: 1px dashed #64748b; color: #94a3b8; }
:is(#modalRoster, .rs-host) .rs-chip.is-free:hover { border-color: #38bdf8; color: #e0f2fe; }
:is(#modalRoster, .rs-host) .rs-chip.is-bad { background: #be123c; color: #fff; }
:is(#modalRoster, .rs-host) .rs-chips { touch-action: none; user-select: none; }
:is(#modalRoster, .rs-host) .rs-chip.is-mine { box-shadow: 0 0 0 2px #fbbf24; }
:is(#modalRoster, .rs-host) .rs-chip.is-pick { box-shadow: 0 0 0 2px #38bdf8; transform: scale(1.08); }
:is(#modalRoster, .rs-host) .rs-chip-sel { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 6px 10px; border-radius: 6px; background: #1f5eff; color: #fff; font-size: 12px; font-weight: 600; }
:is(#modalRoster, .rs-host) .rs-chip-sel .rs-link { color: #fff; text-decoration: underline; }
:is(#modalRoster, .rs-host) .rs-chip-group .rs-link { margin-left: auto; padding: 0 4px; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-chip-group small { margin-left: 8px; }
:is(#modalRoster, .rs-host) .rs-cover-tip b { color: #fbbf24; }

/* 排班管理：粘贴排班 / 手工排班 两段 */
:is(#modalRoster, .rs-host) .rs-autosave { font-size: 12px; color: #7fa3c2; }
:is(#modalRoster, .rs-host) .rs-pane { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rs-line); background: var(--rs-card); }
:is(#modalRoster, .rs-host) .rs-pane > header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; padding: 0; border: 0; box-shadow: none; }
:is(#modalRoster, .rs-host) .rs-pane > header > b { font-size: 15px; color: #e0f2fe; }
:is(#modalRoster, .rs-host) .rs-pane > header > small { font-size: 12px; color: #7fa3c2; }
:is(#modalRoster, .rs-host) .rs-paste textarea { width: 100%; box-sizing: border-box; min-height: 104px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rs-line); background: rgba(8, 20, 38, .6); color: #e0f2fe; font: 14px/1.6 ui-monospace, Consolas, "Microsoft YaHei", monospace; resize: vertical; }
:is(#modalRoster, .rs-host) .rs-paste-msg { margin: 6px 0 0; font-size: 12px; color: #7fa3c2; line-height: 1.6; }
:is(#modalRoster, .rs-host) .rs-paste-msg.is-ok { color: #34d399; }
:is(#modalRoster, .rs-host) .rs-paste-msg.is-bad { color: #fb7185; }
:is(#modalRoster, .rs-host) .rs-share-wrap { max-height: 60vh; overflow: auto; border-radius: 10px; border: 1px solid var(--rs-line); background: #fff; }
:is(#modalRoster, .rs-host) .rs-share-img { display: block; width: 100%; height: auto; }

/* 上传差异 / 列对应 */
:is(#modalRoster, .rs-host) .rs-diff { margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(251, 191, 36, .4); background: rgba(120, 80, 10, .14); }
:is(#modalRoster, .rs-host) .rs-diff p { margin: 6px 0; line-height: 1.7; }
:is(#modalRoster, .rs-host) .rs-diff-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
:is(#modalRoster, .rs-host) .rs-diff-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
:is(#modalRoster, .rs-host) .rs-map-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
:is(#modalRoster, .rs-host) .rs-map-row label { display: inline-flex; align-items: center; gap: 6px; color: #9fc3dc; font-weight: 600; }
:is(#modalRoster, .rs-host) .rs-group-chips { display: flex; flex-wrap: wrap; gap: 6px; }
:is(#modalRoster, .rs-host) .rs-group-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: rgba(56, 189, 248, .12); border: 1px solid var(--rs-line); color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-group-chip b { color: #e0f2fe; }
:is(#modalRoster, .rs-host) .rs-check { display: inline-flex; align-items: center; gap: 6px; color: #b9d7ec; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-check--line { margin-top: 10px; }

/* 班次管理 */
:is(#modalRoster, .rs-host) .rs-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 12px; }
:is(#modalRoster, .rs-host) .rs-preset { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; padding: 10px; border-radius: 14px; border: 1px solid var(--rs-line); background: var(--rs-card); color: #dbeefc; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-preset b { font-size: 15px; }
:is(#modalRoster, .rs-host) .rs-preset span { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
:is(#modalRoster, .rs-host) .rs-preset i { font-style: normal; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c, #64748b) 22%, transparent); color: #cfe6f7; }
:is(#modalRoster, .rs-host) .rs-preset.is-on { border-color: #22d3ee; box-shadow: 0 0 0 2px rgba(34, 211, 238, .35); }
:is(#modalRoster, .rs-host) .rs-timeline { margin: 0 0 14px; }
:is(#modalRoster, .rs-host) .rs-tl-bar { position: relative; height: 30px; border-radius: 8px; background: rgba(2, 10, 22, .6); border: 1px solid var(--rs-line); overflow: hidden; }
:is(#modalRoster, .rs-host) .rs-tl-bar span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 55%, transparent); border-right: 1px solid rgba(0, 0, 0, .3); color: #fff; font-size: 12px; font-weight: 700; overflow: hidden; white-space: nowrap; }
:is(#modalRoster, .rs-host) .rs-tl-axis { position: relative; height: 18px; }
:is(#modalRoster, .rs-host) .rs-tl-axis i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: #7fa3c2; }
:is(#modalRoster, .rs-host) .rs-tl-axis i:first-child { transform: none; } :is(#modalRoster, .rs-host) .rs-tl-axis i:last-child { transform: translateX(-100%); }

/* 表单与对话框 */
:is(#modalRoster, .rs-host) .rs-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
:is(#modalRoster, .rs-host) .rs-form--inline { justify-content: center; }
:is(#modalRoster, .rs-host) .rs-dlg-mask { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 8, 18, .6); }
:is(#modalRoster, .rs-host) .rs-dlg { width: min(560px, 100%); max-height: 100%; display: flex; flex-direction: column; border-radius: 16px; border: 1px solid rgba(125, 211, 252, .35); background: linear-gradient(180deg, #123257, #081a30); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
:is(#modalRoster, .rs-host) .rs-dlg header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rs-line); }
:is(#modalRoster, .rs-host) .rs-dlg header h4 { margin: 0; font-size: 15px; color: #e0f7ff; }
:is(#modalRoster, .rs-host) .rs-dlg-x { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--rs-line); background: transparent; color: #9fc3dc; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-dlg-body { padding: 14px 16px; overflow: auto; }
:is(#modalRoster, .rs-host) .rs-dlg footer { display: flex; justify-content: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--rs-line); }
:is(#modalRoster, .rs-host) .rs-dlg-tip { margin: 8px 0; color: #8fb3d0; font-size: 12px; line-height: 1.7; }
:is(#modalRoster, .rs-host) .rs-dlg-tip code { padding: 1px 6px; border-radius: 5px; background: rgba(56, 189, 248, .15); color: #bae6fd; }
:is(#modalRoster, .rs-host) .rs-dlg:has(.rs-paste-preview, .rs-share-img) { width: min(720px, 100%); }
:is(#modalRoster, .rs-host) .rs-paste-src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: #cfe6f7; }
:is(#modalRoster, .rs-host) .rs-paste-lbl { flex: 0 0 64px; }
:is(#modalRoster, .rs-host) .rs-paste-src select { min-width: 150px; }
:is(#modalRoster, .rs-host) .rs-paste-day { font-variant-numeric: tabular-nums; }
:is(#modalRoster, .rs-host) .rs-paste-shifts { display: flex; flex-wrap: wrap; gap: 6px; }
:is(#modalRoster, .rs-host) .rs-paste-none { font-weight: 400; color: #7fa3c2; }
:is(#modalRoster, .rs-host) .rs-paste-shift { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-paste-shift small { font-weight: 400; opacity: .75; }
:is(#modalRoster, .rs-host) .rs-paste-shift.is-on { background: var(--c); border-color: var(--c); color: #fff; }
:is(#modalRoster, .rs-host) .rs-toolbar--plan { align-items: center; }
:is(#modalRoster, .rs-host) .rs-plan-head { display: flex; flex-direction: column; gap: 8px; }
:is(#modalRoster, .rs-host) .rs-plan-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:is(#modalRoster, .rs-host) .rs-plan-head .rs-summary { margin: 0; }
:is(#modalRoster, .rs-host) .rs-paste-btn { align-self: center; margin-left: 20px; }
:is(#modalRoster, .rs-host) .rs-paste-src select { height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--rs-line); background: rgba(8, 28, 50, .7); color: inherit; font-size: 14px; }
:is(#modalRoster, .rs-host) .rs-dlg #rsPasteText { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rs-line); background: rgba(8, 28, 50, .7); color: #eaf6ff; font: 14px/1.6 ui-monospace, Consolas, "Microsoft YaHei", monospace; text-align: left; resize: vertical; }
:is(#modalRoster, .rs-host) .rs-paste-preview:empty { display: none; }
:is(#modalRoster, .rs-host) .rs-paste-preview { margin-top: 10px; }
:is(#modalRoster, .rs-host) .rs-paste-sum { margin: 0 0 6px; font-size: 13px; color: #a5e8ff; }
:is(#modalRoster, .rs-host) .rs-paste-empty { margin: 0; font-size: 13px; color: #fda4af; }
:is(#modalRoster, .rs-host) .rs-paste-wrap { max-height: 240px; overflow: auto; border-radius: 10px; border: 1px solid var(--rs-line); }
:is(#modalRoster, .rs-host) .rs-paste-table { width: 100%; border-collapse: collapse; font-size: 13px; }
:is(#modalRoster, .rs-host) .rs-paste-table th { position: sticky; top: 0; padding: 6px 10px; text-align: left; background: #12385c; color: #e0f2fe; }
:is(#modalRoster, .rs-host) .rs-paste-table td { padding: 6px 10px; border-top: 1px solid var(--rs-line); word-break: break-all; }
:is(#modalRoster, .rs-host) .rs-paste-table tr.is-bad td { background: rgba(244, 63, 94, .12); }
:is(#modalRoster, .rs-host) .rs-paste-dup { color: #f43f5e; }
:is(#modalRoster, .rs-host) .rs-paste-new { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: rgba(34, 197, 94, .18); color: #4ade80; font-size: 11px; }
:is(#modalRoster, .rs-host) .rs-share-img { max-height: 60vh; overflow: auto; border-radius: 10px; border: 1px solid var(--rs-line); background: #fff; }
:is(#modalRoster, .rs-host) .rs-share-img img { display: block; width: 100%; height: auto; }
:is(#modalRoster, .rs-host) #rsChips .rs-chip { touch-action: none; user-select: none; }
:is(#modalRoster, .rs-host) .rs-radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
:is(#modalRoster, .rs-host) .rs-radio-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--rs-line); background: rgba(8, 28, 50, .7); text-align: center; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-radio-card:has(input:checked) { border-color: #22d3ee; box-shadow: 0 0 0 2px rgba(34, 211, 238, .3); }
:is(#modalRoster, .rs-host) .rs-radio-card span { font-size: 12px; color: #8fb3d0; }
:is(#modalRoster, .rs-host) .rs-checks { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 980px) {
  :is(#modalRoster, .rs-host) .rs-plan { grid-template-columns: 1fr; }
  :is(#modalRoster, .rs-host) .rs-cover { position: static; max-height: none; }
}
@media (max-width: 640px) {
  :is(#modalRoster, .rs-host) .modal--roster { width: 100vw; height: calc(var(--vh, 1vh) * 100); border-radius: 0; }
  :is(#modalRoster, .rs-host) .roster-head { flex-wrap: wrap; padding: 10px 12px; }
  :is(#modalRoster, .rs-host) .roster-tabs { order: 3; flex-basis: 100%; }
  :is(#modalRoster, .rs-host) .roster-body { padding: 10px; }
  :is(#modalRoster, .rs-host) .rs-grid col.c-ops { width: 64px; }
  :is(#modalRoster, .rs-host) .rs-op { padding: 0 6px; }
  :is(#modalRoster, .rs-host) .rs-radio-cards { grid-template-columns: 1fr; }
}

/* ===== t116 设备总数台数：与产线页签台数同色（4F 青绿、5F 紫） ===== */
#statsRow .stat-merge__lead--4f .stat-merge__total .num {
  color: #14b8a6 !important;
  text-shadow: 0 0 10px rgba(20, 184, 166, .55), 0 2px 6px rgba(0, 0, 0, .35);
}
#statsRow .stat-merge__lead--5f .stat-merge__total .num {
  color: #8b5cf6 !important;
  text-shadow: 0 0 10px rgba(139, 92, 246, .55), 0 2px 6px rgba(0, 0, 0, .35);
}

/* ===== t115 工艺参数控制弹窗：统一深蓝科技风、频率手工设定、设备列表排序 ===== */
#modalProcessParams .modal--process {
  --pp-line: rgba(125, 211, 252, .22);
  --pp-card: linear-gradient(180deg, rgba(16, 38, 66, .92), rgba(7, 19, 36, .95));
  width: min(1080px, calc(var(--vw, 1vw) * 96));
  border-radius: 18px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(56, 189, 248, .12), transparent 60%),
    linear-gradient(180deg, #0f2a4a 0%, #0a1f38 55%, #06152a 100%);
  border: 1px solid rgba(125, 211, 252, .32);
  box-shadow: 0 0 0 1px rgba(8, 20, 40, .6), 0 28px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
#modalProcessParams .process-head {
  align-items: center;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--pp-line);
  background: linear-gradient(90deg, rgba(56, 189, 248, .14), transparent 70%);
}
#modalProcessParams .process-head h3 {
  position: relative;
  padding-left: 14px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .12em;
  color: #e0f7ff;
  text-shadow: 0 0 12px rgba(56, 189, 248, .35);
}
#modalProcessParams .process-head h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #5eead4, #38bdf8);
}
#modalProcessParams .process-live-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0 14px;
  font-size: 12px;
  color: #8fb8d6;
  text-shadow: none;
}
#modalProcessParams .process-live-hint::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: ppPulse 2s ease-out infinite;
}
@keyframes ppPulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
#modalProcessParams .process-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 32px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid rgba(125, 211, 252, .35);
  background: rgba(8, 24, 44, .7);
  color: #cfe9fb;
  font-size: 13px;
  text-decoration: none;
}
#modalProcessParams .process-close:hover { border-color: #fb7185; color: #fecdd3; background: rgba(136, 19, 55, .35); }
#modalProcessParams .process-layout {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 16px 20px 20px;
}

/* 状态横幅：与表盘同色，浅底 + 左色条 */
#modalProcessParams .process-banner {
  --tone: #94a3b8;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 0 16px 0 18px;
  border-radius: 12px;
  font-size: 15px;
  color: #e6f4ff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 30%, transparent), color-mix(in srgb, var(--tone) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent);
  box-shadow: inset 4px 0 0 var(--tone), 0 8px 20px rgba(0, 0, 0, .25);
}
#modalProcessParams .process-banner span { color: #a9c8e0; font-weight: 600; letter-spacing: .08em; }
#modalProcessParams .process-banner strong { color: var(--tone); font-size: 17px; letter-spacing: .06em; }
#modalProcessParams .process-banner--run { --tone: #22c55e; }
#modalProcessParams .process-banner--fault { --tone: #ef4444; }
#modalProcessParams .process-banner--human { --tone: #f472b6; }
#modalProcessParams .process-banner--idle { --tone: #facc15; }
#modalProcessParams .process-banner--off { --tone: #94a3b8; }

#modalProcessParams .process-knit {
  gap: 18px;
  padding: 16px;
  border-radius: 16px;
  background: radial-gradient(circle at 18% 50%, rgba(14, 70, 120, .5), rgba(6, 18, 34, .75) 70%);
  border: 1px solid var(--pp-line);
}
#modalProcessParams .process-panel { gap: 12px; }
#modalProcessParams .pp-cell {
  min-height: 84px;
  padding: 10px 8px;
  gap: 6px;
  border-radius: 14px;
  background: var(--pp-card);
  border: 1px solid var(--pp-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 14px rgba(0, 0, 0, .22);
  transition: border-color .2s, box-shadow .2s;
}
#modalProcessParams .pp-cell:hover { border-color: rgba(125, 211, 252, .45); }
#modalProcessParams .pp-cell > span { font-size: 12px; color: #93b9d8; letter-spacing: .1em; text-align: center; }
#modalProcessParams .pp-cell p b { font-size: 26px; }
#modalProcessParams .pp-cell--rpm p b { font-size: 30px; }
#modalProcessParams .pp-cell--stop p b,
#modalProcessParams .pp-cell--remain p b { font-size: 18px; }

/* 频率：手工输入 + 步进 */
#modalProcessParams .pp-cell--freq { border-color: rgba(251, 191, 36, .32); }
#modalProcessParams .pp-cell .process-speed { gap: 8px; }
#modalProcessParams .process-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  border: 1px solid rgba(94, 234, 212, .4);
  background: linear-gradient(180deg, rgba(20, 80, 110, .75), rgba(8, 36, 60, .85));
  color: #5eead4;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: transform .12s, border-color .15s, background .15s;
}
#modalProcessParams .process-step:hover:not(:disabled) { border-color: #5eead4; background: linear-gradient(180deg, rgba(20, 110, 140, .85), rgba(8, 50, 80, .9)); }
#modalProcessParams .process-step:active:not(:disabled) { transform: scale(.92); }
#modalProcessParams .process-step:disabled { opacity: .35; cursor: not-allowed; }
#modalProcessParams .pp-cell--freq input {
  width: 84px;
  height: 36px;
  padding: 0 4px;
  border-radius: 9px;
  border: 1px solid rgba(251, 191, 36, .35);
  background: rgba(2, 10, 22, .65);
  color: #fde68a;
  font-size: 22px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: border-color .15s, box-shadow .15s;
}
#modalProcessParams .pp-cell--freq input::-webkit-outer-spin-button,
#modalProcessParams .pp-cell--freq input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#modalProcessParams .pp-cell--freq input:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, .2); }
#modalProcessParams .pp-cell--freq input.is-dirty { border-color: #f59e0b; color: #fbbf24; box-shadow: 0 0 0 3px rgba(245, 158, 11, .22), 0 0 14px rgba(245, 158, 11, .25); }
#modalProcessParams .pp-cell--freq input:disabled { color: #64748b; border-color: rgba(100, 116, 139, .3); }
#modalProcessParams .pp-cell--freq p { align-items: center; }
#modalProcessParams .pp-sub { font-size: 11px; color: #7fa3c2; text-align: center; font-variant-numeric: tabular-nums; }
#modalProcessParams .pp-cell input[readonly] { width: 6ch; color: #fde68a; font-size: 26px; }

/* 本机关联 */
#modalProcessParams .process-relate {
  margin: 14px 0 8px;
  padding: 12px 14px 14px;
  border-radius: 16px;
  border: 1px solid var(--pp-line);
  background: var(--pp-card);
}
#modalProcessParams .process-relate h4 { font-size: 13px; letter-spacing: .14em; color: #a5e8ff; }
#modalProcessParams .process-relate-grid article {
  min-height: 58px;
  border-radius: 12px;
  background: rgba(2, 10, 22, .45);
  border: 1px solid rgba(125, 211, 252, .12);
}
#modalProcessParams .process-relate-grid span { font-size: 12px; color: #8fb3d0; }
#modalProcessParams .process-relate-grid b { font-size: 15px; }

/* 下发按钮与说明 */
#modalProcessParams .process-action {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: min(320px, 100%);
  height: 40px;
  margin: 14px auto 0 !important;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, .45);
  background: linear-gradient(180deg, #0ea5e9, #0369a1);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: 0 8px 20px rgba(3, 105, 161, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
#modalProcessParams .process-action:hover:not(:disabled) { filter: brightness(1.1); }
#modalProcessParams .process-action:disabled {
  opacity: 1;
  background: rgba(30, 50, 75, .6);
  border-color: rgba(125, 211, 252, .18);
  color: #7d97b0;
  box-shadow: none;
}
#modalProcessParams .process-note {
  margin: 10px auto 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: #a9c3da;
}
#modalProcessParams #processWriteNote { color: #fcd34d; }
#modalProcessParams #processWriteNote b { color: #fbbf24; }
#modalProcessParams #processWriteNote .link { margin-left: 8px; font-size: 12px; color: #7dd3fc; }
#modalProcessParams #processWriteNote.is-flash { animation: ppFlash .9s ease-out; }
@keyframes ppFlash { 0%, 40% { background: rgba(245, 158, 11, .22); } 100% { background: transparent; } }

/* 右侧设备列表 */
#modalProcessParams .process-side {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--pp-line);
  border-left: 1px solid var(--pp-line);
  border-radius: 16px;
  background: var(--pp-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 22px rgba(0, 0, 0, .28);
}
#modalProcessParams .process-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
#modalProcessParams .process-side-head h4 { margin: 0; font-size: 14px; letter-spacing: .12em; color: #e0f2fe; }
#modalProcessParams .process-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, .35);
  background: rgba(8, 28, 50, .8);
  color: #bae6fd;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
#modalProcessParams .process-sort:hover { border-color: #38bdf8; color: #e0f2fe; }
#modalProcessParams .process-sort.is-on { border-color: rgba(94, 234, 212, .55); color: #5eead4; background: rgba(13, 80, 90, .45); }
#modalProcessParams .process-sort .dl-sort-svg { width: 15px; height: 15px; flex: 0 0 auto; }
#modalProcessParams .process-search {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  border-color: rgba(125, 211, 252, .28);
  background: rgba(2, 10, 22, .6);
}
#modalProcessParams .process-search:focus { outline: none; border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56, 189, 248, .18); }
#modalProcessParams .process-machine-list { flex: 1 1 auto; gap: 4px; padding-right: 2px; }
#modalProcessParams .process-machine {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 8px 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(125, 211, 252, .1);
  background: rgba(8, 24, 44, .6);
  box-shadow: inset 3px 0 0 var(--pm-tone, #7fdcff);
  color: #d6ecfb;
  font-size: 13px;
  transition: background .15s, border-color .15s;
}
#modalProcessParams .process-machine:hover { background: rgba(22, 64, 100, .6); border-color: rgba(125, 211, 252, .3); }
#modalProcessParams .process-machine.is-on {
  border-color: rgba(94, 234, 212, .6);
  background: linear-gradient(90deg, rgba(13, 90, 110, .7), rgba(8, 40, 66, .7));
  box-shadow: inset 3px 0 0 var(--pm-tone, #7fdcff), 0 0 0 1px rgba(94, 234, 212, .2);
  color: #f0fdfa;
}
#modalProcessParams .process-machine .ui-ico { flex: 0 0 auto; width: 16px; height: 16px; color: var(--pm-tone, #7fdcff); }
#modalProcessParams .process-machine-id { flex: 1 1 auto; min-width: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
#modalProcessParams .process-machine-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  font-size: 11px;
  color: var(--pm-tone, #7fdcff);
  background: color-mix(in srgb, var(--pm-tone, #7fdcff) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--pm-tone, #7fdcff) 40%, transparent);
}

@media (max-width: 860px) {
  #modalProcessParams .process-layout { grid-template-columns: 1fr; }
  #modalProcessParams .process-machine-list { max-height: calc(var(--vh, 1vh) * 32); }
}
@media (max-width: 520px) {
  #modalProcessParams .process-head { padding: 12px 14px 10px; }
  #modalProcessParams .process-layout { padding: 12px; }
  #modalProcessParams .process-panel { grid-template-columns: 1fr 1fr; gap: 8px; }
  #modalProcessParams .pp-cell p b { font-size: 22px; }
}
/* ===== t118 后台基础数据 / 班次管理 / 机台框选分区 ===== */
.rs-host { position: relative; min-height: 360px; color: #dbeefc; font-size: 13px; --rs-line: rgba(125, 211, 252, .22); --rs-card: linear-gradient(180deg, rgba(16, 38, 66, .9), rgba(7, 19, 36, .94)); }
.rs-host > .rs-host-body { padding: 4px 2px 8px; }
.rs-host > .roster-toast { position: fixed; z-index: 3000; }
.rs-host .rs-dlg-mask { position: fixed; z-index: 2900; }
:is(#modalRoster, .rs-host) .rs-muted { color: #8fb3d0; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-sec { display: flex; align-items: center; gap: 8px; margin: 16px 0 8px; font-size: 14px; color: #e0f2fe; letter-spacing: .06em; }
:is(#modalRoster, .rs-host) .rs-sec b { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, #22d3ee, #0284c7); color: #fff; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-sec small { font-weight: 400; font-size: 12px; color: #8fb3d0; letter-spacing: 0; }
:is(#modalRoster, .rs-host) .rs-savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rs-line); background: rgba(6, 20, 38, .92); backdrop-filter: blur(6px); }
:is(#modalRoster, .rs-host) .rs-savebar > span:first-child { margin-right: auto; }

/* 班次管理 */
:is(#modalRoster, .rs-host) .rs-shift-hero { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(150px, .8fr) minmax(260px, 2fr); gap: 12px; align-items: stretch; padding: 14px; border-radius: 16px; border: 1px solid rgba(34, 211, 238, .35); background: radial-gradient(600px 160px at 0% 0%, rgba(34, 211, 238, .16), transparent 70%), var(--rs-card); }
:is(#modalRoster, .rs-host) .rs-hero-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px; border-radius: 12px; background: rgba(2, 10, 22, .45); text-align: center; }
:is(#modalRoster, .rs-host) .rs-hero-item span { font-size: 12px; color: #8fb3d0; }
:is(#modalRoster, .rs-host) .rs-hero-item b { font-size: 22px; font-weight: 800; color: #e0f7ff; letter-spacing: .06em; }
:is(#modalRoster, .rs-host) .rs-hero-item small { font-size: 12px; color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-hero-tl { display: flex; flex-direction: column; justify-content: center; }
:is(#modalRoster, .rs-host) .rs-preset { position: relative; align-items: stretch; text-align: center; transition: border-color .15s, transform .12s; }
:is(#modalRoster, .rs-host) .rs-preset:hover { transform: translateY(-1px); border-color: rgba(34, 211, 238, .55); }
:is(#modalRoster, .rs-host) .rs-preset small { color: #8fb3d0; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-preset .rs-tl-bar { display: block; align-self: stretch; width: 100%; box-sizing: border-box; height: 18px; margin-top: 6px; border-radius: 6px; }
:is(#modalRoster, .rs-host) .rs-preset .rs-tl-bar span { font-size: 10px; }
:is(#modalRoster, .rs-host) .rs-badge { position: absolute; top: -9px; right: 10px; padding: 1px 8px; border-radius: 99px; background: #0d9488; color: #ecfeff; font-size: 11px; font-style: normal; font-weight: 700; }
:is(#modalRoster, .rs-host) .rs-shift-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
:is(#modalRoster, .rs-host) .rs-shift-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-top: 4px solid var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, rgba(10, 28, 50, .95)), rgba(7, 19, 36, .95)); }
:is(#modalRoster, .rs-host) .rs-shift-card header { display: flex; align-items: center; gap: 8px; }
:is(#modalRoster, .rs-host) .rs-shift-card .rs-color { flex: 0 0 34px; width: 34px; height: 34px; padding: 2px; border-radius: 50%; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-shift-name { flex: 1 1 auto; min-width: 0; font-size: 16px !important; font-weight: 800; text-align: center; }
:is(#modalRoster, .rs-host) .rs-shift-card header .rs-op { flex: 0 0 auto; white-space: nowrap; }
:is(#modalRoster, .rs-host) .rs-hours { flex: 0 0 auto; padding: 2px 8px; border-radius: 99px; background: rgba(2, 10, 22, .5); color: #a5e8ff; font-size: 12px; white-space: nowrap; }
:is(#modalRoster, .rs-host) .rs-shift-times { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 6px; }
:is(#modalRoster, .rs-host) .rs-shift-times label, :is(#modalRoster, .rs-host) .rs-shift-alias { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #9fc3dc; text-align: center; }
:is(#modalRoster, .rs-host) .rs-shift-times input { width: 100%; font-size: 15px; text-align: center; }
:is(#modalRoster, .rs-host) .rs-arrow { padding-bottom: 8px; color: #7fa3c2; }
:is(#modalRoster, .rs-host) .rs-shift-alias input { width: 100%; text-align: center; }
:is(#modalRoster, .rs-host) .rs-shift-card--add { align-items: center; justify-content: center; min-height: 150px; border: 1px dashed rgba(125, 211, 252, .45); border-top-width: 1px; background: rgba(8, 24, 44, .45); color: #7dd3fc; font-weight: 700; cursor: pointer; --c: #38bdf8; }
:is(#modalRoster, .rs-host) .rs-shift-card--add b { font-size: 28px; line-height: 1; }
:is(#modalRoster, .rs-host) .rs-shift-card--add:hover { background: rgba(14, 116, 144, .2); }
:is(#modalRoster, .rs-host) .rs-tl-msg { margin: 8px 0 0; text-align: center; font-size: 12px; color: #4ade80; }
:is(#modalRoster, .rs-host) .rs-tl-msg.is-warn { color: #fbbf24; }
:is(#modalRoster, .rs-host) .rs-default { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
:is(#modalRoster, .rs-host) .rs-default-opt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px; border-radius: 12px; border: 1px solid var(--rs-line); background: rgba(8, 24, 44, .6); cursor: pointer; text-align: center; }
:is(#modalRoster, .rs-host) .rs-default-opt input { position: absolute; opacity: 0; pointer-events: none; }
:is(#modalRoster, .rs-host) .rs-default-opt b { font-size: 15px; color: #e0f2fe; }
:is(#modalRoster, .rs-host) .rs-default-opt small { font-size: 11px; color: #8fb3d0; }
:is(#modalRoster, .rs-host) .rs-default-opt.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 20%, rgba(8, 24, 44, .8)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 40%, transparent); }
:is(#modalRoster, .rs-host) .rs-default-opt.is-on::after { content: "默认"; position: absolute; top: -8px; right: 8px; padding: 0 6px; border-radius: 99px; background: var(--c); color: #04131f; font-size: 11px; font-weight: 800; }

/* 机台管理：框选分区 */
:is(#modalRoster, .rs-host) .rs-mc-head, :is(#modalRoster, .rs-host) .rs-up-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--rs-line); background: var(--rs-card); }
:is(#modalRoster, .rs-host) .rs-mc-total { display: flex; align-items: baseline; gap: 6px; padding-right: 14px; border-right: 1px solid var(--rs-line); }
:is(#modalRoster, .rs-host) .rs-mc-total b { font-size: 34px; font-weight: 800; color: #5eead4; font-variant-numeric: tabular-nums; line-height: 1; }
:is(#modalRoster, .rs-host) .rs-mc-total span { color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-mc-zones { display: flex; flex-wrap: wrap; gap: 8px; }
:is(#modalRoster, .rs-host) .rs-zone-stat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--zc) 55%, transparent); background: color-mix(in srgb, var(--zc) 14%, transparent); color: #dbeefc; }
:is(#modalRoster, .rs-host) .rs-zone-stat i { width: 10px; height: 10px; border-radius: 3px; background: var(--zc); }
:is(#modalRoster, .rs-host) .rs-zone-stat small { color: #8fb3d0; font-size: 11px; }
:is(#modalRoster, .rs-host) .rs-zone-stat b { font-size: 16px; color: #fff; }
:is(#modalRoster, .rs-host) .rs-zone-stat.is-warn b { color: #fbbf24; }
:is(#modalRoster, .rs-host) :is(.rs-zone-stat, .rs-mc-total) { font: inherit; cursor: pointer; transition: box-shadow .15s, transform .15s, opacity .15s; }
:is(#modalRoster, .rs-host) .rs-mc-total { background: none; border-top: 0; border-bottom: 0; border-left: 0; border-radius: 0; color: inherit; }
:is(#modalRoster, .rs-host) .rs-zone-stat:hover { transform: translateY(-1px); }
:is(#modalRoster, .rs-host) .rs-zone-stat.is-on { box-shadow: 0 0 0 2px var(--zc); background: color-mix(in srgb, var(--zc) 30%, transparent); }
:is(#modalRoster, .rs-host) .rs-mc-head:has(.is-on:not(.rs-mc-total)) .rs-zone-stat:not(.is-on) { opacity: .55; }:is(#modalRoster, .rs-host) .rs-mc-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--rs-line); background: rgba(6, 20, 38, .94); backdrop-filter: blur(6px); }
:is(#modalRoster, .rs-host) .rs-mc-pick, :is(#modalRoster, .rs-host) .rs-mc-zone-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
:is(#modalRoster, .rs-host) .rs-mc-count { margin-left: 6px; color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-mc-count b { font-size: 16px; color: #38bdf8; }
:is(#modalRoster, .rs-host) .rs-zone-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--zc); background: color-mix(in srgb, var(--zc) 28%, rgba(8, 24, 44, .9)); color: #fff; font-weight: 800; line-height: 1.15; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-zone-btn small { font-size: 10px; font-weight: 400; opacity: .85; }
:is(#modalRoster, .rs-host) .rs-zone-btn:hover:not(:disabled) { background: var(--zc); color: #04131f; }
:is(#modalRoster, .rs-host) .rs-zone-btn:disabled { opacity: .4; cursor: not-allowed; }
:is(#modalRoster, .rs-host) .rs-zone-btn--clear { --zc: #94a3b8; }
:is(#modalRoster, .rs-host) .rs-mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; user-select: none; -webkit-user-select: none; touch-action: none; }
:is(#modalRoster, .rs-host) .rs-mc-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 62px; padding: 0 4px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--zc) 60%, transparent); border-left: 4px solid var(--zc); background: color-mix(in srgb, var(--zc) 14%, rgba(8, 24, 44, .9)); color: #f0f9ff; cursor: pointer; transition: transform .08s, box-shadow .12s; }
:is(#modalRoster, .rs-host) .rs-mc-tile b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
:is(#modalRoster, .rs-host) .rs-mc-tile small { font-size: 10px; color: #9fc3dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
:is(#modalRoster, .rs-host) .rs-mc-tile.is-none { border-style: dashed; border-left-style: solid; color: #cbd5e1; }
:is(#modalRoster, .rs-host) .rs-mc-tile.is-offline small::after { content: " ·未接数采"; color: #93c5fd; }
:is(#modalRoster, .rs-host) .rs-mc-check { position: absolute; top: 4px; right: 4px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(2, 10, 22, .4); }
:is(#modalRoster, .rs-host) .rs-mc-tile.is-sel { transform: scale(.96); box-shadow: 0 0 0 2px #38bdf8, 0 6px 14px rgba(56, 189, 248, .3); }
:is(#modalRoster, .rs-host) .rs-mc-tile.is-sel .rs-mc-check { border-color: #38bdf8; background: #38bdf8; }
:is(#modalRoster, .rs-host) .rs-mc-tile.is-sel .rs-mc-check::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #04131f; border-width: 0 2px 2px 0; transform: rotate(45deg); }
:is(#modalRoster, .rs-host) .rs-diff--workers { border-color: rgba(34, 211, 238, .4); background: rgba(14, 116, 144, .1); }
:is(#modalRoster, .rs-host) .rs-diff--workers .rs-up-head { margin: 0 0 8px; background: transparent; border: 0; padding: 0; }
@media (max-width: 760px) {
  :is(#modalRoster, .rs-host) .rs-shift-hero { grid-template-columns: 1fr 1fr; }
  :is(#modalRoster, .rs-host) .rs-hero-tl { grid-column: 1 / -1; }
  :is(#modalRoster, .rs-host) .rs-mc-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  :is(#modalRoster, .rs-host) .rs-mc-tile { height: 54px; }
  :is(#modalRoster, .rs-host) .rs-mc-total { border-right: 0; }
}

/* 机台编码参数：分区卡片 */
#backendPaneSite .site-cfg-rows { max-height: none; gap: 12px; }
#backendPaneSite .site-cfg-row { grid-template-columns: repeat(5, minmax(0, 1fr)) auto auto; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(125, 211, 252, .28); border-left: 4px solid #14b8a6; background: linear-gradient(180deg, rgba(16, 40, 70, .85), rgba(8, 22, 40, .9)); }
#backendPaneSite .site-cfg-row:nth-child(2) { border-left-color: #8b5cf6; }
#backendPaneSite .site-cfg-row:nth-child(3) { border-left-color: #f59e0b; }
#backendPaneSite .site-cfg-row:nth-child(4) { border-left-color: #ec4899; }
#backendPaneSite .site-cfg-row label { font-size: 12px; font-weight: 600; color: #a5c9e2; text-align: center; }
#backendPaneSite .site-cfg-row input { text-align: center; }
#backendPaneSite .site-cfg-plants-head { padding: 0 2px 4px; }
#backendPaneSite .site-cfg-plants-head .site-cfg-hint { flex: 1 1 auto; margin: 0; font-size: 12px; color: #8fb3d0; }
#backendPaneSite .site-cfg-moved { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; border: 1px dashed rgba(56, 189, 248, .45); background: rgba(14, 116, 144, .12); color: #bae6fd; text-align: center; }
@media (max-width: 900px) {
  #backendPaneSite .site-cfg-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ===== t119 排班看板：左未排机台 / 右挡车工 / 下已排分组 ===== */
:is(#modalRoster, .rs-host) .rs-board { display: flex; flex-direction: column; gap: 10px; }
:is(#modalRoster, .rs-host) .rs-bd-stat { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--rs-line, rgba(125,211,252,.22)); background: rgba(6, 20, 38, .8); color: #9fc3dc; }
:is(#modalRoster, .rs-host) .rs-bd-stat b { font-size: 18px; color: #e0f2fe; font-variant-numeric: tabular-nums; }
:is(#modalRoster, .rs-host) .rs-bd-stat b.is-warn { color: #fbbf24; }
:is(#modalRoster, .rs-host) .rs-bd-stat b.is-ok { color: #4ade80; }
:is(#modalRoster, .rs-host) .rs-bd-mode { margin-left: auto; padding: 4px 12px; border-radius: 99px; background: rgba(14, 116, 144, .25); color: #bae6fd; }
:is(#modalRoster, .rs-host) .rs-bd-mode b { font-size: 14px; color: #fff; }
:is(#modalRoster, .rs-host) .rs-bd-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 10px; }
:is(#modalRoster, .rs-host) .rs-bd-free, :is(#modalRoster, .rs-host) .rs-bd-people, :is(#modalRoster, .rs-host) .rs-bd-groups { display: flex; flex-direction: column; min-height: 0; border-radius: 14px; border: 1px solid var(--rs-line, rgba(125,211,252,.22)); background: linear-gradient(180deg, rgba(16, 38, 66, .9), rgba(7, 19, 36, .94)); }
:is(#modalRoster, .rs-host) .rs-board header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(125, 211, 252, .14); color: #e0f2fe; }
:is(#modalRoster, .rs-host) .rs-board header small { color: #8fb3d0; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-link { padding: 2px 8px; border: 0; border-radius: 6px; background: transparent; color: #7dd3fc; font-size: 12px; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-link:hover:not(:disabled) { background: rgba(56, 189, 248, .15); }
:is(#modalRoster, .rs-host) .rs-link:disabled { opacity: .4; cursor: default; }
:is(#modalRoster, .rs-host) .rs-bd-free-body { max-height: calc(var(--vh, 1vh) * 40); overflow: auto; padding: 8px 10px 10px; }
:is(#modalRoster, .rs-host) .rs-bd-zone + .rs-bd-zone { margin-top: 10px; }
:is(#modalRoster, .rs-host) .rs-bd-zone-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: #cfe6f7; font-size: 12px; font-weight: 700; }
:is(#modalRoster, .rs-host) .rs-bd-zone-h i { width: 10px; height: 10px; border-radius: 3px; background: var(--zc); }
:is(#modalRoster, .rs-host) .rs-bd-zone-h small { color: #8fb3d0; font-weight: 400; }
:is(#modalRoster, .rs-host) .rs-bd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; user-select: none; -webkit-user-select: none; touch-action: none; }
:is(#modalRoster, .rs-host) .rs-bd-tile { height: 38px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--zc) 55%, transparent); border-left: 3px solid var(--zc); background: color-mix(in srgb, var(--zc) 14%, rgba(8, 24, 44, .9)); color: #f0f9ff; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-bd-tile.is-offline { border-style: dashed; border-left-style: solid; color: #bfdbfe; }
:is(#modalRoster, .rs-host) .rs-bd-tile.is-sel { background: #38bdf8; border-color: #38bdf8; color: #04131f; box-shadow: 0 0 0 2px rgba(56, 189, 248, .45); }
:is(#modalRoster, .rs-host) .rs-bd-empty { margin: 24px 0; text-align: center; color: #4ade80; font-size: 15px; }
:is(#modalRoster, .rs-host) .rs-bd-people { max-height: calc(var(--vh, 1vh) * 40 + 42px); overflow: auto; }
:is(#modalRoster, .rs-host) .rs-bd-workers { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
:is(#modalRoster, .rs-host) .rs-bd-worker { position: relative; display: inline-flex; align-items: center; gap: 4px; min-width: 70px; height: 36px; justify-content: center; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(125, 211, 252, .4); background: rgba(14, 50, 84, .7); color: #e0f2fe; font-size: 14px; font-weight: 700; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-bd-worker:hover { border-color: #38bdf8; background: rgba(14, 116, 144, .45); }
:is(#modalRoster, .rs-host) .rs-bd-worker small { font-size: 10px; font-weight: 400; color: #8fb3d0; }
:is(#modalRoster, .rs-host) .rs-bd-worker em { min-width: 18px; padding: 0 5px; border-radius: 99px; background: #0d9488; color: #ecfeff; font-size: 11px; font-style: normal; line-height: 18px; }
:is(#modalRoster, .rs-host) .rs-bd-worker.is-done { opacity: .62; }
:is(#modalRoster, .rs-host) .rs-bd-worker.is-active { opacity: 1; border-color: #fbbf24; background: rgba(245, 158, 11, .3); box-shadow: 0 0 0 2px rgba(251, 191, 36, .5); }
:is(#modalRoster, .rs-host) .rs-bd-others { padding: 0 10px 8px; }
:is(#modalRoster, .rs-host) .rs-bd-others summary { cursor: pointer; color: #8fb3d0; font-size: 12px; }
:is(#modalRoster, .rs-host) .rs-bd-others .rs-bd-workers { padding: 8px 0 0; }
:is(#modalRoster, .rs-host) .rs-bd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; padding: 10px; }
:is(#modalRoster, .rs-host) .rs-bd-card { border-radius: 12px; border: 1px solid rgba(125, 211, 252, .25); background: rgba(8, 24, 44, .7); }
:is(#modalRoster, .rs-host) .rs-bd-card.is-active { border-color: #fbbf24; box-shadow: 0 0 0 2px rgba(251, 191, 36, .4); }
:is(#modalRoster, .rs-host) .rs-bd-card-h { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid rgba(125, 211, 252, .12); cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-bd-card-h b { font-size: 15px; color: #f0f9ff; }
:is(#modalRoster, .rs-host) .rs-bd-card-h em { font-style: normal; font-size: 12px; color: #5eead4; }
:is(#modalRoster, .rs-host) .rs-bd-x { margin-left: auto; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: #fca5a5; font-size: 16px; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-bd-x:hover { background: rgba(239, 68, 68, .2); }
:is(#modalRoster, .rs-host) .rs-bd-nos { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
:is(#modalRoster, .rs-host) .rs-bd-no { min-width: 34px; height: 26px; padding: 0 6px; border-radius: 6px; border: 1px solid rgba(94, 234, 212, .35); background: rgba(13, 148, 136, .18); color: #ccfbf1; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
:is(#modalRoster, .rs-host) .rs-bd-no:hover { border-color: #f87171; background: rgba(239, 68, 68, .2); color: #fee2e2; text-decoration: line-through; }
:is(#modalRoster, .rs-host) .rs-bd-no.is-extra { border-style: dashed; border-color: rgba(147, 197, 253, .5); background: rgba(59, 130, 246, .12); color: #bfdbfe; }
@media (max-width: 860px) { :is(#modalRoster, .rs-host) .rs-bd-top { grid-template-columns: 1fr; } }
/* ===== t120 后台管理系统独立页（/WSbackend/） ===== */
body.is-admin-page > *:not(#modalBackendAdmin):not(.modal-backdrop.show):not(.deao-dlg-mask):not(script) { visibility: hidden !important; }
body.is-admin-page { overflow: hidden; }
body.is-admin-page #modalBackendAdmin { display: flex !important; visibility: visible !important; opacity: 1 !important; inset: 0; padding: 0; background: radial-gradient(1200px 500px at 10% -10%, rgba(34, 211, 238, .12), transparent 60%), #06121f; backdrop-filter: none; z-index: 50; }
body.is-admin-page #backendAdminTabs { display: flex !important; }
body.is-admin-page #backendAdminTitle::before { content: "织造哨兵 · "; color: #5eead4; }
body.is-admin-page .modal-backdrop.show:not(#modalBackendAdmin) { z-index: 100; visibility: visible !important; }
/* ===== t121 机台分区：只填分区名 + 说明，自动预览 DR-4F ===== */
#backendPaneSite .site-cfg-row.site-cfg-zone { grid-template-columns: 34px minmax(90px, 1fr) minmax(110px, 1.2fr) auto; align-items: center; }
.site-cfg-zone-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(34, 211, 238, .18); color: #67e8f9; font-weight: 800; }
.site-cfg-zone [data-site-zone] { font-size: 18px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.site-cfg-zone .site-cfg-order-btns { display: flex; align-items: center; gap: 4px; }
.site-cfg-zone .site-cfg-del { color: #fca5a5; }
@media (max-width: 900px) { #backendPaneSite .site-cfg-row.site-cfg-zone { grid-template-columns: 34px 1fr 1fr; } }
:is(#modalRoster, .rs-host) .rs-default-opt small:empty, :is(#modalRoster, .rs-host) .rs-tl-msg:empty { display: none; }

/* ===== 产线 Tab 自适应：机台墙与实时告警两排 Tab 均分可用宽度，至少容纳 4 个；窄时收内边距、藏图标、名称省略 ===== */
.plant-tabs { container-type: inline-size; container-name: plant-tabs; }
.plant-tab[data-plant] {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  padding-left: clamp(6px, 2.2cqi, 16px);
  padding-right: clamp(6px, 2.2cqi, 16px);
  gap: clamp(4px, 1cqi, 8px);
}
.plant-tab[data-plant] .plant-tab-label,
.alert-plant-tab .alert-plant-label { min-width: 0; overflow: hidden; }
.plant-tab[data-plant] .plant-tab-name,
.alert-plant-tab .alert-plant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plant-tab[data-plant] .plant-count,
.alert-plant-tab .alert-plant-count,
.plant-tab[data-plant] .ui-ico,
.alert-plant-tab .ui-ico { flex: 0 0 auto; }
.plant-tabs-spacer { min-width: 12px; }

.alert-plant-tabs { container-type: inline-size; container-name: alert-plant-tabs; }
.alert-plant-tab {
  flex: 1 1 0;
  min-width: 0;
  margin-right: clamp(-10px, -1.6cqi, -4px);
  padding-left: clamp(6px, 3cqi, 16px);
  padding-right: clamp(6px, 3cqi, 16px);
  font-size: clamp(12px, 3.6cqi, 15px);
}
.alert-plant-tab.has-ui-ico { gap: clamp(3px, 1.2cqi, 6px); }
.alert-plant-tab:last-child { margin-right: 0; }

@container plant-tabs (max-width: 560px) {
  .plant-tab[data-plant] .ui-ico { display: none; }
}
@container alert-plant-tabs (max-width: 300px) {
  .alert-plant-tab .ui-ico { display: none; }
  .alert-plant-tab .alert-plant-count { min-width: 18px; height: 18px; padding: 0 4px; font-size: 11px; }
}
/* 排班页：原生日历图标、下拉箭头会占右侧位置把文字挤偏，改为透明铺满 / 对称留白，文字在整框内上下左右居中 */
:is(#modalRoster, .rs-host) .rs-field { display: inline-flex; align-items: center; gap: 6px; }
:is(#modalRoster, .rs-host) :is(input[type="date"], input[type="time"]) {
  position: relative;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
:is(#modalRoster, .rs-host) :is(input[type="date"], input[type="time"])::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
:is(#modalRoster, .rs-host) select {
  -webkit-appearance: none;
  appearance: none;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 28px !important;
  padding-right: 28px !important;
  line-height: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238aa0b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 11px 8px !important;
  cursor: pointer;
}
:is(#modalRoster, .rs-host) .rs-form select { min-width: 96px; }
:is(#modalRoster, .rs-host) select option { text-align: center; }
button, input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select {
  text-align: center;
  text-align-last: center;
}
.link-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fbbf24;
  cursor: pointer;
}
.link-status svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.link-status[data-state="on"] { color: #34d399; }
.link-status[data-state="off"] { color: #fb7185; }
.link-status[data-state="wait"] { animation: link-status-pulse 1.2s ease-in-out infinite; }
@keyframes link-status-pulse { 50% { opacity: .35; } }
