/* ============================================================
   洁净室数字化运维管理平台 · 页面容器与业务组件层
   ------------------------------------------------------------------
   与 style.css 共用设计令牌；仅承载「非总览页」的通用组件。
   命名：block__element--modifier
   ============================================================ */

/* ---------------- 1. 页面骨架 ---------------- */
.page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 0;
}

.page-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

/* 各页行高分配（112 指标条 / 主区 / 底部明细） */
.page-body--env      { grid-template-rows: 112px minmax(0, 1fr) 374px; }
.page-body--device   { grid-template-rows: 112px minmax(0, 1fr) 312px; }
.page-body--energy   { grid-template-rows: 112px minmax(0, 1fr) 286px; }
.page-body--alarm    { grid-template-rows: 112px 382px minmax(0, 1fr); }
.page-body--work     { grid-template-rows: 112px minmax(0, 1fr) 262px; }
.page-body--settings { grid-template-columns: 216px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }

.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }
.span-12 { grid-column: span 12; }

/* ---------------- 2. 指标条 ---------------- */
.stat-strip {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  min-height: 0;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 16px;
  background: linear-gradient(168deg, rgba(31, 78, 112, 0.5) 0%, rgba(14, 40, 62, 0.62) 46%, rgba(7, 22, 35, 0.72) 100%);
  border: 1px solid var(--line-1);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--cyan);
  opacity: 0.85;
}
.stat--green::before  { background: var(--green); }
.stat--orange::before { background: var(--orange); }
.stat--red::before    { background: var(--red); }
.stat--purple::before { background: var(--purple); }

.stat__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--t3);
}
.stat__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 8px;
}
.stat__num {
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(56, 214, 255, 0.28);
}
.stat__unit {
  font-family: var(--font-num);
  font-size: 11px;
  color: var(--t4);
}
.stat__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--t4);
  white-space: nowrap;
  overflow: hidden;
}
.stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 5px;
  font-family: var(--font-num);
  font-size: 10px;
  line-height: 1.7;
  border-radius: 2px;
}
.stat__delta--up   { color: var(--green);  background: rgba(46, 224, 138, 0.12); }
.stat__delta--down { color: var(--red);    background: rgba(255, 107, 107, 0.12); }
.stat__delta--flat { color: var(--t3);     background: rgba(126, 196, 240, 0.1); }
.stat__spark {
  position: absolute;
  right: 12px;
  bottom: 8px;
  width: 96px;
  height: 30px;
  opacity: 0.5;
  pointer-events: none;
}

/* ---------------- 3. 页签 / 筛选 ---------------- */
.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: var(--surface-sunk);
}
.tabs__item {
  padding: 3px 12px;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  color: var(--t3);
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.tabs__item:hover { color: var(--t1); }
.tabs__item.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.2), rgba(56, 214, 255, 0.05));
  box-shadow: inset 0 0 0 1px rgba(56, 214, 255, 0.3);
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  background: var(--surface-sunk);
}
.search svg { width: 12px; height: 12px; color: var(--t4); }
.search input {
  width: 118px;
  border: 0;
  background: none;
  outline: none;
  color: var(--t1);
  font-family: inherit;
  font-size: 11.5px;
}
.search input::placeholder { color: var(--t4); }

