.oa-page {
  --oa-bg: #1a2430;
  --oa-panel: #202c3a;
  --oa-line: #394b5f;
  --oa-fg: #edf3fa;
  --oa-muted: #a6b5c6;
  --oa-blue: #55b4ff;
  --oa-red: #ff8588;
  font: 14px system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--oa-fg);
}
.oa-menu { display: flex; flex: 0 0 auto; align-items: center; }
.oa-menu-trigger {
  appearance: none; display: flex; align-items: center; height: 44px;
  background: transparent; border: 0; color: #c2c2c2; cursor: pointer;
  font: inherit; font-size: 16px; padding: 5px 15px; white-space: nowrap;
}
.oa-menu-trigger:hover, .oa-menu-trigger[aria-expanded=true] {
  color: #6486cb; box-shadow: 2px 2px 5px #0006;
}
.oa-menu-body {
  position: fixed; z-index: 2001; top: var(--oa-menu-top, 50px); inset-inline: 0;
  box-sizing: border-box; min-height: min(342px, calc(100dvh - var(--oa-menu-top, 50px)));
  max-height: calc(100dvh - var(--oa-menu-top, 50px)); overflow: auto;
  padding: 34px clamp(24px, 7vw + 24px, 124px) 34px;
  background: #121a1f; box-shadow: 0 4px 20px #0006;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.oa-menu-body[hidden] { display: none; }
.oa-menu-title {
  margin: 0 0 22px; color: #fff; font-size: 18px; font-weight: 500; line-height: 24px;
}
.oa-menu-items {
  display: grid; grid-auto-flow: column; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, 24px); row-gap: 14px; width: min(100%, 720px);
}
.oa-menu-item {
  appearance: none; justify-self: start; background: transparent; border: 0; padding: 0;
  color: #fffc; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 400; line-height: 24px;
}
.oa-menu-item:hover, .oa-menu-item:focus-visible { color: #017afc; }
@media (max-width: 760px) {
  .oa-menu-body { padding-inline: 28px; }
  .oa-menu-items { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(7, 24px); }
}
@media (max-width: 420px) {
  .oa-menu-body { padding-inline: 20px; }
  .oa-menu-items { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
}

#root > .contain > .main:has(> .oa-center-host) {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.oa-center-host {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
}
.oa-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  background: var(--oa-bg);
  padding: 19px 22px;
  overflow: auto;
}
.oa-page *, .oa-menu * { box-sizing: border-box; }
.oa-page-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--oa-line); padding-bottom: 13px;
}
.oa-heading h1 { font-size: 20px; line-height: 1.35; margin: 0; }
.oa-alert, .oa-config-info span { color: var(--oa-muted); }
.oa-binding { margin-top: 6px; color: var(--oa-fg); overflow-wrap: anywhere; }
.oa-drop-hint { margin-top: 4px; color: var(--oa-muted); font-size: 13px; }
.oa-page.oa-drop-active { outline: 2px solid var(--oa-blue); outline-offset: -2px; }
.oa-drop-active .oa-drop-hint { color: var(--oa-blue); }
.oa-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.oa-tool-button {
  appearance: none; display: grid; place-items: center; width: 22px; height: 26px;
  padding: 0; border: 0; background: transparent; color: var(--oa-fg); cursor: pointer;
}
.oa-tool-button svg { width: 18px; height: 18px; fill: currentColor; }
.oa-tool-button:hover { color: var(--oa-blue); }
.oa-tool-button:disabled, .oa-tool-button[aria-disabled=true] { color: var(--oa-muted); cursor: default; }
.oa-time-dialog {
  position: fixed; inset: min(15vh, 160px) 0 auto; margin: 0 auto; width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - min(15vh, 160px) - 16px); padding: 58px 32px 32px; border: 0;
  border-radius: 2px; background: #1b2430; color: #fff; box-shadow: 0 8px 24px #0004;
}
.oa-time-dialog::backdrop { background: #0008; }
.oa-page .oa-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.oa-time-form { max-width: 360px; margin: 0 auto; }
.oa-time-filters { display: grid; gap: 18px; min-width: 0; margin: 0; padding: 0; border: 0; }
.oa-time-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 10px; }
.oa-time-row > span { text-align: right; }
.oa-time-dialog .oa-input, .oa-time-dialog .oa-button {
  appearance: auto; border: 1px solid #505761; border-radius: 4px; background: transparent;
  color: inherit; min-height: 32px; font: inherit; padding: 5px 10px;
}
.oa-time-dialog .oa-input { color-scheme: dark; width: 100%; min-width: 0; }
.oa-time-dialog .oa-input:focus { border-color: #409eff; outline: none; }
.oa-time-dialog .oa-input option { color: #fff; background: #1b2430; }
.oa-time-types { display: flex; flex-wrap: wrap; gap: 12px 23px; min-height: 66px; align-content: center; }
.oa-time-types label { display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.oa-time-types label:has(input:checked) { color: #017afc; }
.oa-time-types input { accent-color: #017afc; }
.oa-time-status { margin: 12px 0 0 100px; line-height: 1.45; color: #b9cee4; }
.oa-time-status:empty { display: none; }
.oa-time-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 18px 0 0 100px; }
.oa-time-dialog .oa-button { padding-inline: 15px; }
.oa-time-dialog .oa-button:hover:not(:disabled) { color: #79bbff; border-color: #409eff; }
.oa-time-dialog.oa-feature-dialog { width: min(400px, calc(100vw - 32px)); padding: 46px 20px 30px; }
.oa-feature-panel { padding: 10px; background: #18222b; }
.oa-feature-point { margin: 7px 10px 15px; overflow-wrap: anywhere; font-size: 16px; }
.oa-feature-row { display: grid; grid-template-columns: minmax(68px, 1fr) minmax(0, 240px); align-items: center; gap: 10px; }
.oa-feature-row > span::after { content: ":"; }
.oa-feature-actions { display: flex; gap: 12px; margin-top: 10px; }
.oa-feature-status { margin: 12px 0 0; color: #b9cee4; }
.oa-feature-status:empty { display: none; }
@media (max-width: 440px) {
  .oa-time-dialog { padding: 24px 16px; }
  .oa-time-row { grid-template-columns: 72px minmax(0, 1fr); }
  .oa-time-status, .oa-time-actions { margin-left: 82px; }
}
.oa-button {
  appearance: none; border-radius: 4px; border: 1px solid #496078; background: #223244; color: var(--oa-fg);
  min-height: 33px; padding: 5px 9px; font: inherit;
}
.oa-button { cursor: pointer; white-space: nowrap; }
.oa-button:hover { border-color: var(--oa-blue); }
.oa-button:disabled { opacity: .5; cursor: default; }
.oa-return-live { min-height: 26px; padding: 3px 8px; }
.oa-history-trend { margin-top: 12px; background: #1b2330; }
.oa-history-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 14px 0; }
.oa-page .oa-history-head h2 { padding: 0; border: 0; overflow-wrap: anywhere; }
.oa-history-legend { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; overflow-wrap: anywhere; }
.oa-history-legend::before { content: ""; display: inline-block; flex: 0 0 18px; height: 2px; background: #5470c6; }
.oa-history-count { color: var(--oa-muted); font-size: 12px; }
.oa-history-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.oa-history-feature svg { width: 16px; height: 16px; }
.oa-history-range {
  padding: 4px 7px; border: 0; background: transparent; color: var(--oa-fg);
  cursor: pointer; font: inherit; font-size: 13px;
}
.oa-history-range:hover { color: var(--oa-blue); }
.oa-history-plot { position: relative; height: clamp(196px, 30vh, 320px); cursor: crosshair; }
.oa-history-plot canvas { display: block; width: 100%; height: 100%; }
.oa-history-plot:focus-visible, .oa-shaft-scroll:focus-visible { outline: 2px solid #86cdff; outline-offset: -2px; }
.oa-history-cursor { position: absolute; width: 1px; background: #ffa500; pointer-events: none; }
.oa-history-dot {
  position: absolute; width: 9px; height: 9px; background: #ffa500; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.oa-history-time {
  position: absolute; top: 100%; min-width: 96px; padding: 2px 4px; color: #111; background: #ffa500;
  white-space: pre; text-align: center; font-size: 12px; line-height: 1.05; font-variant-numeric: tabular-nums;
}
.oa-history-point-value {
  position: absolute; left: 10px; padding: 4px 6px; transform: translateY(-50%); border-radius: 2px;
  color: #e3e9f4; background: #10151d; white-space: nowrap; font-size: 12px;
}
.oa-history-point-value.oa-history-point-left { left: auto; right: 10px; }
.oa-alert { padding: 8px 0 12px; line-height: 1.5; }
.oa-page-content { min-width: 0; padding-bottom: 15px; }
.oa-config-info, .oa-candidates { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-bottom: 12px; }
.oa-config-info strong { font-size: 16px; }
.oa-machine-tables { margin-top: 10px; display: grid; gap: 8px; min-width: 0; }
.oa-machine-table, .oa-shaft { background: var(--oa-panel); border: 1px solid var(--oa-line); border-radius: 5px; overflow: hidden; }
.oa-page h2 { font-size: 15px; margin: 0; padding: 10px 12px; border-bottom: 1px solid var(--oa-line); }
.oa-machine-table h2 { padding: 7px 10px; }
.oa-shaft-scroll { width: 100%; overflow-x: auto; }
.oa-shaft-stage { width: 100%; }
.oa-shaft-columns { display: grid; grid-template-columns: repeat(var(--oa-slots), minmax(0, 1fr)); }
.oa-shaft-groups > div, .oa-shaft-names > div, .oa-shaft-values > div { text-align: center; min-width: 0; overflow-wrap: anywhere; }
.oa-shaft-groups > div { padding: 8px 6px; background: #263648; font-weight: 600; }
.oa-shaft-groups > div + div { border-left: 1px solid var(--oa-line); }
.oa-shaft-row { padding: 8px 0 11px; }
.oa-shaft-row + .oa-shaft-row { border-top: 1px solid var(--oa-line); }
.oa-shaft-direction {
  position: sticky; left: 0; width: max-content; margin: 0 0 6px; padding: 0 12px;
  font-size: 14px; color: var(--oa-fg);
}
.oa-shaft-names > div { align-content: center; padding: 2px 8px; color: var(--oa-fg); font-size: 13px; }
.oa-shaft-values > div { padding: 3px 7px 0; font-size: 13px; }
.oa-shaft-sampled-at { display: block; color: var(--oa-muted); margin-top: 3px; }
.oa-shaft-plot { display: block; width: 100%; }
.oa-shaft-crosshair { fill: none; stroke: #8190a2; stroke-width: 1; stroke-dasharray: 5 4; }
.oa-shaft-clearance { fill: none; stroke: #e9787d; stroke-width: 1.35; }
.oa-shaft-line { fill: none; stroke: #69b9fb; stroke-width: 1.65; }
.oa-shaft-point { fill: #77ceff; stroke: #174d72; stroke-width: 1; }
.oa-shaft-axis-label { fill: #a6b5c6; font-size: 10px; }
.oa-shaft-coordinate {
  fill: var(--oa-fg); stroke: var(--oa-panel); stroke-width: 3px; paint-order: stroke;
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.oa-table-scroll { overflow-x: auto; }
.oa-table { width: 100%; border-collapse: collapse; text-align: left; }
.oa-table th, .oa-table td { border-bottom: 1px solid var(--oa-line); padding: 5px 8px; white-space: nowrap; }
.oa-table tbody tr:nth-child(2n) td, .oa-table tbody tr:last-child td { border-bottom-color: #33475e; }
.oa-table th { font-weight: 500; color: var(--oa-muted); font-size: 13px; }
.oa-table td { font-size: 13px; }
.oa-slot small { display: block; color: var(--oa-muted); padding-top: 3px; }
.oa-result-value, .oa-input-value { font-variant-numeric: tabular-nums; }
.oa-result-value { color: var(--oa-red); }
.oa-input-value { color: var(--oa-blue); }
.oa-missing { color: var(--oa-muted); }
.oa-menu button:focus-visible, .oa-page button:focus-visible, .oa-input:focus-visible { outline: 2px solid #86cdff; outline-offset: -2px; }
.oa-trend-trigger {
  appearance: none; width: 100%; border: 0; background: transparent;
  font-family: inherit; font-weight: inherit; text-align: left;
}
.oa-trend-trigger .el-sub-menu__icon-arrow { width: 1em; height: 1em; }
.oa-trend-units button {
  display: block; border: 0; background: transparent; color: #e7edf6; cursor: pointer;
  padding: 7px 12px; line-height: 22px; font-family: inherit; font-size: 14px; text-align: left;
}
.oa-trend-units button:hover { background: #304963; }
.oa-trend-units {
  position: fixed; z-index: 2002; min-width: 150px; max-height: 65vh; overflow: auto;
  background: #1b2734; border: 1px solid #394b5f; box-shadow: 0 4px 20px #0006;
}
.oa-trend-units[hidden] { display: none; }
.oa-trend-units button { width: 100%; }
