/* OSA journal export dialog styles.
   Keep these styles next to the dialog component so later global CSS patches do not
   accidentally roll back the export editor layout. */

.export-modal.export-modal-large {
  width: min(1220px, 96vw) !important;
  height: min(820px, 94vh) !important;
  min-width: min(760px, 96vw);
  min-height: min(560px, 94vh);
}

.export-large-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.export-controls.export-controls-plain {
  min-height: 0;
  border-right: 1px solid var(--line);
  padding: 14px 14px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.export-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.export-tabs button {
  appearance: none;
  border: 1px solid #2a3a49;
  background: #07111a;
  color: #c9d7e7;
  border-radius: 8px;
  min-height: 31px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.export-tabs button.active {
  background: #d9e6ff;
  border-color: #d9e6ff;
  color: #07111a;
}

.export-section-title {
  margin: 10px 0 5px;
  color: var(--yellow);
  font-weight: 900;
  font-size: 15px;
}

.export-setting-row {
  width: 100%;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.export-setting-row > span {
  color: #a9bdd1;
  font-size: 12px;
  white-space: nowrap;
  text-align: left;
}

.export-setting-row input,
.export-setting-row select {
  width: 100%;
  height: 30px;
  min-height: 30px;
  box-sizing: border-box;
  background: #07111a;
  color: #f1f7ff;
  border: 1px solid #2a3a49;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 12px;
  outline: none;
}

.export-setting-row input:focus,
.export-setting-row select:focus,
.color-code:focus,
.annotation-color-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.35);
}

.export-check-setting,
.export-controls .export-check-setting {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  min-height: 28px;
  color: #f1f7ff !important;
  font-size: 12px !important;
}

.export-check-setting input[type="checkbox"],
.export-setting-row input[type="checkbox"] {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.export-template-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 8px;
}

.export-template-actions .ghost-button,
.export-annotation-tools .ghost-button {
  min-width: 0;
  white-space: nowrap;
}

.export-preview-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.export-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #a9bdd1;
  font-size: 12px;
  flex: 0 0 auto;
}

.export-preview-toolbar > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.export-preview-box {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  border: 1px solid #2a3a49;
  border-radius: 12px;
  background: #07111a;
  padding: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.export-preview-frame {
  flex: 0 0 auto;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid #263746;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 14px 38px rgba(0,0,0,0.24);
}

.export-preview-plot {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.export-message {
  min-height: 22px;
  color: #dcecff;
  font-size: 12px;
  flex: 0 0 auto;
}

.muted-small {
  color: #8fa3b8;
  font-size: 12px;
  line-height: 1.45;
}

.export-curve-row {
  border: 1px solid #223140;
  border-radius: 11px;
  background: rgba(8, 16, 24, 0.45);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-curve-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #dcecff;
  font-size: 12px;
}

.export-curve-head strong {
  color: #ffffff;
  font-size: 14px;
}

.export-curve-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-curve-head label,
.export-controls .export-curve-head label {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  color: #f1f7ff !important;
  font-size: 12px !important;
  white-space: nowrap;
}

.export-curve-color-line {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 36px 34px minmax(0, 1fr) 52px;
  gap: 7px;
  align-items: center;
  color: #a9bdd1;
  font-size: 12px;
  overflow: hidden;
}

.export-curve-line-width-row {
  margin-top: -2px;
}

.export-curve-line-width-row input[type="number"] {
  max-width: 112px;
}

.color-input {
  width: 34px !important;
  min-width: 34px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 2px !important;
  border-radius: 8px !important;
  cursor: pointer;
}

.color-code {
  width: 100%;
  min-width: 0;
  height: 30px;
  box-sizing: border-box;
  background: #07111a;
  color: #f1f7ff;
  border: 1px solid #2a3a49;
  border-radius: 8px;
  padding: 0 8px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
}

.ghost-button.tiny {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.ghost-button.full {
  width: 100%;
  justify-content: center;
}

.export-annotation-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.export-annotation-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.annotation-list-item {
  appearance: none;
  width: 100%;
  min-height: 42px;
  border: 1px solid #223140;
  border-radius: 9px;
  background: rgba(8, 16, 24, 0.45);
  color: #dcecff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
}

.annotation-list-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.35);
}

.annotation-list-item span,
.annotation-list-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annotation-list-item small {
  color: #8fa3b8;
}

.export-annotation-editor {
  border: 1px solid #223140;
  border-radius: 11px;
  background: rgba(8, 16, 24, 0.45);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.annotation-color-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  width: 100%;
}

.annotation-color-row input:not(.color-input) {
  width: 100%;
  min-width: 0;
  height: 30px;
  box-sizing: border-box;
  background: #07111a;
  color: #f1f7ff;
  border: 1px solid #2a3a49;
  border-radius: 8px;
  padding: 0 8px;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

@media (max-width: 980px) {
  .export-modal.export-modal-large {
    width: 96vw !important;
    height: 94vh !important;
  }
  .export-large-layout {
    grid-template-columns: 1fr;
  }
  .export-controls.export-controls-plain {
    max-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}


.export-controls.export-controls-plain * {
  min-width: 0;
}

.export-curve-row,
.export-annotation-editor,
.export-setting-row {
  max-width: 100%;
  overflow: hidden;
}

.export-curve-color-line .ghost-button.tiny {
  width: 52px;
  padding-left: 4px;
  padding-right: 4px;
}

.export-curve-color-line .color-code {
  min-width: 0;
}

/* v7.0.5 typography cleanup */
.osa-export-dialog,
.osa-export-dialog * {
  font-weight: 400 !important;
}
.export-modal,
.export-modal * {
  font-weight: 400 !important;
}
.pump-page {
  --pump-bg: rgba(7, 14, 24, 0.78);
  --pump-bg-soft: rgba(10, 20, 32, 0.68);
  --pump-line: rgba(111, 199, 255, 0.16);
  --pump-line-strong: rgba(111, 199, 255, 0.3);
  --pump-text: #e8f2fb;
  --pump-muted: #8fa8ba;
  --pump-accent: #72d1ff;
  --pump-yellow: #ffe45c;
  --pump-green: #63e6b4;
  --pump-orange: #ffbd66;
  --pump-red: #ff7d86;
  height: 100%;
  min-height: 0;
  padding: 10px;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 9px;
  color: var(--pump-text);
  overflow: hidden;
}

.pump-page button,
.pump-page input,
.pump-page select {
  font: inherit;
}

.pump-page button {
  min-height: 29px;
  padding: 0 11px;
  border: 1px solid rgba(111, 199, 255, 0.14);
  border-radius: 8px;
  background: rgba(12, 25, 39, 0.78);
  color: #d8e9f7;
  cursor: pointer;
  transition: 120ms ease;
}

.pump-page button:hover:not(:disabled) {
  border-color: rgba(111, 199, 255, 0.36);
  background: rgba(19, 39, 59, 0.9);
}

.pump-page button:disabled {
  opacity: 0.42;
  cursor: default;
}

.pump-page .primary-button,
.pump-page button.primary-button {
  border-color: rgba(89, 205, 255, 0.42);
  background: linear-gradient(180deg, rgba(41, 142, 190, 0.94), rgba(21, 91, 130, 0.96));
  color: #f5fcff;
  box-shadow: 0 0 18px rgba(52, 188, 255, 0.08);
}

.pump-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--pump-line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 22, 35, 0.86), rgba(6, 14, 24, 0.8));
  overflow: hidden;
}

.pump-topbar-primary,
.pump-topbar-state,
.pump-pane-title,
.pump-pane-actions,
.pump-modal-actions,
.pump-manager-column-head,
.pump-manager-chart-controls,
.pump-manager-total,
.pump-chart-ranges,
.pump-chart-legend {
  display: flex;
  align-items: center;
}

.pump-topbar-primary {
  min-width: 0;
  gap: 9px;
}

.pump-calibration-entry {
  min-width: 58px;
  font-weight: 700;
}

.pump-current-plan {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.pump-current-plan span {
  color: var(--pump-muted);
  font-size: 12.25px;
}

.pump-current-plan strong {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4fbff;
  font-size: 13.5px;
}

.pump-topbar-state {
  gap: 16px;
  color: var(--pump-muted);
  font-size: 12.25px;
  white-space: nowrap;
}

.pump-topbar-state strong {
  margin-left: 4px;
  color: #dff1ff;
  font-weight: 650;
}

.pump-dimension-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pump-dimension-badges span {
  min-width: 40px;
  padding: 4px 8px;
  border: 1px solid rgba(111, 199, 255, 0.12);
  border-radius: 999px;
  text-align: center;
  font-size: 11.75px;
  line-height: 1;
}

.pump-dimension-badges span.active {
  border-color: rgba(95, 211, 255, 0.34);
  background: rgba(60, 171, 219, 0.15);
  color: #bfeeff;
}

.pump-dimension-badges span.inactive {
  color: #506576;
  background: rgba(255, 255, 255, 0.015);
}

.pump-dimension-badges.compact span {
  min-width: 31px;
  padding: 3px 5px;
  font-size: 10.5px;
}

.pump-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.88fr) minmax(250px, 0.88fr) minmax(440px, 1.4fr);
  gap: 9px;
}

.pump-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  border: 1px solid var(--pump-line);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(9, 20, 32, 0.84), rgba(5, 12, 21, 0.78));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
  overflow: hidden;
}

.pump-chart-pane {
  grid-template-rows: 44px minmax(0, 1fr) 40px;
}

.pump-pane-toolbar {
  min-width: 0;
  padding: 0 8px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.1);
  background: rgba(7, 16, 27, 0.7);
}

.pump-pane-title {
  min-width: 0;
  gap: 7px;
}

.pump-pane-title > strong {
  color: var(--pump-yellow);
  font-size: 13.5px;
  white-space: nowrap;
}

.pump-pane-actions {
  min-width: 0;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.pump-output-actions {
  gap: 4px;
}

.pump-data-size {
  min-width: 46px;
  text-align: center;
  color: #86a0b4;
  font-size: 11.5px;
}

.pump-help-dot {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(111, 199, 255, 0.18);
  border-radius: 50%;
  color: #9acde5;
  font-size: 11.5px;
  font-style: normal;
  cursor: help;
}

.pump-dimension-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pump-dimension-select > span {
  color: #89a8bb;
  font-size: 11px;
  font-weight: 700;
}

.pump-dimension-select select {
  height: 29px;
  min-width: 76px;
  padding: 0 24px 0 9px;
  border: 1px solid rgba(111, 199, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 18, 30, 0.94);
  color: #dcecf8;
  outline: none;
}

.pump-dimension-select select:focus {
  border-color: rgba(111, 199, 255, 0.46);
  box-shadow: 0 0 0 2px rgba(80, 180, 230, 0.08);
}

.pump-status-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #88a2b5;
  font-size: 11px;
}

.pump-status-mini span {
  padding: 2px 4px;
}

.pump-status-mini .near { color: var(--pump-orange); }
.pump-status-mini .extra { color: var(--pump-red); }
.pump-status-mini .invalid { color: #7e91a0; }

.pump-format-switch,
.pump-scope-switch,
.pump-fit-capsule {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid rgba(111, 199, 255, 0.13);
  border-radius: 8px;
  background: rgba(4, 11, 20, 0.6);
}

.pump-format-switch button,
.pump-scope-switch button,
.pump-fit-capsule button {
  min-height: 24px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #829bae;
  font-size: 11px;
}

.pump-format-switch button.selected,
.pump-scope-switch button.selected,
.pump-fit-capsule button.selected {
  background: rgba(56, 158, 205, 0.22);
  color: #d7f4ff;
  box-shadow: inset 0 0 0 1px rgba(111, 199, 255, 0.18);
}

.pump-chart-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #9ab0c1;
  font-size: 11.5px;
  cursor: pointer;
}

.pump-chart-check input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #5bc7f5;
}

.pump-sheet-wrap {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: rgba(3, 8, 14, 0.76);
  outline: none;
}

.pump-sheet-wrap.overflow-x { overflow-x: auto; }
.pump-sheet-wrap.overflow-y { overflow-y: auto; }
.pump-sheet-wrap.overflow-x.overflow-y { overflow: auto; }

.pump-sheet {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  user-select: none;
}

.pump-sheet-index-col {
  width: 34px;
}

.pump-sheet th,
.pump-sheet td {
  height: 34px;
  padding: 0;
  border-right: 1px solid rgba(111, 199, 255, 0.07);
  border-bottom: 1px solid rgba(111, 199, 255, 0.07);
}

.pump-sheet thead th,
.pump-sheet tbody th {
  position: sticky;
  z-index: 2;
  background: rgba(7, 15, 25, 0.96);
  color: #6f8798;
  font-size: 10.75px;
  font-weight: 650;
  text-align: center;
}

.pump-sheet thead th { top: 0; }
.pump-sheet tbody th { left: 0; }
.pump-sheet .corner { left: 0; z-index: 3; }

.pump-sheet td {
  position: relative;
  background: rgba(8, 17, 28, 0.34);
  color: #dcebf6;
  text-align: right;
}

.pump-sheet td input,
.pump-sheet td span {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: inherit;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pump-sheet td input:focus {
  background: rgba(45, 134, 179, 0.08);
}

.pump-sheet td.selected {
  background: rgba(49, 154, 202, 0.16);
  box-shadow: inset 0 0 0 1px rgba(89, 203, 252, 0.48);
}

.pump-sheet td.near { color: #ffd78e; }
.pump-sheet td.extrapolated { color: #ff9a9f; }
.pump-sheet td.invalid { color: #728899; }

.pump-chart-fill,
.pump-manager-chart-fill {
  min-width: 0;
  min-height: 0;
  position: relative;
}

.pump-relation-chart {
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.pump-relation-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pump-chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #627b8d;
  font-size: 13px;
}

.chart-bg { fill: rgba(2, 7, 12, 0.58); }
.chart-grid { stroke: rgba(133, 184, 217, 0.1); stroke-width: 1; }
.chart-axis { stroke: rgba(181, 217, 239, 0.34); stroke-width: 1.1; }
.chart-tick { fill: #7892a5; font-size: 11px; }
.chart-axis-label { fill: #a9bfce; font-size: 11.5px; }
.chart-curve { stroke: #68cfff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(104, 207, 255, 0.18)); }
.chart-boundary { stroke: #ffe45c; stroke-width: 1.15; stroke-dasharray: 6 5; opacity: 0.84; }
.chart-boundary-label { fill: #ffe879; font-size: 10px; }
.chart-calibration { stroke: #07121e; stroke-width: 1.2; fill: #b3ecff; }
.chart-calibration.group-1 { fill: #b699ff; }
.chart-calibration.group-2 { fill: #78e3bc; }
.chart-calibration.group-3 { fill: #f0a6ff; }
.chart-calibration.group-4 { fill: #9db8ff; }
.chart-current { fill: rgba(4, 12, 20, 0.8); stroke: #ffffff; stroke-width: 2; }
.chart-current.near { stroke: #ffd36e; }
.chart-current.extrapolated { stroke: #ff7d86; }

.pump-chart-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  border-top: 1px solid rgba(111, 199, 255, 0.09);
  background: rgba(6, 14, 24, 0.72);
  overflow: hidden;
}

.pump-chart-legend,
.pump-chart-ranges {
  gap: 12px;
  color: #849caf;
  font-size: 11.5px;
  white-space: nowrap;
}

.pump-chart-legend span::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 2px;
  background: #68cfff;
}

.pump-chart-legend .calibration::before { width: 7px; height: 7px; border-radius: 50%; background: #b3ecff; }
.pump-chart-legend .current::before { width: 7px; height: 7px; border-radius: 50%; background: transparent; border: 1.5px solid #fff; box-sizing: border-box; }
.pump-chart-legend .boundary::before { height: 0; border-top: 1px dashed #ffe45c; background: transparent; }

.pump-chart-ranges strong {
  color: #d9edf9;
  margin-left: 4px;
}

.pump-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 5, 10, 0.62);
  backdrop-filter: blur(8px);
}

.pump-detail-modal,
.pump-manager-modal {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(111, 199, 255, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(10, 21, 34, 0.96), rgba(5, 12, 21, 0.97));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  overflow: hidden;
}

.pump-detail-modal {
  width: min(1180px, calc(100vw - 46px));
  height: min(720px, calc(100vh - 64px));
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.pump-manager-modal {
  width: min(1760px, calc(100vw - 34px));
  height: min(900px, calc(100vh - 38px));
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
}

.pump-modal-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.12);
  background: rgba(8, 18, 30, 0.88);
}

.pump-modal-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pump-modal-head strong {
  color: var(--pump-yellow);
  font-size: 14px;
}

.pump-modal-head span {
  color: #8ba3b5;
  font-size: 11px;
}

.pump-modal-actions {
  gap: 6px;
}

.pump-detail-table-wrap {
  min-height: 0;
  overflow: auto;
}

.pump-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.pump-detail-table th,
.pump-detail-table td {
  padding: 8px 10px;
  border-right: 1px solid rgba(111, 199, 255, 0.07);
  border-bottom: 1px solid rgba(111, 199, 255, 0.07);
  white-space: nowrap;
}

.pump-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(8, 18, 30, 0.98);
  color: #9cb3c4;
  font-weight: 600;
}

.pump-detail-table td { color: #d7e8f4; }
.pump-detail-table tr.near td:last-child { color: var(--pump-orange); }
.pump-detail-table tr.extrapolated td:last-child { color: var(--pump-red); }

.pump-manager-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 184px minmax(620px, 1fr) minmax(410px, 0.72fr);
  gap: 9px;
  padding: 9px;
}

.pump-manager-plan-column,
.pump-manager-groups-column,
.pump-manager-chart-column {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(111, 199, 255, 0.12);
  border-radius: 12px;
  background: rgba(5, 12, 21, 0.62);
  overflow: hidden;
}

.pump-manager-plan-column,
.pump-manager-groups-column {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
}

.pump-manager-chart-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.pump-manager-column-head {
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.1);
  background: rgba(8, 18, 29, 0.72);
}

.pump-manager-column-head > div {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pump-manager-column-head strong {
  color: #d8eaf6;
  font-size: 13px;
}

.pump-manager-column-head button {
  min-height: 24px;
  padding: 0 7px;
  font-size: 11px;
}

.pump-plan-list {
  min-height: 0;
  padding: 7px;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow: auto;
}

.pump-plan-item {
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid rgba(111, 199, 255, 0.09);
  border-radius: 8px;
  background: rgba(10, 21, 33, 0.58);
  cursor: pointer;
}

.pump-plan-item:hover,
.pump-plan-item.selected {
  border-color: rgba(111, 199, 255, 0.3);
  background: rgba(25, 62, 86, 0.52);
}

.pump-plan-item em {
  color: #6f899c;
  font-size: 10.75px;
  font-style: normal;
}

.pump-plan-item input {
  min-width: 0;
  width: 100%;
  height: 26px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #dbeaf5;
  outline: none;
}

.pump-plan-item span {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(73, 198, 150, 0.12);
  color: #79e8b9;
  font-size: 10.25px;
}

.pump-group-board {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.pump-group-card {
  flex: 0 0 320px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 40px 35px 35px minmax(0, 1fr);
  border: 1px solid rgba(111, 199, 255, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 22, 35, 0.7), rgba(5, 12, 21, 0.72));
  overflow: hidden;
}

.pump-group-card.selected {
  border-color: rgba(111, 199, 255, 0.48);
  box-shadow: inset 0 0 0 1px rgba(111, 199, 255, 0.11), 0 0 20px rgba(61, 177, 227, 0.07);
}

.pump-group-card.disabled { opacity: 0.55; }

.pump-group-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px 21px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.08);
}

.pump-group-drag {
  color: #728b9c;
  cursor: grab;
  letter-spacing: -2px;
}

.pump-group-card-head em {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(67, 178, 227, 0.14);
  color: #a9def5;
  font-size: 10.75px;
  font-style: normal;
}

.pump-group-card-head > input {
  min-width: 0;
  width: 100%;
  height: 26px;
  padding: 0 5px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #e2eff8;
  outline: none;
}

.pump-group-card-head > input:focus {
  border-bottom-color: rgba(111, 199, 255, 0.4);
}

.pump-group-enabled {
  display: grid;
  place-items: center;
}

.pump-group-enabled input { display: none; }
.pump-group-enabled span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a6070;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.03);
}
.pump-group-enabled input:checked + span { background: var(--pump-green); box-shadow: 0 0 8px rgba(99,230,180,0.35); }

.pump-group-limit-row,
.pump-group-fit-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.07);
}

.pump-group-limit-row > span {
  color: #8ea6b8;
  font-size: 11.5px;
  white-space: nowrap;
}

.pump-group-limit-row > input {
  width: 52px;
  height: 24px;
  padding: 0 5px;
  border: 1px solid rgba(111, 199, 255, 0.14);
  border-radius: 6px;
  background: rgba(4, 11, 20, 0.72);
  color: #e3f0f8;
  text-align: right;
  outline: none;
}

.pump-group-limit-row > em {
  color: #7892a4;
  font-size: 10.75px;
  font-style: normal;
}

.pump-group-limit-row .pump-dimension-badges {
  margin-left: auto;
}

.pump-group-fit-row {
  justify-content: center;
}

.pump-group-table-wrap {
  min-height: 0;
  overflow: auto;
}

.pump-group-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.group-current-col { width: 65px; }
.group-pump-col { width: 86px; }
.group-signal-col { width: 86px; }
.group-action-col { width: 48px; }

.pump-group-table th,
.pump-group-table td {
  height: 32px;
  padding: 0;
  border-right: 1px solid rgba(111, 199, 255, 0.06);
  border-bottom: 1px solid rgba(111, 199, 255, 0.06);
}

.pump-group-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(7, 15, 25, 0.96);
  color: #8098aa;
  font-size: 10.75px;
  font-weight: 650;
}

.pump-group-table td input {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #dcebf6;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.75px;
  text-align: right;
}

.pump-group-table td input:focus {
  background: rgba(48, 141, 185, 0.09);
  box-shadow: inset 0 0 0 1px rgba(111, 199, 255, 0.28);
}

.pump-group-table button {
  min-height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 11px;
}

.pump-point-remove,
.pump-point-cancel {
  color: #b48b92 !important;
}

.pump-point-confirm {
  margin-right: 2px;
  color: #8ee9bf !important;
}

.pump-draft-row td {
  background: rgba(42, 132, 176, 0.045);
}

.pump-add-row td {
  height: 30px;
  text-align: center;
}

.pump-add-row button {
  width: calc(100% - 10px);
  min-height: 22px;
  border-style: dashed;
  color: #73bad8;
  background: rgba(20, 63, 85, 0.16);
}

.pump-manager-chart-top {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 8px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.09);
  background: rgba(8, 18, 29, 0.7);
}

.pump-manager-total {
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #849eb1;
  font-size: 11.25px;
}

.pump-manager-total strong {
  margin-left: 4px;
  color: #d9edf9;
}

.pump-manager-chart-controls {
  gap: 6px;
  flex-wrap: wrap;
}

.pump-manager-info {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border-top: 1px solid rgba(111, 199, 255, 0.09);
  background: rgba(7, 15, 25, 0.78);
}

.pump-manager-info.empty {
  color: #718a9c;
  font-size: 12px;
  text-align: center;
}

.pump-manager-info-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pump-manager-info-title strong {
  color: #e1eef7;
  font-size: 13px;
}

.pump-manager-info-title span {
  color: #81a3b7;
  font-size: 11px;
}

.pump-manager-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.pump-manager-metrics > div {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(111, 199, 255, 0.08);
  border-radius: 8px;
  background: rgba(8, 18, 30, 0.48);
}

.pump-manager-metrics span {
  display: block;
  color: #7891a3;
  font-size: 10.25px;
}

.pump-manager-metrics strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d9ebf6;
  font-size: 11.5px;
  white-space: nowrap;
}

.pump-manager-function {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(111, 199, 255, 0.08);
  border-radius: 8px;
  background: rgba(4, 10, 18, 0.6);
}

.pump-manager-function span {
  color: #7e98aa;
  font-size: 10px;
}

.pump-manager-function code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #bdeaff;
  font-size: 11.5px;
  white-space: nowrap;
}

@media (max-width: 1380px) {
  .pump-workspace {
    grid-template-columns: minmax(220px, 0.8fr) minmax(220px, 0.8fr) minmax(390px, 1.3fr);
  }
  .pump-status-mini { display: none; }
  .pump-manager-layout { grid-template-columns: 170px minmax(560px, 1fr) minmax(350px, 0.65fr); }
  .pump-group-card { flex-basis: 292px; }
}

@media (max-width: 1080px) {
  .pump-topbar-state { display: none; }
  .pump-workspace { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 0.86fr) minmax(300px, 1.14fr); }
  .pump-chart-pane { grid-column: 1 / -1; }
  .pump-manager-layout { grid-template-columns: 150px minmax(500px, 1fr); }
  .pump-manager-chart-column { grid-column: 1 / -1; min-height: 330px; }
}


/* v8.3.84 — UI polish pass 1: hierarchy and spacing */
.pump-topbar,
.pump-pane,
.pump-manager-plan-column,
.pump-manager-groups-column,
.pump-manager-chart-column {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pump-pane-toolbar {
  background: linear-gradient(180deg, rgba(9, 20, 32, 0.82), rgba(6, 15, 25, 0.74));
}

.pump-pane-actions > button,
.pump-modal-actions > button,
.pump-manager-column-head button {
  white-space: nowrap;
}

.pump-current-plan span,
.pump-data-size,
.pump-status-mini,
.pump-chart-footer,
.pump-manager-total {
  letter-spacing: 0.01em;
}

/* v8.3.84 — UI polish pass 2: typography and table readability */
.pump-sheet td input,
.pump-sheet td span,
.pump-group-table td input {
  font-variant-numeric: tabular-nums;
}

.pump-sheet td:hover,
.pump-group-table td:hover {
  background: rgba(53, 145, 188, 0.055);
}

.pump-sheet td.selected,
.pump-group-table td.selected {
  background: rgba(52, 163, 214, 0.16);
  box-shadow: inset 0 0 0 1px rgba(103, 214, 255, 0.52);
}

.pump-group-table-wrap {
  outline: none;
  scrollbar-gutter: stable;
}

.pump-group-table-wrap:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(103, 214, 255, 0.18);
}

.pump-group-table th:last-child .pump-help-dot {
  width: 17px;
  height: 17px;
  margin: 0 auto;
  font-size: 10px;
}

.pump-plan-item input,
.pump-group-card-head > input {
  font-size: 12.5px;
}

/* v8.3.84 — UI polish pass 3: chart controls, focus states and finishing */
.pump-axis-dimension {
  position: absolute;
  z-index: 5;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 5px 2px 7px;
  border: 1px solid rgba(111, 199, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 13, 22, 0.92);
  color: #91aabd;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px);
}

.pump-axis-dimension > span {
  color: #7593a7;
  font-size: 10.5px;
  font-weight: 750;
}

.pump-axis-dimension > strong {
  color: #b9cfdd;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.pump-axis-dimension select {
  height: 24px;
  min-width: 105px;
  padding: 0 22px 0 7px;
  border: 0;
  border-radius: 6px;
  background: rgba(15, 32, 48, 0.84);
  color: #dcecf7;
  outline: none;
  font-size: 11.5px;
  cursor: pointer;
}

.pump-axis-dimension select:focus {
  box-shadow: 0 0 0 1px rgba(103, 214, 255, 0.38);
}

.pump-axis-dimension-x {
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
}

.pump-axis-dimension-y {
  left: 7px;
  top: 50%;
  width: 78px;
  min-height: 58px;
  padding: 5px;
  flex-direction: column;
  justify-content: center;
  transform: translateY(-50%);
}

.pump-axis-dimension-y select {
  width: 68px;
  min-width: 68px;
  padding-left: 5px;
  padding-right: 18px;
  text-overflow: ellipsis;
}

.pump-relation-chart .pump-chart-empty {
  padding: 50px 20px 36px 70px;
}

.pump-page button:focus-visible,
.pump-page input:focus-visible,
.pump-page select:focus-visible,
.pump-sheet-wrap:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(93, 202, 250, 0.14);
}

.pump-sheet-wrap,
.pump-group-table-wrap,
.pump-plan-list,
.pump-group-board,
.pump-detail-table-wrap {
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 166, 204, 0.34) rgba(3, 9, 16, 0.35);
}

.pump-sheet-wrap::-webkit-scrollbar,
.pump-group-table-wrap::-webkit-scrollbar,
.pump-plan-list::-webkit-scrollbar,
.pump-group-board::-webkit-scrollbar,
.pump-detail-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.pump-sheet-wrap::-webkit-scrollbar-thumb,
.pump-group-table-wrap::-webkit-scrollbar-thumb,
.pump-plan-list::-webkit-scrollbar-thumb,
.pump-group-board::-webkit-scrollbar-thumb,
.pump-detail-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(91, 166, 204, 0.34);
  background-clip: padding-box;
}

.pump-sheet-wrap::-webkit-scrollbar-track,
.pump-group-table-wrap::-webkit-scrollbar-track,
.pump-plan-list::-webkit-scrollbar-track,
.pump-group-board::-webkit-scrollbar-track,
.pump-detail-table-wrap::-webkit-scrollbar-track {
  background: rgba(3, 9, 16, 0.35);
}

.pump-chart-footer {
  background: linear-gradient(180deg, rgba(6, 14, 24, 0.62), rgba(5, 12, 21, 0.8));
}

.pump-manager-info {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.012);
}

.pump-manager-function code {
  user-select: text;
}

@media (max-width: 1500px) {
  .pump-axis-dimension-y { left: 5px; }
  .pump-topbar-state { gap: 11px; }
  .pump-chart-check { gap: 3px; }
}

/* v8.3.85 — chart workspace, quality review and backup polish */
.pump-page {
  --pump-control-height: 28px;
  --pump-control-font: 12px;
}

.pump-page button,
.pump-page input,
.pump-page select,
.pump-page textarea {
  font-family: inherit;
  font-size: var(--pump-control-font);
}

.pump-page button {
  min-height: var(--pump-control-height);
  padding-inline: 9px;
  font-weight: 600;
  line-height: 1;
}

.pump-pane-actions,
.pump-modal-actions,
.pump-manager-column-head > div,
.pump-manager-chart-actions,
.pump-manager-chart-meta-row {
  gap: 6px;
}

.pump-format-switch button,
.pump-scope-switch button,
.pump-fit-capsule button,
.pump-analysis-tabs button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 600;
}

.pump-output-actions {
  gap: 6px;
}

.pump-chart-pane {
  grid-template-rows: 44px minmax(0, 1fr);
}

.pump-chart-toolbar {
  padding-right: 9px;
}

.pump-chart-layer-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pump-chart-layer-toggle {
  min-height: 24px !important;
  padding: 0 7px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-color: transparent !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #5f7484 !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.pump-chart-layer-toggle:hover:not(:disabled) {
  background: rgba(111, 199, 255, 0.06) !important;
  color: #8da8ba !important;
}

.pump-chart-layer-toggle.selected {
  color: #cfe8f6 !important;
  background: rgba(56, 158, 205, 0.1) !important;
}

.pump-chart-layer-toggle i {
  width: 12px;
  height: 8px;
  display: inline-block;
  position: relative;
  flex: 0 0 auto;
}

.pump-chart-layer-toggle.curve i::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.pump-chart-layer-toggle.calibration i::before,
.pump-chart-layer-toggle.current i::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 7px;
  height: 7px;
  box-sizing: border-box;
  border-radius: 50%;
  background: currentColor;
}

.pump-chart-layer-toggle.current i::before {
  background: transparent;
  border: 1.5px solid currentColor;
}

.pump-chart-layer-toggle.boundary i::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  border-top: 1px dashed currentColor;
}