/* ---------------- 4. 数据表格 ---------------- */
.table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-right: -4px;
  padding-right: 4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 10px 8px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.6px;
  color: var(--t4);
  text-align: left;
  white-space: nowrap;
  background: linear-gradient(180deg, #0b2234 72%, rgba(11, 34, 52, 0.92));
  border-bottom: 1px solid var(--line-1);
}
.data-table tbody td {
  padding: 8px 10px;
  color: var(--t3);
  border-bottom: 1px solid rgba(126, 196, 240, 0.05);
  white-space: nowrap;
}
.data-table tbody tr { transition: background 0.18s var(--ease); }
.data-table tbody tr:hover td { background: rgba(56, 214, 255, 0.05); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td.strong { color: var(--t1); }
.data-table .mono { font-family: var(--font-num); letter-spacing: 0.02em; }
.data-table .ta-r { text-align: right; }

/* 数值越限着色 */
.cell--warn { color: var(--orange) !important; }
.cell--bad  { color: var(--red) !important; }

/* ---------------- 5. 排行条 ---------------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.rank {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 10px;
}
.rank__no {
  font-family: var(--font-num);
  font-size: 10.5px;
  color: var(--t4);
  text-align: center;
}
.rank__no--top { color: var(--cyan); }
.rank__main { min-width: 0; }
.rank__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--t2);
  margin-bottom: 5px;
}
.rank__top b {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t1);
}
.rank__track {
  height: 5px;
  border-radius: 3px;
  background: rgba(4, 16, 26, 0.85);
  overflow: hidden;
}
.rank__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(56, 214, 255, 0.25), var(--cyan));
  box-shadow: 0 0 8px rgba(56, 214, 255, 0.35);
}
.rank--purple .rank__fill { background: linear-gradient(90deg, rgba(155, 140, 255, 0.25), var(--purple)); box-shadow: 0 0 8px rgba(155, 140, 255, 0.35); }
.rank--orange .rank__fill { background: linear-gradient(90deg, rgba(255, 180, 84, 0.25), var(--orange)); box-shadow: 0 0 8px rgba(255, 180, 84, 0.35); }
.rank--green .rank__fill  { background: linear-gradient(90deg, rgba(46, 224, 138, 0.25), var(--green)); box-shadow: 0 0 8px rgba(46, 224, 138, 0.35); }

/* ---------------- 6. 看板 ---------------- */
.kanban {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.kanban__col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  background: rgba(6, 22, 35, 0.42);
}
.kanban__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-1);
  font-size: 11.5px;
  color: var(--t2);
  letter-spacing: 0.3px;
}
.kanban__cnt {
  font-family: var(--font-num);
  font-size: 10.5px;
  color: var(--t4);
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(126, 196, 240, 0.1);
}
.kanban__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
}

.ticket {
  position: relative;
  padding: 8px 10px 8px 12px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  background: linear-gradient(160deg, rgba(20, 54, 80, 0.55), rgba(8, 26, 40, 0.5));
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.ticket:hover { border-color: var(--line-2); transform: translateY(-1px); }
.ticket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--cyan);
  opacity: 0.7;
}
.ticket--critical::before { background: var(--red); }
.ticket--major::before    { background: var(--orange); }
.ticket--done::before     { background: var(--green); }

.ticket__id {
  font-family: var(--font-num);
  font-size: 9.5px;
  color: var(--t4);
  letter-spacing: 0.05em;
}
.ticket__title {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--t1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ticket__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 9.5px;
  color: var(--t4);
}
.ticket__tag {
  padding: 0 5px;
  border-radius: 2px;
  background: rgba(56, 214, 255, 0.1);
  color: var(--cyan);
}

