/* 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;
}
.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;
}
.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;
}
.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; }