.pump-chart-layer-toggle.curve.selected { color: #72d1ff !important; }
.pump-chart-layer-toggle.calibration.selected { color: #b9ecff !important; }
.pump-chart-layer-toggle.current.selected { color: #f4f8fb !important; }
.pump-chart-layer-toggle.boundary.selected { color: #ffe45c !important; }

.pump-sheet td.near {
  color: #ffd88f;
  background: rgba(255, 183, 70, 0.055);
}

.pump-sheet td.extrapolated {
  color: #ff9ca2;
  background: rgba(255, 96, 108, 0.07);
}

.pump-sheet td.invalid {
  color: #6f8291;
  background: rgba(114, 130, 145, 0.045);
}

.pump-detail-summary {
  display: inline-flex !important;
  align-items: center;
  gap: 8px !important;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(111, 199, 255, 0.12);
}

.pump-detail-summary span {
  color: #8ca4b6 !important;
  font-size: 11.5px !important;
}

.pump-detail-summary strong {
  margin-left: 3px;
  color: #dcecf7;
  font-size: inherit !important;
}

.pump-detail-summary .near strong { color: var(--pump-orange); }
.pump-detail-summary .extra strong { color: var(--pump-red); }
.pump-detail-summary .invalid strong { color: #8495a1; }

.pump-relation-chart.mode-zoom svg { cursor: crosshair; }
.pump-relation-chart.mode-pan svg { cursor: grab; }
.pump-relation-chart.mode-pan.dragging svg { cursor: grabbing; }

.chart-zoom-rect {
  fill: rgba(95, 205, 255, 0.1);
  stroke: rgba(112, 215, 255, 0.75);
  stroke-width: 1;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.chart-horizontal-band {
  fill: rgba(111, 199, 255, 0.08);
  stroke: none;
  pointer-events: none;
}

.chart-calibration {
  cursor: pointer;
  transition: r 100ms ease, filter 100ms ease;
}

.chart-calibration:hover,
.chart-calibration.selected {
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(126, 220, 255, 0.55));
}

.chart-curve.compare-0 { stroke: #72d1ff; }
.chart-curve.compare-1 { stroke: #ffd36f; }
.chart-curve.compare-2 { stroke: #76e0b5; }
.chart-curve.compare-3 { stroke: #c5a7ff; }
.chart-curve.compare-4 { stroke: #ff9fb5; }

.pump-axis-dimension-y {
  left: -12px;
  top: 50%;
  width: auto;
  min-height: 28px;
  padding: 2px 5px 2px 7px;
  flex-direction: row;
  justify-content: center;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
}

.pump-axis-dimension-y select {
  width: auto;
  min-width: 105px;
  padding-left: 7px;
  padding-right: 22px;
  text-overflow: clip;
}

.pump-axis-text {
  position: absolute;
  z-index: 5;
  color: #a9bfce;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.pump-axis-text-x {
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
}

.pump-axis-text-y {
  left: 16px;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.pump-manager-chart-column {
  grid-template-rows: auto minmax(0, 1fr);
}

.pump-manager-chart-top {
  display: grid;
  gap: 6px;
  padding: 7px 8px;
}

.pump-manager-chart-title-row,
.pump-manager-chart-meta-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pump-manager-chart-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.pump-manager-chart-title strong {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2eef6;
  font-size: 13px;
  white-space: nowrap;
}

.pump-manager-chart-title span {
  color: #7994a7;
  font-size: 11.5px;
  white-space: nowrap;
}

.pump-manager-chart-actions,
.pump-analysis-tabs {
  display: inline-flex;
  align-items: center;
}

.pump-analysis-tabs {
  padding: 2px;
  border: 1px solid rgba(111, 199, 255, 0.13);
  border-radius: 8px;
  background: rgba(4, 11, 20, 0.58);
}

.pump-analysis-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7891a3;
}

.pump-analysis-tabs button.selected {
  background: rgba(56, 158, 205, 0.2);
  color: #d9f3ff;
  box-shadow: inset 0 0 0 1px rgba(111, 199, 255, 0.16);
}

.pump-manager-chart-meta-row {
  gap: 8px;
}

.pump-manager-summary-strip {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 5px;
  overflow: hidden;
}

.pump-summary-metric {
  min-width: 62px;
  max-width: 150px;
  padding: 4px 6px;
  border: 1px solid rgba(111, 199, 255, 0.07);
  border-radius: 7px;
  background: rgba(6, 15, 25, 0.48);
}

.pump-summary-metric.wide {
  min-width: 150px;
  max-width: 240px;
}

.pump-summary-metric span {
  display: block;
  color: #71899a;
  font-size: 9.75px;
  line-height: 1.05;
}

.pump-summary-metric strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #d7e8f4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.75px;
  font-weight: 650;
  line-height: 1.05;
  white-space: nowrap;
}

.pump-summary-metric.warning strong { color: #ffd078; }
.pump-summary-metric.good strong { color: #78e2b5; }

.pump-manager-summary-note {
  align-self: center;
  color: #839daf;
  font-size: 11.25px;
  line-height: 1.35;
}

.pump-manager-plan-column {
  grid-template-rows: 42px minmax(0, 1fr) 112px;
}

.pump-plan-note {
  min-height: 0;
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  gap: 4px;
  padding: 6px 7px 7px;
  border-top: 1px solid rgba(111, 199, 255, 0.09);
  background: rgba(6, 15, 25, 0.56);
}

.pump-plan-note > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pump-plan-note strong {
  color: #9fb4c3;
  font-size: 11.5px;
}

.pump-plan-note span {
  color: #5f7788;
  font-size: 10px;
}

.pump-plan-note textarea {
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  padding: 6px 7px;
  border: 1px solid rgba(111, 199, 255, 0.1);
  border-radius: 7px;
  background: rgba(3, 9, 16, 0.52);
  color: #cadce8;
  outline: none;
  font-size: 11px;
  line-height: 1.4;
}

.pump-plan-note textarea:focus {
  border-color: rgba(111, 199, 255, 0.34);
}

.pump-group-card-head {
  grid-template-columns: 22px 21px minmax(0, 1fr) auto 26px;
}

.pump-quality-badge {
  min-width: 24px;
  min-height: 20px !important;
  padding: 0 4px !important;
  border-color: rgba(255, 194, 88, 0.22) !important;
  border-radius: 6px !important;
  background: rgba(255, 166, 43, 0.08) !important;
  color: #ffc86d !important;
  font-size: 10px !important;
}

.pump-quality-ok {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #67d8aa;
  font-size: 11px;
}

.pump-group-table tr.linked td {
  background: rgba(72, 173, 219, 0.1);
  box-shadow: inset 0 1px 0 rgba(111, 213, 255, 0.22), inset 0 -1px 0 rgba(111, 213, 255, 0.22);
}

.pump-group-table tr.linked td:first-child {
  box-shadow: inset 2px 0 0 #72d1ff, inset 0 1px 0 rgba(111, 213, 255, 0.22), inset 0 -1px 0 rgba(111, 213, 255, 0.22);
}

.pump-quality-panel {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  overflow: hidden;
  background: rgba(3, 9, 16, 0.46);
}

.pump-roundtrip-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 7px 10px;
  border: 1px solid rgba(105, 209, 255, 0.12);
  border-radius: 8px;
  background: rgba(52, 155, 205, 0.045);
  color: #9eb4c1;
  font-size: 11.5px;
}

.pump-roundtrip-strip strong {
  color: #cdeaf7;
  font-size: 12px;
}

.pump-quality-banner {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 193, 86, 0.16);
  border-radius: 9px;
  background: rgba(255, 164, 42, 0.055);
}

.pump-quality-banner.good {
  border-color: rgba(99, 230, 180, 0.15);
  background: rgba(66, 189, 143, 0.05);
}

.pump-quality-banner strong {
  color: #ffd084;
  font-size: 12.5px;
}

.pump-quality-banner.good strong { color: #7de6ba; }
.pump-quality-banner span { color: #879faf; font-size: 11.5px; }

.pump-quality-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.pump-quality-list > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(111, 199, 255, 0.08);
  border-radius: 8px;
  background: rgba(7, 17, 28, 0.58);
}

.pump-quality-list i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 176, 58, 0.1);
  color: #ffc46c;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.pump-quality-list .info i {
  background: rgba(91, 190, 235, 0.1);
  color: #8dd9fb;
}

.pump-quality-list strong {
  display: block;
  color: #d9e9f4;
  font-size: 11.75px;
}

.pump-quality-list span {
  display: block;
  margin-top: 2px;
  color: #8ca4b6;
  font-size: 11.25px;
  line-height: 1.4;
}

.pump-quality-panel > p {
  margin: 0;
  color: #657e90;
  font-size: 10.75px;
}

.pump-submodal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 5, 10, 0.66);
  backdrop-filter: blur(9px);
}

.pump-compare-modal,
.pump-backup-modal {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(111, 199, 255, 0.22);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(10, 21, 34, 0.98), rgba(5, 12, 21, 0.98));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.pump-compare-modal {
  width: min(1180px, calc(100vw - 58px));
  height: min(720px, calc(100vh - 70px));
  display: grid;
  grid-template-rows: 48px 54px minmax(0, 1fr);
}

.pump-compare-toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.1);
  background: rgba(7, 16, 27, 0.72);
}

.pump-compare-plan-list {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
}

.pump-compare-plan-list label {
  max-width: 190px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid rgba(111, 199, 255, 0.08);
  border-radius: 7px;
  color: #758c9d;
  cursor: pointer;
  white-space: nowrap;
}

.pump-compare-plan-list label.selected {
  border-color: rgba(111, 199, 255, 0.23);
  background: rgba(41, 113, 150, 0.12);
  color: #d3e7f3;
}

.pump-compare-plan-list input { display: none; }
.pump-compare-plan-list i { width: 13px; height: 2px; border-radius: 2px; background: #72d1ff; }
.pump-compare-plan-list .compare-1 i { background: #ffd36f; }
.pump-compare-plan-list .compare-2 i { background: #76e0b5; }
.pump-compare-plan-list .compare-3 i { background: #c5a7ff; }
.pump-compare-plan-list .compare-4 i { background: #ff9fb5; }
.pump-compare-plan-list span { overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; }

.pump-compare-axis {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pump-compare-chart {
  min-width: 0;
  min-height: 0;
}

.pump-backup-modal {
  width: min(860px, calc(100vw - 62px));
  display: grid;
  grid-template-rows: 48px auto 42px;
}

.pump-backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}

.pump-backup-grid section {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(111, 199, 255, 0.11);
  border-radius: 10px;
  background: rgba(6, 15, 25, 0.62);
}

.pump-backup-grid section.disabled { opacity: 0.7; }
.pump-backup-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pump-backup-card-head strong { color: #dcecf7; font-size: 13px; }
.pump-backup-card-head span { padding: 3px 6px; border-radius: 999px; background: rgba(111, 199, 255, 0.08); color: #8fb5ca; font-size: 10.5px; }
.pump-backup-grid section.configured .pump-backup-card-head span { background: rgba(84, 205, 157, 0.1); color: #7be2b5; }
.pump-backup-grid p { min-height: 48px; margin: 0; color: #829bad; font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }
.pump-backup-grid section > div:last-child { display: flex; gap: 7px; }

.pump-backup-message {
  display: flex;
  align-items: center;
  padding: 0 13px;
  border-top: 1px solid rgba(111, 199, 255, 0.09);
  color: #7893a5;
  font-size: 11.5px;
}

.pump-backup-message.error { color: #ff939b; }

@media (max-width: 1480px) {
  .pump-manager-summary-strip .pump-summary-metric:nth-of-type(n+5) { display: none; }
  .pump-manager-chart-meta-row { align-items: flex-start; }
  .pump-chart-layer-toggle { padding-inline: 5px !important; }
}

@media (max-width: 1180px) {
  .pump-chart-layer-toggle span { display: none; }
  .pump-chart-layer-toggle { width: 26px; justify-content: center; }
  .pump-detail-summary { display: none !important; }
  .pump-backup-grid { grid-template-columns: 1fr; }
}

/* v8.3.89 — Plotly migration and calibration workspace refinement */
.pump-chart-pane {
  grid-template-rows: 44px minmax(0, 1fr);
}

.pump-chart-toolbar {
  gap: 12px;
}

.pump-plotly-shell,
.pump-plotly {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.pump-plotly-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 18%, rgba(55, 156, 205, 0.045), transparent 34%),
    rgba(2, 8, 14, 0.42);
}

.pump-plotly.empty {
  opacity: 0.2;
}

.pump-plotly-shell .pump-chart-empty {
  z-index: 2;
  pointer-events: none;
}

.pump-plotly-range-note {
  position: absolute;
  right: 15px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #70899a;
  font-size: 9.75px;
  pointer-events: none;
  z-index: 2;
}

.pump-plotly-range-note i {
  width: 13px;
  height: 5px;
  border-radius: 2px;
}

.pump-plotly-range-note i.near { background: rgba(255, 202, 91, 0.4); }
.pump-plotly-range-note i.extra { margin-left: 5px; background: rgba(255, 104, 119, 0.42); }

.pump-relation-switch {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pump-relation-switch > i {
  color: #607c8e;
  font-size: 11px;
  font-style: normal;
}

.pump-relation-axis {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(111, 199, 255, 0.11);
  border-radius: 8px;
  background: rgba(4, 11, 19, 0.56);
}

.pump-relation-axis > span {
  padding: 0 4px;
  color: #607c8e;
  font-size: 9.5px;
  font-weight: 800;
}

.pump-relation-axis button {
  min-height: 23px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7993a5;
  font-size: 10.5px;
}

.pump-relation-axis button:hover:not(:disabled) {
  border: 0;
  background: rgba(48, 121, 158, 0.12);
}

.pump-relation-axis button.selected {
  background: rgba(49, 151, 197, 0.22);
  color: #dff6ff;
  box-shadow: inset 0 0 0 1px rgba(111, 205, 247, 0.2);
}

.pump-relation-switch.compact .pump-relation-axis button {
  min-height: 22px;
  padding-inline: 6px;
}

.pump-manager-modal {
  border-color: rgba(111, 199, 255, 0.16);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.pump-manager-layout {
  grid-template-columns: 198px minmax(610px, 1.06fr) minmax(470px, 0.86fr);
  gap: 8px;
  padding: 8px;
}

.pump-manager-plan-column,
.pump-manager-groups-column,
.pump-manager-chart-column {
  border-color: rgba(111, 199, 255, 0.095);
  background: rgba(4, 11, 19, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.012);
}

.pump-manager-plan-column {
  grid-template-rows: 42px minmax(0, 1fr) 98px;
}

.pump-plan-note {
  grid-template-rows: 22px minmax(0, 1fr);
  padding: 5px 7px 7px;
}

.pump-plan-item {
  height: 40px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  border-color: transparent;
  background: rgba(11, 23, 35, 0.45);
}

.pump-plan-item:hover,
.pump-plan-item.selected {
  border-color: rgba(111, 199, 255, 0.28);
  background: linear-gradient(90deg, rgba(37, 104, 138, 0.38), rgba(17, 44, 63, 0.38));
}

.pump-plan-item.active span {
  background: rgba(69, 195, 148, 0.13);
  color: #7be4b8;
}

.pump-group-board {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  overflow-y: hidden;
}

.pump-group-card {
  flex: 0 0 320px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  grid-template-rows: 40px 35px 35px minmax(0, 1fr);
  border-color: rgba(111, 199, 255, 0.14);
  background: linear-gradient(180deg, rgba(10, 22, 35, 0.7), rgba(5, 12, 21, 0.72));
}

.pump-group-card.selected {
  border-color: rgba(111, 199, 255, 0.48);
  background: linear-gradient(180deg, rgba(10, 22, 35, 0.7), rgba(5, 12, 21, 0.72));
  box-shadow: inset 0 0 0 1px rgba(111, 199, 255, 0.11), 0 0 20px rgba(61, 177, 227, 0.07);
}

.pump-group-card-head {
  grid-template-columns: 22px 21px minmax(0, 1fr) auto 26px;
}

.pump-group-table-wrap {
  max-height: none;
  overflow: auto;
}

.pump-group-table th,
.pump-group-table td {
  border-right-color: rgba(111, 199, 255, 0.045);
  border-bottom-color: rgba(111, 199, 255, 0.052);
}

.pump-group-table tr.quality-linked td {
  background: rgba(255, 181, 66, 0.095);
  box-shadow: inset 0 1px 0 rgba(255, 199, 104, 0.24), inset 0 -1px 0 rgba(255, 199, 104, 0.24);
}

.pump-group-table tr.quality-linked td:first-child {
  box-shadow: inset 2px 0 0 #ffc76d, inset 0 1px 0 rgba(255, 199, 104, 0.24), inset 0 -1px 0 rgba(255, 199, 104, 0.24);
}

.pump-manager-chart-top {
  gap: 7px;
  padding: 8px 9px 7px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.075);
  background: rgba(7, 16, 26, 0.5);
}

.pump-manager-chart-title-row {
  min-height: 28px;
}

.pump-manager-chart-title strong {
  max-width: 260px;
  color: #e6f2f8;
  font-size: 13.25px;
}

.pump-manager-chart-actions {
  gap: 7px;
}

.pump-manager-chart-meta-row {
  min-height: 30px;
  gap: 10px;
}

.pump-manager-summary-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: #89a2b3;
  font-size: 10.75px;
  line-height: 1.35;
  white-space: nowrap;
}

.pump-manager-summary-line strong {
  color: #dbeaf4;
  font-weight: 700;
}

.pump-manager-summary-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pump-manager-summary-line em {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #7f98aa;
  font-style: normal;
}

.pump-manager-summary-line.warning strong { color: #ffd078; }
.pump-manager-summary-line.good strong { color: #78e2b5; }

.pump-manager-chart-fill {
  background: rgba(2, 8, 14, 0.34);
}

.pump-quality-panel {
  background: rgba(3, 9, 16, 0.3);
}

.pump-quality-list > button {
  width: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(111, 199, 255, 0.075);
  border-radius: 9px;
  background: rgba(7, 17, 28, 0.5);
  text-align: left;
}

.pump-quality-list > button:hover:not(:disabled) {
  border-color: rgba(111, 199, 255, 0.24);
  background: rgba(14, 34, 51, 0.68);
}

.pump-quality-list > button > b {
  color: #78cfee;
  font-size: 10px;
  font-weight: 650;
}

.pump-quality-list > button > div > em {
  display: block;
  margin-top: 4px;
  color: #bd9a65;
  font-size: 10px;
  font-style: normal;
}

.pump-modal-actions button:not(.primary-button) {
  min-height: 27px;
  padding-inline: 9px;
  color: #9eb4c2;
  background: rgba(7, 17, 28, 0.52);
}

.pump-modal-actions .primary-button {
  min-width: 86px;
  font-weight: 700;
}

.pump-compare-toolbar {
  align-items: center;
}

.pump-compare-axis .pump-relation-switch {
  justify-content: flex-end;
}

.pump-compare-chart .pump-plotly-shell {
  border-top: 1px solid rgba(111, 199, 255, 0.07);
}

@media (max-width: 1540px) {
  .pump-manager-layout {
    grid-template-columns: 180px minmax(560px, 1fr) minmax(420px, 0.78fr);
  }
  .pump-group-card { flex-basis: 292px; }
  .pump-relation-axis button { padding-inline: 5px; }
}

@media (max-width: 1250px) {
  .pump-manager-layout { grid-template-columns: 164px minmax(520px, 1fr); }
  .pump-manager-chart-column { grid-column: 1 / -1; min-height: 360px; }
  .pump-manager-summary-line { max-width: 55%; }
}

/* v8.3.90 — compact pump-group cards and aligned calibration controls */
.pump-group-card {
  flex-basis: 286px;
  grid-template-rows: 40px 36px minmax(0, 1fr);
}

.pump-group-card-head {
  grid-template-columns: 18px 20px minmax(54px, 1fr) auto auto 20px;
  gap: 3px;
  padding-inline: 5px;
}

.pump-group-card-head > input {
  padding-inline: 3px;
  font-size: 12px;
}

.pump-group-card-head .pump-dimension-badges {
  gap: 2px;
  margin-left: 2px;
}

.pump-group-card-head .pump-dimension-badges.compact span {
  min-width: 27px;
  padding: 3px 4px;
  font-size: 9.75px;
}

.pump-group-card-head .pump-quality-badge {
  min-width: 20px;
  min-height: 18px !important;
  padding-inline: 3px !important;
}

.pump-group-enabled {
  width: 20px;
}

.pump-group-limit-row {
  gap: 4px;
  padding: 0 6px;
}

.pump-group-limit-row > span {
  font-size: 10.75px;
}

.pump-group-limit-row > input {
  width: 40px;
  height: 23px;
  padding: 0 4px;
  font-size: 11.5px;
}

.pump-group-limit-row > em {
  margin-right: 1px;
  font-size: 10px;
}

.pump-group-limit-row .pump-fit-capsule {
  min-width: 0;
  margin-left: auto;
  padding: 1px;
  border-radius: 7px;
}

.pump-group-limit-row .pump-fit-capsule button {
  min-height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 10.25px;
  font-weight: 600;
}

.group-current-col { width: 58px; }
.group-pump-col,
.group-signal-col { width: 72px; }
.group-action-col { width: 38px; }

.pump-group-table th,
.pump-group-table td {
  height: 31px;
}

.pump-group-table td input {
  padding: 0 4px;
  font-size: 12px;
}

.pump-group-table td:last-child {
  padding: 2px;
}

.pump-group-table td:last-child > .pump-point-remove {
  width: 100%;
  height: 100%;
  min-height: 25px;
  padding: 0;
  border-radius: 5px;
  font-size: 13px;
}

.pump-group-table .pump-draft-row td:last-child {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 2px;
}

.pump-group-table .pump-draft-row td:last-child button {
  width: 100%;
  min-width: 0;
  min-height: 25px;
  margin: 0;
  padding: 0;
}

.pump-group-table th:last-child .pump-help-dot {
  width: 18px;
  height: 18px;
}

@media (max-width: 1540px) {
  .pump-group-card { flex-basis: 276px; }
  .pump-group-card-head .pump-dimension-badges.compact span {
    min-width: 25px;
    padding-inline: 3px;
  }
  .pump-group-limit-row .pump-fit-capsule button {
    padding-inline: 4px;
    font-size: 10px;
  }
}

.pump-quality-placeholder {
  width: 0;
  min-width: 0;
  height: 1px;
  overflow: hidden;
}

/* v8.3.93 — Pump workflow, traceability and comparison polish */
.pump-current-plan {
  grid-template-columns: auto minmax(90px, 1fr) auto;
  column-gap: 7px;
}

.pump-current-plan em {
  overflow: hidden;
  color: #718a9b;
  font-size: 9.75px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pump-plan-validation-badge,
.pump-conversion-risk,
.pump-unsaved-badge,
.pump-locked-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(113, 184, 219, 0.18);
  border-radius: 999px;
  background: rgba(12, 29, 43, 0.62);
  color: #9fb8c8;
  font-size: 9.75px;
  font-weight: 650;
  white-space: nowrap;
}

.pump-plan-validation-badge.pass,
.pump-conversion-risk.unique { border-color: rgba(87, 215, 163, 0.25); color: #83e3bb; background: rgba(36, 123, 91, 0.12); }
.pump-plan-validation-badge.warning,
.pump-conversion-risk.caution,
.pump-unsaved-badge { border-color: rgba(255, 198, 90, 0.28); color: #ffd078; background: rgba(148, 99, 22, 0.14); }
.pump-plan-validation-badge.blocked,
.pump-conversion-risk.unavailable { border-color: rgba(255, 114, 126, 0.28); color: #ff9aa5; background: rgba(142, 45, 55, 0.14); }
.pump-locked-badge { border-color: rgba(157, 166, 255, 0.24); color: #c1c7ff; background: rgba(72, 68, 148, 0.14); }

.pump-manager-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pump-manager-layout {
  grid-template-columns: 226px minmax(610px, 1.06fr) minmax(470px, 0.86fr);
}

.pump-manager-plan-column {
  grid-template-rows: 42px minmax(74px, 1fr) auto 88px auto;
}

.pump-manager-column-head > div:last-child {
  gap: 3px;
}

.pump-manager-column-head button.selected {
  border-color: rgba(157, 166, 255, 0.32);
  color: #cbd0ff;
  background: rgba(78, 72, 156, 0.16);
}

.pump-plan-item {
  grid-template-columns: 25px minmax(0, 1fr) auto auto;
}

.pump-plan-item.locked b {
  color: #aeb6ff;
  font-size: 9px;
  font-weight: 650;
}

.pump-plan-item input:disabled {
  color: #93a8b8;
  cursor: default;
}

.pump-plan-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 5px;
  padding: 6px 7px;
  border-top: 1px solid rgba(111, 199, 255, 0.07);
  background: rgba(4, 12, 20, 0.42);
}

.pump-plan-meta-grid label {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: #708a9b;
  font-size: 9px;
}

.pump-plan-meta-grid input {
  width: 100%;
  min-width: 0;
  height: 23px;
  padding: 0 5px;
  border: 1px solid rgba(111, 199, 255, 0.1);
  border-radius: 5px;
  background: rgba(3, 10, 17, 0.7);
  color: #c8dce8;
  font-size: 9.75px;
}

.pump-plan-meta-grid input:focus {
  border-color: rgba(111, 199, 255, 0.36);
  outline: none;
}

.pump-plan-note textarea:disabled,
.pump-plan-meta-grid input:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.pump-plan-validation-card {
  display: grid;
  gap: 2px;
  margin: 5px 7px 7px;
  padding: 6px 7px;
  border: 1px solid rgba(111, 199, 255, 0.1);
  border-radius: 7px;
  background: rgba(7, 18, 28, 0.58);
}

.pump-plan-validation-card strong { color: #cfe1eb; font-size: 10px; }
.pump-plan-validation-card span { color: #7891a2; font-size: 9px; line-height: 1.35; }
.pump-plan-validation-card.pass strong { color: #78e2b5; }
.pump-plan-validation-card.warning strong { color: #ffd078; }
.pump-plan-validation-card.blocked strong { color: #ff98a4; }

.pump-group-card {
  position: relative;
  --pump-group-color: #74d8ff;
}

.pump-group-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  border-radius: 8px 0 0 8px;
  background: var(--pump-group-color);
  opacity: 0.55;
  content: '';
  pointer-events: none;
}

.pump-group-card.group-color-1 { --pump-group-color: #ffbd66; }
.pump-group-card.group-color-2 { --pump-group-color: #8ee6b8; }
.pump-group-card.group-color-3 { --pump-group-color: #c7a4ff; }
.pump-group-card.group-color-4 { --pump-group-color: #ff8ba0; }

.pump-group-status {
  min-width: 37px;
  min-height: 19px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  font-size: 9px !important;
  font-weight: 650 !important;
}

.pump-group-status.ready { border-color: rgba(87, 215, 163, 0.24) !important; color: #78e2b5 !important; background: rgba(36, 123, 91, 0.12) !important; }
.pump-group-status.warning { border-color: rgba(255, 198, 90, 0.28) !important; color: #ffd078 !important; background: rgba(148, 99, 22, 0.14) !important; }
.pump-group-status.incomplete { border-color: rgba(111, 159, 186, 0.18) !important; color: #87a1b2 !important; background: rgba(31, 58, 76, 0.14) !important; }
.pump-group-status.disabled { border-color: rgba(116, 130, 141, 0.14) !important; color: #697e8d !important; background: rgba(42, 49, 54, 0.18) !important; }

.pump-group-table input:disabled,
.pump-group-limit-row input:disabled {
  color: #758b99;
  cursor: not-allowed;
}

.pump-compare-axis {
  gap: 7px;
  flex-wrap: wrap;
}

.pump-compare-mode {
  display: inline-flex;
  padding: 2px;
  border: 1px solid rgba(111, 199, 255, 0.11);
  border-radius: 7px;
  background: rgba(4, 13, 21, 0.55);
}

.pump-compare-mode button {
  min-height: 23px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #7892a4;
  font-size: 10px;
}

.pump-compare-mode button.selected {
  background: rgba(52, 142, 184, 0.2);
  color: #d8f2ff;
}

.pump-compare-base {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7e97a8;
  font-size: 9.75px;
}

.pump-compare-base select {
  max-width: 150px;
  height: 25px;
  border: 1px solid rgba(111, 199, 255, 0.12);
  border-radius: 6px;
  background: #07131f;
  color: #bfd4df;
  font-size: 10px;
}

.pump-compare-stats {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  border-top: 1px solid rgba(111, 199, 255, 0.06);
  border-bottom: 1px solid rgba(111, 199, 255, 0.06);
  background: rgba(4, 12, 20, 0.46);
}

.pump-compare-stats > div {
  min-width: 210px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 8px;
  padding: 6px 8px;
  border: 1px solid rgba(111, 199, 255, 0.09);
  border-radius: 7px;
  background: rgba(8, 20, 31, 0.58);
}

.pump-compare-stats strong { grid-column: 1 / -1; overflow: hidden; color: #d4e5ee; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pump-compare-stats span { color: #819aaa; font-size: 9px; }
.pump-compare-stats > div.disabled { opacity: 0.55; }

.pump-revision-modal {
  width: min(680px, 88vw);
  max-height: min(720px, 86vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.pump-revision-list {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  overflow: auto;
}

.pump-revision-list article {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border: 1px solid rgba(111, 199, 255, 0.09);
  border-radius: 8px;
  background: rgba(7, 18, 29, 0.62);
}

.pump-revision-list article > em { color: #5f8297; font-size: 10px; font-style: normal; }
.pump-revision-list article > div { min-width: 0; display: grid; gap: 2px; }
.pump-revision-list strong { color: #cfe1eb; font-size: 10.5px; }
.pump-revision-list span { overflow: hidden; color: #89a1b1; font-size: 9.75px; text-overflow: ellipsis; white-space: nowrap; }
.pump-revision-list small { color: #627c8d; font-size: 9px; }

.pump-close-confirm-layer { z-index: 140; }
.pump-close-confirm {
  width: min(430px, 88vw);
  display: grid;
  gap: 9px;
  padding: 18px;
  border-color: rgba(255, 194, 88, 0.23);
}
.pump-close-confirm > strong { color: #f0e2c6; font-size: 14px; }
.pump-close-confirm p { margin: 0; color: #8ea2ae; font-size: 11px; line-height: 1.55; }
.pump-close-confirm > div { display: flex; justify-content: flex-end; gap: 7px; }
.pump-close-confirm button.danger { border-color: rgba(255, 111, 124, 0.24); color: #ff9aa5; }

.pump-empty-state {
  padding: 32px;
  color: #6f8797;
  text-align: center;
  font-size: 11px;
}

@media (max-width: 1540px) {
  .pump-manager-layout { grid-template-columns: 208px minmax(560px, 1fr) minmax(420px, 0.78fr); }
  .pump-plan-meta-grid { grid-template-columns: 1fr; }
  .pump-manager-plan-column { grid-template-rows: 42px minmax(65px, 1fr) auto 78px auto; }
}

@media (max-width: 1250px) {
  .pump-manager-layout { grid-template-columns: 190px minmax(520px, 1fr); }
}


/* v8.3.94 — Pump plan header, group accent and Plotly alignment polish */
.pump-topbar-primary {
  flex-wrap: nowrap;
  overflow: hidden;
}

.pump-current-plan {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(430px, 38vw);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 7px;
  white-space: nowrap;
}

.pump-current-plan > span,
.pump-current-plan > em {
  flex: 0 0 auto;
  white-space: nowrap;
}

.pump-current-plan > strong,
.pump-current-plan > em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pump-current-plan > strong {
  max-width: none;
}

.pump-group-card::before {
  z-index: 8;
  width: 3px;
  opacity: 0.72;
}

.pump-plotly-shell .modebar {
  top: -3px !important;
  right: 6px !important;
}

@media (max-width: 1380px) {
  .pump-current-plan {
    max-width: min(360px, 34vw);
  }

  .pump-current-plan > em {
    display: none;
  }
}

/* v8.3.95 — Pump status indicator, calibration readability and chart alignment */
.pump-output-pane .pump-pane-toolbar,
.pump-output-actions {
  overflow: visible;
}

.pump-output-pane .pump-pane-toolbar {
  position: relative;
  z-index: 12;
}

.pump-conversion-indicator {
  position: relative;
  z-index: 20;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  border: 1px solid rgba(113, 184, 219, 0.18);
  border-radius: 50%;
  background: rgba(12, 29, 43, 0.72);
  cursor: help;
  outline: none;
}

.pump-conversion-indicator > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7f98a8;
  box-shadow: 0 0 8px rgba(127, 152, 168, 0.24);
}

.pump-conversion-indicator.unique {
  border-color: rgba(87, 215, 163, 0.26);
  background: rgba(36, 123, 91, 0.12);
}

.pump-conversion-indicator.unique > i {
  background: #6ee0b1;
  box-shadow: 0 0 9px rgba(91, 226, 176, 0.55);
}

.pump-conversion-indicator.caution {
  border-color: rgba(255, 198, 90, 0.3);
  background: rgba(148, 99, 22, 0.14);
}

.pump-conversion-indicator.caution > i {
  background: #ffd078;
  box-shadow: 0 0 9px rgba(255, 199, 91, 0.5);
}

.pump-conversion-indicator.unavailable {
  border-color: rgba(255, 114, 126, 0.3);
  background: rgba(142, 45, 55, 0.14);
}

.pump-conversion-indicator.unavailable > i {
  background: #ff8f9b;
  box-shadow: 0 0 9px rgba(255, 116, 131, 0.48);
}

.pump-conversion-indicator::after {
  position: absolute;
  left: -5px;
  top: calc(100% + 7px);
  width: max-content;
  max-width: 286px;
  padding: 7px 9px;
  border: 1px solid rgba(111, 199, 255, 0.2);
  border-radius: 7px;
  background: rgba(4, 13, 22, 0.98);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.42);
  color: #d6e7f1;
  content: attr(data-tooltip);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.pump-conversion-indicator:hover::after,
.pump-conversion-indicator:focus-visible::after {
  visibility: visible;
  opacity: 1;
}

.pump-manager-chart-top {
  gap: 0;
  padding: 7px 9px;
}

.pump-manager-chart-title-row {
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 10px;
}

.pump-manager-chart-relation-center {
  min-width: 0;
  justify-self: center;
}

.pump-manager-chart-actions {
  justify-self: end;
}

.pump-manager-chart-fill {
  position: relative;
}

.pump-manager-chart-bottom-summary {
  position: absolute;
  left: 15px;
  bottom: 7px;
  z-index: 5;
  max-width: calc(100% - 172px);
  pointer-events: none;
}

.pump-manager-chart-bottom-summary .pump-manager-summary-line {
  max-width: 100%;
  color: #829cab;
  font-size: 12px;
}

.pump-plotly-range-note {
  right: 15px;
  bottom: 7px;
  font-size: 12px;
}

.pump-plotly-range-note i {
  width: 14px;
  height: 6px;
}

.pump-plotly-shell .modebar {
  top: -9px !important;
  right: 6px !important;
  z-index: 8 !important;
}

/* Calibration manager text must remain readable at normal desktop zoom. */
.pump-manager-modal .pump-modal-head span {
  font-size: 12px;
}

.pump-manager-column-head strong {
  font-size: 13.5px;
}

.pump-manager-column-head button,
.pump-manager-chart-actions button {
  font-size: 11.5px;
}

.pump-plan-item em {
  font-size: 11.5px;
}

.pump-plan-item input {
  font-size: 12px;
}

.pump-plan-item span {
  font-size: 11px;
}

.pump-plan-item.locked b {
  font-size: 10.5px;
}

.pump-plan-meta-grid label {
  font-size: 10.5px;
}

.pump-plan-meta-grid input {
  font-size: 11.5px;
}

.pump-plan-validation-card strong {
  font-size: 11.5px;
}

.pump-plan-validation-card span {
  font-size: 10.5px;
  line-height: 1.42;
}

.pump-plan-note span {
  font-size: 11px;
}

.pump-plan-note textarea {
  font-size: 11.5px;
}

.pump-group-card-head > input {
  font-size: 12.5px;
}

.pump-group-card-head .pump-dimension-badges.compact span {
  font-size: 10.75px;
}

.pump-group-status {
  font-size: 10.5px !important;
}

.pump-group-limit-row > span {
  font-size: 11.5px;
}

.pump-group-limit-row > input {
  font-size: 12px;
}

.pump-group-limit-row > em {
  font-size: 11px;
}

.pump-group-limit-row .pump-fit-capsule button {
  font-size: 11px;
}

.pump-group-table th {
  font-size: 11.5px;
}

.pump-group-table td input {
  font-size: 12.5px;
}

.pump-manager-chart-title strong {
  max-width: 230px;
  font-size: 14px;
}

.pump-manager-modal .pump-relation-axis > span {
  font-size: 11px;
}

.pump-manager-modal .pump-relation-axis button {
  font-size: 11.5px;
}

.pump-manager-modal .pump-relation-switch > i {
  font-size: 12px;
}

.pump-quality-banner span,
.pump-quality-panel > p,
.pump-quality-list > button div > span,
.pump-quality-list > button div > em,
.pump-quality-list > button > b {
  font-size: 11.5px;
}

.pump-quality-list > button div > strong {
  font-size: 12px;
}

@media (max-width: 1420px) {
  .pump-manager-chart-title-row {
    grid-template-columns: minmax(90px, 0.8fr) auto minmax(180px, 1fr);
    gap: 7px;
  }

  .pump-manager-chart-relation-center .pump-relation-axis button {
    padding-inline: 5px;
  }
}


/* v8.3.96 — compact plan tools, floating plan editor and single-line chart header */
.pump-manager-plan-column {
  position: relative;
  grid-template-rows: 42px minmax(0, 1fr) !important;
  overflow: visible;
}

.pump-plan-column-head {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  padding-inline: 7px;
  overflow: visible;
}

.pump-plan-column-head > div {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.pump-plan-column-head > div:first-child {
  flex: 0 0 auto;
  gap: 4px;
}

.pump-plan-column-head > div:last-child {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  gap: 2px;
}

.pump-plan-column-head button {
  min-width: 0;
  min-height: 23px;
  padding-inline: 5px;
  white-space: nowrap;
}

.pump-plan-item {
  grid-template-columns: 25px minmax(0, 1fr) auto 24px !important;
  gap: 4px;
}

.pump-plan-info-trigger {
  position: relative;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border-radius: 50% !important;
  color: #8fcce7 !important;
  font-family: Georgia, serif;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1;
}

.pump-plan-info-trigger::after {
  position: absolute;
  left: calc(100% + 7px);
  top: 50%;
  z-index: 80;
  width: max-content;
  max-width: 340px;
  padding: 7px 9px;
  border: 1px solid rgba(111, 199, 255, 0.2);
  border-radius: 7px;
  background: rgba(4, 13, 22, 0.98);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.44);
  color: #d6e7f1;
  content: attr(data-tooltip);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  transform: translateY(-50%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.pump-plan-info-trigger:hover::after,
.pump-plan-info-trigger:focus-visible::after {
  visibility: visible;
  opacity: 1;
}

.pump-plan-floating-editor {
  position: absolute;
  left: calc(100% + 8px);
  top: 48px;
  z-index: 72;
  width: 318px;
  max-height: calc(100% - 58px);
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 9px;
  overflow: auto;
  border: 1px solid rgba(111, 199, 255, 0.2);
  border-radius: 10px;
  background: rgba(5, 15, 25, 0.98);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.5);
}

.pump-plan-floating-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 1px 6px;
  border-bottom: 1px solid rgba(111, 199, 255, 0.1);
}

.pump-plan-floating-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pump-plan-floating-head strong {
  overflow: hidden;
  color: #d8eaf6;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pump-plan-floating-head span {
  color: #718b9c;
  font-size: 10.5px;
}

.pump-plan-floating-head button {
  width: 25px;
  min-width: 25px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  border-radius: 3px;
  font-size: 15px;
}

.pump-plan-floating-editor .pump-plan-meta-grid.floating {
  grid-template-columns: 1fr 1fr !important;
  padding: 0;
  border: 0;
  background: transparent;
}

.pump-plan-floating-editor .pump-plan-note.floating {
  padding: 0;
  border: 0;
  background: transparent;
}

.pump-plan-floating-editor .pump-plan-note textarea {
  min-height: 68px;
}

.pump-plan-lock-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(111, 199, 255, 0.1);
  border-radius: 7px;
  background: rgba(8, 20, 31, 0.58);
  cursor: pointer;
}

.pump-plan-lock-option input {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  accent-color: #5ebee8;
}

.pump-plan-lock-option span {
  display: grid;
  gap: 2px;
}

.pump-plan-lock-option strong {
  color: #cbdde7;
  font-size: 11.5px;
}

.pump-plan-lock-option em {
  color: #748d9d;
  font-size: 10.5px;
  font-style: normal;
  line-height: 1.35;
}

.pump-plan-floating-editor .pump-plan-validation-card {
  margin: 0;
}

/* Group identity uses the upper border; status is a separate round indicator. */
.pump-group-card::before {
  inset: 0 0 auto 0 !important;
  z-index: 9;
  width: auto !important;
  height: 4px;
  border-radius: 8px 8px 0 0;
  opacity: 0.82;
}

.pump-group-card-head {
  padding-top: 3px;
}

.pump-group-status {
  position: relative;
  width: 18px;
  min-width: 18px !important;
  height: 18px;
  min-height: 18px !important;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  cursor: help;
}

.pump-group-status > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}

.pump-group-status::after {
  position: absolute;
  right: -6px;
  top: calc(100% + 7px);
  z-index: 90;
  width: max-content;
  max-width: 270px;
  padding: 7px 9px;
  border: 1px solid rgba(111, 199, 255, 0.2);
  border-radius: 7px;
  background: rgba(4, 13, 22, 0.98);
  box-shadow: 0 9px 28px rgba(0, 0, 0, 0.44);
  color: #d6e7f1;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.pump-group-status:hover::after,
.pump-group-status:focus-visible::after {
  visibility: visible;
  opacity: 1;
}

.pump-group-enabled {
  width: 18px;
  display: grid;
  place-items: center;
}

.pump-group-enabled input {
  display: block !important;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #58c99a;
  cursor: pointer;
}

.pump-group-enabled input:disabled {
  cursor: not-allowed;
}

.pump-group-enabled span {
  display: none !important;
}

.pump-group-table td:last-child > .pump-point-remove,
.pump-group-table .pump-draft-row td:last-child button {
  border-radius: 2px !important;
}

/* The chart header is a strict single line. Controls compact progressively. */
.pump-manager-chart-top {
  min-width: 0;
  overflow: hidden;
}

.pump-manager-chart-title-row {
  min-width: 0;
  grid-template-columns: minmax(52px, 0.55fr) auto auto !important;
  gap: clamp(3px, 0.45vw, 8px) !important;
  overflow: hidden;
  white-space: nowrap;
}

.pump-manager-chart-title,
.pump-manager-chart-relation-center,
.pump-manager-chart-actions,
.pump-scope-switch,
.pump-analysis-tabs,
.pump-manager-chart-relation-center .pump-relation-switch,
.pump-manager-chart-relation-center .pump-relation-axis {
  min-width: 0;
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.pump-manager-chart-title strong {
  display: block;
  max-width: 92px !important;
  overflow: hidden;
  font-size: clamp(10.5px, 0.78vw, 14px) !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pump-manager-chart-relation-center {
  justify-self: center;
}

.pump-manager-chart-relation-center .pump-relation-switch {
  gap: 2px;
}

.pump-manager-chart-relation-center .pump-relation-axis {
  gap: 1px;
}

.pump-manager-chart-relation-center .pump-relation-axis > span {
  margin-right: 1px;
  font-size: clamp(9px, 0.66vw, 11px) !important;
}

.pump-manager-chart-relation-center .pump-relation-axis button {
  min-width: 0;
  min-height: 22px;
  padding-inline: clamp(3px, 0.35vw, 6px) !important;
  font-size: clamp(9px, 0.68vw, 11.5px) !important;
}

.pump-manager-chart-relation-center .pump-relation-switch > i {
  margin-inline: 1px;
  font-size: 10px !important;
}

.pump-manager-chart-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.pump-manager-chart-actions button {
  min-width: 0;
  min-height: 22px;
  padding-inline: clamp(3px, 0.32vw, 6px) !important;
  font-size: clamp(9px, 0.67vw, 11.5px) !important;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  .pump-manager-chart-title-row {
    grid-template-columns: minmax(44px, 0.4fr) auto auto !important;
    gap: 3px !important;
  }

  .pump-manager-chart-title strong {
    max-width: 70px !important;
  }

  .pump-manager-chart-actions {
    gap: 2px;
  }

  .pump-manager-chart-relation-center .pump-relation-axis button,
  .pump-manager-chart-actions button {
    padding-inline: 3px !important;
    font-size: 9px !important;
  }
}

/* v8.3.97 — plan hover details, compact group labels and global fit shortcut */
.pump-plan-list {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.pump-plan-list::-webkit-scrollbar:horizontal {
  height: 0 !important;
}

.pump-plan-info-trigger::after {
  display: none !important;
}

.pump-group-card-head .pump-dimension-badges {
  gap: 2px;
}

.pump-group-card-head .pump-dimension-badges.compact span {
  min-width: 27px;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 10.5px;
}

.pump-group-table td:last-child > .pump-point-remove,
.pump-group-table .pump-draft-row td:last-child .pump-point-cancel,
.pump-group-table .pump-draft-row td:last-child .pump-point-confirm {
  border-radius: 0 !important;
}

.pump-group-table td:last-child > .pump-point-remove {
  width: 100%;
  height: 100%;
  min-height: 25px;
  padding: 0;
}

.pump-global-fit-toggle {
  position: absolute;
  left: 12px;
  top: 5px;
  z-index: 12;
  min-height: 24px;
  padding: 0 9px;
  border-color: rgba(255, 79, 216, 0.28) !important;
  border-radius: 5px !important;
  background: rgba(8, 22, 34, 0.92) !important;
  color: #c7d8e3 !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.28);
  font-size: 11px !important;
  white-space: nowrap;
}

.pump-global-fit-toggle:hover:not(:disabled) {
  border-color: rgba(255, 79, 216, 0.56) !important;
  color: #ff9bea !important;
}

.pump-global-fit-toggle.selected {
  border-color: rgba(255, 79, 216, 0.72) !important;
  background: rgba(118, 24, 102, 0.32) !important;
  color: #ff9bea !important;
  box-shadow: inset 0 0 0 1px rgba(255, 79, 216, 0.14), 0 5px 16px rgba(0, 0, 0, 0.28);
}

.pump-global-fit-toggle:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* Fixed hover card avoids horizontal scrolling while keeping plan details visible. */
.pump-plan-item::after {
  display: none !important;
}

.pump-plan-hover-tooltip {
  position: fixed;
  z-index: 130;
  width: max-content;
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid rgba(111, 199, 255, 0.2);
  border-radius: 7px;
  background: rgba(4, 13, 22, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.46);
  color: #d6e7f1;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  transform: translateY(-50%);
  pointer-events: none;
}
.scope-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.scope-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 236px minmax(460px, 1fr) 292px;
  gap: 10px;
}

.scope-left,
.scope-right {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.scope-plot-card {
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--plot-border);
  background: #050607;
  box-shadow: 0 16px 45px rgba(0,0,0,0.28);
  display: grid;
  grid-template-rows: 34px minmax(260px, 1fr) auto;
  gap: 0;
  position: relative;
  padding: 12px 14px 12px;
}

.scope-main-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 42px;
}

.scope-main-tabs button {
  min-width: 58px;
  height: 25px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.26);
  background: rgba(13, 23, 33, 0.85);
  color: #dcecff;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.scope-main-tabs button.selected {
  background: #dbe8ff;
  color: #0a1520;
  border-color: #dbe8ff;
}

.scope-main-plot {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #050607;
}

.scope-info-button {
  position: absolute;
  left: 16px;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #21c9ff;
  background: rgba(11, 20, 29, 0.92);
  color: #ffe94a;
  font-size: 15px;
  line-height: 1;
  z-index: 8;
  cursor: pointer;
}

.scope-info-popover {
  position: absolute;
  left: 44px;
  top: 42px;
  z-index: 12;
  width: max-content;
  max-width: min(760px, calc(100% - 88px));
  border: 1px solid rgba(33, 201, 255, 0.68);
  border-radius: 10px;
  background: rgba(9, 18, 27, 0.96);
  box-shadow: 0 18px 50px rgba(0,0,0,0.42);
  padding: 13px 16px 14px;
}

.scope-info-title {
  color: #ffe94a;
  font-size: 13px;
  margin-bottom: 8px;
}

.scope-info-grid {
  display: grid;
  gap: 5px;
}

.scope-info-row {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 38px;
  align-items: baseline;
  color: #b7c8dc;
  font-size: 12px;
  line-height: 1.25;
}

.scope-info-row strong {
  color: #e8f4ff;
  font-weight: 400;
  white-space: nowrap;
}

.scope-control-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scope-control-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.scope-control-row input,
.scope-control-row select,
.scope-time-window-row input,
.scope-frequency-inputs input {
  min-width: 0;
  width: 100%;
  padding: 6px 7px;
  font-size: 12px;
}

.scope-file-name {
  color: #dcecff;
  font-size: 12px;
  line-height: 1.5;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
  word-break: break-word;
}

.scope-time-window-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr) max-content 54px;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.scope-frequency-control {
  display: grid;
  grid-template-rows: auto 56px;
  gap: 7px;
  padding: 0 72px 0 72px;
}

.scope-frequency-inputs {
  display: grid;
  grid-template-columns: max-content 82px max-content 82px max-content 54px;
  gap: 6px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.scope-overview {
  position: relative;
  height: 56px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(180, 210, 240, 0.36);
  background: rgba(15, 28, 38, 0.88);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.scope-overview-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scope-overview-svg line {
  stroke: rgba(255,255,255,0.14);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
}

.scope-overview-svg polyline {
  fill: none;
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
  opacity: 0.95;
}

.scope-overview-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(157, 210, 255, 0.24);
  border-left: 1px solid rgba(255,255,255,0.72);
  border-right: 1px solid rgba(255,255,255,0.72);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  cursor: grab;
}

.scope-overview-dim {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0,0,0,0.42);
  pointer-events: none;
}

.scope-overview-dim.left {
  left: 0;
}

.scope-overview-dim.right {
  right: 0;
}

.scope-overview-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}

.scope-overview-handle.left { left: -7px; }
.scope-overview-handle.right { right: -7px; }

.scope-overview-handle span {
  display: block;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #f4f7ff 0 33%, transparent 33% 36%, #f4f7ff 36% 64%, transparent 64% 67%, #f4f7ff 67% 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.28);
}

.scope-overview-handle:hover span {
  width: 7px;
}

.scope-overview-ticks {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 2px;
  display: flex;
  justify-content: space-between;
  color: rgba(220,236,255,0.72);
  font-size: 10px;
  pointer-events: none;
}

.scope-check-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.scope-check-row input {
  width: 16px;
  height: 16px;
}

.scope-stat-section {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 9px;
  background: rgba(8, 16, 24, 0.64);
}

.scope-window-lines {
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 8px;
  margin-bottom: 8px;
  display: grid;
  gap: 4px;
  font-size: 11.5px;
  color: #b7c8dc;
}

.scope-stat-title {
  color: var(--accent-2);
  margin-bottom: 8px;
  font-weight: 400;
}

.scope-stat-grid {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 6px 8px;
  align-items: baseline;
  font-size: 12px;
}

.scope-stat-grid span {
  color: var(--muted);
}

.scope-stat-grid strong {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 400;
  text-align: right;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.scope-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.scope-control-list .ghost-button {
  width: 100%;
}

.scope-page,
.scope-page * {
  font-weight: 400 !important;
}

/* v7.2.1: split time/FFT into independent stacked views and compact range controls */
.scope-grid {
  grid-template-columns: 236px minmax(560px, 1fr) 304px;
}

.scope-plot-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  padding: 8px 14px 10px;
}

.scope-plot-section {
  min-height: 0;
  min-width: 0;
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: 16px minmax(124px, 1fr) 50px;
  gap: 2px;
}

.scope-plot-title {
  color: #eaf4ff;
  font-size: 13px;
  line-height: 16px;
  padding-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.scope-plot-title span {
  color: #ffffff;
}

.scope-plot-title em {
  color: #91a8bd;
  font-style: normal;
  font-size: 11.5px;
  transform: translateY(1px);
}

.scope-main-plot {
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.scope-main-tabs,
.scope-frequency-control,
.scope-frequency-inputs {
  display: none;
}

.scope-range-row {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) 5px minmax(0, 1fr) 21px 34px;
  gap: 2px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.scope-range-row + .scope-range-row {
  margin-top: 6px;
}

.scope-range-row input {
  min-width: 0;
  width: 100%;
  padding: 5px 2px;
  text-align: center;
  font-size: 11.5px;
}

.scope-range-row em {
  font-style: normal;
  text-align: center;
  color: #8fa4b8;
}

.scope-range-unit {
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
}

.scope-reset-button {
  width: 34px !important;
  min-width: 34px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 11px !important;
}

.scope-control-list.compact {
  margin-top: 9px;
  gap: 7px;
}

.scope-file-meta {
  color: #9fb4c8;
  font-size: 11.5px;
  margin-top: 3px;
  line-height: 1.35;
}

.scope-overview {
  height: 50px;
  border: 1px solid rgba(238,246,255,0.44);
  background: #0b1118;
  box-shadow: inset 0 0 0 1px rgba(76,201,240,0.04);
  cursor: pointer;
}

.scope-overview::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to right,
    rgba(255,255,255,0.12) 0,
    rgba(255,255,255,0.12) 1px,
    transparent 1px,
    transparent 10%
  );
}

.scope-overview-svg polyline {
  stroke-width: 1.05;
  opacity: 0.9;
}

.scope-overview-selection {
  min-width: 14px;
  background: rgba(194, 224, 255, 0.24);
  border-left: 1px solid rgba(255,255,255,0.92);
  border-right: 1px solid rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 1px rgba(76,201,240,0.18), 0 0 0 9999px rgba(0,0,0,0.30);
}

.scope-overview-dim {
  display: none;
}

.scope-overview-handle {
  width: 18px;
  z-index: 3;
}

.scope-overview-handle.left { left: -9px; }
.scope-overview-handle.right { right: -9px; }

.scope-overview-handle::before,
.scope-overview-handle::after,
.scope-overview-handle span {
  content: '';
  display: block;
  background: #f8fbff;
  box-shadow: 0 0 6px rgba(255,255,255,0.35);
}

.scope-overview-handle::before,
.scope-overview-handle::after {
  width: 4px;
  height: 33.3%;
}

.scope-overview-handle span {
  width: 12px;
  height: 33.4%;
  border-radius: 2px;
}

.scope-overview-handle:hover span {
  width: 12px;
}

.scope-overview-ticks {
  bottom: 2px;
  font-size: 10px;
  color: rgba(220,236,255,0.70);
}

.scope-result-head {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.scope-result-head .panel-title {
  margin: 0;
  white-space: nowrap;
}

.scope-window-lines {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  display: grid;
  justify-items: start;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.35;
  color: #b7c8dc;
  text-align: left;
}

.scope-stat-section {
  padding: 11px 10px;
}

.scope-stat-title {
  font-size: 15.5px;
  margin-bottom: 9px;
}

.scope-stat-grid {
  grid-template-columns: 118px 1fr;
  gap: 7px 10px;
  font-size: 13px;
}

.scope-stat-grid strong {
  font-size: 13.5px;
}

.scope-stat-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  cursor: help;
}

.scope-stat-label em {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(110,207,255,0.42);
  color: #bfeaff;
  font-style: normal;
  font-size: 9px;
  line-height: 11px;
  text-align: center;
}

.scope-plot-section > .scope-overview {
  width: calc(100% - 96px);
  margin-left: 72px;
  margin-right: 24px;
}

.scope-stat-label,
.scope-stat-grid > span:first-child {
  white-space: nowrap;
}

.scope-left .panel {
  padding-left: 11px;
  padding-right: 11px;
}

.scope-left .panel .panel-title {
  margin-bottom: 8px;
}


/* v7.2.2.3: compact stacked oscilloscope layout and draw selected overview trace clearly above the full-range background */
.scope-plot-title em {
  display: none;
}

.scope-overview-svg polyline:last-of-type {
  stroke-width: 1.28;
  opacity: 0.98;
}

.scope-overview-svg polyline:first-of-type:not(:last-of-type) {
  stroke-width: 0.95;
  opacity: 0.72;
}

/* v7.2.3: unified scope plot/control geometry */
.scope-plot-card {
  padding: 6px 12px 8px;
  gap: 5px;
}

.scope-plot-section {
  grid-template-rows: 14px minmax(132px, 1fr) 44px;
  gap: 2px;
}

.scope-plot-title {
  line-height: 14px;
  font-size: 13px;
}

.scope-plot-section > .scope-overview {
  width: calc(100% - 88px);
  margin-left: 70px;
  margin-right: 18px;
}

.scope-overview {
  height: 44px;
}

.scope-overview-ticks {
  bottom: 1px;
  font-size: 9.5px;
}

.scope-range-row {
  grid-template-columns: 31px minmax(48px, 1fr) 5px minmax(48px, 1fr) 24px 40px;
  gap: 4px;
}

.scope-range-row input {
  padding: 5px 5px;
  min-height: 26px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.scope-reset-button {
  width: 40px !important;
  min-width: 40px !important;
  height: 26px !important;
  font-size: 11px !important;
}

.scope-range-unit {
  font-size: 11.5px;
  text-align: center;
}

.scope-control-row {
  grid-template-columns: 44px 1fr;
}

.scope-control-row select {
  min-height: 29px;
}

.scope-result-head {
  grid-template-columns: max-content 1fr;
  gap: 8px;
}

.scope-window-lines {
  justify-self: stretch;
  justify-items: start;
  text-align: left;
}

/* v8.0.1: Plotly toolbar restored and large popup views */
.scope-plot-title {
  position: relative;
}

.scope-expand-button {
  position: absolute;
  right: 0;
  top: 0;
  height: 18px;
  min-width: 42px;
  border-radius: 7px;
  border: 1px solid rgba(110,207,255,0.34);
  background: rgba(10, 20, 30, 0.86);
  color: #cfeeff;
  font-size: 11px;
  line-height: 16px;
  padding: 0 8px;
  cursor: pointer;
}

.scope-expand-button:hover {
  border-color: rgba(110,207,255,0.72);
  color: #ffffff;
  background: rgba(22, 45, 62, 0.94);
}

.scope-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.74);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 18px;
}

.scope-modal-card {
  width: min(1780px, 100%);
  height: calc(100vh - 36px);
  min-height: 520px;
  border: 1px solid rgba(87, 206, 255, 0.55);
  border-radius: 14px;
  background: #050607;
  box-shadow: 0 26px 90px rgba(0,0,0,0.68);
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr);
  overflow: hidden;
}

.scope-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(9, 18, 27, 0.96);
}

.scope-modal-head > div {
  display: flex;
  align-items: baseline;
  gap: 18px;
  min-width: 0;
}

.scope-modal-head strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500 !important;
  white-space: nowrap;
}

.scope-modal-head span {
  color: #a8bdd2;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scope-modal-close {
  width: 62px;
  height: 28px;
  min-width: 62px;
  padding: 0 !important;
}

.scope-modal-plot {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #050607;
}

.scope-modal-card .modebar {
  opacity: 0.96 !important;
}

.scope-page .modebar,
.scope-modal-card .modebar {
  background: transparent !important;
}

.scope-page .modebar-btn svg path,
.scope-modal-card .modebar-btn svg path {
  fill: rgba(220,236,255,0.72) !important;
}

.scope-page .modebar-btn:hover svg path,
.scope-modal-card .modebar-btn:hover svg path,
.scope-page .modebar-btn.active svg path,
.scope-modal-card .modebar-btn.active svg path {
  fill: #ffffff !important;
}

/* v8.0.2: put expand action into Plotly modebar, move FFT legend inside the frame, and space result header */
.scope-expand-button {
  display: none !important;
}

.scope-result-head {
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 22px;
  align-items: start;
}

.scope-window-lines {
  justify-self: stretch;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  justify-items: start;
  text-align: left;
}

.scope-page .modebar-btn[data-title="放大视图"] svg path,
.scope-modal-card .modebar-btn[data-title="放大视图"] svg path {
  fill: rgba(220,236,255,0.86) !important;
}

.scope-page .modebar-btn[data-title="放大视图"]:hover svg path,
.scope-modal-card .modebar-btn[data-title="放大视图"]:hover svg path {
  fill: #ffffff !important;
}

/* v8.0.3: keep Plotly toolbar inside plot area and use softer dashed grid styling */
.scope-page .js-plotly-plot .modebar {
  top: 10px !important;
  right: 14px !important;
  transform: none !important;
  background: rgba(5, 6, 7, 0.34) !important;
  border-radius: 7px;
  padding: 1px 2px;
}

.scope-page .js-plotly-plot .modebar-group {
  background: transparent !important;
  box-shadow: none !important;
}

.scope-page .js-plotly-plot .modebar-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 23px !important;
  height: 23px !important;
  padding: 3px !important;
  opacity: 0.72;
}

.scope-page .js-plotly-plot .modebar-btn:hover {
  opacity: 1;
  background: rgba(120, 210, 255, 0.18) !important;
}

.scope-page .js-plotly-plot .modebar-btn svg path,
.scope-page .js-plotly-plot .modebar-btn svg rect,
.scope-page .js-plotly-plot .modebar-btn svg polygon {
  fill: #dcecff !important;
}


/* v8.0.4: place toolbar/legend slightly inside, transparent FFT legend, and remove visual solid zero line */
.scope-page .js-plotly-plot .modebar {
  top: 14px !important;
  right: 22px !important;
  background: rgba(5, 6, 7, 0.24) !important;
}

.scope-page .legend .bg,
.scope-modal-card .legend .bg {
  fill: transparent !important;
  stroke: transparent !important;
  stroke-width: 0 !important;
}

/* v8.1.0: scope batch analysis */
.scope-actions-dual {
  grid-template-columns: 1fr 1fr;
}

.scope-actions-dual .ghost-button[disabled],
.scope-batch-actions .ghost-button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.scope-analysis-params {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.scope-subtitle {
  color: #bfeaff;
  font-size: 12px;
  margin-bottom: 6px;
}

.scope-mini-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.scope-mini-row label {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.scope-mini-row input {
  min-width: 0;
  width: 100%;
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid rgba(110,207,255,0.20);
  background: rgba(5, 12, 18, 0.92);
  color: #e9f3ff;
  font-size: 11.5px;
}

.scope-batch-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(0,0,0,0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.scope-batch-card,
.scope-trend-card {
  width: min(1540px, 100%);
  height: min(780px, calc(100vh - 40px));
  border: 1px solid rgba(87, 206, 255, 0.55);
  border-radius: 14px;
  background: #071018;
  box-shadow: 0 26px 90px rgba(0,0,0,0.68);
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  overflow: hidden;
}

.scope-trend-card {
  width: min(1260px, 100%);
  height: min(720px, calc(100vh - 40px));
}

.scope-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(9, 18, 27, 0.96);
}

.scope-batch-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.scope-batch-head strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500 !important;
  white-space: nowrap;
}

.scope-batch-head span {
  color: #a8bdd2;
  font-size: 12px;
}

.scope-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.scope-batch-actions .ghost-button,
.scope-batch-actions select {
  height: 29px;
  min-width: 68px;
  padding: 0 10px !important;
  border-radius: 8px;
  font-size: 12px;
}

.scope-batch-actions select {
  border: 1px solid rgba(110,207,255,0.24);
  background: rgba(5, 12, 18, 0.92);
  color: #e9f3ff;
}

.scope-batch-table-wrap {
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.scope-batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #dcecff;
  font-variant-numeric: tabular-nums;
}

.scope-batch-table th,
.scope-batch-table td {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 6px 8px;
  text-align: right;
  white-space: nowrap;
}

.scope-batch-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #0d1823;
  color: #ffe94a;
  font-weight: 400 !important;
}

.scope-batch-table td.name,
.scope-batch-table th:nth-child(2) {
  text-align: left;
}

.scope-batch-table tr.ok:hover {
  background: rgba(76,201,240,0.08);
}

.scope-batch-table tr.error {
  color: #ffb7b7;
}

.scope-batch-table button {
  border: 0;
  background: transparent;
  color: #dcecff;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
}

.scope-batch-table button:hover {
  color: #ffffff;
  text-decoration: underline;
}

.scope-batch-table button[disabled] {
  color: #ffb7b7;
  cursor: default;
  text-decoration: none;
}

.scope-trend-plot {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #050607;
}

/* v8.1.1: split right panel into Time / FFT / TMI tabs */
.scope-data-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scope-data-title em {
  font-style: normal;
  color: #9fb4c8;
  font-size: 11px;
  white-space: nowrap;
}

.scope-result-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.scope-result-tabs button {
  height: 27px;
  border-radius: 8px;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(8, 18, 27, 0.88);
  color: #bcd1e6;
  cursor: pointer;
  font-size: 12px;
}

.scope-result-tabs button.selected {
  color: #071018;
  background: #dcecff;
  border-color: #dcecff;
}

.scope-stat-section-tabbed {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.scope-stat-grid-compact {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 7px 8px;
}

.scope-stat-grid-compact strong,
.nowrap-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal !important;
}

.scope-tmi-controls {
  display: grid;
  gap: 7px;
  padding-bottom: 9px;
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.scope-tmi-controls .scope-range-row {
  grid-template-columns: 32px minmax(46px, 1fr) 5px minmax(46px, 1fr) 27px 36px;
}

.scope-mini-row.one-line {
  grid-template-columns: 1fr 1fr;
}

.scope-mini-row.one-line label {
  grid-template-columns: 50px minmax(0, 1fr);
}

.tmi-stat-grid {
  margin-top: 2px;
}

/* v8.1.2: dedicated batch TMI plots */
.scope-tmi-trend-card {
  width: min(1480px, 100%);
  height: min(820px, calc(100vh - 40px));
  border: 1px solid rgba(87, 206, 255, 0.55);
  border-radius: 14px;
  background: #071018;
  box-shadow: 0 26px 90px rgba(0,0,0,0.68);
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  overflow: hidden;
}

.scope-tmi-trend-grid {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.scope-tmi-trend-plot {
  min-height: 0;
  width: 100%;
  height: 100%;
  background: #050607;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}

/* v8.1.3: Otto low-signal correction controls */
.scope-tmi-controls .scope-subtitle:not(:first-child) {
  margin-top: 4px;
}

/* v8.1.4: readable FFT peaks and separated TMI/Otto/Tao diagnostics */
.scope-stat-grid-compact strong,
.nowrap-value {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal !important;
}

.scope-section-divider {
  height: 1px;
  margin: 10px 8px 9px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.22), transparent);
}

.scope-peak-list {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.scope-peak-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  font-size: 12.2px;
}

.scope-peak-row strong {
  min-width: 0;
  text-align: right;
  color: #eaf4ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12.2px;
  font-weight: 400 !important;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.empty-note.compact {
  padding: 4px 0;
  font-size: 12px;
}

.scope-help-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  cursor: help;
  white-space: nowrap;
  min-width: 0;
}

.scope-help-label em {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(110,207,255,0.42);
  color: #bfeaff;
  font-style: normal;
  font-size: 8px;
  line-height: 10px;
  text-align: center;
}

.scope-tmi-controls {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  gap: 9px;
}

.scope-tmi-block {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.scope-tmi-block .scope-subtitle {
  margin-bottom: 0;
  color: #ffe94a;
}

.scope-tmi-block .scope-check-row {
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 6px;
}

.scope-mini-row.one-line {
  gap: 7px;
}

.scope-mini-row.one-line label {
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px;
  min-width: 0;
}

.scope-mini-row.one-line label .scope-help-label {
  font-size: 11px;
}

.scope-mini-row.one-line input {
  min-width: 0;
  font-size: 11.5px;
  padding-left: 5px;
  padding-right: 5px;
  font-variant-numeric: tabular-nums;
}

.scope-mini-row.one-line.single-param {
  grid-template-columns: 1fr;
}

.scope-tmi-controls .scope-range-row {
  grid-template-columns: 36px minmax(48px, 1fr) 5px minmax(48px, 1fr) 27px 36px;
}

.scope-tmi-controls .scope-range-row .scope-help-label {
  font-size: 11px;
}

.tmi-stat-grid {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 6px 8px;
  padding-top: 2px;
}

.tmi-stat-grid strong {
  font-size: 12.4px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}


/* v8.1.5: batch previous/next navigator and full-range current export */
.scope-actions-dual {
  grid-template-columns: 1fr 1fr;
}

.scope-clear-action {
  grid-column: 1 / -1;
}

.scope-file-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
  min-width: 0;
}

.scope-file-line .scope-file-name {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: #dcecff;
  font-size: 12px;
  line-height: 1.5;
  word-break: normal;
}

.scope-file-line .scope-file-name span {
  flex: 0 0 auto;
  color: #dcecff;
}

.scope-file-line .scope-file-name strong {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eaf4ff;
  font-weight: 400 !important;
}

.scope-batch-navigator {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  border: 1px solid rgba(110,207,255,0.22);
  border-radius: 8px;
  background: rgba(5, 12, 18, 0.78);
  padding: 0 4px;
}

.scope-batch-navigator button {
  width: 19px;
  height: 19px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dcecff;
  font-size: 15px;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
}

.scope-batch-navigator button:hover:not(:disabled) {
  background: rgba(76,201,240,0.18);
  color: #ffffff;
}

.scope-batch-navigator button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.scope-batch-navigator em {
  min-width: 34px;
  text-align: center;
  font-style: normal;
  color: #9fb4c8;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* v8.1.6: dedicated batch TMI threshold modal with Otto/Tao tabs and power input */
.scope-tmi-threshold-card {
  width: min(1480px, calc(100vw - 28px));
  height: min(880px, calc(100vh - 28px));
  min-height: min(720px, calc(100vh - 28px));
  border: 1px solid rgba(87, 206, 255, 0.55);
  border-radius: 14px;
  background: #071018;
  box-shadow: 0 26px 90px rgba(0,0,0,0.68);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scope-tmi-threshold-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(360px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.scope-tmi-threshold-title {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.scope-tmi-threshold-head .scope-batch-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.scope-tmi-threshold-head .scope-batch-actions select {
  min-width: 60px;
}

.scope-power-editor {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(5, 12, 18, 0.82);
}

.scope-power-editor-note {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.scope-power-editor-note strong {
  color: #ffe94a;
  font-size: 13px;
  font-weight: 500 !important;
}

.scope-power-editor-note span {
  color: #9fb4c8;
  font-size: 12px;
  line-height: 1.45;
}

.scope-power-editor textarea {
  min-height: 92px;
  max-height: 150px;
  resize: vertical;
  border-radius: 9px;
  border: 1px solid rgba(110,207,255,0.25);
  background: rgba(4, 10, 15, 0.96);
  color: #e9f3ff;
  padding: 8px 10px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  outline: none;
  white-space: pre;
}

.scope-power-editor-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 8px;
  min-width: 92px;
}

.scope-power-editor-actions em {
  max-width: 220px;
  color: #ffb7b7;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.scope-tmi-threshold-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
}

.scope-tmi-threshold-tabs button {
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(8, 18, 27, 0.88);
  color: #bcd1e6;
  cursor: pointer;
  font-size: 12px;
}

.scope-tmi-threshold-tabs button.selected {
  color: #071018;
  background: #dcecff;
  border-color: #dcecff;
}

.scope-tmi-threshold-summary {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 7px 16px 8px;
  color: #9fb4c8;
  font-size: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.scope-tmi-threshold-summary span {
  min-width: 0;
  white-space: nowrap;
}

.scope-tmi-threshold-summary span:last-child {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scope-tmi-threshold-plot-wrap {
  flex: 1 1 auto;
  min-height: 520px;
  padding: 10px 14px 14px;
  display: flex;
  overflow: hidden;
}

.scope-tmi-threshold-plot {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 520px;
  background: #050607;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
}

@media (max-width: 1180px) {
  .scope-tmi-threshold-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .scope-tmi-threshold-head .scope-batch-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .scope-tmi-threshold-plot-wrap,
  .scope-tmi-threshold-plot {
    min-height: 440px;
  }
}


/* v8.1.6.3: make batch TMI power input a vertical floating panel and compact the top toolbar */
.scope-tmi-threshold-card {
  position: relative;
}

.scope-tmi-threshold-head {
  grid-template-columns: minmax(210px, 0.75fr) auto auto;
  gap: 10px;
  padding: 10px 12px;
}

.scope-tmi-threshold-tabs {
  width: auto;
  grid-template-columns: 152px 152px;
  justify-content: center;
  gap: 7px;
}

.scope-tmi-threshold-tabs button {
  height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.scope-tmi-threshold-head .scope-batch-actions {
  gap: 6px;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button,
.scope-tmi-threshold-head .scope-batch-actions select {
  height: 30px;
  min-width: 56px;
  padding: 0 9px !important;
  white-space: nowrap;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button {
  min-width: 62px;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button:last-child {
  min-width: 56px;
}

.scope-power-editor {
  position: absolute;
  top: 58px;
  right: 14px;
  z-index: 20;
  width: min(380px, calc(100% - 28px));
  max-height: calc(100% - 78px);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(87, 206, 255, 0.45);
  border-radius: 12px;
  background: rgba(6, 14, 21, 0.98);
  box-shadow: 0 18px 54px rgba(0,0,0,0.62);
}

.scope-power-editor textarea {
  min-height: 260px;
  max-height: min(520px, calc(100vh - 260px));
  resize: vertical;
  line-height: 1.45;
}

.scope-power-editor-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.scope-power-editor-actions em {
  max-width: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-tmi-threshold-plot-wrap {
  padding-top: 8px;
}

.scope-tmi-threshold-card .js-plotly-plot .legend .bg {
  fill: transparent !important;
  stroke: transparent !important;
}

@media (max-width: 1180px) {
  .scope-tmi-threshold-head {
    grid-template-columns: 1fr;
  }

  .scope-tmi-threshold-tabs {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .scope-power-editor {
    left: 14px;
    right: 14px;
    width: auto;
  }
}

/* v8.1.7: compact batch TMI toolbar and split Otto fitting / derivative plots */
.scope-tmi-threshold-head {
  grid-template-columns: minmax(180px, 0.66fr) auto auto;
  gap: 8px;
  padding: 8px 10px;
}

.scope-tmi-threshold-title strong {
  font-size: 14px;
}

.scope-tmi-threshold-title span {
  font-size: 11px;
}

.scope-tmi-threshold-tabs {
  grid-template-columns: 128px 128px;
  gap: 6px;
}

.scope-tmi-threshold-tabs button {
  height: 28px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 8px;
}

.scope-tmi-threshold-head .scope-batch-actions {
  gap: 5px;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button,
.scope-tmi-threshold-head .scope-batch-actions select {
  height: 28px;
  min-width: 48px;
  padding: 0 7px !important;
  font-size: 11px;
  border-radius: 8px;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button {
  min-width: 54px;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button:last-child {
  min-width: 48px;
}

.scope-tmi-otto-split {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 520px;
  display: grid;
  grid-template-rows: minmax(300px, 1fr) minmax(220px, 0.72fr);
  gap: 10px;
}

.scope-tmi-otto-split .scope-tmi-threshold-plot {
  min-height: 0;
  height: 100%;
}

@media (max-width: 1180px) {
  .scope-tmi-threshold-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .scope-tmi-otto-split {
    min-height: 620px;
    grid-template-rows: minmax(300px, 1fr) minmax(240px, 0.8fr);
  }
}


/* v8.1.7.1: Otto fit metric selector and continuous fit export tools */
.scope-otto-fit-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 14px 7px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #9fb4c8;
  font-size: 11px;
}

.scope-mini-segment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 1px solid rgba(110,207,255,0.22);
  border-radius: 8px;
  background: rgba(5, 12, 18, 0.72);
}

.scope-mini-segment button {
  height: 24px;
  padding: 0 9px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #bcd1e6;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.scope-mini-segment button.selected {
  background: #dcecff;
  color: #071018;
}

.scope-otto-export-title {
  margin-left: 8px;
  color: #dcecff;
}

.scope-otto-fit-tools label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.scope-otto-fit-tools input {
  width: 72px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(110,207,255,0.24);
  background: rgba(4, 10, 15, 0.94);
  color: #e9f3ff;
  padding: 0 7px;
  font-size: 11px;
  outline: none;
}

.scope-otto-fit-tools .ghost-button {
  height: 25px;
  padding: 0 9px !important;
  font-size: 11px;
  border-radius: 7px;
}

.scope-tmi-threshold-plot-wrap {
  overflow: auto;
}

@media (max-width: 1280px) {
  .scope-otto-fit-tools {
    flex-wrap: wrap;
  }
}

/* v8.1.7.2: compact batch navigator, move Otto fit tools to summary row, and put power unit inside editor */
.scope-batch-navigator.vertical {
  height: 24px;
  gap: 4px;
  padding: 0 4px 0 6px;
}

.scope-batch-navigator.vertical em {
  min-width: 30px;
  text-align: right;
  font-size: 10.5px;
}

.scope-batch-nav-arrows {
  width: 14px;
  height: 20px;
  display: grid;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 0;
}

.scope-batch-navigator.vertical .scope-batch-nav-arrows button {
  width: 14px;
  height: 10px;
  min-width: 0;
  border-radius: 3px;
  font-size: 11px;
  line-height: 8px;
  padding: 0;
}

.scope-power-editor-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.scope-power-editor-title-row label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9fb4c8;
  font-size: 11px;
  white-space: nowrap;
}

.scope-power-editor-title-row select {
  height: 25px;
  min-width: 60px;
  border-radius: 7px;
  border: 1px solid rgba(110,207,255,0.24);
  background: rgba(4, 10, 15, 0.94);
  color: #e9f3ff;
  padding: 0 8px;
  outline: none;
}

.scope-tmi-threshold-summary {
  justify-content: space-between;
  gap: 10px;
  padding: 6px 12px 6px;
}

.scope-tmi-summary-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.scope-tmi-summary-info span {
  min-width: 0;
  white-space: nowrap;
}

.scope-tmi-summary-info span:last-child {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scope-tmi-threshold-summary .scope-otto-fit-tools {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  border-bottom: 0;
  gap: 6px;
  max-width: 720px;
  overflow: hidden;
}

.scope-tmi-threshold-summary .scope-mini-segment button {
  height: 22px;
  padding: 0 7px;
  font-size: 10.5px;
}

.scope-tmi-threshold-summary .scope-otto-export-title {
  margin-left: 3px;
}

.scope-tmi-threshold-summary .scope-otto-fit-tools label {
  gap: 3px;
}

.scope-tmi-threshold-summary .scope-otto-fit-tools input {
  width: 58px;
  height: 22px;
  padding: 0 5px;
}

.scope-tmi-threshold-summary .scope-otto-fit-tools .ghost-button {
  height: 23px;
  padding: 0 7px !important;
  min-width: 38px;
}

@media (max-width: 1320px) {
  .scope-tmi-threshold-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .scope-tmi-threshold-summary .scope-otto-fit-tools {
    margin-left: 0;
    flex-wrap: wrap;
    max-width: 100%;
  }
}


/* v8.1.7.3: polish batch navigator, keep TMI modal modebar inside plot, and make current export visibly trigger */
.scope-tmi-threshold-card .js-plotly-plot .modebar {
  top: 24px !important;
  right: 28px !important;
  transform: none !important;
  background: rgba(5, 6, 7, 0.30) !important;
  border-radius: 7px;
  padding: 1px 2px;
}

.scope-tmi-threshold-card .js-plotly-plot .modebar-group {
  background: transparent !important;
  box-shadow: none !important;
}

.scope-batch-navigator.vertical {
  height: 25px;
  gap: 3px;
  padding: 0 4px 0 5px;
  border-radius: 8px;
}

.scope-batch-navigator.vertical em {
  min-width: 31px;
  text-align: right;
  padding: 0 1px 0 0;
  border: 0;
  background: transparent;
  color: #cfe3f7;
  font-size: 10.5px;
  line-height: 1;
}

.scope-batch-nav-arrows {
  width: 12px;
  height: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.scope-batch-navigator.vertical .scope-batch-nav-arrows button {
  width: 12px;
  height: 9px;
  min-width: 0;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.scope-batch-triangle {
  display: block;
  width: 0;
  height: 0;
  opacity: 0.92;
}

.scope-batch-triangle.up {
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-bottom: 6.5px solid #dcecff;
}

.scope-batch-triangle.down {
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 6.5px solid #dcecff;
}

.scope-batch-navigator.vertical .scope-batch-nav-arrows button:hover:not(:disabled) .scope-batch-triangle.up {
  border-bottom-color: #ffffff;
}

.scope-batch-navigator.vertical .scope-batch-nav-arrows button:hover:not(:disabled) .scope-batch-triangle.down {
  border-top-color: #ffffff;
}

.scope-batch-navigator.vertical .scope-batch-nav-arrows button:disabled .scope-batch-triangle {
  opacity: 0.34;
}

/* v8.1.7.4: larger side-by-side batch switcher and reliable download fallback link */
.scope-batch-navigator.inline {
  height: 27px;
  gap: 4px;
  padding: 0 5px 0 6px;
  border-radius: 8px;
  max-width: 72px;
}

.scope-batch-navigator.inline em {
  min-width: 29px;
  text-align: right;
  padding-right: 2px;
  color: #cfe3f7;
  font-size: 10.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows {
  width: 32px;
  height: 22px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button {
  width: 16px;
  height: 22px;
  min-width: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button + button {
  margin-left: -1px;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:hover:not(:disabled) {
  background: rgba(76,201,240,0.18);
}

.scope-batch-navigator.inline .scope-batch-triangle {
  display: block;
  width: 0;
  height: 0;
  opacity: 0.94;
}

.scope-batch-navigator.inline .scope-batch-triangle.up {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid #dcecff;
}

.scope-batch-navigator.inline .scope-batch-triangle.down {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid #dcecff;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:hover:not(:disabled) .scope-batch-triangle.up {
  border-bottom-color: #ffffff;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:hover:not(:disabled) .scope-batch-triangle.down {
  border-top-color: #ffffff;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:disabled .scope-batch-triangle {
  opacity: 0.30;
}

.scope-download-ready {
  margin-top: 7px;
  padding: 5px 7px;
  border: 1px solid rgba(110,207,255,0.20);
  border-radius: 7px;
  background: rgba(9, 22, 32, 0.76);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-size: 11px;
  color: #a9bfd4;
}

.scope-download-ready span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-download-ready a {
  flex: 0 0 auto;
  color: #dff3ff;
  text-decoration: none;
  border: 1px solid rgba(110,207,255,0.30);
  border-radius: 6px;
  padding: 2px 7px;
  background: rgba(44, 162, 198, 0.18);
}

.scope-download-ready a:hover {
  border-color: rgba(110,207,255,0.58);
  background: rgba(44, 162, 198, 0.30);
}


/* v8.1.7.5: export dialog with visible generation progress and larger inline batch switcher */
.scope-batch-navigator.inline {
  max-width: 86px;
  height: 29px;
  padding: 0 4px 0 7px;
  gap: 5px;
}

.scope-batch-navigator.inline em {
  min-width: 32px;
  padding-right: 1px;
  font-size: 10.5px;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows {
  width: 42px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button {
  width: 21px;
  height: 24px;
  min-width: 21px;
  border-radius: 0;
  background: rgba(7, 18, 28, 0.82);
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:first-child {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button + button {
  margin-left: 0;
  border-left: 1px solid rgba(110, 207, 255, 0.22);
}

.scope-batch-navigator.inline .scope-batch-triangle.up {
  border-left-width: 7px;
  border-right-width: 7px;
  border-bottom-width: 10px;
}

.scope-batch-navigator.inline .scope-batch-triangle.down {
  border-left-width: 7px;
  border-right-width: 7px;
  border-top-width: 10px;
}

.scope-export-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.scope-export-card {
  position: relative;
  z-index: 5201;
  width: min(520px, calc(100vw - 40px));
  border: 1px solid rgba(33, 201, 255, 0.62);
  border-radius: 14px;
  background: #09131d;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  padding: 14px 16px 15px;
  color: #dcecff;
}

.scope-export-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.scope-export-head strong {
  display: block;
  color: #ffe94a;
  font-size: 15px;
  margin-bottom: 4px;
}

.scope-export-head span {
  display: block;
  color: #9fb5c9;
  font-size: 12px;
  line-height: 1.35;
}

.scope-export-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.scope-export-options button {
  height: 32px;
  border: 1px solid rgba(110, 207, 255, 0.28);
  border-radius: 9px;
  background: rgba(8, 22, 33, 0.86);
  color: #dcecff;
  font-weight: 700;
  cursor: pointer;
}

.scope-export-options button.selected {
  background: #dbe8ff;
  border-color: #dbe8ff;
  color: #07131f;
}

.scope-export-body {
  border: 1px solid rgba(110, 207, 255, 0.18);
  border-radius: 10px;
  background: rgba(4, 12, 19, 0.62);
  padding: 12px;
}

.scope-export-progress {
  display: grid;
  gap: 8px;
}

.scope-export-progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(110, 207, 255, 0.18);
}

.scope-export-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #21c9ff, #ffe94a);
  transition: width 0.16s ease;
}

.scope-export-progress em {
  color: #b9ccde;
  font-size: 12px;
  font-style: normal;
}

.scope-export-error {
  margin-top: 10px;
  color: #ff8b8b;
  font-size: 12px;
  line-height: 1.4;
}

.scope-export-ready {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #c6daec;
  font-size: 12px;
}

.scope-export-ready span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-export-ready a {
  color: #06121d;
  background: #dbe8ff;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 800;
  text-decoration: none;
}

.scope-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* v8.1.8: TMI threshold analysis export result link */
.scope-tmi-export-ready {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 16px 0;
  padding: 6px 9px;
  border: 1px solid rgba(110,207,255,0.22);
  border-radius: 8px;
  background: rgba(7, 18, 26, 0.78);
  color: #bfd4e8;
  font-size: 11px;
  min-width: 0;
}
.scope-tmi-export-ready span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scope-tmi-export-ready a {
  flex: 0 0 auto;
  color: #06111a;
  background: #dcecff;
  border-radius: 7px;
  padding: 4px 10px;
  text-decoration: none;
  font-weight: 700;
}
.scope-tmi-export-ready a:hover {
  filter: brightness(1.06);
}
.scope-tao-fit-tools {
  justify-content: flex-end;
}

/* v8.1.9: Otto fit point selection and inline TMI export result */
.scope-inline-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 210px;
  padding: 2px 6px;
  border: 1px solid rgba(110,207,255,0.22);
  border-radius: 7px;
  background: rgba(7, 18, 26, 0.78);
  color: #bfd4e8;
  font-size: 10.5px;
}

.scope-inline-download span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-inline-download a {
  flex: 0 0 auto;
  color: #06111a;
  background: #dcecff;
  border-radius: 6px;
  padding: 2px 7px;
  text-decoration: none;
  font-weight: 800;
}

.scope-otto-lowmean-toggle {
  height: 22px;
  padding: 0 5px;
  border: 1px solid rgba(110,207,255,0.18);
  border-radius: 7px;
  background: rgba(4, 10, 15, 0.52);
  color: #bcd1e6;
  font-size: 10.5px;
}

.scope-otto-lowmean-toggle input {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
}

.scope-otto-fit-point-panel {
  flex: 0 0 auto;
  margin: 0 16px 8px;
  border: 1px solid rgba(110,207,255,0.18);
  border-radius: 9px;
  background: rgba(5, 13, 20, 0.76);
  overflow: hidden;
}

.scope-fit-point-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  color: #dcecff;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.scope-fit-point-head span {
  flex: 1 1 auto;
  min-width: 0;
  color: #9fb4c8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-fit-point-table-wrap {
  max-height: 178px;
  overflow: auto;
}

.scope-fit-point-table {
  width: 100%;
  border-collapse: collapse;
  color: #dcecff;
  font-size: 11px;
  table-layout: fixed;
}

.scope-fit-point-table th,
.scope-fit-point-table td {
  padding: 5px 7px;
  border-bottom: 1px solid rgba(255,255,255,0.045);
  text-align: right;
  white-space: nowrap;
}

.scope-fit-point-table th:first-child,
.scope-fit-point-table td:first-child,
.scope-fit-point-table th:nth-child(2),
.scope-fit-point-table td:nth-child(2) {
  width: 38px;
  text-align: center;
}

.scope-fit-point-table th:nth-child(3),
.scope-fit-point-table td:nth-child(3) {
  width: auto;
  text-align: left;
}

.scope-fit-point-table th:nth-child(4),
.scope-fit-point-table td:nth-child(4) {
  width: 78px;
}

.scope-fit-point-table th:nth-child(5),
.scope-fit-point-table td:nth-child(5),
.scope-fit-point-table th:nth-child(6),
.scope-fit-point-table td:nth-child(6) {
  width: 74px;
}

.scope-fit-point-table th:nth-child(7),
.scope-fit-point-table td:nth-child(7) {
  width: 62px;
}

.scope-fit-point-table tbody tr.excluded {
  color: #72889c;
  opacity: 0.72;
}

.scope-fit-point-table tbody tr:hover {
  background: rgba(110,207,255,0.055);
}

.scope-fit-point-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* v8.2.0: move TMI threshold export into a compact floating popup */
.scope-tmi-threshold-summary .scope-otto-fit-tools {
  max-width: 420px;
}

.scope-tmi-export-popover {
  position: absolute;
  top: 104px;
  right: 18px;
  z-index: 30;
  width: min(440px, calc(100% - 36px));
  border: 1px solid rgba(48, 177, 226, 0.68);
  border-radius: 12px;
  background: rgba(5, 16, 24, 0.98);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.03) inset;
  overflow: hidden;
}

.scope-tmi-export-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: #ffe951;
  font-size: 13px;
}

.scope-tmi-export-popover-body {
  display: grid;
  gap: 10px;
  padding: 10px 11px 12px;
  color: #b9cfe2;
  font-size: 11px;
}

.scope-tmi-export-popover-body p {
  margin: 0;
  color: #8fa9bc;
}

.scope-tmi-export-block {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(110,207,255,0.16);
  border-radius: 10px;
  background: rgba(9, 26, 37, 0.56);
}

.scope-tmi-export-block-head {
  display: grid;
  gap: 3px;
}

.scope-tmi-export-block-head strong {
  color: #e9f3ff;
  font-size: 12px;
}

.scope-tmi-export-block-head span {
  color: #8fa9bc;
  font-size: 11px;
  line-height: 1.35;
}

.scope-tmi-export-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  color: #b9cfe2;
}

.scope-tmi-export-theme-row .scope-mini-segment {
  flex: 0 0 auto;
}

.scope-tmi-export-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scope-tmi-export-form-row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  color: #9fb4c8;
  white-space: nowrap;
}

.scope-tmi-export-form-row input {
  width: 100%;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(110,207,255,0.24);
  background: rgba(3, 8, 13, 0.92);
  color: #e9f3ff;
  padding: 0 7px;
  outline: none;
}

.scope-tmi-export-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scope-tmi-export-option-grid .ghost-button {
  height: 30px;
  min-width: 0;
  justify-content: center;
}

.scope-tmi-export-download-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(110,207,255,0.22);
  border-radius: 9px;
  background: rgba(9, 26, 37, 0.82);
  color: #dcecff;
}

.scope-tmi-export-download-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-tmi-export-download-line a {
  color: #06111a;
  background: #dcecff;
  border-radius: 8px;
  padding: 5px 10px;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.scope-tmi-export-hint {
  padding: 7px 8px;
  border: 1px dashed rgba(110,207,255,0.22);
  border-radius: 8px;
  color: #8fa9bc;
}

@media (max-width: 1320px) {
  .scope-tmi-export-popover {
    top: 132px;
    right: 12px;
  }
  .scope-tmi-export-form-row,
  .scope-tmi-export-option-grid {
    grid-template-columns: 1fr;
  }
}

/* v8.2.1 power manager */
.scope-power-editor.power-manager {
  width: min(820px, calc(100% - 28px));
  grid-template-rows: auto auto minmax(260px, 1fr);
}

.scope-power-validation {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(110,207,255,0.08);
  color: #b9d9f0;
  font-size: 11px;
  white-space: nowrap;
}

.scope-power-validation.ok {
  color: #baf2c4;
  border-color: rgba(91, 235, 143, 0.35);
  background: rgba(91, 235, 143, 0.08);
}

.scope-power-validation.warn {
  color: #ffe7a4;
  border-color: rgba(255, 216, 77, 0.38);
  background: rgba(255, 216, 77, 0.08);
}

.scope-power-validation.error {
  color: #ffb7b7;
  border-color: rgba(255, 126, 126, 0.35);
  background: rgba(255, 126, 126, 0.08);
}

.scope-power-manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.scope-power-manager-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(360px, 1fr);
  gap: 12px;
}

.scope-power-paste {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr) auto;
  gap: 8px;
}

.scope-power-paste textarea {
  min-height: 190px;
  max-height: none;
}

.scope-power-table-wrap {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(110,207,255,0.18);
  border-radius: 10px;
  background: rgba(4, 10, 15, 0.55);
}

.scope-power-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.scope-power-table th,
.scope-power-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
  text-align: left;
}

.scope-power-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #ffe94a;
  background: rgba(6, 14, 21, 0.98);
}

.scope-power-table td.name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #cde8ff;
}

.scope-power-table input {
  width: 96px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(110,207,255,0.24);
  background: rgba(2, 9, 15, 0.96);
  color: #e9f3ff;
  padding: 0 8px;
  outline: none;
}

.scope-power-table tr.missing td {
  color: #ffccba;
}

.scope-power-table tr.missing input {
  border-color: rgba(255, 126, 126, 0.38);
}

@media (max-width: 980px) {
  .scope-power-editor.power-manager {
    width: min(620px, calc(100% - 28px));
  }
  .scope-power-manager-grid {
    grid-template-columns: 1fr;
  }
  .scope-power-paste textarea {
    min-height: 120px;
  }
}

/* v8.2.1.1: power manager polish */
.scope-power-editor.power-manager {
  position: relative;
}

.scope-power-editor.power-manager .scope-power-editor-title-row {
  justify-content: flex-start;
  padding-right: 34px;
}

.scope-power-editor.power-manager .scope-power-editor-title-row strong {
  flex: 0 0 auto;
}

.scope-power-editor.power-manager .scope-power-validation {
  margin-left: auto;
}

.scope-power-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 9px;
  border: 1px solid rgba(110,207,255,0.28);
  background: rgba(8, 18, 27, 0.92);
  color: #d9efff;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scope-power-close:hover {
  background: rgba(32, 82, 108, 0.92);
  border-color: rgba(110,207,255,0.55);
}

.scope-power-manager-actions {
  align-items: stretch;
}

.scope-power-manager-actions .ghost-button {
  min-height: 36px;
}

.scope-power-error {
  min-height: 22px;
  color: #ffb7b7;
  font-size: 12px;
  line-height: 1.4;
}


/* v8.2.1.2: restore power manager as floating overlay while keeping close button */
.scope-power-editor.power-manager {
  position: absolute;
  top: 58px;
  right: 14px;
  left: auto;
  z-index: 30;
  width: min(820px, calc(100% - 28px));
  max-height: calc(100% - 78px);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(260px, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(87, 206, 255, 0.45);
  border-radius: 12px;
  background: rgba(6, 14, 21, 0.98);
  box-shadow: 0 18px 54px rgba(0,0,0,0.62);
}

.scope-power-editor.power-manager .scope-power-manager-grid {
  min-height: 0;
  overflow: hidden;
}

.scope-power-editor.power-manager .scope-power-table-wrap,
.scope-power-editor.power-manager .scope-power-paste {
  min-height: 0;
}

.scope-power-editor.power-manager .scope-power-paste textarea {
  min-height: 190px;
  max-height: none;
}

@media (max-width: 980px) {
  .scope-power-editor.power-manager {
    left: 14px;
    right: 14px;
    width: auto;
    max-height: calc(100% - 78px);
  }
}


/* v8.2.2: align power paste panel height with power table, including header rows */
.scope-power-editor.power-manager .scope-power-manager-grid {
  align-items: stretch;
}

.scope-power-editor.power-manager .scope-power-paste {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(110,207,255,0.18);
  border-radius: 10px;
  background: rgba(4, 10, 15, 0.55);
}

.scope-power-editor.power-manager .scope-power-paste .scope-subtitle {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(6, 14, 21, 0.98);
  color: #bfeeff;
  font-size: 12px;
  line-height: 1.2;
}

.scope-power-editor.power-manager .scope-power-paste textarea {
  min-height: 0;
  height: 100%;
  width: 100%;
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.scope-power-editor.power-manager .scope-power-error {
  padding: 6px 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(30, 8, 8, 0.18);
}

/* v8.2.3: threshold diagnostics */
.scope-fit-point-table th:nth-child(5),
.scope-fit-point-table td:nth-child(5),
.scope-fit-point-table th:nth-child(6),
.scope-fit-point-table td:nth-child(6),
.scope-fit-point-table th:nth-child(7),
.scope-fit-point-table td:nth-child(7) {
  width: 72px;
}

.scope-fit-point-table th:nth-child(8),
.scope-fit-point-table td:nth-child(8) {
  width: 58px;
}

.scope-fit-point-table td.residual-warn {
  color: #ffcf70;
  font-weight: 700;
}

.scope-tmi-threshold-compare {
  color: #ffcf70 !important;
}

/* v8.2.4: TMI threshold modal top-bar summary and clearer Otto marker semantics */
.scope-tmi-threshold-head {
  grid-template-columns: minmax(210px, 0.62fr) minmax(280px, 1.12fr) auto auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.scope-tmi-head-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #c8e6ff;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.scope-tmi-head-summary span,
.scope-tmi-head-summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-tmi-head-summary span {
  color: #e9f3ff;
}

.scope-tmi-head-summary em {
  flex: 0 1 auto;
  color: #ffcf70;
  font-style: normal;
  max-width: 360px;
}

.scope-tmi-threshold-tabs {
  grid-template-columns: 104px 104px !important;
  justify-content: end;
  gap: 6px !important;
}

.scope-tmi-threshold-tabs button {
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

.scope-tmi-threshold-head .scope-batch-actions {
  gap: 5px !important;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button {
  height: 28px !important;
  min-width: 48px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
}

.scope-tmi-threshold-summary {
  padding: 5px 12px 6px !important;
}

.scope-tmi-summary-info {
  flex: 0 1 auto !important;
  gap: 10px !important;
}

.scope-tmi-threshold-summary .scope-otto-fit-tools {
  max-width: none !important;
}

@media (max-width: 1360px) {
  .scope-tmi-threshold-head {
    grid-template-columns: minmax(180px, 0.7fr) minmax(180px, 1fr) auto !important;
  }

  .scope-tmi-threshold-head .scope-batch-actions {
    grid-column: 3;
  }

  .scope-tmi-head-summary em {
    display: none;
  }
}

@media (max-width: 1080px) {
  .scope-tmi-threshold-head {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .scope-tmi-head-summary {
    justify-content: flex-start;
  }

  .scope-tmi-threshold-tabs {
    justify-content: stretch;
    grid-template-columns: 1fr 1fr !important;
  }
}

/* v8.2.4: TMI threshold header relayout and Otto marker readability */
.scope-tmi-threshold-head {
  grid-template-columns: minmax(220px, 0.78fr) minmax(280px, 1fr) auto auto !important;
  gap: 8px !important;
  padding: 8px 10px !important;
}

.scope-tmi-head-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: #ffcf70;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.scope-tmi-head-summary span,
.scope-tmi-head-summary em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.scope-tmi-head-summary span {
  flex: 0 1 auto;
  color: #dcecff;
}

.scope-tmi-head-summary em {
  flex: 1 1 auto;
  color: #ffcf70;
}

.scope-tmi-threshold-head .scope-tmi-threshold-tabs {
  grid-template-columns: 110px 110px !important;
  gap: 5px !important;
  justify-self: end;
}

.scope-tmi-threshold-head .scope-tmi-threshold-tabs button {
  height: 28px;
  padding: 0 6px !important;
  font-size: 11px;
}

.scope-tmi-threshold-head .scope-batch-actions {
  justify-self: end;
  flex-wrap: nowrap;
  gap: 5px !important;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button {
  height: 28px;
  min-width: 50px !important;
  padding: 0 8px !important;
  font-size: 11px;
}

.scope-tmi-threshold-head .scope-batch-actions .ghost-button:first-child {
  min-width: 64px !important;
}

.scope-tmi-threshold-summary {
  align-items: center;
  min-height: 32px;
}

.scope-tmi-summary-info {
  gap: 10px;
}

.scope-tmi-threshold-card .js-plotly-plot .modebar {
  top: 26px !important;
}

@media (max-width: 1260px) {
  .scope-tmi-threshold-head {
    grid-template-columns: minmax(200px, 1fr) auto auto !important;
  }
  .scope-tmi-head-summary {
    grid-column: 1 / -1;
    order: 2;
  }
}

/* v8.2.4.1: keep fit parameters in the second status row and reserve the header center only for threshold summary */
.scope-tmi-threshold-head {
  grid-template-columns: minmax(220px, 0.75fr) minmax(260px, 1fr) auto auto !important;
}

.scope-tmi-head-summary {
  justify-content: center !important;
  color: #ffcf70 !important;
  font-weight: 700;
  min-width: 0;
}

.scope-tmi-head-summary span,
.scope-tmi-head-summary em {
  color: #ffcf70 !important;
  max-width: 100%;
}

.scope-tmi-summary-info {
  min-width: 0;
  flex: 1 1 auto !important;
}

.scope-otto-fit-status {
  color: #dcecff !important;
  font-weight: 500;
  max-width: min(720px, 58vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-tmi-threshold-summary .scope-otto-fit-tools {
  flex: 0 0 auto;
}

@media (max-width: 1360px) {
  .scope-otto-fit-status {
    max-width: 42vw;
  }
}

.scope-tmi-block.preprocess-block {
  border: 1px solid rgba(110, 207, 255, 0.16);
  border-radius: 12px;
  padding: 8px;
  background: rgba(7, 18, 28, 0.32);
}

.scope-select-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  font-size: 12px;
  color: #b8cfe3;
}

.scope-select-row select {
  min-width: 0;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.22);
  background: #07121c;
  color: #e9f3ff;
  padding: 0 8px;
  font-weight: 700;
}

/* v8.2.5.1: move Otto fit point table into a floating dialog so it never changes plot layout */
.scope-tmi-threshold-card {
  position: relative;
}

.scope-otto-fit-point-backdrop {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 58px 24px 24px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(2px);
}

.scope-otto-fit-point-dialog {
  width: min(1120px, calc(100% - 24px));
  max-height: min(620px, calc(100% - 28px));
  border: 1px solid rgba(110,207,255,0.38);
  border-radius: 12px;
  background: rgba(5, 13, 20, 0.97);
  box-shadow: 0 22px 72px rgba(0,0,0,0.62);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scope-otto-fit-point-dialog .scope-fit-point-head {
  flex: 0 0 auto;
  padding: 9px 11px;
  background: rgba(9, 24, 35, 0.88);
}

.scope-otto-fit-point-dialog .scope-fit-point-table-wrap {
  flex: 1 1 auto;
  max-height: none;
  min-height: 220px;
  overflow: auto;
}

.scope-otto-fit-point-dialog .scope-power-close {
  flex: 0 0 auto;
  margin-left: 4px;
}

@media (max-width: 920px) {
  .scope-otto-fit-point-backdrop {
    align-items: stretch;
    padding: 54px 10px 12px;
  }
  .scope-otto-fit-point-dialog {
    width: 100%;
    max-height: 100%;
  }
  .scope-otto-fit-point-dialog .scope-fit-point-head {
    flex-wrap: wrap;
  }
}

/* v8.2.6: batch column presets and larger Otto fit-point dialog */
.scope-batch-column-picker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9fb4c8;
  font-size: 12px;
  white-space: nowrap;
}

.scope-batch-column-picker select {
  min-width: 72px !important;
  height: 29px !important;
  padding: 0 8px !important;
}

.scope-batch-table-wrap {
  scrollbar-gutter: stable;
}

.scope-otto-fit-point-backdrop {
  padding: 72px 34px 34px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(1px);
}

.scope-otto-fit-point-dialog {
  width: min(1360px, calc(100% - 48px));
  max-height: min(720px, calc(100% - 44px));
  border-radius: 14px;
}

.scope-otto-fit-point-dialog .scope-fit-point-head {
  padding: 12px 14px;
  gap: 10px;
}

.scope-otto-fit-point-dialog .scope-fit-point-head strong {
  font-size: 14px;
}

.scope-otto-fit-point-dialog .scope-fit-point-head span {
  font-size: 12.5px;
}

.scope-otto-fit-point-dialog .scope-fit-point-head .ghost-button.tiny {
  height: 30px;
  min-width: 66px;
  font-size: 12px;
}

.scope-otto-fit-point-dialog .scope-power-close {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.scope-otto-fit-point-dialog .scope-fit-point-table-wrap {
  min-height: 360px;
}

.scope-otto-fit-point-dialog .scope-fit-point-table {
  font-size: 12.5px;
}

.scope-otto-fit-point-dialog .scope-fit-point-table th,
.scope-otto-fit-point-dialog .scope-fit-point-table td {
  padding: 8px 10px;
}

.scope-otto-fit-point-dialog .scope-fit-point-table input[type="checkbox"] {
  transform: scale(1.1);
}

@media (max-width: 1100px) {
  .scope-batch-actions {
    gap: 6px;
  }
  .scope-batch-actions .ghost-button,
  .scope-batch-actions select {
    min-width: 58px;
    padding: 0 8px !important;
  }
}


/* v8.2.9 modal layer stabilization */
.scope-export-backdrop {
  z-index: 9800 !important;
}
.scope-export-card {
  z-index: 9801 !important;
}
.scope-batch-backdrop {
  z-index: 2100;
}
.scope-tmi-threshold-card,
.scope-batch-card,
.scope-trend-card {
  isolation: isolate;
}
.scope-power-editor-panel,
.scope-otto-fit-point-backdrop,
.scope-tmi-export-popover {
  z-index: 7600;
}
.scope-tmi-export-popover {
  max-height: calc(100vh - 132px);
  overflow: auto;
}
.scope-export-ready a,
.scope-tmi-export-download-line a {
  cursor: pointer;
}

/* v8.3.10: use the same compact vertical up/down navigator as Beam. */
.scope-batch-navigator.inline {
  max-width: none !important;
  height: 29px !important;
  padding: 0 4px 0 7px !important;
  gap: 5px !important;
}

.scope-batch-navigator.inline em {
  min-width: 32px !important;
  padding-right: 1px !important;
  text-align: right !important;
  font-size: 10.5px !important;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows {
  width: 20px !important;
  height: 24px !important;
  display: grid !important;
  grid-template-rows: 12px 12px !important;
  grid-template-columns: 20px !important;
  gap: 1px !important;
  overflow: hidden;
  border-radius: 6px;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button {
  width: 20px !important;
  height: 12px !important;
  min-width: 20px !important;
  padding: 0 !important;
  border: 1px solid rgba(110,207,255,0.22) !important;
  background: rgba(7, 18, 28, 0.82) !important;
  border-radius: 0 !important;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:first-child {
  border-radius: 6px 6px 2px 2px !important;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button:last-child {
  border-radius: 2px 2px 6px 6px !important;
}

.scope-batch-navigator.inline .scope-batch-nav-arrows button + button {
  margin-left: 0 !important;
  border-left: 1px solid rgba(110,207,255,0.22) !important;
}

.scope-batch-navigator.inline .scope-batch-triangle.up {
  border-left-width: 5px !important;
  border-right-width: 5px !important;
  border-bottom-width: 6px !important;
}

.scope-batch-navigator.inline .scope-batch-triangle.down {
  border-left-width: 5px !important;
  border-right-width: 5px !important;
  border-top-width: 6px !important;
}
.beam-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.beam-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 238px minmax(720px, 1fr) 282px;
  gap: 9px;
}

.beam-left,
.beam-right {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.beam-data-head,
.beam-right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.beam-data-head .panel-title {
  margin: 0;
}

.beam-data-head span,
.beam-right-head span {
  color: #9fb4c8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.beam-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.beam-wide {
  width: 100%;
  margin-top: 8px;
}

.beam-status-text {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #b7c8dc;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.beam-side-file-switcher {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.beam-file-switcher,
.lla-file-switcher {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.beam-file-switcher span,
.lla-file-switcher span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #b7c8dc;
  font-size: 12px;
  text-align: left;
}

.beam-file-switcher-buttons {
  display: inline-grid;
  grid-template-rows: 13px 13px;
  gap: 1px;
}

.beam-file-switcher-buttons button {
  width: 20px;
  height: 13px;
  padding: 0;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(6,16,24,0.84);
  color: #dcecff;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.beam-file-switcher-buttons button:first-child {
  border-radius: 6px 6px 2px 2px;
}

.beam-file-switcher-buttons button:last-child {
  border-radius: 2px 2px 6px 6px;
}

.beam-file-switcher-buttons button:disabled {
  opacity: 0.38;
  cursor: default;
}

.beam-download-line {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: #b7c8dc;
  font-size: 11.5px;
}

.beam-download-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-download-line a {
  color: #06111a;
  background: #dcecff;
  border-radius: 8px;
  padding: 5px 9px;
  text-decoration: none;
  font-weight: 800;
}

.beam-workspace.panel {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

.beam-workspace {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 198px;
  gap: 0;
  background: #050607;
}

.beam-view-row {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  background: #050607;
}

.beam-view-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #050607;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.beam-view-card:first-child {
  border-right: 1px solid rgba(160, 190, 220, 0.34);
}

.beam-view-card:disabled {
  cursor: default;
}

.beam-floating-label,
.beam-view-action {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  line-height: 1;
}

.beam-floating-label {
  left: 5px;
  top: 5px;
  color: rgba(225, 238, 255, 0.96);
  font-size: 13px;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.beam-view-action {
  right: 5px;
  top: 5px;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.38);
  color: rgba(220, 236, 255, 0.72);
  font-size: 11px;
  opacity: 0;
  transition: opacity .14s ease;
}

.beam-view-card:hover .beam-view-action {
  opacity: 1;
}

.beam-image-viewport {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050607;
  overflow: hidden;
}

.beam-image-viewport img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
  pointer-events: none;
}

.beam-placeholder,
.beam-empty-note {
  color: #7f91a6;
  font-size: 13px;
  text-align: center;
  padding: 12px;
}

.beam-parameter-deck {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  grid-template-rows: 24px minmax(0, 1fr);
  gap: 7px 12px;
  padding: 10px 12px 12px;
  background: rgba(8, 15, 23, 0.96);
  border-top: 1px solid rgba(180, 210, 240, 0.22);
}

.beam-parameter-head {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
}

.beam-parameter-head strong,
.beam-right-head strong {
  color: #dcecff;
  font-size: 13px;
  font-weight: 400;
}

.beam-help-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(110,207,255,0.35);
  background: rgba(7, 19, 29, 0.86);
  color: #bfe9ff;
  font-size: 12px;
  font-weight: 800;
  cursor: help;
  flex: 0 0 auto;
}

.beam-parameter-controls {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 6px;
  overflow: auto;
  padding: 0 4px 0 0;
}

.beam-parameter-controls label {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 38px;
  grid-template-rows: 31px;
  gap: 6px;
  align-items: center;
  color: #a9bdd2;
  font-size: 13px;
}

.beam-parameter-controls label span {
  white-space: nowrap;
}

.beam-parameter-controls input {
  width: 100%;
  height: 31px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 13px;
  text-align: center;
}

.beam-parameter-controls em {
  font-style: normal;
  font-size: 12px;
  color: #91a8bb;
}

.beam-parameter-controls button {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 9px;
  align-self: stretch;
  font-size: 13px;
}

.beam-parameter-options {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(3, 32px) minmax(0, 1fr);
  gap: 8px;
  align-content: start;
  overflow: hidden;
}

.beam-option-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #a9bdd2;
  font-size: 13px;
}

.beam-option-row > span {
  color: #91a8bb;
  white-space: nowrap;
}

.beam-mini-segment {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.beam-mini-segment button {
  min-width: 54px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(6, 15, 23, 0.88);
  color: #cfe5f8;
  cursor: pointer;
  font-size: 12px;
}

.beam-mini-segment button.selected {
  color: #06111a;
  background: #dcecff;
  border-color: #dcecff;
  font-weight: 800;
}

.beam-mini-segment button:disabled {
  opacity: 0.45;
  cursor: default;
}

.beam-parameter-note {
  align-self: end;
  padding: 8px 10px;
  border: 1px solid rgba(110,207,255,0.10);
  border-radius: 9px;
  background: rgba(4, 10, 16, 0.48);
  color: #8fa4b8;
  font-size: 12px;
  line-height: 1.45;
}

.beam-right.panel {
  padding: 9px 9px 10px;
}

.beam-right {
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr) auto;
  gap: 7px;
}

.beam-output-body.right {
  min-height: 0;
  overflow: hidden;
}

.beam-stat-grid,
.beam-report-grid,
.beam-stat-grid.compact,
.beam-stat-grid.compact.right {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  padding-right: 2px;
  font-size: 13.5px;
}

.beam-stat-item,
.beam-stat-grid.compact.right .beam-stat-item,
.beam-report-grid .beam-stat-item {
  display: grid;
  grid-template-columns: minmax(0, 88px) minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.065);
  border-radius: 0;
  background: transparent;
}

.beam-stat-item span,
.beam-stat-grid span,
.beam-report-grid span {
  color: #91a8bb;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beam-stat-item strong,
.beam-stat-grid strong,
.beam-report-grid strong {
  color: #eaf4ff;
  font-weight: 400;
  font-size: 13.5px;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  white-space: normal;
}

.beam-right-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.beam-right-actions button {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
}

.beam-frame-table-wrap,
.beam-batch-table-wrap,
.beam-trend-table-wrap {
  min-height: 0;
  overflow: auto;
}

.beam-frame-table,
.beam-batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #dcecff;
  font-variant-numeric: tabular-nums;
}

.beam-frame-table th,
.beam-frame-table td,
.beam-batch-table th,
.beam-batch-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
  text-align: right;
}

.beam-frame-table th:first-child,
.beam-frame-table td:first-child,
.beam-batch-table th:first-child,
.beam-batch-table td:first-child,
.beam-batch-table .name {
  text-align: left;
}

.beam-frame-table th,
.beam-batch-table th {
  position: sticky;
  top: 0;
  background: #09131d;
  color: #ffe94a;
  z-index: 1;
}

.beam-batch-table tr.ok:hover,
.beam-batch-table tr.running:hover,
.beam-batch-table tr.error:hover {
  background: rgba(110,207,255,0.06);
}

.beam-batch-table tr.error td {
  color: #ffb7b7;
}

.beam-batch-table tr.running td {
  color: #ffe3a1;
}

.beam-batch-table .name button {
  max-width: 420px;
  border: 0;
  background: transparent;
  color: #dcecff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-batch-table .name button:disabled {
  color: #7f91a6;
  cursor: default;
}

.beam-batch-table.compact {
  font-size: 11.5px;
}

.beam-batch-backdrop,
.beam-image-modal-backdrop,
.beam-report-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6400;
  background: rgba(0,0,0,0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.beam-batch-card,
.beam-detail-card,
.beam-trend-card,
.beam-image-modal-card,
.beam-report-card {
  border: 1px solid rgba(87, 206, 255, 0.55);
  border-radius: 14px;
  background: #071018;
  box-shadow: 0 26px 90px rgba(0,0,0,0.68);
  overflow: hidden;
}

.beam-batch-card {
  width: min(1540px, 100%);
  height: min(780px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.beam-detail-card {
  width: min(1320px, 100%);
  height: min(560px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.beam-trend-card {
  width: min(1260px, 100%);
  height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.beam-batch-head,
.beam-image-modal-head,
.beam-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(9, 18, 27, 0.96);
}

.beam-batch-head > div:first-child,
.beam-image-modal-head > div,
.beam-report-head > div {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.beam-batch-head strong,
.beam-image-modal-head strong,
.beam-report-head strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500 !important;
  white-space: nowrap;
}

.beam-batch-head span,
.beam-image-modal-head span,
.beam-report-head span {
  color: #a8bdd2;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.beam-batch-actions .ghost-button {
  height: 29px;
  min-width: 68px;
  padding: 0 10px !important;
  border-radius: 8px;
  font-size: 12px;
}

.beam-batch-table-wrap {
  padding: 10px;
}

.beam-image-modal-card {
  width: min(1480px, 100%);
  height: calc(100vh - 40px);
  min-height: 520px;
  display: grid;
  grid-template-rows: 46px minmax(0, 1fr);
  background: #050607;
}

.beam-modal-close {
  width: 62px;
  height: 28px;
  min-width: 62px;
  padding: 0 !important;
}

.beam-image-modal-view {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #050607;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.beam-image-modal-view img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.beam-report-card {
  width: min(980px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
}

.beam-report-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 16px;
}

.beam-report-body h4 {
  margin: 16px 0 8px;
  color: #eaf4ff;
}

.beam-report-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 7px 18px;
  overflow: visible;
}

.beam-report-grid .beam-stat-item {
  grid-template-columns: minmax(0, 90px) minmax(0, 1fr);
}

.beam-trend-body {
  min-height: 0;
  display: grid;
  grid-template-rows: 42px minmax(260px, 1fr) minmax(150px, 0.48fr);
  gap: 10px;
  padding: 10px;
}

.beam-trend-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #a9bdd2;
  font-size: 13px;
}

.beam-mini-segment.trend {
  flex-wrap: nowrap;
  overflow: auto;
}

.beam-mini-segment.trend button {
  min-width: 76px;
  flex: 0 0 auto;
}

.beam-trend-plot {
  min-height: 0;
  border: 1px solid rgba(110,207,255,0.12);
  border-radius: 10px;
  background: rgba(4, 10, 16, 0.65);
  padding: 12px;
}

.beam-trend {
  width: 100%;
  height: 100%;
  min-height: 190px;
}

.beam-trend line {
  stroke: rgba(255,255,255,0.18);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
}

.beam-trend polyline {
  fill: none;
  stroke: #ffd84d;
  stroke-width: 1.7;
  vector-effect: non-scaling-stroke;
}

.beam-trend-table-wrap {
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

@media (max-width: 1280px) {
  .beam-grid {
    grid-template-columns: 220px minmax(520px, 1fr) 282px;
  }

  .beam-workspace {
    grid-template-rows: minmax(0, 1fr) 218px;
  }

  .beam-parameter-deck {
    grid-template-columns: 236px minmax(0, 1fr);
  }
}

@media (max-width: 1180px) {
  .beam-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .beam-right.panel {
    display: none;
  }

  .beam-parameter-deck {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

/* v8.3.10: Beam page follows Scope layout more closely.
   Main workspace is only for the current image pair. Controls live on the left,
   batch/detail/report stay in popups, and the right result panel has clear rows. */
.beam-grid {
  grid-template-columns: 238px minmax(720px, 1fr) 292px;
}

.beam-left {
  overflow: auto;
  padding-right: 2px;
}

.beam-workspace {
  grid-template-rows: minmax(0, 1fr);
}

.beam-view-row {
  height: 100%;
}

.beam-param-panel {
  flex: 0 0 auto;
}

.beam-param-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.beam-param-head .panel-title {
  margin: 0;
}

.beam-param-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.beam-param-list label {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  color: #a9bdd2;
  font-size: 12px;
}

.beam-param-list label span {
  white-space: nowrap;
}

.beam-param-list input {
  width: 100%;
  min-width: 0;
  height: 28px;
  padding: 4px 7px;
  border-radius: 7px;
  text-align: center;
  font-size: 12px;
}

.beam-param-list em {
  color: #91a8bb;
  font-style: normal;
  font-size: 11px;
  white-space: nowrap;
}

.beam-param-list .beam-option-row {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  font-size: 12px;
}

.beam-param-list .beam-mini-segment {
  gap: 5px;
}

.beam-param-list .beam-mini-segment button {
  min-width: 48px;
  height: 26px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 11.5px;
}

.beam-param-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding-top: 3px;
}

.beam-param-actions button {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.beam-param-actions .beam-stop-button {
  grid-column: 1 / -1;
}

.beam-right.panel {
  padding: 9px 9px 10px;
}

.beam-right {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.beam-right-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  align-items: stretch;
}

.beam-right-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.beam-right-title strong {
  color: #dcecff;
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
}

.beam-right-title span {
  color: #9fb4c8;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.beam-right-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.beam-right-tools button {
  height: 27px;
  min-width: 0;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}

.beam-output-body.right {
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(8, 16, 24, 0.64);
}

.beam-stat-grid.compact.right {
  height: 100%;
  padding: 4px 8px 7px;
  overflow: auto;
  gap: 0;
}

.beam-stat-item,
.beam-stat-grid.compact.right .beam-stat-item,
.beam-report-grid .beam-stat-item {
  min-height: 28px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(110,207,255,0.14);
}

.beam-stat-grid.compact.right .beam-stat-item:nth-child(even) {
  background: linear-gradient(90deg, rgba(255,255,255,0.018), rgba(255,255,255,0));
}

.beam-stat-grid.compact.right .beam-stat-item:last-child {
  border-bottom: 0;
}

.beam-stat-grid.compact.right .beam-stat-item span {
  color: #91a8bb;
}

.beam-stat-grid.compact.right .beam-stat-item strong {
  color: #eef7ff;
}

.beam-right-actions {
  display: none;
}

@media (max-width: 1280px) {
  .beam-workspace {
    grid-template-rows: minmax(0, 1fr);
  }
}

/* v8.3.10: Beam interaction cleanup based on Scope batch workflow. */
.beam-workspace {
  grid-template-rows: minmax(0, 1fr) !important;
}

.beam-view-row {
  height: 100%;
}

.beam-parameter-deck {
  display: none !important;
}

.beam-actions {
  grid-template-columns: 1fr 1fr;
}

.beam-clear-action {
  grid-column: 1 / -1;
}

.beam-file-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 8px;
  min-width: 0;
}

.beam-file-name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: #dcecff;
  font-size: 12px;
  line-height: 1.5;
}

.beam-file-name span {
  flex: 0 0 auto;
  color: #dcecff;
}

.beam-file-name strong {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #eaf4ff;
  font-weight: 400 !important;
}

.beam-batch-navigator.inline {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 29px;
  padding: 0 4px 0 7px;
  gap: 5px;
  border: 1px solid rgba(110,207,255,0.22);
  border-radius: 8px;
  background: rgba(5, 12, 18, 0.78);
}

.beam-batch-navigator.inline em {
  min-width: 32px;
  padding-right: 1px;
  color: #cfe3f7;
  font-style: normal;
  font-size: 10.5px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.beam-batch-nav-arrows {
  width: 20px;
  height: 24px;
  display: grid;
  grid-template-rows: 12px 12px;
  gap: 1px;
  overflow: hidden;
  border-radius: 6px;
}

.beam-batch-nav-arrows button {
  width: 20px;
  height: 12px;
  min-width: 20px;
  padding: 0;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(7, 18, 28, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.beam-batch-nav-arrows button:first-child {
  border-radius: 6px 6px 2px 2px;
}

.beam-batch-nav-arrows button:last-child {
  border-radius: 2px 2px 6px 6px;
}

.beam-batch-nav-arrows button:hover:not(:disabled) {
  background: rgba(76,201,240,0.18);
}

.beam-batch-nav-arrows button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.beam-batch-triangle {
  display: block;
  width: 0;
  height: 0;
  opacity: 0.94;
}

.beam-batch-triangle.up {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #dcecff;
}

.beam-batch-triangle.down {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #dcecff;
}

.beam-batch-nav-arrows button:hover:not(:disabled) .beam-batch-triangle.up {
  border-bottom-color: #ffffff;
}

.beam-batch-nav-arrows button:hover:not(:disabled) .beam-batch-triangle.down {
  border-top-color: #ffffff;
}

.beam-right-head {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  min-height: 24px;
}

.beam-analysis-title {
  margin: 0;
  color: #ffe94a !important;
}

.beam-right-tools,
.beam-right-title {
  display: none !important;
}

.beam-output-body.right {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.beam-stat-grid.compact.right {
  padding: 0 2px 6px 0 !important;
  gap: 2px !important;
}

.beam-stat-grid.compact.right .beam-stat-item {
  min-height: 25px;
  padding: 2px 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

.beam-stat-grid.compact.right .beam-stat-item:nth-child(even) {
  background: transparent !important;
}

.beam-download-line {
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(110,207,255,0.14);
  border-radius: 9px;
  background: rgba(4, 10, 16, 0.55);
}

.beam-batch-backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(74, 201, 240, 0.13), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(255, 233, 74, 0.08), transparent 30%),
    rgba(0,0,0,0.58) !important;
  backdrop-filter: blur(6px);
}

.beam-batch-card,
.beam-detail-card,
.beam-trend-card {
  background:
    linear-gradient(135deg, rgba(8, 23, 35, 0.88), rgba(4, 10, 18, 0.78)) !important;
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: 0 28px 100px rgba(0,0,0,0.64), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

.beam-batch-head {
  background: linear-gradient(90deg, rgba(8, 18, 28, 0.92), rgba(14, 33, 47, 0.72)) !important;
  backdrop-filter: blur(10px);
}

.beam-export-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6800;
  background: rgba(0,0,0,0.62);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.beam-export-card {
  width: min(680px, 100%);
  max-height: min(620px, calc(100vh - 40px));
  border: 1px solid rgba(87, 206, 255, 0.55);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 22, 34, 0.94), rgba(4, 10, 17, 0.92));
  box-shadow: 0 26px 90px rgba(0,0,0,0.70), inset 0 1px 0 rgba(255,255,255,0.05);
  display: grid;
  grid-template-rows: 48px auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.beam-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(9, 18, 27, 0.90);
}

.beam-export-head > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.beam-export-head strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 500 !important;
  white-space: nowrap;
}

.beam-export-head span {
  color: #a8bdd2;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-export-head .ghost-button {
  height: 29px;
  min-width: 62px;
  padding: 0 10px !important;
  border-radius: 8px;
  font-size: 12px;
}

.beam-export-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}

.beam-export-tabs button {
  min-width: 0;
  height: 31px;
  border-radius: 9px;
  border: 1px solid rgba(110,207,255,0.22);
  background: rgba(6, 15, 23, 0.84);
  color: #cfe5f8;
  font-size: 12px;
  cursor: pointer;
}

.beam-export-tabs button.selected {
  color: #06111a;
  background: #dcecff;
  border-color: #dcecff;
  font-weight: 800;
}

.beam-export-tabs button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.beam-export-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
}

.beam-export-body p {
  margin: 0 0 10px;
  color: #b9cbdd;
  font-size: 12.5px;
  line-height: 1.6;
}

.beam-export-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid rgba(110,207,255,0.12);
  border-radius: 10px;
  background: rgba(4,10,16,0.48);
}

.beam-export-meta .beam-stat-item {
  min-height: 22px;
  padding: 0;
  border: 0 !important;
}

.beam-export-ready,
.beam-export-hint {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(110,207,255,0.16);
  background: rgba(4,10,16,0.56);
  color: #a8bdd2;
  font-size: 12px;
}

.beam-export-ready {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.beam-export-ready span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-export-ready a {
  color: #06111a;
  background: #dcecff;
  border-radius: 8px;
  padding: 6px 10px;
  text-decoration: none;
  font-weight: 800;
}

.beam-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 14px 14px;
}

.beam-export-actions button {
  height: 32px;
  min-width: 120px;
  padding: 0 14px;
}

/* v8.3.11: Restore the middle lower detail-parameter deck.
   Left panel only keeps global data controls. The right result panel flows from top
   instead of stretching rows to fill the full height. */
.beam-workspace {
  grid-template-rows: minmax(0, 1fr) 174px !important;
}

.beam-parameter-deck {
  display: grid !important;
  grid-template-columns: 246px minmax(0, 1fr) 236px;
  grid-template-rows: 26px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 9px 12px 11px;
  background: linear-gradient(180deg, rgba(8, 16, 25, 0.98), rgba(5, 12, 19, 0.98));
  border-top: 1px solid rgba(110,207,255,0.20);
}

.beam-parameter-head {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.beam-parameter-head strong {
  color: #dcecff;
  font-size: 13px;
  font-weight: 500 !important;
  white-space: nowrap;
}

.beam-parameter-controls {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 7px;
  overflow: hidden;
  padding: 0;
}

.beam-parameter-controls label {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 44px;
  grid-template-rows: 30px;
  gap: 7px;
  align-items: center;
  color: #a9bdd2;
  font-size: 12.5px;
}

.beam-parameter-controls label span,
.beam-parameter-controls em {
  white-space: nowrap;
}

.beam-parameter-controls input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 4px 7px;
  border-radius: 8px;
  text-align: center;
  font-size: 12.5px;
}

.beam-parameter-controls em {
  color: #91a8bb;
  font-style: normal;
  font-size: 11.5px;
}

.beam-parameter-options {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: min-content;
  align-content: start;
  gap: 9px;
  overflow: hidden;
  padding-top: 2px;
}

.beam-parameter-options .beam-option-row {
  min-height: 32px;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  font-size: 12.5px;
}

.beam-parameter-options .beam-mini-segment {
  gap: 7px;
}

.beam-parameter-options .beam-mini-segment button {
  min-width: 56px;
  height: 28px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 12px;
}

.beam-parameter-actions {
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 31px;
  align-content: start;
  gap: 8px;
  padding-top: 2px;
}

.beam-parameter-actions button {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12.5px;
}

.beam-parameter-note {
  grid-column: 2 / 4;
  grid-row: 2;
  align-self: end;
  min-width: 0;
  max-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(110,207,255,0.11);
  border-radius: 9px;
  background: rgba(4, 10, 16, 0.42);
  color: #8fa4b8;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.beam-right {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}

.beam-right.panel {
  padding: 10px 10px 12px;
}

.beam-right-head {
  flex: 0 0 auto;
  min-height: 24px;
}

.beam-output-body.right {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible !important;
}

.beam-stat-grid.compact.right {
  height: auto !important;
  overflow: visible !important;
  align-content: start;
  gap: 8px !important;
  padding: 4px 1px 0 0 !important;
}

.beam-stat-grid.compact.right .beam-stat-item {
  min-height: 20px;
  padding: 0 !important;
  grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
  align-items: baseline;
}

.beam-stat-grid.compact.right .beam-stat-item span,
.beam-stat-grid.compact.right .beam-stat-item strong {
  font-size: 13px;
  line-height: 1.25;
}

.beam-batch-backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(74, 201, 240, 0.16), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(255, 233, 74, 0.10), transparent 30%),
    rgba(0,0,0,0.74) !important;
  backdrop-filter: blur(8px) saturate(1.05);
}

.beam-batch-card,
.beam-detail-card,
.beam-trend-card {
  background:
    linear-gradient(135deg, rgba(8, 23, 35, 0.70), rgba(4, 10, 18, 0.58)) !important;
  backdrop-filter: blur(18px) saturate(1.18);
  box-shadow: 0 28px 100px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.beam-batch-head {
  background: linear-gradient(90deg, rgba(8, 18, 28, 0.76), rgba(14, 33, 47, 0.56)) !important;
  backdrop-filter: blur(14px) saturate(1.12);
}

.beam-batch-table-wrap,
.beam-frame-table-wrap,
.beam-trend-body {
  background: rgba(3, 8, 14, 0.18);
}

@media (max-width: 1280px) {
  .beam-workspace {
    grid-template-rows: minmax(0, 1fr) 188px !important;
  }

  .beam-parameter-deck {
    grid-template-columns: 226px minmax(0, 1fr) 204px;
  }
}

/* v8.3.13: Rebalance Beam popup glass transparency.
   The outside overlay keeps a light transparent mask, while popup content is
   slightly more opaque so the page behind no longer interferes with reading. */
.beam-batch-backdrop,
.beam-image-modal-backdrop,
.beam-report-backdrop,
.beam-export-backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(74, 201, 240, 0.08), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(255, 233, 74, 0.05), transparent 30%),
    rgba(0, 0, 0, 0.24) !important;
  backdrop-filter: none !important;
}

.beam-batch-card,
.beam-detail-card,
.beam-trend-card,
.beam-report-card,
.beam-export-card {
  background:
    linear-gradient(135deg, rgba(8, 23, 35, 0.70), rgba(4, 10, 18, 0.58)) !important;
  border-color: rgba(87, 206, 255, 0.50) !important;
  backdrop-filter: blur(18px) saturate(1.22) !important;
  box-shadow:
    0 24px 82px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.beam-image-modal-card {
  background: rgba(5, 8, 12, 0.60) !important;
  backdrop-filter: blur(18px) saturate(1.18) !important;
}

.beam-batch-head,
.beam-image-modal-head,
.beam-report-head,
.beam-export-head {
  background: linear-gradient(90deg, rgba(8, 18, 28, 0.70), rgba(14, 33, 47, 0.56)) !important;
  backdrop-filter: blur(12px) saturate(1.18) !important;
}

.beam-batch-table-wrap,
.beam-detail-body,
.beam-trend-body,
.beam-report-body,
.beam-export-body,
.beam-export-meta,
.beam-export-ready,
.beam-export-hint {
  background-color: rgba(3, 8, 14, 0.42) !important;
}

.beam-batch-table,
.beam-batch-table tbody,
.beam-batch-table tr,
.beam-batch-table td {
  background-color: transparent !important;
}

.beam-batch-table th {
  background: rgba(5, 15, 24, 0.64) !important;
}

.beam-image-modal-view {
  background: rgba(0, 0, 0, 0.36) !important;
}

/* v8.3.14: Add a light glass blur back to the outside popup overlay.
   Keep the dialog body unchanged, but make the page behind softly blurred rather
   than fully clear. */
.beam-batch-backdrop,
.beam-image-modal-backdrop,
.beam-report-backdrop,
.beam-export-backdrop {
  background:
    radial-gradient(circle at 18% 14%, rgba(74, 201, 240, 0.10), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(255, 233, 74, 0.06), transparent 30%),
    rgba(0, 0, 0, 0.16) !important;
  backdrop-filter: blur(10px) saturate(1.10) !important;
}

/* v8.3.15: Static-image Beam viewer and selectable right-side metrics.
   Beam remains image-only. The popup image viewer supports wheel zoom and drag pan,
   while the right panel lets the user decide which single-image metrics to show. */
.beam-metric-selector {
  flex: 0 0 auto;
  padding: 8px 8px 9px;
  border: 1px solid rgba(110,207,255,0.12);
  border-radius: 10px;
  background: rgba(5, 13, 21, 0.40);
}

.beam-metric-selector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.beam-metric-selector-head strong {
  color: #dcecff;
  font-size: 12.5px;
  font-weight: 500 !important;
}

.beam-metric-selector-head span {
  color: #91a8bb;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.beam-metric-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 7px;
  max-height: 154px;
  overflow: auto;
  padding-right: 2px;
}

.beam-metric-checks label {
  min-width: 0;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 6px;
  border: 1px solid rgba(110,207,255,0.12);
  border-radius: 7px;
  background: rgba(3, 9, 15, 0.28);
  color: #9fb4c8;
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.beam-metric-checks label.checked {
  border-color: rgba(110,207,255,0.28);
  background: rgba(76,201,240,0.08);
  color: #dcecff;
}

.beam-metric-checks input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #6ecfff;
  flex: 0 0 auto;
}

.beam-metric-checks span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-metric-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.beam-metric-actions button {
  min-width: 0;
  height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  border: 1px solid rgba(110,207,255,0.18);
  background: rgba(6, 15, 23, 0.60);
  color: #cfe5f8;
  font-size: 11.5px;
  cursor: pointer;
}

.beam-metric-actions button:hover {
  background: rgba(76,201,240,0.12);
}

.beam-stat-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.beam-stat-section {
  min-width: 0;
}

.beam-stat-section h4 {
  margin: 0 0 5px;
  color: #ffe94a;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
}

.beam-stat-section .beam-stat-grid.compact.right {
  padding: 0 !important;
  gap: 4px !important;
}

.beam-stat-section .beam-stat-item {
  min-height: 22px !important;
  grid-template-columns: minmax(0, 94px) minmax(0, 1fr) !important;
  padding: 1px 0 !important;
}

.beam-stat-section .beam-stat-item span,
.beam-stat-section .beam-stat-item strong {
  font-size: 12.8px !important;
}

.beam-image-modal-head {
  min-width: 0;
}

.beam-image-zoom-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.beam-image-zoom-tools .ghost-button {
  height: 28px;
  min-width: 34px;
  padding: 0 9px !important;
  border-radius: 8px;
  font-size: 12px;
}

.beam-image-zoom-tools span {
  min-width: 48px;
  color: #dcecff;
  font-size: 12px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.beam-image-modal-view {
  cursor: grab;
  touch-action: none;
}

.beam-image-modal-view:active {
  cursor: grabbing;
}

.beam-image-modal-view img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 80ms ease-out;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}

/* v8.3.16: Inline image pan/zoom and overlay-only checkboxes.
   The right panel always shows every calculated value. Checkboxes only control
   markers drawn on the processed image. */
.beam-right {
  grid-template-rows: 24px auto minmax(0, 1fr) !important;
}

.beam-view-card {
  cursor: default !important;
}

.beam-view-tools {
  position: absolute;
  z-index: 8;
  right: 6px;
  top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  border-radius: 999px;
  background: rgba(4, 10, 16, 0.52);
  backdrop-filter: blur(8px) saturate(1.1);
  opacity: 0.36;
  transition: opacity 0.14s ease, background 0.14s ease;
}

.beam-view-card:hover .beam-view-tools,
.beam-view-tools:focus-within {
  opacity: 1;
  background: rgba(4, 10, 16, 0.72);
}

.beam-view-tools span {
  min-width: 38px;
  color: rgba(220, 236, 255, 0.82);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.beam-view-tools button {
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  background: rgba(6, 16, 25, 0.72);
  color: #dcecff;
  font-size: 11px;
  cursor: pointer;
}

.beam-view-tools button:hover:not(:disabled) {
  border-color: rgba(110, 207, 255, 0.36);
  background: rgba(30, 137, 173, 0.46);
}

.beam-view-tools button:disabled {
  opacity: 0.32;
  cursor: default;
}

.beam-view-tools .beam-view-expand {
  min-width: 25px;
  font-size: 13px;
  font-weight: 700;
  color: #ffe94a;
}

.beam-image-viewport.interactive {
  cursor: grab;
  touch-action: none;
}

.beam-image-viewport.interactive:active {
  cursor: grabbing;
}

.beam-image-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  transform-origin: center center;
  will-change: transform;
}

.beam-image-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  user-select: none;
  pointer-events: none;
}

.beam-analysis-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.beam-overlay-ellipse {
  fill: none;
  stroke: rgba(255, 216, 77, 0.92);
  filter: drop-shadow(0 0 4px rgba(255, 216, 77, 0.28));
}

.beam-overlay-centroid line,
.beam-overlay-centroid circle {
  fill: none;
  stroke: rgba(26, 232, 255, 0.92);
  filter: drop-shadow(0 0 4px rgba(26, 232, 255, 0.28));
}

.beam-overlay-roi {
  fill: none;
  stroke: rgba(110, 207, 255, 0.76);
  stroke-width: 1.4;
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 3px rgba(110, 207, 255, 0.24));
}

.beam-overlay-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 7px 7px 8px;
  border: 1px solid rgba(110, 207, 255, 0.10);
  border-radius: 10px;
  background: rgba(5, 13, 21, 0.30);
}

.beam-overlay-hint > span {
  color: #8fa4b8;
  font-size: 11.5px;
  line-height: 1.35;
}

.beam-overlay-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.beam-overlay-actions button {
  min-width: 0;
  height: 23px;
  padding: 0 6px;
  border-radius: 7px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  background: rgba(6, 15, 23, 0.55);
  color: #cfe5f8;
  font-size: 11.5px;
  cursor: pointer;
}

.beam-overlay-actions button:hover {
  background: rgba(76, 201, 240, 0.12);
}

.beam-stat-item span.with-overlay-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.beam-stat-item span.with-overlay-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #6ecfff;
  cursor: pointer;
}

.beam-stat-item span em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.beam-stat-section .beam-stat-item {
  grid-template-columns: minmax(0, 102px) minmax(0, 1fr) !important;
}

/* v8.3.17: remove heavy image modal, add inline left/right expand, and correct overlay mapping. */
.beam-view-row.mode-split {
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) !important;
}

.beam-view-row.mode-rawOnly,
.beam-view-row.mode-processedOnly {
  grid-template-columns: minmax(0, 1fr) !important;
}

.beam-view-row .beam-view-card:first-child {
  border-right: 0 !important;
}

.beam-view-divider {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, rgba(77, 114, 143, 0.10), rgba(77, 114, 143, 0.22), rgba(77, 114, 143, 0.10));
  border-left: 1px solid rgba(160, 190, 220, 0.22);
  border-right: 1px solid rgba(160, 190, 220, 0.22);
}

.beam-divider-toggle,
.beam-edge-toggle {
  position: absolute;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(110, 207, 255, 0.18);
  background: rgba(5, 12, 19, 0.58);
  color: #dcecff;
  cursor: pointer;
  backdrop-filter: blur(8px) saturate(1.08);
}

.beam-divider-toggle:hover,
.beam-edge-toggle:hover {
  background: rgba(30, 137, 173, 0.42);
  border-color: rgba(110, 207, 255, 0.36);
}

.beam-divider-toggle.left {
  top: calc(50% - 40px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 9px 9px 2px 2px;
}

.beam-divider-toggle.right {
  top: calc(50% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px 2px 9px 9px;
}

.beam-edge-toggle {
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.82;
}

.beam-edge-toggle.edge-right {
  right: 0;
  border-radius: 9px 0 0 9px;
  border-right: 0;
}

.beam-edge-toggle.edge-left {
  left: 0;
  border-radius: 0 9px 9px 0;
  border-left: 0;
}

.beam-edge-toggle.restore {
  width: 24px;
  height: 42px;
  background: rgba(7, 20, 31, 0.68);
}

.beam-right-head.with-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.beam-overlay-actions.compact {
  margin-top: 6px;
  margin-bottom: 6px;
}

.beam-overlay-actions.compact button {
  height: 24px;
}

.beam-overlay-d4box {
  fill: none;
  stroke: rgba(255, 214, 87, 0.92);
  filter: drop-shadow(0 0 4px rgba(255, 214, 87, 0.30));
}

.beam-overlay-axes line {
  stroke: rgba(255, 233, 74, 0.95);
  filter: drop-shadow(0 0 4px rgba(255, 233, 74, 0.26));
}


/* v8.3.18: simplify expand arrows, restore center divider, improve overlay contrast, align right-panel labels. */
.beam-view-divider {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, rgba(92, 126, 156, 0.08), rgba(92, 126, 156, 0.22), rgba(92, 126, 156, 0.08));
  border-left: 1px solid rgba(160, 190, 220, 0.26);
  border-right: 1px solid rgba(160, 190, 220, 0.26);
}

.beam-divider-toggle {
  display: none !important;
}

.beam-edge-toggle {
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(110, 207, 255, 0.20);
  background: rgba(7, 19, 29, 0.72);
  color: #dcecff;
  opacity: 0.82;
}

.beam-edge-toggle.edge-right {
  right: 0;
  left: auto;
  border-radius: 9px 0 0 9px;
  border-right: 0;
}

.beam-edge-toggle.edge-left {
  left: 0;
  right: auto;
  border-radius: 0 9px 9px 0;
  border-left: 0;
}

.beam-edge-toggle.restore {
  background: rgba(7, 19, 29, 0.72);
}

.beam-overlay-centroid line,
.beam-overlay-centroid circle {
  fill: none;
  stroke: rgba(255, 255, 255, 0.98);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.34));
}

.beam-overlay-d4box {
  fill: none;
  stroke: rgba(87, 169, 255, 0.96);
  filter: drop-shadow(0 0 4px rgba(87, 169, 255, 0.30));
}

.beam-overlay-ellipse {
  fill: none;
  stroke: rgba(87, 169, 255, 0.92);
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 4px rgba(87, 169, 255, 0.24));
}

.beam-overlay-axes line {
  stroke: rgba(98, 255, 162, 0.96);
  filter: drop-shadow(0 0 4px rgba(98, 255, 162, 0.28));
}

.beam-overlay-roi {
  fill: none;
  stroke: rgba(110, 207, 255, 0.86);
  stroke-width: 1.4;
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 3px rgba(110, 207, 255, 0.24));
}

.beam-stat-item span.with-overlay-toggle {
  display: inline-grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.beam-overlay-slot {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.beam-stat-item span.with-overlay-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #6ecfff;
  cursor: pointer;
}

.beam-stat-item span em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

/* v8.3.19: remove center black frame, use thin divider, improve zoom reset and overlay clarity. */
.beam-view-row.mode-split {
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr) !important;
}

.beam-view-divider {
  width: 1px;
  min-width: 1px;
  background: rgba(160, 190, 220, 0.34) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.beam-edge-toggle {
  width: 18px !important;
  height: 42px !important;
  background: rgba(7, 19, 29, 0.76) !important;
}

.beam-overlay-centroid line,
.beam-overlay-centroid circle {
  stroke: rgba(242, 249, 255, 0.98) !important;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.36));
}

.beam-overlay-d4box {
  stroke: rgba(94, 186, 255, 0.98) !important;
  filter: drop-shadow(0 0 4px rgba(94, 186, 255, 0.34));
}

.beam-overlay-ellipse {
  stroke: rgba(165, 220, 255, 0.98) !important;
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 4px rgba(165, 220, 255, 0.28));
}

.beam-overlay-axes line {
  stroke: rgba(96, 241, 255, 0.98) !important;
  filter: drop-shadow(0 0 4px rgba(96, 241, 255, 0.30));
}

.beam-overlay-roi {
  stroke: rgba(110, 207, 255, 0.92) !important;
}

.beam-stat-section h4 {
  padding-left: 20px;
}

/* v8.3.20: fix contain-based zoom and overlay alignment inside viewport. */
.beam-image-viewport {
  display: grid !important;
  place-items: center;
}

.beam-image-stage-shell {
  position: relative;
  flex: 0 0 auto;
  will-change: transform;
}

.beam-image-stage-zoom {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.beam-image-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
}

.beam-image-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill !important;
  user-select: none;
  pointer-events: none;
}

/* v8.3.21: smoother image pan/zoom and clearer cold-color overlays. */
.beam-overlay-centroid line,
.beam-overlay-centroid circle {
  stroke: rgba(246, 252, 255, 0.98) !important;
  filter: none !important;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beam-overlay-d4box {
  stroke: rgba(96, 190, 255, 0.98) !important;
  filter: none !important;
  stroke-linejoin: miter;
}

.beam-overlay-ellipse {
  stroke: rgba(160, 220, 255, 0.98) !important;
  filter: none !important;
}

.beam-overlay-axes line {
  stroke: rgba(188, 128, 255, 0.98) !important;
  filter: none !important;
  stroke-linecap: round;
}

.beam-overlay-roi {
  stroke: rgba(110, 207, 255, 0.92) !important;
  filter: none !important;
}

.beam-image-stage-shell,
.beam-image-stage-zoom,
.beam-analysis-overlay {
  backface-visibility: hidden;
}

/* v8.3.23: single-image static distribution plots in the right analysis panel. */
.beam-insight-section {
  margin-top: 4px;
  padding-top: 4px;
}

.beam-insight-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.beam-insight-head h4 {
  margin-bottom: 0 !important;
}

.beam-insight-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding-left: 20px;
}

.beam-insight-tabs button {
  min-width: 0;
  height: 23px;
  padding: 0 4px;
  border-radius: 7px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  background: rgba(6, 15, 23, 0.48);
  color: #cfe5f8;
  font-size: 11.5px;
  cursor: pointer;
}

.beam-insight-tabs button.selected {
  background: rgba(206, 225, 255, 0.92);
  border-color: rgba(220, 238, 255, 0.72);
  color: #06111a;
  font-weight: 800;
}

.beam-insight-plot-wrap,
.beam-quadrant-plot {
  margin: 7px 0 0 20px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  border-radius: 10px;
  background: rgba(3, 9, 15, 0.34);
  overflow: hidden;
}

.beam-insight-plot {
  display: block;
  width: 100%;
  height: 116px;
}

.beam-insight-plot .axis {
  stroke: rgba(173, 205, 231, 0.34);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.beam-insight-plot .grid {
  stroke: rgba(173, 205, 231, 0.14);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.beam-insight-plot polyline {
  fill: none;
  stroke-width: 1.7;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.beam-insight-plot polyline.primary {
  stroke: rgba(218, 235, 255, 0.96);
}

.beam-insight-plot polyline.secondary {
  stroke: rgba(162, 126, 255, 0.92);
}

.beam-insight-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 7px;
  color: #8fa4b8;
  font-size: 11px;
}

.beam-insight-legend span::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 99px;
  background: rgba(218, 235, 255, 0.96);
}

.beam-insight-legend span.secondary::before {
  background: rgba(162, 126, 255, 0.92);
}

.beam-insight-empty {
  margin: 7px 0 0 20px;
  padding: 18px 10px;
  border: 1px solid rgba(110, 207, 255, 0.10);
  border-radius: 10px;
  background: rgba(3, 9, 15, 0.28);
  color: #8fa4b8;
  text-align: center;
  font-size: 12px;
}

.beam-quadrant-plot {
  padding: 8px;
  display: grid;
  gap: 7px;
}

.beam-quadrant-core {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  color: #8fa4b8;
  font-size: 11.5px;
}

.beam-quadrant-core strong {
  color: #e6f4ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.5px;
  text-align: right;
}

.beam-qbar {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 44px;
  gap: 7px;
  align-items: center;
  color: #9bb0c5;
  font-size: 11.5px;
}

.beam-qbar em {
  height: 7px;
  border-radius: 99px;
  background: rgba(120, 155, 185, 0.15);
  overflow: hidden;
}

.beam-qbar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(110, 207, 255, 0.86), rgba(162, 126, 255, 0.92));
}

.beam-qbar strong {
  color: #e6f4ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11.2px;
  text-align: right;
}

/* v8.3.24: right-panel tabbed analysis and compact overlay preset switch. */
.beam-right {
  overflow: hidden !important;
  gap: 8px !important;
}

.beam-right-head.with-tools {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 154px;
  align-items: center;
  gap: 8px;
  min-height: 26px;
}

.beam-right-titleline {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.beam-right-titleline .beam-help-dot {
  width: 17px;
  height: 17px;
  font-size: 11px;
}

.beam-overlay-switch {
  height: 24px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(110, 207, 255, 0.18);
  border-radius: 9px;
  background: rgba(3, 9, 15, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.beam-overlay-switch button {
  min-width: 0;
  height: 18px;
  padding: 0 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b9d1e7;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.beam-overlay-switch button:hover {
  background: rgba(110, 207, 255, 0.10);
  color: #e7f5ff;
}

.beam-overlay-switch button.selected {
  background: rgba(218, 234, 255, 0.92);
  color: #06111a;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.28) inset;
}

.beam-analysis-tabs {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  padding: 2px 0 1px;
}

.beam-analysis-tabs button {
  min-width: 0;
  height: 26px;
  padding: 0 3px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  border-radius: 8px;
  background: rgba(6, 15, 23, 0.48);
  color: #b8cce1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.beam-analysis-tabs button:hover {
  background: rgba(76, 201, 240, 0.12);
  color: #e4f5ff;
}

.beam-analysis-tabs button.selected {
  background: rgba(206, 225, 255, 0.92);
  border-color: rgba(220, 238, 255, 0.72);
  color: #06111a;
  font-weight: 900;
}

.beam-output-body.right {
  flex: 1 1 auto !important;
  overflow: hidden !important;
}

.beam-stat-sections.compact-mode {
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
}

.beam-stat-sections.compact-mode .beam-stat-section h4 {
  padding-left: 20px;
  margin-bottom: 4px;
}

.beam-stat-sections.compact-mode .beam-stat-grid.compact.right {
  gap: 5px !important;
}

.beam-stat-sections.compact-mode .beam-stat-item {
  min-height: 22px !important;
}

.beam-insight-section.active {
  min-height: 0;
  overflow: hidden;
}

.beam-insight-section.active .beam-insight-plot {
  height: 136px;
}

.beam-insight-section.active .beam-quadrant-plot {
  min-height: 126px;
}

/* v8.3.25: align right-panel overlay preset switch with title, after moving defaults into Settings. */
.beam-right-head.with-tools {
  grid-template-columns: minmax(0, 1fr) 150px !important;
  align-items: center !important;
  min-height: 24px !important;
}

.beam-right-titleline {
  align-items: center !important;
  height: 24px;
}

.beam-right-titleline .beam-help-dot {
  transform: translateY(-1px);
}

.beam-overlay-switch {
  align-self: center !important;
  height: 22px !important;
  margin-top: 0 !important;
}

.beam-overlay-switch button {
  height: 16px !important;
  line-height: 16px !important;
}

.beam-analysis-tabs {
  margin-top: 2px;
}

/* v8.3.26: right header baseline alignment and quality warning panel. */
.beam-right-head.with-tools {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 31px !important;
  height: 31px !important;
  padding: 0 0 7px !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(110, 207, 255, 0.16);
}

.beam-right-titleline {
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  line-height: 24px !important;
}

.beam-right-titleline .beam-analysis-title,
.beam-right-titleline .panel-title {
  line-height: 24px !important;
}

.beam-right-titleline .beam-help-dot {
  transform: none !important;
  margin-top: 0 !important;
  align-self: center !important;
}

.beam-overlay-switch {
  flex: 0 0 150px !important;
  width: 150px !important;
  height: 23px !important;
  align-self: center !important;
  margin: 0 !important;
  transform: none !important;
}

.beam-overlay-switch button {
  height: 17px !important;
  line-height: 17px !important;
}

.beam-analysis-tabs {
  margin-top: 0 !important;
  padding-top: 6px !important;
}

.beam-warning-panel {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  border-radius: 10px;
  background: rgba(5, 13, 21, 0.32);
}

.beam-warning-panel.ok {
  border-color: rgba(120, 210, 180, 0.16);
  background: rgba(6, 20, 20, 0.26);
}

.beam-warning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.beam-warning-head strong {
  color: #ffe94a;
  font-size: 12.3px;
  font-weight: 700;
}

.beam-warning-head span {
  color: #cfe5f8;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.beam-warning-panel p {
  margin: 0;
  color: #8fa4b8;
  font-size: 12px;
  line-height: 1.35;
}

.beam-warning-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.beam-warning-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(9, 20, 31, 0.52);
  border: 1px solid rgba(110, 207, 255, 0.10);
}

.beam-warning-item em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  border-radius: 999px;
  background: rgba(255, 233, 74, 0.13);
  color: #ffe94a;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
}

.beam-warning-item.danger em {
  background: rgba(255, 105, 126, 0.16);
  color: #ff9eaa;
}

.beam-warning-item div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.beam-warning-item strong {
  color: #e4f5ff;
  font-size: 12px;
  font-weight: 700;
}

.beam-warning-item span {
  color: #8fa4b8;
  font-size: 11.5px;
  line-height: 1.32;
}

/* v8.3.27: hard-align the Beam analysis header title, help dot and overlay preset switch. */
.beam-right-head.with-tools {
  position: relative !important;
  display: block !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 0 6px !important;
  margin: 0 0 2px !important;
  border-bottom: 1px solid rgba(110, 207, 255, 0.18) !important;
}

.beam-right-titleline {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  line-height: 24px !important;
}

.beam-right-titleline .beam-analysis-title,
.beam-right-titleline .panel-title {
  display: inline-flex !important;
  align-items: center !important;
  height: 24px !important;
  line-height: 24px !important;
  margin: 0 !important;
}

.beam-right-titleline .beam-help-dot {
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  transform: none !important;
  align-self: center !important;
  line-height: 17px !important;
}

.beam-overlay-switch {
  position: absolute !important;
  right: 0 !important;
  top: 1px !important;
  width: 150px !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 2px !important;
  transform: none !important;
  align-self: auto !important;
}

.beam-overlay-switch button {
  height: 16px !important;
  line-height: 16px !important;
  padding: 0 4px !important;
}

.beam-analysis-tabs {
  margin-top: 0 !important;
  padding-top: 4px !important;
}

/* v8.3.28: static reference comparison controls in the right analysis panel. */
.beam-reference-panel {
  display: grid;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  border-radius: 10px;
  background: rgba(5, 13, 21, 0.30);
}

.beam-reference-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.beam-reference-head > span {
  color: #ffe94a;
  font-size: 12px;
  font-weight: 700;
}

.beam-reference-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.beam-reference-tabs button {
  height: 24px;
  padding: 0 7px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  background: rgba(6, 16, 25, 0.56);
  color: #cfe5f8;
  font-size: 11.5px;
  cursor: pointer;
}

.beam-reference-tabs button.selected {
  color: #06111a;
  background: linear-gradient(180deg, #e7f1ff, #b8d9ff);
  border-color: rgba(220, 238, 255, 0.90);
  font-weight: 800;
}

.beam-reference-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8fa4b8;
  font-size: 11.5px;
}

/* v8.3.29: redesign reference comparison UI with explicit file picker and mean reference. */
.beam-reference-panel.redesigned {
  gap: 8px;
  padding: 8px;
  background: rgba(5, 13, 21, 0.34);
}

.beam-reference-mode-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.beam-reference-mode-row > span,
.beam-reference-file-main > span,
.beam-reference-compare-line > span,
.beam-reference-mean-card > span {
  color: #8fa4b8;
  font-size: 11.5px;
  white-space: nowrap;
}

.beam-reference-tabs.dual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.beam-reference-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 7px 8px;
  padding: 7px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  border-radius: 9px;
  background: rgba(3, 9, 15, 0.36);
}

.beam-reference-file-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.beam-reference-file-main strong,
.beam-reference-compare-line strong,
.beam-reference-mean-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e4f3ff;
  font-size: 12px;
  font-weight: 700;
}

.beam-reference-file-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}

.beam-reference-file-nav em {
  min-width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(110, 207, 255, 0.16);
  border-radius: 7px;
  background: rgba(6, 16, 25, 0.62);
  color: #dcecff;
  font-size: 11px;
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.beam-batch-stepper.compact {
  width: 21px;
  height: 25px;
}

.beam-batch-stepper.compact button {
  height: 12px;
}

.beam-reference-current-button {
  grid-column: 1 / 3;
  height: 24px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  background: rgba(6, 16, 25, 0.56);
  color: #cfe5f8;
  font-size: 11.5px;
  cursor: pointer;
}

.beam-reference-current-button:hover:not(:disabled) {
  border-color: rgba(110, 207, 255, 0.34);
  background: rgba(76, 201, 240, 0.12);
}

.beam-reference-current-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.beam-reference-mean-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px 8px;
  padding: 8px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  border-radius: 9px;
  background: rgba(3, 9, 15, 0.36);
}

.beam-reference-mean-card em {
  grid-column: 1 / 3;
  min-width: 0;
  color: #8fa4b8;
  font-size: 11.5px;
  font-style: normal;
}

.beam-reference-compare-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

/* v8.3.30: clean reference comparison panel. */
.beam-reference-panel.clean {
  gap: 7px;
  padding: 8px 8px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.beam-reference-standard-row,
.beam-reference-current-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.beam-reference-standard-row {
  grid-template-columns: 48px minmax(0, 1fr) auto auto auto;
}

.beam-reference-standard-row > span:first-child,
.beam-reference-current-row > span:first-child {
  color: #8fa4b8;
  font-size: 12px;
  white-space: nowrap;
}

.beam-reference-file-box,
.beam-reference-current-row > strong {
  min-width: 0;
  height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(110, 207, 255, 0.14);
  border-radius: 8px;
  background: rgba(4, 12, 19, 0.48);
  color: #e4f3ff;
  font-size: 12px;
  font-weight: 700;
}

.beam-reference-file-box {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  cursor: pointer;
}

.beam-reference-file-box.selected {
  border-color: rgba(220, 238, 255, 0.62);
  background: linear-gradient(180deg, rgba(232, 243, 255, 0.92), rgba(180, 215, 255, 0.86));
  color: #06111a;
}

.beam-reference-current-row > strong {
  display: flex;
  align-items: center;
  background: rgba(2, 8, 14, 0.30);
  border-color: rgba(110, 207, 255, 0.08);
}

.beam-tail-name {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl;
  text-align: left;
  unicode-bidi: plaintext;
}

.beam-reference-file-nav.compact-clean {
  gap: 4px;
}

.beam-reference-file-nav.compact-clean em {
  min-width: 32px;
  height: 25px;
}

.beam-reference-divider {
  color: rgba(143, 164, 184, 0.62);
  font-size: 13px;
  line-height: 25px;
}

.beam-reference-mean-button {
  height: 25px;
  min-width: 42px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.14);
  background: rgba(6, 16, 25, 0.54);
  color: #cfe5f8;
  font-size: 12px;
  cursor: pointer;
}

.beam-reference-mean-button.selected {
  color: #06111a;
  background: linear-gradient(180deg, #e7f1ff, #b8d9ff);
  border-color: rgba(220, 238, 255, 0.90);
  font-weight: 800;
}

.beam-reference-mean-note {
  margin-left: 54px;
  color: #8fa4b8;
  font-size: 11.5px;
  line-height: 1.25;
}

.beam-reference-rule {
  height: 1px;
  margin-top: 2px;
  background: linear-gradient(90deg, transparent, rgba(110, 207, 255, 0.18), transparent);
}

/* v8.3.31: rewrite reference panel to match left-side file switch UI. */
.beam-reference-panel.clean {
  gap: 8px;
  padding: 6px 4px 4px;
}

.beam-reference-standard-row.redesigned-clean,
.beam-reference-current-row.redesigned-clean {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.beam-reference-label {
  flex: 0 0 44px;
  color: #dcecff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.beam-reference-file-box.left-style,
.beam-reference-file-box.current-only {
  flex: 1 1 auto;
  min-width: 0;
  height: 29px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.beam-reference-file-box.left-style strong,
.beam-reference-file-box.current-only {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-reference-file-box.left-style {
  border: 1px solid rgba(110, 207, 255, 0.22);
  background: rgba(5, 12, 18, 0.78);
  color: #e4f3ff;
}

.beam-reference-file-box.left-style.selected {
  border-color: rgba(220, 238, 255, 0.58);
  background: linear-gradient(180deg, rgba(232, 243, 255, 0.92), rgba(180, 215, 255, 0.86));
  color: #06111a;
}

.beam-reference-file-box.current-only {
  border: 1px solid rgba(110, 207, 255, 0.14);
  background: rgba(4, 12, 19, 0.48);
  color: #e4f3ff;
  font-weight: 400;
}

.beam-reference-navigator {
  flex: 0 0 auto;
  height: 29px;
  padding-right: 3px;
}

.beam-reference-divider {
  flex: 0 0 auto;
  color: rgba(143, 164, 184, 0.62);
  font-size: 13px;
  line-height: 29px;
}

.beam-reference-mean-button {
  flex: 0 0 auto;
  height: 29px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: 8px;
}

.beam-reference-rule {
  margin-top: 0;
}

.beam-tail-name {
  direction: ltr;
  unicode-bidi: normal;
}

/* v8.3.32: compact inline reference selector without boxes except actionable controls. */
.beam-reference-standard-row.redesigned-clean.minimal-clean,
.beam-reference-current-row.redesigned-clean.minimal-clean {
  gap: 4px;
}

.beam-reference-label {
  flex-basis: 42px;
}

.beam-reference-file-inline {
  flex: 1 1 auto;
  min-width: 0;
  color: #e4f3ff;
  font-size: 12px;
  line-height: 29px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-reference-file-inline.current-only {
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  min-height: 29px;
}

.beam-reference-counter {
  flex: 0 0 auto;
  min-width: 28px;
  color: #e4f3ff;
  font-size: 12px;
  line-height: 29px;
  font-style: normal;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}

.beam-reference-stepper {
  flex: 0 0 auto;
  width: 16px;
  height: 26px;
  display: inline-grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.beam-reference-stepper button {
  width: 16px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.beam-reference-stepper button:disabled {
  opacity: 0.32;
  cursor: default;
}

.beam-reference-stepper .beam-batch-triangle.up,
.beam-reference-stepper .beam-batch-triangle.down {
  width: 0;
  height: 0;
}

.beam-reference-stepper .beam-batch-triangle.up {
  border-left-width: 4px;
  border-right-width: 4px;
  border-bottom-width: 5px;
}

.beam-reference-stepper .beam-batch-triangle.down {
  border-left-width: 4px;
  border-right-width: 4px;
  border-top-width: 5px;
}

.beam-reference-divider {
  line-height: 29px;
  margin: 0 1px;
}

.beam-reference-mean-button {
  min-width: 40px;
  padding: 0 8px;
}


/* v8.3.33: remove residual current-file box and align current name with standard name. */
.beam-reference-current-row.redesigned-clean.minimal-clean {
  align-items: center;
}

.beam-reference-current-row.redesigned-clean.minimal-clean > strong,
.beam-reference-file-inline.current-only,
.beam-reference-file-box.current-only {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  height: 29px !important;
  min-height: 29px !important;
  line-height: 29px !important;
  display: block !important;
  align-items: unset !important;
}

.beam-reference-file-inline.current-only {
  flex: 1 1 auto;
  min-width: 0;
  color: #e4f3ff;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.beam-reference-standard-row.redesigned-clean.minimal-clean .beam-reference-file-inline,
.beam-reference-current-row.redesigned-clean.minimal-clean .beam-reference-file-inline {
  margin-left: 0;
}


/* v8.3.39: batch list filter and sort toolbar. */
.beam-batch-filterbar {
  min-height: 34px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid rgba(110, 207, 255, 0.10);
  border-bottom: 1px solid rgba(110, 207, 255, 0.10);
  background: rgba(4, 12, 19, 0.34);
}

.beam-batch-filterbar > em {
  margin-left: auto;
  color: #8fa4b8;
  font-style: normal;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.beam-batch-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.beam-batch-filter-group > span {
  color: #8fa4b8;
  font-size: 12px;
  white-space: nowrap;
}

.beam-batch-filter-group button {
  height: 23px;
  min-width: 48px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid rgba(110, 207, 255, 0.16);
  background: rgba(6, 16, 25, 0.52);
  color: #cfe5f8;
  font-size: 12px;
  cursor: pointer;
}

.beam-batch-filter-group button.selected {
  color: #06111a;
  background: linear-gradient(180deg, #e7f1ff, #b8d9ff);
  border-color: rgba(220, 238, 255, 0.90);
  font-weight: 800;
}


/* v8.3.40: clickable batch overview quick jump cards. */
.beam-batch-overview-strip.clickable {
  grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.beam-batch-overview-strip.clickable button {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  border-radius: 9px;
  background: rgba(4, 12, 19, 0.42);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.beam-batch-overview-strip.clickable button:hover {
  border-color: rgba(110, 207, 255, 0.32);
  background: rgba(30, 137, 173, 0.14);
}

.beam-batch-overview-strip.clickable button span {
  display: block;
  color: #8fa4b8;
  font-size: 11.5px;
}

.beam-batch-overview-strip.clickable button strong {
  display: block;
  margin-top: 3px;
  color: #eaf4ff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* v8.3.42: fix batch list modal grid rows, removing the accidental huge blank middle area. */
.beam-batch-card {
  grid-template-rows: 48px auto auto minmax(0, 1fr) !important;
}

.beam-batch-overview-strip.clickable {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 6px !important;
  padding: 8px 10px !important;
  min-height: 0 !important;
  align-items: stretch !important;
  border-top: 1px solid rgba(110, 207, 255, 0.10);
  border-bottom: 1px solid rgba(110, 207, 255, 0.10);
  background: rgba(4, 12, 19, 0.24);
}

.beam-batch-overview-strip.clickable > div,
.beam-batch-overview-strip.clickable > button {
  min-height: 42px !important;
  height: auto !important;
}

.beam-batch-filterbar {
  min-height: 34px !important;
  flex: 0 0 auto;
}

.beam-batch-table-wrap {
  min-height: 0 !important;
  overflow: auto !important;
}

/* v8.3.43: fixed reference-center ROI analysis controls. */
.beam-roi-lock-note {
  margin: 1px 0 0 46px;
  color: #8fb8d0;
  font-size: 11.5px;
  line-height: 1.35;
}

.beam-roi-lock-note.muted {
  color: #6f8598;
}

/* v8.3.44: normalized shape-difference metrics. */
.beam-reference-assessment .beam-reference-norm-note {
  color: #8fb8d0;
  font-size: 11px;
}

/* v8.3.45: normalized 2D difference map. */
.beam-diff-map-card {
  margin: 8px 0 6px;
  padding: 8px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  border-radius: 10px;
  background: rgba(3, 9, 15, 0.38);
}

.beam-diff-map-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.beam-diff-map-head strong {
  color: #fff45c;
  font-size: 12px;
}

.beam-diff-map-head span,
.beam-diff-map-legend {
  color: #8fa4b8;
  font-size: 11px;
}

.beam-diff-map-card svg {
  width: 100%;
  height: 118px;
  display: block;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #050b10;
}

.beam-diff-map-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
}

/* v8.3.46: batch quicklook maps. */
.beam-batch-quicklook {
  padding: 8px 10px 6px;
  border-bottom: 1px solid rgba(110,207,255,0.08);
  background: rgba(3, 10, 16, 0.20);
}

.beam-batch-quicklook-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.beam-batch-quicklook-head strong {
  color: #fff45c;
  font-size: 13px;
}

.beam-batch-quicklook-head span {
  color: #8fa4b8;
  font-size: 11.5px;
}

.beam-batch-quicklook-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.beam-quicklook-map {
  min-width: 0;
  display: grid;
  grid-template-rows: 16px 86px;
  gap: 3px;
}

.beam-quicklook-map span {
  color: #cfe5f8;
  font-size: 11.5px;
}

.beam-quicklook-map svg {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #050b10;
}

/* v8.3.47: consolidated summary panel. */
.beam-summary-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) minmax(220px, 1.1fr);
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(110,207,255,0.14);
  border-radius: 12px;
  background: rgba(3, 10, 16, 0.42);
}

.beam-summary-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.beam-summary-images div {
  position: relative;
  min-width: 0;
  border-radius: 9px;
  overflow: hidden;
  background: #030609;
  border: 1px solid rgba(255,255,255,0.08);
}

.beam-summary-images span {
  position: absolute;
  top: 5px;
  left: 6px;
  z-index: 2;
  color: #dcecff;
  font-size: 11px;
}

.beam-summary-images img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: block;
}

.beam-summary-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.beam-summary-kpis div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(110,207,255,0.10);
  border-radius: 9px;
  background: rgba(5, 14, 22, 0.52);
}

.beam-summary-kpis span {
  display: block;
  color: #8fa4b8;
  font-size: 11px;
  margin-bottom: 2px;
}

.beam-summary-kpis strong {
  color: #eaf4ff;
  font-size: 13px;
}

.beam-summary-curves {
  min-width: 0;
  min-height: 120px;
}

/* v8.3.48: pull Beam back to single-image analysis and keep batch list compact. */
.beam-batch-card {
  grid-template-rows: 50px 38px minmax(0, 1fr) !important;
}

.beam-batch-overview-strip,
.beam-batch-quicklook {
  display: none !important;
}

.beam-batch-filterbar {
  min-height: 38px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(110, 207, 255, 0.10);
  background: rgba(3, 10, 16, 0.36);
}

.beam-batch-table-wrap {
  min-height: 0;
  overflow: auto;
}

.beam-stat-section h4 {
  color: #fff45c;
}

.beam-stat-grid.compact.right .beam-stat-item {
  grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
}

.beam-summary-panel {
  grid-template-columns: minmax(180px, 0.85fr) minmax(220px, 1fr) minmax(220px, 1.05fr);
}

.beam-reference-panel.clean .beam-reference-rule {
  background: linear-gradient(90deg, transparent, rgba(110, 207, 255, 0.24), transparent);
}

/* v8.3.50: clean up middle-lower single-image parameter deck. */
.beam-workspace {
  grid-template-rows: minmax(0, 1fr) 158px !important;
}

.beam-parameter-deck {
  grid-template-columns: 288px minmax(360px, 1fr) 220px !important;
  grid-template-rows: 24px minmax(0, 1fr) !important;
  gap: 8px 16px !important;
  padding: 9px 12px 10px !important;
  align-items: stretch;
}

.beam-parameter-head {
  grid-column: 1 !important;
  grid-row: 1 !important;
  height: 24px;
  align-self: center;
}

.beam-parameter-controls {
  grid-column: 1 !important;
  grid-row: 2 !important;
  gap: 6px !important;
  align-content: start;
  overflow: hidden !important;
}

.beam-parameter-controls label {
  grid-template-columns: 72px minmax(0, 1fr) 42px !important;
  grid-template-rows: 28px !important;
  gap: 7px !important;
}

.beam-parameter-controls input {
  height: 28px !important;
}

.beam-parameter-options {
  grid-column: 2 !important;
  grid-row: 1 / 3 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: 31px !important;
  gap: 9px 14px !important;
  align-content: center !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.beam-parameter-options .beam-option-row {
  min-height: 31px !important;
  grid-template-columns: 44px minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: center !important;
}

.beam-parameter-options .beam-mini-segment {
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.beam-parameter-options .beam-mini-segment button {
  min-width: 52px !important;
  height: 27px !important;
  padding: 0 8px !important;
}

.beam-parameter-actions {
  grid-column: 3 !important;
  grid-row: 1 / 3 !important;
  align-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
}

.beam-parameter-actions button {
  height: 31px !important;
}

.beam-parameter-note {
  display: none !important;
}

/* v8.3.51: keep four single-image parameter rows clear after adding pixel calibration. */
.beam-workspace {
  grid-template-rows: minmax(0, 1fr) 172px !important;
}

.beam-parameter-deck {
  grid-template-columns: 306px minmax(360px, 1fr) 220px !important;
}

.beam-parameter-controls label {
  grid-template-columns: 72px minmax(0, 1fr) 54px !important;
}

.beam-parameter-controls em {
  overflow: visible !important;
  white-space: nowrap;
}

/* v8.3.52-v8.3.53: single-image stabilization and algorithm sanity-check panel. */
.beam-validation-panel {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(110, 207, 255, 0.14);
  background: rgba(5, 14, 22, 0.52);
}

.beam-validation-panel.ok {
  border-color: rgba(110, 207, 255, 0.18);
  background: rgba(4, 18, 25, 0.50);
}

.beam-validation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.beam-validation-head strong {
  color: #eaf4ff;
  font-size: 12px;
}

.beam-validation-head span {
  color: #8fa4b8;
  font-size: 11px;
}

.beam-validation-panel p {
  margin: 0;
  color: #9fb5c9;
  font-size: 11.5px;
  line-height: 1.45;
}

.beam-validation-list {
  display: grid;
  gap: 6px;
}

.beam-validation-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 6px 7px;
  border-radius: 8px;
  background: rgba(3, 10, 16, 0.42);
}

.beam-validation-item em {
  font-style: normal;
  font-size: 10.5px;
  color: #f4c76b;
}

.beam-validation-item.danger em {
  color: #ff8a9a;
}

.beam-validation-item strong {
  display: block;
  color: #eaf4ff;
  font-size: 11.5px;
  margin-bottom: 2px;
}

.beam-validation-item span {
  display: block;
  color: #8fa4b8;
  font-size: 11px;
  line-height: 1.35;
}

.beam-stat-grid.compact.right .beam-stat-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.beam-output-body.right {
  overflow-x: hidden;
}


/* v8.3.54 single-image freeze cleanup */
.beam-stat-item { min-width: 0; }
.beam-stat-item strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.beam-stat-item em { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.beam-stat-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  color: var(--muted-text, #64748b);
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(248, 250, 252, 0.72);
}
.beam-analysis-tabs { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.beam-stat-grid.compact.right { overflow: hidden; }


/* v8.3.55: simplify right analysis tabs to avoid vertical text wrapping. */
.beam-analysis-tabs {
  grid-template-columns: repeat(7, minmax(26px, 1fr)) !important;
  gap: 3px !important;
  align-items: stretch;
}

.beam-analysis-tabs button {
  height: 25px !important;
  min-width: 0 !important;
  padding: 0 2px !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  writing-mode: horizontal-tb !important;
  line-height: 1 !important;
  letter-spacing: -0.5px;
  font-size: 11px !important;
}

.beam-stat-section h4 {
  word-break: keep-all;
  white-space: nowrap;
}


/* v8.3.56: lift the middle-lower parameter deck so pixel calibration is not clipped. */
.beam-workspace {
  grid-template-rows: minmax(0, 1fr) 192px !important;
}

.beam-parameter-deck {
  grid-template-rows: 24px minmax(0, 1fr) !important;
  padding: 10px 12px 16px !important;
  gap: 8px 16px !important;
  min-height: 192px;
  box-sizing: border-box;
}

.beam-parameter-controls {
  gap: 5px !important;
  overflow: visible !important;
  align-content: start !important;
}

.beam-parameter-controls label {
  grid-template-rows: 27px !important;
  min-height: 27px !important;
}

.beam-parameter-controls input {
  height: 27px !important;
}

.beam-parameter-options {
  align-content: center !important;
  padding-bottom: 4px !important;
}

.beam-parameter-actions {
  align-content: center !important;
  padding-bottom: 4px !important;
}

/* v8.3.60: Beam final cleanup - keep batch lightweight and freeze modal layout. */
.beam-batch-card {
  width: min(1420px, 100%) !important;
  height: min(720px, calc(100vh - 40px)) !important;
  grid-template-rows: 50px 40px minmax(0, 1fr) 34px !important;
}

.beam-batch-filterbar {
  min-height: 40px !important;
  padding: 6px 12px !important;
  overflow: hidden;
}

.beam-batch-filter-group button {
  min-width: 56px;
  white-space: nowrap;
}

.beam-batch-table-wrap {
  padding: 8px 10px 0 !important;
  min-height: 0 !important;
  overflow: auto !important;
}

.beam-batch-table.stable th,
.beam-batch-table.stable td {
  padding: 6px 8px;
}

.beam-batch-table.stable .name button {
  max-width: 360px;
}

.beam-batch-statusbar {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 12px;
  border-top: 1px solid rgba(110, 207, 255, 0.12);
  color: #8fa4b8;
  font-size: 12px;
  background: rgba(4, 12, 19, 0.42);
}

.beam-trend-card {
  width: min(1180px, 100%) !important;
  height: min(690px, calc(100vh - 40px)) !important;
}

.beam-trend-body {
  grid-template-rows: 42px minmax(260px, 1fr) minmax(128px, 0.36fr) !important;
}

.beam-mini-segment.trend button {
  min-width: 70px !important;
}

.beam-batch-overview-strip,
.beam-batch-quicklook {
  display: none !important;
}

/* v8.3.61: processed-view profile projection overlays with distribution checkboxes. */
.beam-overlay-centerlines line {
  stroke: rgba(255, 255, 255, 0.55);
  stroke-linecap: round;
}

.beam-overlay-profile {
  fill: none;
}

.beam-overlay-profile .beam-overlay-profile-guide {
  stroke: rgba(210, 227, 248, 0.24);
}

.beam-overlay-profile-x polyline {
  stroke: rgba(232, 240, 255, 0.96);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beam-overlay-profile-y polyline {
  stroke: rgba(188, 128, 255, 0.98);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.beam-distribution-overlay-card {
  display: grid;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(110, 207, 255, 0.14);
  border-radius: 10px;
  background: rgba(7, 16, 26, 0.54);
  margin-bottom: 10px;
}

.beam-distribution-overlay-head {
  display: grid;
  gap: 3px;
}

.beam-distribution-overlay-head strong {
  color: #ffe45c;
  font-size: 12px;
}

.beam-distribution-overlay-head span {
  color: #90a6b9;
  font-size: 11.5px;
  line-height: 1.35;
}

.beam-distribution-overlay-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.beam-overlay-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  background: rgba(7, 16, 26, 0.36);
  color: #d8e9fa;
  font-size: 12px;
  cursor: pointer;
}

.beam-overlay-check input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #6ecfff;
  cursor: pointer;
}

.beam-overlay-check span {
  white-space: nowrap;
}

/* v8.3.62: overlay style controls + synthetic acceptance tool */
.beam-overlay-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 8px;
}

.beam-overlay-style-grid label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(110, 207, 255, 0.10);
  background: rgba(7, 16, 26, 0.30);
  color: #dcecf8;
  font-size: 12px;
}

.beam-overlay-style-grid label span {
  color: #9fb6c9;
  white-space: nowrap;
}

.beam-overlay-style-grid label input[type="color"] {
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.beam-overlay-style-grid label input[type="range"] {
  width: 100%;
}

.beam-overlay-style-grid label select {
  width: 100%;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(110, 207, 255, 0.18);
  background: rgba(11, 22, 33, 0.76);
  color: #dcecf8;
}

.beam-overlay-style-grid label em {
  color: #8db0c5;
  font-style: normal;
  white-space: nowrap;
}

.beam-overlay-style-check {
  grid-template-columns: auto 1fr;
}

.beam-inline-toggle {
  height: 26px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid rgba(110, 207, 255, 0.18);
  background: rgba(11, 22, 33, 0.82);
  color: #dcecf8;
  cursor: pointer;
}

.beam-inline-toggle.selected {
  background: rgba(110, 207, 255, 0.18);
  border-color: rgba(110, 207, 255, 0.32);
}

.beam-test-card {
  width: min(1040px, calc(100vw - 44px));
  max-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(110, 207, 255, 0.18);
  background: rgba(7, 16, 26, 0.80);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.beam-test-head {
  align-items: flex-start;
}

.beam-test-body {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.beam-test-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.beam-test-case {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  background: rgba(9, 20, 31, 0.64);
  color: #dcecf8;
  cursor: pointer;
}

.beam-test-case strong {
  color: #ffe45c;
  font-size: 13px;
}

.beam-test-case span {
  color: #9fb6c9;
  font-size: 12px;
  line-height: 1.45;
}

.beam-test-case.selected {
  border-color: rgba(110, 207, 255, 0.36);
  background: rgba(15, 35, 53, 0.82);
  box-shadow: inset 0 0 0 1px rgba(110, 207, 255, 0.18);
}

.beam-test-preview-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.beam-test-preview-box {
  min-height: 320px;
  border-radius: 14px;
  border: 1px solid rgba(110, 207, 255, 0.14);
  background: rgba(3, 8, 14, 0.82);
  display: grid;
  place-items: center;
  padding: 12px;
}

.beam-test-preview-box img {
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  image-rendering: auto;
}

.beam-test-meta {
  display: grid;
  gap: 10px;
  align-content: start;
}

.beam-test-meta h4 {
  margin: 0;
  font-size: 18px;
  color: #f4fbff;
}

.beam-test-meta p {
  margin: 0;
  color: #a4b8c9;
  line-height: 1.58;
}

.beam-test-note {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(110, 207, 255, 0.12);
  background: rgba(9, 20, 31, 0.56);
}

.beam-test-note strong {
  color: #ffe45c;
  font-size: 12.5px;
}

.beam-test-note span {
  color: #d7e6f3;
  line-height: 1.55;
  font-size: 13px;
}

@media (max-width: 980px) {
  .beam-overlay-style-grid {
    grid-template-columns: 1fr;
  }

  .beam-test-body {
    grid-template-columns: 1fr;
  }

  .beam-test-list {
    max-height: 240px;
  }
}
.power-page {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.power-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 236px minmax(420px, 1fr) 292px;
  gap: 10px;
}

.power-left,
.power-right {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.power-data-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.power-title-row,
.power-stats-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.power-title-row .panel-title,
.power-stats-title-row .panel-title {
  margin-bottom: 0;
}

.inline-info {
  position: static;
  width: 26px;
  height: 26px;
  min-height: 26px;
  border-radius: 50%;
  padding: 0;
  font-weight: 900;
}

.inline-info:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.power-plot-card {
  min-height: 0;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.power-plot-area {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.power-plot-card .modebar {
  top: 24px !important;
  right: 28px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 2px !important;
}

.power-file-name {
  color: #dcecff;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
  padding: 2px 0 1px;
}

.power-error-text {
  color: #ffb38f;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid rgba(255,112,67,0.24);
  background: rgba(255,112,67,0.08);
  border-radius: 8px;
  padding: 6px 7px;
}

.power-info-popover {
  width: 310px;
  max-height: min(440px, 70vh);
  overflow: auto;
  background: rgba(7, 13, 20, 0.88);
  backdrop-filter: blur(6px);
}

.power-info-button {
  top: 12px;
  left: 14px;
}

.power-info-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
  line-height: 1.35;
}

.power-info-row span {
  color: var(--muted);
}

.power-info-row strong,
.power-info-row b {
  color: #dcecff;
  font-family: Consolas, "Microsoft YaHei UI", "Microsoft YaHei", monospace;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.power-curve-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.power-curve-list.embedded {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px;
}

.power-curve-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(7, 14, 22, 0.62);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.power-curve-card:hover {
  border-color: rgba(76,201,240,0.32);
}

.power-curve-card.selected {
  border-color: rgba(76,201,240,0.78);
  background: rgba(12, 28, 42, 0.72);
  box-shadow: inset 0 0 0 1px rgba(76,201,240,0.18);
}

.power-curve-head {
  display: grid;
  grid-template-columns: 18px 16px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.power-color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  flex: 0 0 auto;
}

.power-curve-name {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 900;
  color: #f1f7ff;
}

.power-curve-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.power-y-row {
  display: grid;
  grid-template-columns: 16px minmax(54px, 1fr) 10px minmax(54px, 1fr) 26px;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}

.power-y-row input {
  min-width: 0;
  padding: 5px 5px;
  font-size: 11px;
  font-family: Consolas, "Microsoft YaHei UI", "Microsoft YaHei", monospace;
}

.power-y-row b {
  font-weight: 400;
  color: var(--muted);
  text-align: center;
}

.power-y-row em {
  min-width: 0;
  color: #bcd4ec;
  font-style: normal;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.power-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.power-stats-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 2px;
}

.power-stats-list.single {
  padding-top: 8px;
}

.power-stat-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(8, 16, 24, 0.64);
  padding: 9px;
}

.active-stat-card {
  border-color: rgba(255,255,255,0.12);
}

.power-stat-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 900;
  color: #f1f7ff;
  margin-bottom: 8px;
}

.power-stat-grid {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 6px 8px;
  align-items: baseline;
  font-size: 12px;
}

.power-stat-grid span {
  color: var(--muted);
}

.power-stat-grid strong {
  font-family: Consolas, "Microsoft YaHei UI", "Microsoft YaHei", monospace;
  text-align: right;
  overflow-wrap: anywhere;
}

.power-window-range {
  color: #cde3f8;
  font-family: Consolas, "Microsoft YaHei UI", "Microsoft YaHei", monospace;
  font-size: 11.5px;
  white-space: nowrap;
}

.power-stat-tabs {
  display: flex;
  gap: 5px;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.power-stat-tabs button {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: #0b1219;
  color: #dcecff;
  min-height: 25px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
}

.power-stat-tabs button.selected {
  background: #dbe7ff;
  color: #17345a;
  border-color: #dbe7ff;
}

.power-stat-tabs button .power-color-dot {
  width: 10px;
  height: 10px;
}

.power-reference-box {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
  font-size: 11px;
}

.power-reference-grid {
  margin-top: 5px;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 4px 7px;
}

.power-reference-grid strong {
  font-family: Consolas, "Microsoft YaHei UI", "Microsoft YaHei", monospace;
  text-align: right;
  color: #cfe7ff;
  overflow-wrap: anywhere;
}

.power-export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.power-export-grid .ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.power-export-grid .ghost-button {
  min-height: 34px;
}

/* v7.0.3 precision, plot spacing and custom timeline refinement */
.power-grid {
  grid-template-columns: 250px minmax(520px, 1fr) 300px;
}
.power-plot-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  background: #050607;
}
.power-plot-main {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.power-plot-area {
  position: absolute;
  inset: 0;
}
.power-plot-card .modebar {
  top: 12px !important;
  right: 20px !important;
  background: transparent !important;
}
.power-info-button {
  top: 10px;
  left: 12px;
  z-index: 8;
}
.power-info-popover {
  top: 42px !important;
  left: 18px !important;
  z-index: 9;
  width: 320px;
  max-height: min(420px, 66vh);
}
.power-file-name,
.power-curve-name,
.power-stat-title {
  font-size: 13px;
}
.power-curve-sub,
.power-info-row,
.power-reference-box {
  font-size: 12px;
}
.power-y-row {
  grid-template-columns: 16px minmax(50px, 1fr) 10px minmax(50px, 1fr) 28px;
  font-size: 12px;
}
.power-y-row input {
  font-size: 12px;
  padding: 5px 5px;
  text-align: center;
}
.power-stat-tabs button {
  font-size: 12.5px;
  min-height: 27px;
}
.power-window-range {
  font-size: 12px;
}
.power-stat-grid {
  grid-template-columns: 92px 1fr;
  font-size: 12.8px;
  gap: 7px 10px;
}
.power-stat-grid strong,
.power-reference-grid strong,
.power-y-row input,
.power-window-range {
  font-variant-numeric: tabular-nums;
}
.power-timeline {
  flex: 0 0 96px;
  display: grid;
  grid-template-rows: 18px 1fr;
  gap: 4px;
  padding: 0 56px 12px 92px;
  background: #050607;
}
.power-timeline-title {
  color: #eaf4ff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 18px;
}
.power-timeline-track {
  position: relative;
  min-height: 58px;
  border: 1px solid rgba(238,246,255,0.44);
  background: #0b1118;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.power-timeline-track::before,
.power-timeline-track::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.power-timeline-track::before {
  background: repeating-linear-gradient(
    to right,
    rgba(255,255,255,0.12) 0,
    rgba(255,255,255,0.12) 1px,
    transparent 1px,
    transparent 10%
  );
}
.power-timeline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.power-timeline-svg line {
  stroke: rgba(255,255,255,0.16);
  stroke-width: 0.25;
  vector-effect: non-scaling-stroke;
}
.power-timeline-svg polyline {
  fill: none;
  stroke-width: 1.4;
  opacity: 0.88;
  vector-effect: non-scaling-stroke;
}
.power-timeline-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 14px;
  background: rgba(194, 224, 255, 0.24);
  border-left: 1px solid rgba(255,255,255,0.92);
  border-right: 1px solid rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 1px rgba(76,201,240,0.18), 0 0 0 9999px rgba(0,0,0,0.30);
  cursor: grab;
}
.power-timeline-selection:active {
  cursor: grabbing;
}
.power-timeline-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  z-index: 3;
}
.power-timeline-handle.left { left: -9px; }
.power-timeline-handle.right { right: -9px; }
.power-timeline-handle::before,
.power-timeline-handle::after,
.power-timeline-handle span {
  content: '';
  display: block;
  background: #f8fbff;
  box-shadow: 0 0 6px rgba(255,255,255,0.35);
}
.power-timeline-handle::before,
.power-timeline-handle::after {
  width: 4px;
  height: 33.3%;
}
.power-timeline-handle span {
  width: 12px;
  height: 33.4%;
  border-radius: 2px;
}

/* v7.0.4: restore crisp typography, clean plot annotation, wider metadata popover and grouped stats */
.power-page,
.power-page button,
.power-page input,
.power-page select,
.power-page textarea {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.power-curve-name,
.power-stat-title,
.power-stat-tabs button,
.power-timeline-title,
.power-info-row strong,
.power-info-row b,
.power-stat-grid strong,
.power-reference-grid strong {
  font-weight: 400 !important;
}

.power-curve-name {
  font-size: 13.5px;
  color: #f2f8ff;
}

.power-curve-sub {
  font-size: 12.5px;
}

.power-y-row,
.power-y-row input {
  font-size: 12.5px;
}

.power-axis-header {
  position: absolute;
  z-index: 7;
  top: 34px;
  left: 74px;
  min-width: 44px;
  color: #bfe7ff;
  font-size: 12.5px;
  line-height: 1;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

.power-info-popover {
  width: min(760px, calc(100vw - 560px)) !important;
  max-width: 760px;
  max-height: none !important;
  overflow: visible !important;
  padding: 14px 16px;
  background: rgba(7, 13, 20, 0.90);
  backdrop-filter: blur(8px);
}

.power-info-popover > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 13.5px;
  font-weight: 500;
}

.power-info-row {
  grid-template-columns: 104px minmax(260px, 1fr);
  gap: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: nowrap;
}

.power-info-row span {
  color: #9fb1c4;
}

.power-info-row strong,
.power-info-row b {
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
  font-family: "Segoe UI", system-ui, "Microsoft YaHei UI", sans-serif;
  color: #e4f2ff;
}

.power-stat-card {
  padding: 11px 10px;
}

.power-stat-title {
  font-size: 14px;
  margin-bottom: 9px;
  color: #eef7ff;
}

.power-stat-groups {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.power-stat-group {
  position: relative;
  padding: 8px 0 7px;
}

.power-stat-group:not(.first)::before,
.power-reference-box::before {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  top: 0;
  height: 1px;
  background: rgba(180, 210, 236, 0.18);
}

.power-stat-grid {
  grid-template-columns: 92px minmax(0, 1fr);
  font-size: 13.4px;
  gap: 8px 11px;
}

.power-stat-grid span {
  color: #a8bacb;
}

.power-stat-grid strong {
  color: #e8f4ff;
  font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-size: 13.4px;
  line-height: 1.2;
}

.power-reference-box {
  position: relative;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 0;
  color: #7f92a6;
  font-size: 12px;
}

.power-reference-grid {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 5px 8px;
  opacity: 0.68;
}

.power-reference-grid span {
  color: #77899c;
}

.power-reference-grid strong {
  color: #a9bfd4;
  font-size: 12.2px;
}

.power-stats-title-row .panel-title {
  font-weight: 500;
}

.power-window-range {
  font-size: 12.5px;
  font-weight: 400;
}

.power-stat-tabs button {
  font-size: 13px;
  min-height: 28px;
  padding: 3px 9px;
}

.power-plot-card .modebar {
  top: 12px !important;
}

/* v7.0.5: alignment, readable regular-weight typography and power setting refinements */
.power-page,
.power-page * {
  font-weight: 400 !important;
}
.power-page .panel-title,
.power-page .settings-section-title {
  font-weight: 500 !important;
}
.power-curve-head input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.power-curve-head {
  grid-template-columns: 20px 16px minmax(0, 1fr);
}
.power-curve-name {
  font-size: 14px;
}
.power-curve-sub,
.power-y-row,
.power-y-row input {
  font-size: 13px;
}
.power-stat-title {
  font-size: 14.5px;
}
.power-stat-grid,
.power-stat-grid strong {
  font-size: 13.8px;
}
.power-stat-tabs button {
  font-size: 13.2px;
}
.power-stat-group:not(.first)::before,
.power-reference-box::before {
  left: 0;
  right: 0;
}
.power-reference-box {
  color: #73869a;
}
.power-reference-grid {
  opacity: 0.55;
}
.power-reference-grid strong {
  color: #95aabe;
}
.power-axis-header {
  top: 44px;
  left: 102px;
  padding: 1px 5px;
  border-radius: 4px;
  color: #d9f2ff;
  background: rgba(5, 8, 12, 0.48);
  font-size: 13px;
  z-index: 8;
}
.power-timeline {
  flex: 0 0 76px;
  display: block;
  padding: 0 18px 10px 102px;
  background: #050607;
}
.power-timeline-title {
  display: none !important;
}
.power-timeline-track {
  height: 56px;
  min-height: 56px;
}
.power-info-popover {
  left: 76px !important;
  width: min(760px, calc(100vw - 620px)) !important;
}

/* v7.0.6: stable fixed plot/timeline layout, metadata spacing, unit label and gentler inactive curves */
.power-plot-card {
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) 68px !important;
  gap: 8px !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: #050607 !important;
}

.power-plot-main {
  position: relative !important;
  min-height: 0 !important;
  overflow: visible !important;
  grid-row: 1 !important;
}

.power-plot-area {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.power-timeline {
  grid-row: 2 !important;
  height: 68px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  padding: 0 18px 10px 102px !important;
  margin: 0 !important;
  background: #050607 !important;
  box-sizing: border-box !important;
}

.power-timeline-track {
  height: 58px !important;
  min-height: 58px !important;
  max-height: 58px !important;
}

.power-info-button {
  top: 10px !important;
  left: 12px !important;
  z-index: 20 !important;
}

.power-info-popover {
  top: 50px !important;
  left: 118px !important;
  z-index: 30 !important;
  width: min(760px, calc(100vw - 690px)) !important;
  min-width: 620px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 14px 18px !important;
}

.power-info-row {
  grid-template-columns: 108px minmax(340px, 1fr) !important;
  column-gap: 16px !important;
}

.power-axis-header {
  display: block !important;
  z-index: 50 !important;
  top: 40px !important;
  left: 102px !important;
  min-width: 28px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  background: rgba(5, 8, 12, 0.70) !important;
  color: #e4f8ff !important;
  font-size: 13px !important;
  line-height: 1.05 !important;
  font-weight: 400 !important;
  pointer-events: none !important;
}

/* v7.0.7: compact metadata popover, exact time window inputs and unit label fix */
.power-info-popover {
  top: 42px !important;
  left: 44px !important;
  width: max-content !important;
  min-width: 0 !important;
  max-width: min(780px, calc(100% - 58px)) !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 13px 16px 14px !important;
  box-sizing: border-box !important;
}

.power-info-popover > strong {
  margin-bottom: 9px !important;
}

.power-info-row {
  display: grid !important;
  grid-template-columns: max-content max-content !important;
  column-gap: 38px !important;
  align-items: baseline !important;
  width: max-content !important;
  max-width: 100% !important;
  font-size: 12.5px !important;
  line-height: 1.52 !important;
  white-space: nowrap !important;
}

.power-info-row span {
  min-width: 0 !important;
  color: #a7b9ca !important;
}

.power-info-row strong,
.power-info-row b {
  min-width: 0 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  color: #edf7ff !important;
  font-weight: 400 !important;
}

.power-time-window-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 10px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 5px;
  color: #b7c9dc;
  font-size: 12.5px;
  line-height: 1.25;
  padding: 1px 0 2px;
}

.power-time-window-row input {
  min-width: 0;
  height: 28px;
  padding: 4px 6px;
  text-align: center;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.power-time-window-row b,
.power-time-window-row em {
  color: #9eb2c6;
  font-style: normal;
  font-weight: 400;
  text-align: center;
}

.power-axis-header {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  top: 40px !important;
  left: 102px !important;
  min-width: 26px !important;
  color: #e4f8ff !important;
  background: rgba(5, 8, 12, 0.76) !important;
  border: 1px solid rgba(120, 204, 240, 0.18) !important;
}


/* v7.0.8: final power unit label and compact metadata popover adjustment */
.power-info-popover {
  top: 42px !important;
  left: 42px !important;
  width: fit-content !important;
  min-width: 0 !important;
  max-width: min(720px, calc(100% - 58px)) !important;
  padding: 13px 16px 14px !important;
}

.power-info-row {
  display: grid !important;
  grid-template-columns: max-content minmax(max-content, 1fr) !important;
  column-gap: 48px !important;
  width: fit-content !important;
  max-width: 100% !important;
  white-space: nowrap !important;
}

.power-info-row span {
  text-align: left !important;
}

.power-info-row b,
.power-info-row strong {
  text-align: left !important;
  font-weight: 400 !important;
}

.power-axis-header {
  position: absolute !important;
  top: 41px !important;
  left: 102px !important;
  z-index: 200 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 26px !important;
  min-height: 18px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(120, 204, 240, 0.22) !important;
  background: rgba(5, 8, 12, 0.82) !important;
  color: #e4f8ff !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  pointer-events: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* v7.0.9: use Plotly annotation for Y-axis unit so camera export includes it, and keep raw W range inputs editable */
.power-axis-header {
  display: none !important;
}
.power-y-row input[type="text"] {
  font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

/* v7.1.0: simple StarLab batch analysis panel */
.hidden-file-input {
  display: none !important;
}

.power-actions.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.power-actions.three .ghost-button,
.power-actions.three .primary-button {
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.power-right.has-batch .power-stats-list.single {
  flex: 0 0 auto;
  max-height: 43%;
}

.power-batch-panel {
  flex: 1 1 auto;
  min-height: 210px;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.power-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.power-batch-tabs {
  display: flex;
  gap: 5px;
}

.power-batch-tabs button,
.power-batch-close {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(7, 14, 22, 0.72);
  color: #dcecff;
  border-radius: 7px;
  min-height: 26px;
  padding: 4px 9px;
  font-size: 12.5px;
  cursor: pointer;
}

.power-batch-tabs button.selected {
  background: #dbe7ff;
  color: #17345a;
  border-color: #dbe7ff;
}

.power-batch-close {
  width: 28px;
  padding: 0;
  color: #b7c8d9;
}

.power-batch-note {
  color: #9fb2c5;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.power-batch-list-wrap,
.power-batch-trend-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.power-batch-export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.power-batch-export-row .ghost-button {
  min-height: 30px;
}

.power-batch-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.power-batch-file {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  background: rgba(7, 14, 22, 0.62);
  padding: 8px;
  cursor: default;
}

.power-batch-file:hover {
  border-color: rgba(76,201,240,0.32);
}

.power-batch-file.warning {
  border-color: rgba(255, 93, 93, 0.55);
  background: rgba(38, 12, 16, 0.48);
}

.power-batch-file.error {
  border-color: rgba(255, 93, 93, 0.72);
}

.power-batch-file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.power-batch-file-head span {
  color: #f1f7ff;
  font-size: 12.8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.power-batch-file-head em {
  color: #9fb2c5;
  font-size: 11.5px;
  font-style: normal;
  white-space: nowrap;
}

.power-batch-file.warning .power-batch-file-head span {
  color: #ffb6b6;
}

.power-batch-curve {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px 8px;
  padding: 5px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11.8px;
}

.power-batch-curve span {
  min-width: 0;
  color: #cbddeb;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.power-batch-curve b {
  color: #eaf6ff;
  font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.power-batch-curve small {
  grid-column: 1 / -1;
  color: #8297ab;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.power-batch-error {
  color: #ffb6a6;
  font-size: 11.5px;
  line-height: 1.35;
}

.power-batch-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.power-batch-controls label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  color: #a8bacb;
  font-size: 11.5px;
}

.power-batch-controls select {
  min-width: 0;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(122,161,200,0.25);
  background: #071019;
  color: #eaf4ff;
  font-size: 12px;
  padding: 3px 6px;
}

.power-batch-trend {
  flex: 1;
  min-height: 150px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  background: #050607;
}

/* v7.1.1: batch analysis modal and non-invasive batch controls */
.power-batch-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(76,201,240,0.18);
  border-radius: 8px;
  background: rgba(12, 28, 42, 0.42);
  color: #bcd4ec;
  font-size: 12px;
}
.power-batch-quick-row button {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(76,201,240,0.28);
  background: rgba(9, 18, 28, 0.86);
  color: #e7f5ff;
  cursor: pointer;
}
.power-right {
  overflow: hidden !important;
}
.power-batch-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(2px);
}
.power-batch-modal {
  width: min(1060px, calc(100% - 44px));
  height: min(720px, calc(100% - 44px));
  min-height: 460px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(76,201,240,0.42);
  border-radius: 14px;
  background: rgba(8, 15, 23, 0.96);
  box-shadow: 0 18px 60px rgba(0,0,0,0.46);
  overflow: hidden;
}
.power-batch-modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.power-batch-modal-title {
  color: var(--accent-2);
  font-size: 16px;
  line-height: 1.2;
}
.power-batch-modal-note {
  margin-top: 4px;
  color: #9fb1c4;
  font-size: 12px;
}
.power-batch-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.power-batch-modal-actions .ghost-button {
  min-height: 30px;
  padding: 4px 12px;
}
.power-batch-modal-actions .power-batch-hide {
  color: #c9d9e8;
}
.power-batch-modal-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 16px 0;
}
.power-batch-modal-tabs button {
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  background: rgba(9, 18, 28, 0.82);
  color: #dcecff;
  min-height: 30px;
  padding: 4px 16px;
  cursor: pointer;
}
.power-batch-modal-tabs button.selected {
  background: #dbe7ff;
  color: #17345a;
  border-color: #dbe7ff;
}
.power-batch-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 16px 16px;
  overflow: hidden;
}
.power-batch-modal-body.trend {
  gap: 10px;
}
.power-batch-table-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #9fb1c4;
  font-size: 12px;
}
.power-batch-table-toolbar label,
.power-batch-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b7c9dc;
  font-size: 12px;
}
.power-batch-table-toolbar select,
.power-batch-controls select {
  min-height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.16);
  background: #07111a;
  color: #e7f5ff;
  padding: 3px 8px;
}
.power-batch-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  background: rgba(3, 7, 11, 0.74);
}
.power-batch-table {
  width: 100%;
  border-collapse: collapse;
  color: #dfefff;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.power-batch-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0b1722;
  color: #f0f8ff;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  white-space: nowrap;
}
.power-batch-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.045);
  white-space: nowrap;
}
.power-batch-table tr:hover td {
  background: rgba(76,201,240,0.07);
}
.power-batch-table tr.batch-group-start td {
  border-top: 1px solid rgba(160,190,215,0.18);
}
.power-batch-table td.file-cell {
  color: #dcecff;
  min-width: 140px;
}
.power-batch-table .warning-file {
  color: #ff6f6f !important;
}
.power-batch-table .batch-error-row td {
  color: #ffb38f;
}
.power-batch-table .muted-cell,
.power-batch-empty-cell {
  color: #90a5b9;
}
.batch-channel-pill {
  display: inline-flex;
  min-width: 20px;
  justify-content: center;
  margin-right: 6px;
  border-radius: 5px;
  border: 1px solid rgba(76,201,240,0.22);
  color: #dff5ff;
  background: rgba(76,201,240,0.08);
  font-size: 11px;
}
.power-batch-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}
.power-batch-trend.modal-trend {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  background: #050607;
  overflow: hidden;
}

/* v7.1.2: persistent right-bottom batch operation dock */
.power-batch-dock {
  flex: 0 0 auto;
  border: 1px solid rgba(76, 201, 240, 0.18);
  border-radius: 11px;
  background: rgba(7, 15, 23, 0.72);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.power-batch-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--accent-2);
  font-size: 13px;
}
.power-batch-dock-head em {
  color: #bcd4ec;
  font-style: normal;
  font-size: 12px;
}
.power-batch-dock-status {
  color: #8ea5bb;
  font-size: 11.5px;
  min-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.power-batch-dock-actions,
.power-batch-dock-exports {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.power-batch-dock .ghost-button {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
}
.power-batch-dock .ghost-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
/* Keep the batch result window away from the right statistics column. */
.power-batch-modal-backdrop {
  left: 246px;
  right: 306px;
  top: 18px;
  bottom: 18px;
  inset: 18px 306px 18px 246px;
  background: rgba(0, 0, 0, 0.22);
  pointer-events: none;
}
.power-batch-modal {
  pointer-events: auto;
  width: min(1040px, 100%);
  height: min(700px, 100%);
}
/* v7.1.2: the old left quick row is no longer used. */
.power-batch-quick-row {
  display: none !important;
}

/* v7.1.3: batch dock/menu, modal filters, compact right panel and time reset */
.power-stats-list.single {
  flex: 0 0 auto !important;
  max-height: min(560px, 62%) !important;
}

.power-batch-dock {
  margin-top: 8px !important;
  gap: 8px !important;
}

.power-batch-dock-head {
  align-items: baseline !important;
}

.power-batch-dock-head em {
  font-size: 11.8px !important;
  color: #a9bed4 !important;
  text-align: right;
  white-space: nowrap;
}

.power-batch-dock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 30px 30px;
  gap: 7px;
}

.power-batch-dock-grid .ghost-button {
  min-height: 30px;
  padding: 3px 6px;
  font-size: 12px;
}

.power-batch-dock-grid .ghost-button.selected {
  background: #dbe7ff;
  color: #17345a;
  border-color: #dbe7ff;
}

.power-batch-dock-grid .ghost-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.power-batch-dock-status,
.power-batch-dock-actions,
.power-batch-dock-exports {
  display: none !important;
}

.power-batch-modal-head {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) max-content !important;
  align-items: center !important;
  gap: 16px !important;
  padding: 14px 16px 10px !important;
}

.power-batch-modal-title {
  white-space: nowrap;
}

.power-batch-modal-status {
  color: #a9bed4;
  font-size: 12px;
  text-align: right;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.power-batch-modal-toolbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 16px 0;
}

.power-batch-modal-toolbar .power-batch-modal-tabs {
  padding: 0 !important;
}

.power-batch-modal-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.power-batch-modal-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b7c9dc;
  font-size: 12px;
  white-space: nowrap;
}

.power-batch-modal-filters select {
  min-height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.16);
  background: #07111a;
  color: #e7f5ff;
  padding: 3px 8px;
}

.power-batch-modal-body {
  padding-top: 10px !important;
}

.power-batch-modal-body.trend {
  gap: 0 !important;
}

.power-batch-trend.modal-trend {
  min-height: 0 !important;
}

.power-time-window-row {
  grid-template-columns: max-content minmax(0, 1fr) 10px minmax(0, 1fr) max-content max-content !important;
}

.power-time-reset {
  height: 28px;
  min-width: 42px;
  padding: 3px 8px;
  border-radius: 7px;
  border: 1px solid rgba(76,201,240,0.22);
  background: rgba(9, 18, 28, 0.82);
  color: #dcecff;
  cursor: pointer;
  font-size: 12px;
}

.power-time-reset:hover {
  border-color: rgba(76,201,240,0.44);
  color: #ffffff;
}

/* v7.1.4: batch dock activation is a display/menu state, not a load state. */
.power-batch-dock {
  margin-top: 8px !important;
  flex: 0 0 auto !important;
}

.power-batch-dock.inactive {
  opacity: 0.72;
  filter: grayscale(0.18);
}

.power-batch-dock-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  grid-template-rows: 30px 30px !important;
  gap: 7px !important;
}

.power-batch-dock-grid .ghost-button,
.power-batch-dock-grid .batch-toggle-button {
  min-height: 30px;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(135, 168, 198, 0.22);
  background: rgba(8, 17, 28, 0.86);
  color: #dcecff;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
}

.power-batch-dock-grid .batch-toggle-button.selected,
.power-batch-dock-grid .ghost-button.selected {
  background: #dbe7ff;
  color: #123252;
  border-color: #dbe7ff;
}

.power-batch-dock-grid .ghost-button:disabled,
.power-batch-dock-grid .batch-toggle-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.power-batch-dock.inactive .power-batch-dock-grid .ghost-button:not(.selected) {
  opacity: 0.38;
}

.power-batch-dock-head em {
  font-size: 11.8px !important;
  color: #a9bed4 !important;
  text-align: right;
  white-space: nowrap;
}

.power-batch-modal-x {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(135, 168, 198, 0.22);
  background: rgba(8, 17, 28, 0.86);
  color: #dcecff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.power-batch-modal-x:hover {
  border-color: rgba(76, 201, 240, 0.5);
  color: #ffffff;
}

.power-batch-modal-body.list {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.power-batch-modal-body.list .power-batch-table-wrap {
  display: block !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  overflow: auto !important;
}

.power-batch-modal-body.list .power-batch-trend,
.power-batch-modal-body.list .js-plotly-plot,
.power-batch-modal-body.list .plot-container {
  display: none !important;
}

.power-batch-modal-body.trend {
  display: flex !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.power-batch-modal-body.trend .power-batch-trend.modal-trend {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 420px !important;
}

.batch-file-cell-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
  line-height: 1.25;
}
.batch-file-cell-content > span {
  white-space: nowrap;
}
.batch-file-cell-content > em {
  color: rgba(255, 177, 130, 0.92);
  font-style: normal;
  font-size: 11.5px;
  white-space: normal;
  max-width: 280px;
}
.power-batch-table .warning-file .batch-file-cell-content > em {
  color: #ffb07a;
}
:root {
  --bg: #070b10;
  --panel: #111820;
  --panel-2: #17202b;
  --line: #293747;
  --plot-border: #334253;
  --text: #eef3f8;
  --muted: #91a0b2;
  --accent: #4cc9f0;
  --accent-2: #ffe66d;
  --danger: #ff5d73;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: 0.45; }

.app-shell {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  display: flex;
  background: radial-gradient(circle at top left, #152232, #070b10 46%);
  overflow: hidden;
}

.workspace { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 110px;
  min-width: 110px;
  padding: 10px 8px;
  border-right: 1px solid var(--line);
  background: rgba(8, 12, 17, 0.92);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.sidebar-brand {
  padding: 4px 4px 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.sidebar-brand-main { font-size: 22px; line-height: 1; font-weight: 900; color: var(--accent-2); letter-spacing: 0.07em; }
.sidebar-brand-sub { margin-top: 4px; font-size: 9.5px; line-height: 1; color: #c6d6e8; white-space: nowrap; letter-spacing: -0.04em; transform: scaleX(0.88); transform-origin: left center; }
.side-nav { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.side-tab {
  border: 1px solid #39485a;
  background: #17212b;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.side-tab.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(76, 201, 240, 0.35), 0 0 0 1px rgba(76, 201, 240, 0.12); background: #12314a; }
.side-tab-label { display: block; font-weight: 800; font-size: 14px; }
.sidebar-actions { margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.side-action { width: 100%; padding: 7px 6px; font-size: 12px; }

.github-link {
  width: 36px;
  height: 36px;
  margin: 4px auto 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #111b24;
  color: #dbe7f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.github-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #122436;
  transform: translateY(-1px);
}
.github-icon { width: 20px; height: 20px; display: block; }

.main-panel { flex: 1; min-width: 0; min-height: 0; overflow: hidden; padding: 10px; }
.embed-shell .main-panel { padding: 10px; }
.panel {
  background: rgba(17, 24, 32, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.22);
  min-height: 0;
}
.panel-title { font-weight: 900; color: var(--accent-2); margin-bottom: 10px; letter-spacing: 0.03em; }
.primary-button, .ghost-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
}
.primary-button { background: #168aad; border-color: #4cc9f0; color: white; font-weight: 800; }
.ghost-button { background: #111b24; color: var(--text); }
.ghost-button:hover, .primary-button:hover { filter: brightness(1.15); }
.ghost-button.small { padding: 5px 9px; font-size: 12px; min-height: 28px; }
.ghost-button.selected { border-color: var(--accent); color: var(--accent); }
.full { width: 100%; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.button-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.button-stack { display: flex; flex-direction: column; gap: 8px; }
.spaced { margin-bottom: 10px; }
input, select, textarea { background: #081018; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px; }
textarea { width: 100%; min-height: 0; flex: 1; resize: none; font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; }
.hint, .empty-note { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 10px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; }
.full-height { height: 100%; }
.simple-page { height: 100%; min-height: 0; overflow: hidden; }
.page-panel { height: 100%; display: flex; flex-direction: column; overflow: auto; }
.json-preview { background: #071018; color: #d7e8f7; border: 1px solid var(--line); border-radius: 10px; padding: 12px; flex: 1; min-height: 0; overflow: auto; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.settings-modal {
  width: min(620px, 92vw);
  max-height: 88vh;
  background: #101820;
  border: 1px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.settings-header, .settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.settings-footer { border-top: 1px solid var(--line); border-bottom: 0; }
.settings-body {
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  overflow: auto;
}
.settings-section-title { grid-column: 1 / -1; color: var(--accent-2); font-weight: 900; margin-top: 4px; }
.settings-body label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.inline-setting { grid-column: 1 / -1; flex-direction: row !important; align-items: center; color: var(--text) !important; }

.settings-modal-wide { width: min(760px, 94vw); height: min(620px, 88vh); }
.settings-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 116px 1fr; }
.settings-nav { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.settings-nav button { background: #111b24; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: left; cursor: pointer; }
.settings-nav button.selected { border-color: var(--accent); color: var(--accent); background: #122436; }
.tabbed-settings-body { grid-template-columns: 1fr 1fr; align-content: start; }
.settings-about { grid-column: 1 / -1; color: #c9d7e7; line-height: 1.7; }

/* v0.1.x logo refinement */
.sidebar-brand {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  column-gap: 6px;
  padding: 5px 2px 10px;
}
.sidebar-logo { width: 28px; height: 28px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(76,201,240,0.25)); }
.sidebar-brand-main { font-size: 20px; letter-spacing: 0.04em; }
.sidebar-brand-sub { font-size: 8.7px; transform: none; letter-spacing: -0.06em; width: 64px; overflow: hidden; }

/* v0.1.x brand layout refinement */
.sidebar-brand {
  display: grid !important;
  grid-template-columns: 30px 1fr;
  grid-template-rows: 24px 14px;
  align-items: center;
  column-gap: 6px;
  row-gap: 0;
  padding: 6px 0 12px;
}
.sidebar-logo { grid-column: 1; grid-row: 1; width: 26px; height: 26px; }
.sidebar-brand-text { display: contents; }
.sidebar-brand-main { grid-column: 2; grid-row: 1; font-size: 21px; line-height: 1; letter-spacing: 0.04em; }
.sidebar-brand-sub {
  grid-column: 1 / 3;
  grid-row: 2;
  margin-top: 1px;
  width: 100%;
  font-size: 9.2px;
  line-height: 1;
  letter-spacing: -0.055em;
  transform: scaleX(1.02);
  transform-origin: left center;
  color: #d8e8f7;
  overflow: hidden;
  white-space: nowrap;
}


/* v0.1.x compact fixes */
.sidebar-brand-sub {
  font-size: 10.7px !important;
  line-height: 1.02 !important;
  letter-spacing: -0.075em !important;
  transform: scaleX(1.0) !important;
  color: #eef6ff !important;
}
.compact-view-title .panel-title {
  margin-bottom: 0 !important;
  line-height: 26px;
}
.compact-view-title .export-inline {
  align-self: center !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.compact-cursor div:not(.cursor-empty) {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}
.compact-cursor strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.plot-card .modebar,
.plot-card .modebar-container,
.plot-card .modebar-group,
.plot-card .modebar-btn,
.plot-card .modebar-btn[data-title]:hover:after,
.plot-card .modebar-btn[data-title]:hover:before {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.batch-table-wrap {
  overflow: auto;
}
.batch-table {
  min-width: 520px;
}
.batch-table .filename-cell {
  max-width: 115px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-table th,
.hub-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* v0.1.x final brand and plot toolbar overrides */
.sidebar-brand-sub {
  font-size: 12px !important;
  line-height: 1.05 !important;
  letter-spacing: -0.055em !important;
  transform: scaleX(1.04) !important;
  color: #f2f7ff !important;
}
.plot-card .modebar,
.plot-card .modebar-container,
.plot-card .modebar-group,
.plot-card .modebar-btn {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.plot-card .modebar-group { display: inline-block !important; }
.plot-card .modebar-btn { display: inline-flex !important; align-items: center; justify-content: center; }


/* v7.0.1 sidebar footer and font refinement */
.sidebar-footer-row {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 6px;
}
.sidebar-footer-row .github-link {
  margin: 0;
  justify-self: start;
}
.app-version {
  justify-self: end;
  color: #9fb1c4;
  font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  font-size: 10.5px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 7px;
  padding: 4px 5px;
  background: rgba(9, 16, 23, 0.72);
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button, input, select, textarea {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
.plot-card {
  background: #050607;
}
.plot-area {
  position: absolute;
  inset: 0;
}


/* v7.0.2 footer flatten and Plotly container refinement */
.sidebar-footer-row {
  grid-template-columns: 30px 1fr;
  gap: 4px;
}
.sidebar-footer-row .github-link,
.github-link {
  width: 28px;
  height: 28px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.github-link:hover {
  background: transparent !important;
  transform: none !important;
}
.github-icon { width: 19px; height: 19px; }
.app-version {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  color: #9fb1c4;
}

/* v7.0.2 module keep-alive panes: preserve module data while switching */
.main-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.module-pane {
  position: absolute;
  inset: 10px;
  min-width: 0;
  min-height: 0;
  display: none;
  overflow: hidden;
}
.module-pane.active {
  display: block;
}

/* v7.0.5 global typography cleanup. Keep logo bold, keep normal UI crisp. */
.panel-title,
.primary-button,
.ghost-button,
.side-tab-label,
.settings-section-title,
button,
input,
select,
textarea {
  font-weight: 400 !important;
}
.sidebar-brand-main {
  font-weight: 900 !important;
}

/* v7.0.6: center version text within remaining sidebar footer space */
.sidebar-footer-row {
  grid-template-columns: 28px minmax(0, 1fr) !important;
  column-gap: 4px !important;
}
.sidebar-footer-row .github-link {
  justify-self: start !important;
}
.app-version {
  justify-self: stretch !important;
  text-align: center !important;
  max-width: none !important;
}

.report-pump-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.report-pump-card > div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(111, 199, 255, 0.12);
  border-radius: 8px;
  background: rgba(7, 18, 29, 0.6);
}

.report-pump-card span { color: #7891a2; font-size: 10px; }
.report-pump-card strong { color: #d8e8f1; font-size: 12px; }
.osa-page { height: 100%; min-height: 0; overflow: hidden; }
.osa-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 226px minmax(420px, 1fr) 260px;
  grid-template-rows: auto 1fr;
  gap: 10px;
}
.trace-panel { grid-column: 1; grid-row: 1; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.controls-panel { grid-column: 1; grid-row: 2; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.plot-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--plot-border);
  background: #000;
  box-shadow: 0 16px 45px rgba(0,0,0,0.28);
}
.metrics-panel { grid-column: 3; grid-row: 1 / span 2; overflow: hidden; display: flex; flex-direction: column; }
.plot-area { width: 100%; height: 100%; min-height: 0; }
.drop-hint { position: absolute; z-index: 2; top: 48%; left: 50%; transform: translate(-50%, -50%); border: 1px dashed #4cc9f0; border-radius: 16px; padding: 20px 26px; background: rgba(0,0,0,0.70); color: #dff7ff; text-align: center; max-width: 360px; pointer-events: none; }

.compact-actions.split-actions { display: grid; grid-template-columns: 1fr 64px; gap: 7px; align-items: center; }
.load-clear-group { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.compact-action { min-height: 31px; padding: 5px 8px; font-size: 12px; }
.test-action { width: 64px; }
.trace-buttons { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.trace-row { display: grid; grid-template-columns: 38px 24px 1fr; gap: 6px; align-items: center; border-radius: 8px; padding: 1px; transition: background 120ms ease; }
.trace-row.warn { animation: trace-warn-blink 1.05s ease-in-out 0s 2; }
@keyframes trace-warn-blink {
  0%, 100% { background: transparent; }
  50% { background: rgba(255, 112, 67, 0.32); }
}
.trace-button { border: 1px solid var(--line); background: #050708; border-radius: 8px; padding: 6px; font-weight: 700; cursor: pointer; }
.trace-button.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.45); }
.mini-check { color: var(--muted); font-size: 12px; display: flex; justify-content: center; }
.trace-name { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill.warning { border-color: #ff7043; color: #ffb38f; background: rgba(255,112,67,0.12); }

.view-form { display: flex; flex-direction: column; gap: 8px; }
.view-row { display: grid; grid-template-columns: 42px 1fr; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.view-row.unit-row { grid-template-columns: 42px 1fr 1fr; }
.view-row label { display: grid; grid-template-columns: 15px 1fr; align-items: center; gap: 5px; }
.view-row select, .range-line input { width: 100%; min-width: 0; padding: 5px 6px; font-size: 12px; }
.range-block { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 8px; }
.range-header { display: grid; grid-template-columns: 1fr 54px; align-items: center; color: #dcecff; font-weight: 700; font-size: 12px; }
.range-auto { min-height: 24px; padding: 3px 7px; font-size: 11px; }
.range-line { display: grid; grid-template-columns: 14px 1fr 10px 1fr; gap: 5px; align-items: center; color: var(--muted); font-size: 12px; }
.range-line b { color: var(--muted); text-align: center; font-weight: 400; }
.view-footnote { color: var(--muted); font-size: 11px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 7px; }

.analysis-hub-button { margin-bottom: 9px; min-height: 32px; }
.metrics-list { min-height: 0; }
.metric { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-family: Consolas, "Microsoft YaHei", monospace; font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.metric-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.metric-label input { margin: 0; }
.marker-metric strong { font-size: 15px; }
.cursor-readout { margin-top: auto; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.cursor-title { color: var(--accent-2); font-weight: 700; font-size: 13px; }
.cursor-readout div:not(.cursor-title):not(.cursor-empty) { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.cursor-readout strong { color: var(--text); font-family: Consolas, "Microsoft YaHei", monospace; }
.cursor-empty { color: var(--muted); font-size: 12px; }

.analysis-modal, .export-modal {
  width: min(920px, 92vw);
  height: min(620px, 86vh);
  background: #101820;
  border: 1px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hub-layout, .export-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 180px 1fr; gap: 0; }
.hub-nav { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.hub-nav button { background: #111b24; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px; text-align: left; cursor: default; }
.hub-nav button.selected { border-color: var(--accent); color: var(--accent); }
.hub-content, .export-preview { padding: 16px; overflow: auto; color: #c9d7e7; line-height: 1.6; }
.export-controls { border-right: 1px solid var(--line); padding: 12px; display: flex; flex-direction: column; gap: 9px; overflow: auto; }
.export-controls label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.export-controls label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; color: var(--text); }

@media (max-width: 1180px) {
  .osa-grid { grid-template-columns: 220px minmax(360px, 1fr) 248px; }
  .compact-actions.split-actions { grid-template-columns: 1fr; }
  .test-action { width: 100%; }
}

.compact-view-title { align-items: center; gap: 6px; }
.inline-unit-selects { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.inline-unit-selects label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.inline-unit-selects select { width: 66px; padding: 4px 5px; font-size: 12px; }
.osa-export-entry { margin-top: 4px; min-height: 30px; }
.metric-grid { display: grid; grid-template-columns: 20px minmax(72px, 1fr) auto; align-items: center; gap: 7px; }
.metric-grid .metric-check, .metric-check-placeholder { width: 18px; display: inline-flex; justify-content: center; align-items: center; }
.metric-grid .metric-check input { margin: 0; }
.metric-grid .metric-name { color: var(--muted); font-size: 12px; min-width: 0; }
.metric-grid .metric-value { font-family: Consolas, "Microsoft YaHei", monospace; font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.marker-metric .metric-value { font-size: 15px; }
.hub-nav button { cursor: pointer; }
.hub-section { display: flex; flex-direction: column; gap: 12px; }
.hub-section h3 { margin: 0; color: var(--accent-2); }
.region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.region-editor { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: rgba(8, 16, 24, 0.55); }
.region-editor strong { color: #dcecff; }
.region-editor label, .hub-inline { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; }
.hub-range { max-width: 360px; }
.result-box { border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 16, 24, 0.55); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.result-box span, .result-box small { color: var(--muted); }
.hub-table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 330px; }
.hub-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hub-table th, .hub-table td { border-bottom: 1px solid rgba(255,255,255,0.06); padding: 7px 8px; text-align: right; white-space: nowrap; }
.hub-table th:first-child, .hub-table td:first-child { text-align: left; }
.hub-file-button { width: 180px; }

/* v0.1.x UI refinement */
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-pill { margin-left: auto; }
.trace-panel .panel-title { margin-bottom: 0; }
.trace-button {
  background: #1f2a35;
  border-color: #536477;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
  text-shadow: 0 0 8px currentColor;
}
.trace-button.active {
  background: #102d42;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76,201,240,0.72), inset 0 1px 0 rgba(255,255,255,0.10);
}
.trace-row:has(.trace-button.active) .trace-name { color: #dcecff; }
.trace-row:not(:has(input:checked)) { opacity: 0.5; }
.view-row.unit-row-refined { grid-template-columns: 42px 1fr 1fr; }
.view-row.unit-row-refined label { grid-template-columns: 14px 1fr; }
.view-row.bg-row-refined { grid-template-columns: 42px 1fr; }
.segmented-control {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #081018;
  min-height: 28px;
}
.segmented-control button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.segmented-control button.selected {
  background: #dbe7ff;
  color: #1c3f8c;
  font-weight: 800;
}
.view-footnote { display: none; }
.plot-card { border-color: var(--plot-border); box-shadow: 0 12px 32px rgba(0,0,0,0.24); }
.plot-card .modebar {
  top: 28px !important;
  right: 34px !important;
  background: rgba(15,23,31,0.72) !important;
  border: 1px solid rgba(160,176,195,0.22) !important;
  border-radius: 7px !important;
  padding: 2px !important;
}
.plot-card .modebar-group { background: transparent !important; }
.plot-card .modebar-btn svg { fill: #cfd9e6 !important; }

/* v0.1.x analysis mode */
.osa-page.analysis-mode .osa-grid {
  grid-template-columns: 226px minmax(420px, 1fr) 260px;
  grid-template-rows: 1fr;
}
.analysis-control-panel {
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.analysis-mode .plot-card { grid-row: 1; }
.analysis-results-panel { grid-column: 3; grid-row: 1; }
.analysis-mode-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.analysis-mode-header strong, .analysis-result-title { color: var(--accent-2); font-weight: 900; }
.hub-tabs-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.hub-tabs-compact button {
  border: 1px solid var(--line);
  background: #111b24;
  color: var(--text);
  border-radius: 8px;
  padding: 7px 5px;
  cursor: pointer;
  font-size: 12px;
}
.hub-tabs-compact button.selected { border-color: var(--accent); color: var(--accent); background: #122436; }
.analysis-control-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.analysis-mini-title { color: #dcecff; font-weight: 800; }
.compact-region { padding: 9px; gap: 7px; }
.compact-region .hub-range { max-width: none; }
.analysis-results-panel .result-box { margin-top: 10px; }
.compact-result { font-size: 13px; }
.analysis-table-wrap { margin-top: 10px; max-height: calc(100vh - 190px); }
.hub-table tr.selected-row { background: rgba(76, 201, 240, 0.20); color: #ffffff; }
.hub-table tbody tr { cursor: pointer; }
.hub-table tbody tr:hover { background: rgba(255,255,255,0.06); }

/* brighter active data trace */
.trace-button.active {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.88), 0 0 12px rgba(76,201,240,0.42), inset 0 1px 0 rgba(255,255,255,0.14) !important;
}
.trace-row.loaded .trace-button:not(.active) {
  border-color: #9aa8b8;
  background: #202c38;
}

/* v0.1.x right analysis panel layout */
.osa-grid {
  grid-template-columns: 226px minmax(420px, 1fr) 276px;
}
.controls-panel { gap: 10px; }
.readout-panel {
  margin-top: 2px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
}
.readout-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.readout-title-row .panel-title { margin: 0; }
.readout-title-row span {
  min-width: 0;
  color: #c7d6e8;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.readout-panel .metrics-list { display: flex; flex-direction: column; min-height: 0; }
.readout-panel .metric { padding: 5px 0; }
.readout-panel .metric-grid { grid-template-columns: 18px minmax(68px, 1fr) auto; gap: 5px; }
.readout-panel .metric-name { font-size: 11.5px; }
.readout-panel .metric-value { font-size: 12.5px; }
.readout-panel .marker-metric .metric-value { font-size: 13px; }
.compact-cursor {
  margin-top: 5px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.compact-cursor div:not(.cursor-empty) { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; }
.compact-cursor strong { white-space: nowrap; font-size: 11.5px; }
.cursor-empty { font-size: 11px; }

.compact-view-title .export-inline {
  margin-left: auto;
  min-height: 26px;
  padding: 3px 9px;
  align-self: center;
}
.view-row.bg-row-refined .segmented-control,
.small-segment,
.analysis-enable-toggle {
  width: 104px;
  max-width: 104px;
  min-height: 26px;
}
.view-row.bg-row-refined .segmented-control button,
.small-segment button,
.analysis-enable-toggle button { padding: 3px 8px; }

.analysis-side-panel {
  grid-column: 3;
  grid-row: 1 / span 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.analysis-side-panel.inactive {
  opacity: 0.72;
}
.analysis-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.analysis-title { color: var(--accent-2); font-weight: 900; }
.hub-tabs-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}
.hub-tabs-row button {
  border: 1px solid var(--line);
  background: #111b24;
  color: var(--text);
  border-radius: 7px;
  padding: 6px 3px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.hub-tabs-row button.selected {
  border-color: var(--accent);
  color: #ffffff;
  background: #168aad;
}
.hub-tabs-row button:disabled { cursor: not-allowed; opacity: 0.42; }
.analysis-disabled-note {
  border: 1px dashed rgba(145,160,178,0.38);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.analysis-param-block {
  flex: 0 0 auto;
  min-height: 0;
}
.analysis-result-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
}
.analysis-result-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--accent-2);
}
.compact-analysis-control { gap: 7px; }
.compact-analysis-control .hub-inline input { padding: 5px 7px; }
.compact-analysis-control .empty-note { margin-top: 2px; }
.analysis-control-body { overflow: visible; }
.analysis-table-wrap.fill-table {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.analysis-table-wrap.fill-table:hover { scrollbar-color: #60748a transparent; }
.analysis-table-wrap.fill-table::-webkit-scrollbar { width: 8px; height: 8px; }
.analysis-table-wrap.fill-table::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
.analysis-table-wrap.fill-table:hover::-webkit-scrollbar-thumb { background: #60748a; }
.batch-result-flex {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.batch-load-targets {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9px;
  padding: 6px;
  display: grid;
  grid-template-columns: 1fr repeat(6, 28px);
  gap: 4px;
  align-items: center;
}
.batch-load-targets span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 11px;
}
.batch-load-targets button { min-height: 24px; padding: 2px 4px; }
.floating-layer {
  position: fixed;
  inset: 0;
  z-index: 980;
  pointer-events: none;
}
.floating-window {
  position: absolute;
  width: min(560px, 42vw);
  height: min(520px, 58vh);
  background: #101820;
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 18px 70px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}
.floating-title {
  flex: 0 0 auto;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  cursor: move;
}
.floating-title strong { color: var(--accent-2); }
.floating-body {
  flex: 1;
  min-height: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.plot-card .modebar-btn[data-title]:hover:after,
.plot-card .modebar-btn[data-title]:hover:before,
.plot-card .modebar-btn:after,
.plot-card .modebar-btn:before {
  display: none !important;
  opacity: 0 !important;
}
.plot-card .modebar {
  top: 30px !important;
  right: 42px !important;
}

/* v0.1.x restore Plotly buttons but remove the heavy frame */
.plot-card .modebar {
  top: 30px !important;
  right: 42px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.plot-card .modebar-group {
  background: rgba(15, 23, 31, 0.55) !important;
  border: 1px solid rgba(160, 176, 195, 0.12) !important;
  border-radius: 6px !important;
  margin-left: 3px !important;
}
.plot-card .modebar-btn[data-title]:hover:after,
.plot-card .modebar-btn[data-title]:hover:before,
.plot-card .modebar-btn:after,
.plot-card .modebar-btn:before {
  display: none !important;
  opacity: 0 !important;
}

/* v0.1.x display denoise and batch workflow additions */
.compact-actions.split-actions {
  grid-template-columns: 1fr 54px 54px !important;
  gap: 6px !important;
}
.test-action,
.current-action {
  width: 54px !important;
}
.view-row .denoise-segment {
  grid-template-columns: 1fr 1fr 1fr;
  width: 132px;
  max-width: 132px;
}
.view-row .compact-segment {
  width: 82px !important;
  max-width: 82px !important;
}
.data-info-button {
  position: absolute;
  z-index: 9;
  top: 10px;
  left: 12px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(76,201,240,0.55);
  background: rgba(10,18,26,0.78);
  color: var(--accent-2);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
}
.data-info-button:hover { filter: brightness(1.25); }
.data-info-popover {
  position: absolute;
  z-index: 10;
  top: 40px;
  left: 12px;
  width: 250px;
  padding: 10px 12px;
  border: 1px solid rgba(76,201,240,0.45);
  border-radius: 10px;
  background: rgba(13,21,30,0.94);
  color: #dbe7f4;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 18px 50px rgba(0,0,0,0.38);
}
.data-info-popover strong { color: var(--accent-2); display: block; margin-bottom: 5px; }
.plot-card .modebar {
  top: 30px !important;
  right: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
}
.plot-card .modebar-group {
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.plot-card .modebar-btn {
  width: 25px !important;
  height: 25px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.plot-card .modebar-btn svg {
  display: block !important;
  margin: auto !important;
}
.batch-table { min-width: 650px; }
.batch-table .filename-cell { max-width: 110px; }

/* v0.1.x compact action finalization */
.compact-actions.trace-actions-quad {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 5px !important;
  align-items: center !important;
}
.compact-actions.trace-actions-quad .compact-action {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 29px !important;
  padding: 4px 4px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  text-align: center !important;
  justify-content: center !important;
}
.compact-actions.trace-actions-quad .current-action.selected {
  border-color: var(--accent-2) !important;
  color: #ffffff !important;
  background: rgba(76, 201, 240, 0.16) !important;
  box-shadow: 0 0 0 1px rgba(76, 201, 240, 0.35) inset;
}

/* keep denoise control on one line */
.view-row .denoise-segment {
  grid-template-columns: repeat(3, 1fr) !important;
  width: 96px !important;
  max-width: 96px !important;
  min-height: 24px !important;
}
.view-row .denoise-segment button {
  padding: 2px 6px !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}
.view-row.bg-row-refined {
  gap: 6px !important;
}
.view-row .compact-segment {
  min-height: 24px !important;
}

/* final Plotly modebar centering */
.plot-card .modebar {
  top: 26px !important;
  right: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  height: 28px !important;
  line-height: 1 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.plot-card .modebar-group {
  height: 28px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  padding: 1px 3px !important;
  margin: 0 0 0 3px !important;
  background: rgba(15, 23, 31, 0.62) !important;
  border: 1px solid rgba(160, 176, 195, 0.16) !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
}
.plot-card .modebar-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}
.plot-card .modebar-btn svg {
  position: static !important;
  display: block !important;
  margin: 0 auto !important;
  transform: none !important;
  width: 16px !important;
  height: 16px !important;
}
.plot-card .modebar-btn[data-title]:hover:after,
.plot-card .modebar-btn[data-title]:hover:before,
.plot-card .modebar-btn:after,
.plot-card .modebar-btn:before {
  display: none !important;
  opacity: 0 !important;
}

/* compact batch cards with full information visible in the right analysis panel */
.batch-card-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px;
  background: rgba(8, 16, 24, 0.30);
}
.batch-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px;
  padding: 7px 8px;
  background: rgba(255,255,255,0.025);
  cursor: pointer;
}
.batch-card:hover { background: rgba(255,255,255,0.06); }
.batch-card.selected-row {
  border-color: rgba(76, 201, 240, 0.60);
  background: rgba(76, 201, 240, 0.15);
}
.batch-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 5px;
}
.batch-file {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e7f3ff;
  font-weight: 700;
  font-size: 11.5px;
}
.batch-var {
  color: var(--accent-2);
  border: 1px solid rgba(76,201,240,0.22);
  background: rgba(76,201,240,0.08);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10.5px;
  white-space: nowrap;
}
.batch-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
  color: var(--muted);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 10.7px;
  line-height: 1.25;
}
.batch-card-metrics span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* restore batch results to compact table/list mode */
.batch-table-list {
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  padding: 0 !important;
  background: rgba(8, 16, 24, 0.30) !important;
  overflow: auto !important;
}
.batch-result-table {
  width: 100% !important;
  min-width: 560px !important;
  border-collapse: collapse !important;
  font-size: 11px !important;
  table-layout: fixed !important;
}
.batch-result-table th,
.batch-result-table td {
  padding: 6px 7px !important;
  border-bottom: 1px solid rgba(255,255,255,0.055) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: right !important;
}
.batch-result-table th:first-child,
.batch-result-table td:first-child {
  text-align: left !important;
}
.batch-result-table th:nth-child(1),
.batch-result-table td:nth-child(1) { width: 82px; }
.batch-result-table th:nth-child(2),
.batch-result-table td:nth-child(2) { width: 52px; }
.batch-result-table th:nth-child(3),
.batch-result-table td:nth-child(3) { width: 72px; }
.batch-result-table th:nth-child(4),
.batch-result-table td:nth-child(4) { width: 64px; }
.batch-result-table th:nth-child(5),
.batch-result-table td:nth-child(5) { width: 58px; }
.batch-result-table th:nth-child(6),
.batch-result-table td:nth-child(6) { width: 58px; }
.batch-result-table th:nth-child(7),
.batch-result-table td:nth-child(7) { width: 56px; }
.batch-result-table tbody tr {
  cursor: pointer;
}
.batch-result-table tbody tr:hover {
  background: rgba(255,255,255,0.055);
}
.batch-result-table tr.selected-row {
  background: rgba(76, 201, 240, 0.18) !important;
  color: #ffffff;
}
.batch-empty-cell {
  text-align: left !important;
  color: var(--muted) !important;
  padding: 12px !important;
}

/* configurable batch variable extraction rules */
.settings-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: -2px 0 8px;
}
.batch-rule-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.batch-rule-row {
  display: grid;
  grid-template-columns: 24px 92px minmax(210px, 1fr) 52px 36px 16px;
  gap: 6px;
  align-items: center;
}
.batch-rule-row input {
  min-width: 0;
  height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}
.batch-rule-row .rule-enable {
  display: flex;
  justify-content: center;
  align-items: center;
}
.batch-rule-row .rule-unit {
  text-align: center;
}
.batch-rule-row.invalid .rule-pattern {
  border-color: #ff7043;
  box-shadow: 0 0 0 1px rgba(255,112,67,0.25);
}
.rule-error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255,112,67,0.18);
  color: #ffb38f;
  font-weight: 700;
  font-size: 11px;
}
.settings-inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

/* v0.2 batch variable rules and batch visualization */
.compact-help {
  max-width: 620px;
}
.batch-rule-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px;
}
.batch-rule-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  overflow: visible;
}
.batch-rule-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(8, 16, 24, 0.36);
  min-width: 0;
}
.batch-rule-card.invalid {
  border-color: rgba(255,112,67,0.55);
  box-shadow: 0 0 0 1px rgba(255,112,67,0.12) inset;
}
.rule-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rule-card-head .ghost-button { margin-left: auto; }
.rule-card-index {
  font-family: Consolas, monospace;
  color: var(--muted);
  font-size: 11px;
}
.rule-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  align-items: end;
}
.rule-card-grid label {
  margin: 0;
  min-width: 0;
}
.rule-card-grid input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 5px 8px;
}
.rule-pattern-wide {
  grid-column: 1 / -1;
}
.rule-error {
  width: auto;
  min-width: 16px;
  padding: 1px 6px;
  border-radius: 999px;
}
.batch-view-tabs {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  min-height: 28px !important;
}
.batch-view-tabs button {
  padding: 4px 6px !important;
  font-size: 11.5px !important;
}
.batch-chart-panel {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8,16,24,0.32);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.batch-chart-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--accent-2);
}
.batch-chart-title span {
  color: var(--muted);
  font-size: 11px;
}
.batch-trend-svg,
.batch-waterfall-svg {
  width: 100%;
  flex: 1;
  min-height: 170px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: #02070b;
}
.batch-axis {
  stroke: rgba(220,235,255,0.42);
  stroke-width: 1;
}
.batch-trend-line {
  stroke: #4cc9f0;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}
.batch-point {
  fill: #ffeb3b;
  stroke: #081018;
  stroke-width: 1;
  cursor: pointer;
}
.batch-point.selected {
  fill: #ffffff;
  stroke: #4cc9f0;
  stroke-width: 1.4;
}
.batch-plot-bg {
  fill: rgba(0,0,0,0.12);
  stroke: rgba(220,235,255,0.20);
  stroke-width: 1;
}
.waterfall-line {
  stroke: #4cc9f0;
  stroke-width: 0.9;
  opacity: 0.75;
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}
.waterfall-line:nth-of-type(3n+1) { stroke: #ff00e6; }
.waterfall-line:nth-of-type(3n+2) { stroke: #ffeb3b; }
.waterfall-line.selected {
  stroke: #ffffff !important;
  stroke-width: 1.6;
  opacity: 1;
}
.compact-targets {
  margin-top: 0;
}

/* v0.2 batch/settings cleanup after field testing */
.settings-modal-wide .settings-body {
  overflow-x: hidden;
}
.settings-modal-wide .batch-rule-card-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}
.compact-rule-card {
  padding: 8px 10px !important;
}
.rule-form-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.rule-field-row {
  display: grid;
  grid-template-columns: 40px minmax(140px, 1fr) 34px 58px;
  gap: 7px;
  align-items: center;
}
.rule-field-row span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.rule-field-row input {
  min-width: 0;
  height: 29px;
  padding: 5px 7px;
  font-size: 12px;
}
.rule-field-row.rule-pattern-row {
  grid-template-columns: 40px minmax(0, 1fr);
}
.rule-unit-input {
  width: 58px !important;
  text-align: center;
}
.rule-card-head {
  margin-bottom: 6px !important;
}
.batch-inline-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.batch-inline-controls label {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.batch-inline-controls select {
  min-width: 0;
  width: 100%;
  padding: 5px 6px;
}
.batch-result-flex {
  min-height: 0;
}
.batch-chart-panel {
  min-height: 0;
}
.batch-chart-title {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 8px !important;
}
.batch-chart-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.batch-selected-hint {
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 2px 0;
}
.batch-point-label rect {
  fill: rgba(7, 14, 21, 0.9);
  stroke: rgba(76, 201, 240, 0.65);
  stroke-width: 1;
}
.batch-point-label text {
  fill: #ffffff;
  font-size: 8px;
  font-family: Consolas, monospace;
}
.batch-waterfall-svg .waterfall-line,
.waterfall-line {
  stroke-width: 1.1;
  opacity: 0.9;
}
.batch-load-targets.compact-targets {
  display: none !important;
}

/* v0.2 settings row rewrite and batch chart stability fixes */
.settings-modal-wide {
  max-width: 880px;
}
.settings-modal-wide .settings-body,
.tabbed-settings-body {
  overflow-x: hidden !important;
}
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}
.settings-row {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 32px;
}
.settings-row-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
}
.settings-row-control {
  min-width: 0;
  display: flex;
  align-items: center;
}
.settings-row-control > input,
.settings-row-control > select {
  width: 100%;
  max-width: 390px;
  min-width: 0;
}
.settings-row-control .short-input {
  width: 96px;
  max-width: 96px;
  text-align: center;
}
.settings-row-hint {
  grid-column: 2;
  margin-top: -5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.settings-check {
  margin: 0 !important;
}
.settings-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 168px;
  margin: 2px 0 6px;
}
.batch-rule-line-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.batch-rule-line {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(8,16,24,0.28);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.batch-rule-line.invalid {
  border-color: rgba(255,112,67,0.55);
}
.rule-line-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-2);
}
.rule-line-head .ghost-button {
  margin-left: auto;
}
.rule-error {
  width: auto !important;
  min-width: 16px !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  background: rgba(255,112,67,0.18) !important;
  color: #ffb38f !important;
  font-size: 11px !important;
}
.batch-rule-line .settings-row {
  grid-template-columns: 156px minmax(0, 1fr);
}
.batch-rule-line .settings-row-control > input {
  max-width: none;
}
.batch-trend-svg,
.batch-waterfall-svg {
  overflow: visible;
}
.batch-point-label rect {
  fill: rgba(7, 14, 21, 0.94);
  stroke: rgba(76, 201, 240, 0.75);
  stroke-width: 1;
}
.batch-point-label text {
  fill: #ffffff;
  font-size: 8px;
  font-family: Consolas, monospace;
  pointer-events: none;
}
.waterfall-line-0 { stroke: #4cc9f0; }
.waterfall-line-1 { stroke: #ff00e6; }
.waterfall-line-2 { stroke: #ffeb3b; }
.waterfall-line-3 { stroke: #00ff77; }
.waterfall-line-4 { stroke: #b388ff; }
.waterfall-line-5 { stroke: #ff8f00; }
.waterfall-line.selected {
  stroke: #ffffff !important;
  stroke-width: 1.7 !important;
  opacity: 1 !important;
}
@media (max-width: 900px) {
  .settings-row,
  .batch-rule-line .settings-row {
    grid-template-columns: 118px minmax(0, 1fr);
  }
  .settings-inline-actions {
    padding-left: 130px;
  }
}

/* v0.2 settings final rewrite and batch result popup polish */
.settings-modal-wide {
  width: min(980px, 94vw) !important;
  height: min(680px, 90vh) !important;
}
.settings-layout {
  grid-template-columns: 118px minmax(0, 1fr) !important;
}
.tabbed-settings-body,
.settings-modal-wide .settings-body {
  display: block !important;
  padding: 14px 22px !important;
  overflow-x: hidden !important;
}
.settings-form {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 7px !important;
}
.settings-section-title {
  margin: 12px 0 6px !important;
  padding-top: 4px !important;
  color: var(--accent-2) !important;
}
.settings-help {
  max-width: none !important;
  margin: 0 0 8px !important;
}
.settings-row {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 172px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 34px !important;
}
.settings-row-label {
  text-align: right !important;
  color: #9fb1c6 !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}
.settings-row-control {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
}
.settings-row-control > input,
.settings-row-control > select {
  width: 220px !important;
  max-width: 220px !important;
  height: 32px !important;
  box-sizing: border-box !important;
}
.settings-row-control > input[type="number"] {
  width: 148px !important;
  max-width: 148px !important;
}
.settings-row-control .short-input {
  width: 86px !important;
  max-width: 86px !important;
}
.settings-row-control .regex-input,
.regex-setting-row .settings-row-control > input {
  width: min(100%, 620px) !important;
  max-width: 620px !important;
  font-family: Consolas, "Microsoft YaHei", monospace !important;
}
.settings-row-hint {
  grid-column: 2 !important;
  margin: -3px 0 3px !important;
  max-width: 620px !important;
}
.settings-inline-actions {
  padding-left: 184px !important;
  margin: 6px 0 8px !important;
}
.batch-rule-line-list {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.batch-rule-line {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  border-radius: 11px !important;
  background: rgba(8, 16, 24, 0.30) !important;
}
.batch-rule-line .settings-row {
  grid-template-columns: 172px minmax(0, 1fr) !important;
  min-height: 32px !important;
}
.rule-line-head {
  padding-left: 172px !important;
  min-height: 28px !important;
}
.rule-line-head strong {
  color: var(--accent-2) !important;
  min-width: 58px !important;
}
.rule-line-head .ghost-button {
  margin-left: 12px !important;
}
.settings-check {
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.settings-about {
  display: block !important;
  max-width: 760px !important;
}
.floating-window {
  width: min(760px, 62vw) !important;
  height: min(660px, 76vh) !important;
  min-width: 420px !important;
  min-height: 320px !important;
  resize: both !important;
  overflow: hidden !important;
}
.floating-body {
  overflow: auto !important;
}
.floating-window .batch-chart-panel {
  min-height: 360px !important;
}
.floating-window .batch-trend-svg,
.floating-window .batch-waterfall-svg {
  width: 100% !important;
  height: min(430px, 56vh) !important;
}
.batch-point-label rect {
  fill: rgba(7, 14, 21, 0.96) !important;
  stroke: rgba(76, 201, 240, 0.85) !important;
  stroke-width: 1 !important;
}
.batch-point-label text {
  fill: #ffffff !important;
  font-size: 8.5px !important;
  font-family: Consolas, "Microsoft YaHei", monospace !important;
  pointer-events: none !important;
}
@media (max-width: 900px) {
  .settings-modal-wide { width: 96vw !important; }
  .settings-layout { grid-template-columns: 104px minmax(0, 1fr) !important; }
  .settings-row,
  .batch-rule-line .settings-row { grid-template-columns: 126px minmax(0, 1fr) !important; }
  .settings-inline-actions { padding-left: 138px !important; }
  .rule-line-head { padding-left: 126px !important; }
}

/* v0.2.1 plain settings layout and batch trend label cleanup */
.settings-modal-wide {
  width: min(980px, 94vw) !important;
  height: min(690px, 90vh) !important;
}
.settings-layout {
  grid-template-columns: 118px minmax(0, 1fr) !important;
}
.tabbed-settings-body,
.settings-modal-wide .settings-body {
  padding: 16px 20px !important;
  overflow-x: hidden !important;
}
.settings-form {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-items: stretch !important;
}
.settings-section-title {
  margin: 12px 0 6px !important;
  padding: 0 !important;
  color: var(--accent-2) !important;
  text-align: left !important;
}
.settings-help,
.compact-help {
  width: 100% !important;
  max-width: 780px !important;
  margin: 0 0 8px !important;
  text-align: left !important;
  line-height: 1.5 !important;
}
.settings-row,
.batch-rule-line .settings-row {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 148px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 38px !important;
}
.settings-row-label {
  text-align: left !important;
  color: #a8b9cc !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  line-height: 1.35 !important;
}
.settings-row-control {
  min-width: 0 !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
.settings-row-control > input,
.settings-row-control > select {
  width: min(420px, 100%) !important;
  max-width: 420px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 7px 10px !important;
  line-height: 20px !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
}
.settings-row-control > input[type="number"] {
  width: 170px !important;
  max-width: 170px !important;
}
.settings-row-control .short-input {
  width: 100px !important;
  max-width: 100px !important;
  text-align: left !important;
}
.settings-row-control .regex-input,
.regex-setting-row .settings-row-control > input {
  width: min(100%, 720px) !important;
  max-width: 720px !important;
  font-family: Consolas, "Microsoft YaHei", monospace !important;
}
.settings-row-hint {
  grid-column: 2 !important;
  margin: -4px 0 4px !important;
  max-width: 720px !important;
  line-height: 1.45 !important;
  text-align: left !important;
}
.settings-inline-actions {
  padding-left: 0 !important;
  margin: 8px 0 10px !important;
  justify-content: flex-start !important;
}
.batch-rule-line-list {
  width: 100% !important;
  max-width: 820px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.batch-rule-line {
  width: 100% !important;
  max-width: 820px !important;
  box-sizing: border-box !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  background: rgba(8, 16, 24, 0.25) !important;
}
.rule-line-head {
  padding-left: 0 !important;
  min-height: 30px !important;
  display: flex !important;
  align-items: center !important;
}
.rule-line-head strong {
  color: var(--accent-2) !important;
  min-width: 68px !important;
}
.rule-line-head .ghost-button {
  margin-left: auto !important;
}
.settings-check {
  height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.batch-point-label.plain text,
.batch-point-label text {
  fill: #ffffff !important;
  font-size: 8.5px !important;
  font-family: Consolas, "Microsoft YaHei", monospace !important;
  paint-order: stroke !important;
  stroke: rgba(0,0,0,0.85) !important;
  stroke-width: 2px !important;
  pointer-events: none !important;
}
.batch-point-label.plain rect {
  display: none !important;
}
@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 104px minmax(0, 1fr) !important; }
  .settings-row,
  .batch-rule-line .settings-row { grid-template-columns: 126px minmax(0, 1fr) !important; }
}

/* v0.2.2 journal figure export center */
.export-modal-large {
  width: min(1220px, 96vw) !important;
  height: min(820px, 94vh) !important;
}
.export-large-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.export-controls-plain {
  border-right: 1px solid var(--line);
  padding: 14px 14px 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.export-section-title {
  margin: 8px 0 4px;
  color: var(--yellow);
  font-weight: 900;
  font-size: 15px;
}
.export-setting-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 32px;
}
.export-setting-row > span {
  color: #a9bdd1;
  font-size: 12px;
  white-space: nowrap;
  text-align: left;
}
.export-setting-row input,
.export-setting-row select {
  width: 100%;
  height: 30px;
  min-height: 30px;
  box-sizing: border-box;
  background: #07111a;
  color: #f1f7ff;
  border: 1px solid #2a3a49;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 12px;
  outline: none;
}
.export-setting-row input[type="checkbox"] {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0 6px 0 0;
}
.export-preview-pane {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}
.export-preview-toolbar,
.export-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #a9bdd1;
  font-size: 12px;
  flex-shrink: 0;
}
.export-actions {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.export-actions > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.export-preview-frame {
  min-height: 320px;
  border: 1px solid #2a3a49;
  border-radius: 12px;
  background: #07111a;
  padding: 10px;
  overflow: hidden;
}
.export-preview-plot {
  width: 100%;
  height: 100%;
}
@media (max-width: 920px) {
  .export-large-layout { grid-template-columns: 1fr; }
  .export-controls-plain { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
}

.module-error-card {
  max-width: 760px;
  margin: 28px auto;
  padding: 18px;
  border: 1px solid rgba(255, 99, 99, 0.45);
  border-radius: 14px;
  background: rgba(80, 20, 20, 0.72);
  color: #ffe9e9;
}

.module-error-card p {
  margin: 8px 0 12px;
  color: rgba(255, 235, 235, 0.78);
}

.module-error-card pre {
  max-height: 160px;
  overflow: auto;
  padding: 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: #ffd0d0;
  white-space: pre-wrap;
}

/* v0.2.3 settings storage status */
.settings-status-text {
  color: #dbeafe;
  font-weight: 700;
  font-size: 13px;
}
.settings-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.10);
  font-size: 12px;
  font-weight: 800;
}
.settings-status-pill.ok {
  border-color: rgba(52, 211, 153, 0.70);
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
}
.settings-status-pill.warning {
  border-color: rgba(251, 146, 60, 0.75);
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.14);
}
.settings-status-pill.muted {
  border-color: rgba(148, 163, 184, 0.36);
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
}
.settings-path-input {
  width: min(100%, 680px) !important;
  max-width: 680px !important;
  font-family: Consolas, "Microsoft YaHei", monospace !important;
}
.settings-message {
  margin: 4px 0 2px;
  padding: 8px 10px;
  border: 1px solid rgba(76, 201, 240, 0.28);
  border-radius: 8px;
  background: rgba(76, 201, 240, 0.08);
  color: #bcecff;
  font-size: 12px;
  line-height: 1.45;
}

/* v7.0.5 typography cleanup: avoid bold blur on dark UI. Logo remains bold. */
.trace-button,
.range-header,
.cursor-title,
.analysis-mode-header strong,
.analysis-result-title,
.analysis-mini-title,
.analysis-title,
.panel-title,
.primary-button,
.side-tab-label,
.settings-section-title,
button,
input,
select,
textarea {
  font-weight: 400 !important;
}
.sidebar-brand-main {
  font-weight: 900 !important;
}
.paper-mode-note { color: #111; background: #fff; }