/* ---------------- 7. 时间线 ---------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timeline li {
  position: relative;
  padding: 0 0 14px 18px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(56, 214, 255, 0.8);
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 14px;
  bottom: 2px;
  width: 1px;
  background: var(--line-2);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline--warn li::before { background: var(--orange); box-shadow: 0 0 8px rgba(255, 180, 84, 0.8); }
.timeline--mute li::before { background: var(--t4); box-shadow: none; }
.timeline__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 11.5px;
  color: var(--t1);
}
.timeline__date {
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--t4);
  margin-left: auto;
}
.timeline__desc {
  margin-top: 3px;
  font-size: 10px;
  color: var(--t4);
}

/* ---------------- 8. 表单控件 ---------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label {
  font-size: 11px;
  color: var(--t3);
  letter-spacing: 0.2px;
}
.field__hint { font-size: 9.5px; color: var(--t4); }

.input,
.select {
  height: 30px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 12px;
  color: var(--t1);
  background: var(--surface-sunk);
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input::placeholder { color: var(--t4); }
.input:focus,
.select:focus {
  border-color: rgba(56, 214, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(56, 214, 255, 0.12);
}
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--t3) 50%), linear-gradient(135deg, var(--t3) 50%, transparent 50%); background-position: calc(100% - 14px) 13px, calc(100% - 9px) 13px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }

.switch {
  position: relative;
  width: 34px;
  height: 18px;
  flex: none;
  border-radius: 999px;
  background: rgba(4, 16, 26, 0.9);
  border: 1px solid var(--line-2);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--t3);
  transition: left 0.2s var(--ease), background 0.2s var(--ease);
}
.switch.is-on {
  background: rgba(56, 214, 255, 0.3);
  border-color: rgba(56, 214, 255, 0.55);
  box-shadow: 0 0 10px rgba(56, 214, 255, 0.25);
}
.switch.is-on::after {
  left: 18px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(56, 214, 255, 0.9);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(126, 196, 240, 0.08);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row__main { min-width: 0; }
.switch-row__title { font-size: 11.5px; color: var(--t1); }
.switch-row__desc { margin-top: 2px; font-size: 10px; color: var(--t4); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 14px;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  color: var(--cyan);
  border: 1px solid rgba(56, 214, 255, 0.3);
  border-radius: var(--r-xs);
  background: rgba(56, 214, 255, 0.06);
  transition: all 0.2s var(--ease);
}
.btn:hover {
  color: #02141c;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(56, 214, 255, 0.5);
}
.btn--ghost {
  color: var(--t2);
  border-color: var(--line-2);
  background: transparent;
}
.btn--ghost:hover {
  color: var(--t1);
  background: rgba(126, 196, 240, 0.1);
  border-color: var(--line-2);
  box-shadow: none;
}
.btn--sm { height: 24px; padding: 0 10px; font-size: 10.5px; }

/* ---------------- 9. 设置页 ---------------- */
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: linear-gradient(168deg, rgba(31, 78, 112, 0.42), rgba(7, 22, 35, 0.7));
  border: 1px solid var(--line-1);
  border-radius: var(--r-card);
  min-height: 0;
  overflow-y: auto;
}
.settings-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--t3);
  border-radius: var(--r-xs);
  border: 1px solid transparent;
  text-align: left;
  transition: all 0.2s var(--ease);
}
.settings-nav__item:hover { color: var(--t1); background: rgba(56, 214, 255, 0.06); }
.settings-nav__item.is-active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(56, 214, 255, 0.18), rgba(56, 214, 255, 0.04));
  border-color: rgba(56, 214, 255, 0.28);
  box-shadow: inset 0 0 16px rgba(56, 214, 255, 0.12);
}
.settings-nav__item svg { width: 15px; height: 15px; flex: none; }

.settings-panel { display: none; }
.settings-panel.is-active { display: flex; }

.panel-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-1);
}
.panel-section:first-child { padding-top: 0; }
.panel-section:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t1);
  letter-spacing: 0.4px;
}
.panel-section__title::before {
  content: "";
  width: 3px;
  height: 12px;
  border-radius: 1px;
  background: linear-gradient(180deg, var(--cyan), rgba(56, 214, 255, 0.12));
  box-shadow: 0 0 8px rgba(56, 214, 255, 0.45);
}
.panel-section__desc {
  margin: -6px 0 12px;
  font-size: 10.5px;
  color: var(--t4);
}
.panel-actions {
  display: flex;
  gap: 10px;
  padding-top: 14px;
}

/* ---------------- 10. 迷你统计块 ---------------- */
.mini-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
}
.mini {
  padding: 9px 11px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-xs);
  background: rgba(8, 26, 40, 0.5);
}
.mini__label { font-size: 10px; color: var(--t4); }
.mini__value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 5px;
}
.mini__num {
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
}
.mini__unit { font-size: 9.5px; color: var(--t4); }

/* ---------------- 11. 柱状图（CSS 实现） ---------------- */
.bars {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-top: 6px;
}
.bars__item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}
.bars__val {
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--t3);
}
.bars__bar {
  width: 100%;
  max-width: 44px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, var(--cyan), rgba(56, 214, 255, 0.18));
  box-shadow: 0 0 10px rgba(56, 214, 255, 0.28);
  transition: height 0.6s var(--ease);
}
.bars__bar--alt { background: linear-gradient(180deg, rgba(155, 140, 255, 0.9), rgba(155, 140, 255, 0.16)); box-shadow: 0 0 10px rgba(155, 140, 255, 0.24); }
.bars__label { font-family: var(--font-num); font-size: 9.5px; color: var(--t4); }

/* ---------------- 12. 响应式 ---------------- */
@media (max-width: 1600px) {
  .page-body { gap: 12px; }
  .stat-strip { gap: 12px; }
  .stat__num { font-size: 26px; }
}

@media (max-width: 1500px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; }
  .page { padding: 12px 0; }
  .page-body,
  .page-body--env,
  .page-body--device,
  .page-body--energy,
  .page-body--alarm,
  .page-body--work {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
  }
  .page-body > * { grid-column: span 1 !important; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-body--settings { grid-template-columns: minmax(0, 1fr) !important; }
  .settings-nav { flex-direction: row; overflow-x: auto; padding: 8px; }
  .settings-nav__item { white-space: nowrap; }
  .card--env-trend, .card--alarm-table { min-height: 320px; }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .kanban__list { max-height: 260px; }
}

@media (max-width: 900px) {
  .stat-strip { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================
   13. 补充组件
   ============================================================ */

/* 纵向图例 */
.legend-v {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.legend-v__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--t3);
}
.legend-v__row i,
.legend-v li i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
}
.legend-v__row span,
.legend-v li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-v__row b,
.legend-v li b {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--t1);
}
.legend-v li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--t3); }

/* 环形 + 图例并排 */
.split-donut {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}
.split-donut > .donut-shell { flex: none; }
.split-donut > .legend-v,
.split-donut > .col-flex { flex: 1; min-width: 0; }

.donut-shell--sm { width: 132px; height: 132px; }
.donut-shell--md { width: 146px; height: 146px; }

.col-flex {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* 分组柱 */
.bars__pair {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}
.bars__pair .bars__bar { max-width: 18px; }

/* 告警级别标签 */
.alarm-lv {
  display: inline-block;
  padding: 1px 7px;
  font-size: 10px;
  line-height: 1.7;
  border-radius: 2px;
  white-space: nowrap;
}
.alarm-lv--critical { color: var(--red);    background: rgba(255, 107, 107, 0.15); }
.alarm-lv--major    { color: var(--orange); background: rgba(255, 180, 84, 0.15); }
.alarm-lv--minor    { color: var(--cyan);   background: rgba(56, 214, 255, 0.13); }

/* 表格内两行文本 */
.cell-title { color: var(--t1); }
.cell-sub { margin-top: 2px; font-size: 9.5px; color: var(--t4); }
.empty-cell { padding: 30px 0 !important; text-align: center; color: var(--t4) !important; }

/* 表格内联输入 */
.input--cell {
  height: 24px;
  width: 68px;
  padding: 0 8px;
  font-family: var(--font-num);
  font-size: 11.5px;
  background: rgba(4, 16, 26, 0.9);
}

/* 自适应高度滚动区（设置页用） */
.table-scroll--auto { flex: none; overflow: visible; max-height: none; }

/* 设置页内容区 */
.settings-panels {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.settings-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}
.settings-panel.is-active { display: block; }

/* 图表卡内的图例条 */
.card__legend-row {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 4px;
  font-size: 10.5px;
  color: var(--t4);
}

/* 环形图容器内的画布自适应 */
.donut-shell .chart-box {
  width: 100%;
  height: 100%;
}
.flex-auto { flex: none !important; }
.block-label {
  flex: none;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--t4);
}
.divider-line {
  flex: none;
  height: 1px;
  margin: 10px 0 12px;
  background: var(--line-1);
}

.donut-shell--xs { width: 120px; height: 120px; }
.settings-panel .data-table th:nth-child(2),
.settings-panel .data-table th:nth-child(3) { width: 112px; }
.settings-panel .data-table th:nth-child(4) { width: 88px; }
.settings-panel .data-table th:nth-child(5) { width: 96px; }
.settings-panel .data-table th:nth-child(6) { width: 72px; }
.input--cell { width: 88px; display: block; }

.settings-panel .data-table { max-width: 900px; }
.settings-panel .data-table th:first-child { width: 34%; }
