#diagnosticAgentPage.active {
  margin: 0 -20px -20px;
  height: calc(100svh - 79px);
  min-height: calc(100svh - 79px);
  color: #d5e3ef;
  background: #08111c;
  overflow: hidden;
}

body:has(#diagnosticAgentPage.active) {
  overflow: hidden;
}

.da-shell {
  height: 100%;
  min-height: inherit;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(44, 110, 214, 0.15), transparent 24%),
    radial-gradient(circle at 78% 8%, rgba(30, 199, 173, 0.08), transparent 22%),
    linear-gradient(180deg, #07111d 0%, #08131f 100%);
}

.da-shell button,
.da-shell input {
  font: inherit;
  letter-spacing: 0;
}

.da-shell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.da-workspace {
  display: grid;
  --da-result-panel-width: 360px;
  grid-template-columns: 178px minmax(0, 1fr) 4px var(--da-result-panel-width);
  gap: 14px 4px;
  height: calc(100svh - 107px);
  min-height: calc(100svh - 107px);
  overflow: hidden;
  transition: grid-template-columns .18s ease;
}

.da-workspace.is-left-collapsed {
  grid-template-columns: 64px minmax(0, 1fr) 4px var(--da-result-panel-width);
}

.da-left-panel,
.da-main-panel,
.da-right-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(123, 146, 173, 0.16);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.96), rgba(9, 14, 24, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.da-result-resizer {
  position: relative;
  z-index: 18;
  align-self: stretch;
  width: 12px;
  min-width: 12px;
  margin: 0 -4px;
  cursor: col-resize;
  touch-action: none;
  outline: 0;
}

.da-result-resizer::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 2px;
  border-radius: 2px;
  opacity: 0;
  background: rgba(124, 145, 164, .3);
  transform: translateX(-50%);
  transition: opacity .16s ease, width .16s ease, background .16s ease, box-shadow .16s ease;
}

.da-result-resizer:hover::before,
.da-result-resizer:focus-visible::before,
.da-result-resizer.is-active::before {
  width: 4px;
  opacity: 1;
  background: #42d2ba;
  box-shadow: 0 0 10px rgba(66, 210, 186, .5);
}

#diagnosticAgentPage.is-result-resizing,
#diagnosticAgentPage.is-result-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.da-left-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 10px 12px;
  overflow: hidden;
}

.da-left-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(123, 146, 173, 0.12);
}

.da-left-heading {
  min-width: 0;
}

.da-left-title {
  color: #f3f8fc;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.da-left-subtitle {
  margin-top: 4px;
  color: #7f8d9c;
  font-size: 12px;
  line-height: 1.45;
}

.da-sidebar-toggle {
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(123, 146, 173, .18);
  border-radius: 8px;
  color: #8fa4b9;
  background: rgba(10, 18, 29, .68);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

.da-sidebar-toggle:hover {
  color: #5be1c9;
  border-color: rgba(91, 225, 201, .38);
  background: rgba(91, 225, 201, .08);
}

.da-sidebar-toggle svg {
  width: 15px;
  height: 15px;
  transform: rotate(180deg);
  transition: transform .18s ease;
}

.da-menu-group-title {
  margin-bottom: 8px;
  color: #758595;
  font-size: 12px;
}

.da-menu-group + .da-menu-group {
  padding-top: 8px;
  border-top: 1px solid rgba(123, 146, 173, 0.1);
}

.da-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  margin-bottom: 4px;
  color: #aab8c6;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 14px;
  text-align: left;
}

.da-menu-item svg {
  width: 18px;
  height: 18px;
  color: #7f8fa0;
}

.da-menu-item.is-active {
  color: #b7d6ff;
  border-color: rgba(61, 132, 255, 0.24);
  background: linear-gradient(180deg, rgba(26, 47, 77, 0.96), rgba(17, 31, 50, 0.96));
}

.da-menu-item.is-active svg {
  color: #4fa3ff;
}

.da-menu-item em {
  margin-left: auto;
  color: #f56c6c;
  font-style: normal;
}

.da-left-bottom {
  display: none;
}

.da-left-bottom-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 142px;
}

.da-left-bottom-copy strong {
  color: #e6fff6;
  font-size: 24px;
  font-weight: 700;
}

.da-left-bottom-copy span {
  margin-top: 6px;
  color: #d9e4ee;
  font-size: 14px;
}

.da-workspace.is-left-collapsed .da-left-panel {
  align-items: center;
  padding: 14px 8px 12px;
}

.da-workspace.is-left-collapsed .da-left-top {
  justify-content: center;
  width: 100%;
}

.da-workspace.is-left-collapsed .da-left-heading,
.da-workspace.is-left-collapsed .da-menu-group-title,
.da-workspace.is-left-collapsed .da-menu-item span,
.da-workspace.is-left-collapsed .da-menu-item em {
  display: none;
}

.da-workspace.is-left-collapsed .da-sidebar-toggle svg {
  transform: rotate(0deg);
}

.da-workspace.is-left-collapsed .da-menu-group {
  width: 100%;
}

.da-workspace.is-left-collapsed .da-menu-group + .da-menu-group {
  padding-top: 10px;
}

.da-workspace.is-left-collapsed .da-menu-item {
  justify-content: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  margin: 0 auto 6px;
}

.da-workspace.is-left-collapsed .da-menu-item svg {
  width: 20px;
  height: 20px;
}

.da-main-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  min-height: 0;
  overflow: hidden;
}

.da-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.da-global-search-control {
  display: grid;
  grid-template-columns: 50% minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
  column-gap: 18px;
}

.da-global-search-control > label {
  grid-column: 1;
  grid-row: 1;
}

.da-global-search-control .da-global-search-wrap {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
}

.da-station-context {
  grid-column: 2;
  grid-row: 1 / span 2;
  overflow: hidden;
  min-width: 0;
}

#diagnosticAgentPage .go-station-copy {
  min-width: 0;
}

#diagnosticAgentPage .go-station-copy > strong {
  display: block;
  overflow: hidden;
  color: #f3f7f7;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#diagnosticAgentPage .go-station-summary {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
}

#diagnosticAgentPage .go-station-summary > div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

#diagnosticAgentPage .go-station-summary dt,
#diagnosticAgentPage .go-station-summary dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

#diagnosticAgentPage .go-station-summary dt {
  color: #8293a6;
  white-space: nowrap;
}

#diagnosticAgentPage .go-station-summary dd {
  min-width: 0;
  color: #cbd7e4;
  overflow-wrap: anywhere;
}

.da-control label {
  display: block;
  margin-bottom: 6px;
  color: #95a5b6;
  font-size: 12px;
}

.da-select,
.da-control input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(123, 146, 173, 0.16);
  border-radius: 8px;
  background: rgba(10, 18, 29, 0.9);
  color: #e7edf4;
  font-size: 13px;
}

.da-control input {
  width: 100%;
  justify-content: flex-start;
  outline: 0;
}

.da-select svg {
  width: 14px;
  height: 14px;
  color: #738497;
}

.da-native-select {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 30px 0 12px;
  border: 1px solid rgba(123, 146, 173, 0.16);
  border-radius: 8px;
  outline: 0;
  color: #e7edf4;
  background-color: rgba(10, 18, 29, 0.9);
  font-size: 13px;
  appearance: auto;
}

.da-native-select:focus {
  border-color: rgba(73, 143, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(73, 143, 255, 0.12);
}

.da-global-search-wrap {
  position: relative;
  z-index: 2000;
  width: 100%;
}

.da-global-search-wrap > input {
  width: 100%;
  box-sizing: border-box;
}

.da-global-search-wrap > input:focus {
  border-color: rgba(73, 143, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(73, 143, 255, 0.12);
}

.da-global-search-menu {
  display: none;
  position: absolute;
  z-index: 2001;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(73, 143, 255, .48);
  border-radius: 8px;
  background: #0b1523;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .38);
}

.da-global-search-wrap.is-open .da-global-search-menu {
  display: block;
}

.da-global-search-options {
  max-height: 430px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.da-global-search-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-height: 36px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  color: #d5e3ef;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.da-global-search-option:hover {
  background: #1d6ed8;
}

.da-global-search-option strong,
.da-global-search-option small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-global-search-option strong {
  color: #edf5ff;
  font-size: 13px;
  font-weight: 600;
}

.da-global-search-option small {
  color: #8ea2b7;
  font-size: 11px;
}

.da-global-search-option span {
  color: #78b5ff;
  font-size: 11px;
}

.da-global-search-option mark {
  padding: 0 1px;
  border-radius: 2px;
  color: #ffe36e;
  background: rgba(255, 227, 110, .18);
}

.da-global-search-empty {
  padding: 10px 9px;
  color: #8193a7;
  font-size: 13px;
}

.da-device-search-wrap {
  position: relative;
  z-index: 19;
}

.da-device-search-wrap > input {
  width: 100%;
  box-sizing: border-box;
}

.da-device-search-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 6px;
  border: 1px solid rgba(73, 143, 255, .48);
  border-radius: 8px;
  background: #0b1523;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .38);
}

.da-device-search-wrap.is-open .da-device-search-menu {
  display: block;
}

.da-device-search-options {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.da-device-search-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  color: #d5e3ef;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.da-device-search-option:hover {
  background: #1d6ed8;
}

.da-device-search-option strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}

.da-device-search-option span {
  flex: 0 0 auto;
  color: #8ea2b7;
  font-size: 11px;
}

.da-device-search-option mark {
  padding: 0 1px;
  border-radius: 2px;
  color: #ffe36e;
  background: rgba(255, 227, 110, .18);
}

.da-device-search-empty {
  padding: 10px 9px;
  color: #8193a7;
  font-size: 13px;
}

.da-device-choices {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: -4px 0 12px;
}

.da-device-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 92px;
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(123, 146, 173, .18);
  border-radius: 8px;
  color: #c5d5e4;
  background: rgba(11, 22, 35, .78);
  text-align: center;
  cursor: pointer;
}

.da-device-choice:hover {
  border-color: rgba(73, 143, 255, .7);
}

.da-device-choice.is-active {
  border-color: #3988ff;
  background: linear-gradient(180deg, rgba(25, 66, 118, .92), rgba(17, 40, 72, .92));
  box-shadow: inset 0 0 0 1px rgba(67, 146, 255, .18);
}

.da-device-choice strong {
  width: 100%;
  overflow: hidden;
  color: #edf5ff;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-device-choice span {
  margin-top: 3px;
  color: #78b5ff;
  font-size: 11px;
}

.da-device-choice small {
  width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: #8fa4b9;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-overview-equipment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.da-overview-device-card {
  position: relative;
  display: grid;
  grid-template-columns: 134px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 150px;
  padding: 5px 6px;
  color: #d9e3ee;
  cursor: pointer;
}

.da-overview-device-card.is-inverter {
  order: 1;
}

.da-overview-device-card.is-gateway {
  order: 2;
  border-top: 1px solid rgba(147, 164, 184, .16);
}

.da-overview-device-card + .da-overview-device-card {
  border-top: 1px solid rgba(147, 164, 184, .16);
}

.da-overview-device-card.is-active {
  background:
    linear-gradient(90deg, rgba(66, 145, 255, .22) 0%, rgba(54, 123, 229, .14) 42%, rgba(29, 77, 144, .06) 78%, transparent 100%),
    linear-gradient(180deg, rgba(77, 151, 255, .08), rgba(25, 67, 128, .04));
  box-shadow:
    inset 2px 0 0 rgba(93, 169, 255, .68),
    inset 0 1px 0 rgba(143, 202, 255, .16),
    inset 0 -1px 0 rgba(31, 105, 214, .16),
    0 0 18px rgba(38, 119, 239, .09);
  border-radius: 10px;
}

.da-overview-device-card.is-active::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(91, 165, 255, .28);
  border-radius: 10px;
  pointer-events: none;
  content: "";
}

.da-overview-device-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 134px;
  height: 134px;
}

.da-overview-device-visual img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .34));
  transition: transform .2s ease, filter .2s ease;
}

.da-overview-device-card.is-gateway .da-overview-device-visual img {
  width: 58px;
  height: 134px;
  filter: drop-shadow(0 0 1px rgba(221, 235, 241, .48)) drop-shadow(0 12px 10px rgba(0, 0, 0, .44));
}

.da-overview-device-card.is-inverter .da-overview-device-visual img {
  width: 130px;
  height: 110px;
}

.da-overview-device-card:hover .da-overview-device-visual img {
  transform: translateY(-2px) scale(1.025);
  filter: drop-shadow(0 15px 12px rgba(0, 0, 0, .42));
}

.da-overview-device-card.is-gateway:hover .da-overview-device-visual img {
  filter: drop-shadow(0 0 1px rgba(221, 235, 241, .58)) drop-shadow(0 15px 12px rgba(0, 0, 0, .5));
}

.da-overview-device-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}

.da-overview-device-title strong {
  display: block;
  margin: 0;
  color: #f2f7ff;
  font-size: 16px;
  font-weight: 700;
}

.da-overview-device-card dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.da-overview-device-card dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.da-overview-device-card dt {
  color: #93a4b8;
  font-size: 14px;
  white-space: nowrap;
}

.da-overview-device-card dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #d9e3ee;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-device-online-status,
#diagnosticAgentPage .go-device-online-status {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-areas: 'label value';
  align-items: center;
  column-gap: 8px;
  margin-left: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(91, 225, 201, .22);
  border-radius: 8px;
  background: rgba(91, 225, 201, .07);
}

.da-device-online-status span,
#diagnosticAgentPage .go-device-online-status span {
  grid-area: label;
  color: #9fb0c3;
  font-size: 12px;
  line-height: 1;
}

.da-device-online-status strong,
#diagnosticAgentPage .go-device-online-status strong {
  grid-area: value;
  margin: 0;
  color: #f2f7ff;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .2px;
}

.da-device-online-status i,
#diagnosticAgentPage .go-device-online-status i {
  color: #7f8da0;
  font-style: normal;
}

.da-inverter-lights,
#diagnosticAgentPage .go-inverter-lights {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8fa1b5;
  font-size: 12px;
}

.da-inverter-lights span,
#diagnosticAgentPage .go-inverter-lights span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #26303d;
  opacity: .42;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 2px rgba(0, 0, 0, .55);
}

.da-inverter-lights .red,
.da-inverter-lights .yellow,
.da-inverter-lights .green,
#diagnosticAgentPage .go-inverter-lights .red,
#diagnosticAgentPage .go-inverter-lights .yellow,
#diagnosticAgentPage .go-inverter-lights .green {
  background: #26303d;
}

.da-inverter-lights.is-fault .red,
.da-inverter-lights.is-alarm .yellow,
.da-inverter-lights.is-normal .green,
#diagnosticAgentPage .go-inverter-lights.is-fault .red,
#diagnosticAgentPage .go-inverter-lights.is-alarm .yellow,
#diagnosticAgentPage .go-inverter-lights.is-normal .green {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .18), 0 0 10px currentColor, 0 0 18px currentColor, inset 0 1px 2px rgba(255, 255, 255, .42);
}

.da-inverter-lights.is-fault .red,
#diagnosticAgentPage .go-inverter-lights.is-fault .red {
  color: #ff3b4f;
  background: #ff3b4f;
}

.da-inverter-lights.is-alarm .yellow,
#diagnosticAgentPage .go-inverter-lights.is-alarm .yellow {
  color: #ffc83d;
  background: #ffc83d;
}

.da-inverter-lights.is-normal .green,
#diagnosticAgentPage .go-inverter-lights.is-normal .green {
  color: #20f09a;
  background: #20f09a;
}

.da-inverter-lights em,
.da-signal-bars em,
#diagnosticAgentPage .go-inverter-lights em,
#diagnosticAgentPage .go-signal-bars em {
  color: #9fb0c3;
  font-style: normal;
  line-height: 1;
}

.da-signal-bars,
#diagnosticAgentPage .go-signal-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  color: #8f9dae;
  font-size: 12px;
}

.da-signal-bars i,
#diagnosticAgentPage .go-signal-bars i {
  display: block;
  width: 3.5px;
  border-radius: 2px 2px 1px 1px;
  background: #354150;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.da-signal-bars .bar-1,
#diagnosticAgentPage .go-signal-bars .bar-1 { height: 4.9px; }
.da-signal-bars .bar-2,
#diagnosticAgentPage .go-signal-bars .bar-2 { height: 7px; }
.da-signal-bars .bar-3,
#diagnosticAgentPage .go-signal-bars .bar-3 { height: 9.1px; }
.da-signal-bars .bar-4,
#diagnosticAgentPage .go-signal-bars .bar-4 { height: 11.2px; }
.da-signal-bars .bar-5,
#diagnosticAgentPage .go-signal-bars .bar-5 { height: 13.3px; }
.da-signal-bars.is-good i.is-on,
#diagnosticAgentPage .go-signal-bars.is-good i.is-on { background: #18c987; box-shadow: 0 0 7px rgba(24, 201, 135, .42); }
.da-signal-bars.is-medium i.is-on,
#diagnosticAgentPage .go-signal-bars.is-medium i.is-on { background: #e8b84f; box-shadow: 0 0 7px rgba(232, 184, 79, .42); }
.da-signal-bars.is-poor i.is-on,
#diagnosticAgentPage .go-signal-bars.is-poor i.is-on { background: #e15361; box-shadow: 0 0 7px rgba(225, 83, 97, .42); }
.da-signal-bars.is-unknown i,
#diagnosticAgentPage .go-signal-bars.is-unknown i { opacity: .62; }

.da-station-picker {
  position: relative;
  z-index: 20;
}

.da-station-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(123, 146, 173, 0.16);
  border-radius: 8px;
  color: #e7edf4;
  background: rgba(10, 18, 29, 0.9);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.da-station-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.da-station-trigger svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  color: #738497;
  transition: transform .16s ease;
}

.da-station-picker.is-open .da-station-trigger {
  border-color: rgba(73, 143, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(73, 143, 255, 0.12);
}

.da-station-picker.is-open .da-station-trigger svg {
  transform: rotate(180deg);
}

.da-station-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  padding: 8px;
  border: 1px solid rgba(73, 143, 255, 0.48);
  border-radius: 8px;
  background: #0b1523;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .38);
}

.da-station-picker.is-open .da-station-menu {
  display: block;
}

.da-station-search {
  display: block;
  width: 100%;
  min-height: 32px;
  margin-bottom: 6px;
  padding: 0 9px;
  border: 1px solid rgba(123, 146, 173, 0.24);
  border-radius: 6px;
  outline: 0;
  color: #e7edf4;
  background: #09111d;
  font-size: 13px;
  box-sizing: border-box;
}

.da-station-search:focus {
  border-color: rgba(73, 143, 255, 0.72);
}

.da-station-options {
  max-height: 510px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.da-station-option {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  color: #d5e3ef;
  background: transparent;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.da-station-option:hover,
.da-station-option.is-active {
  color: #fff;
  background: #1d6ed8;
}

.da-station-option mark {
  padding: 0 1px;
  border-radius: 2px;
  color: #ffe36e;
  background: rgba(255, 227, 110, .18);
}

.da-station-empty {
  padding: 10px 9px;
  color: #8193a7;
  font-size: 13px;
}

.da-native-select option {
  color: #e7edf4;
  background: #0b1624;
}

.da-select-toggle,
.da-range {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 4px;
}

.da-range {
  grid-template-columns: repeat(3, 1fr);
  width: 50%;
  box-sizing: border-box;
}

.da-select-toggle button,
.da-range button {
  min-height: 28px;
  padding: 0 10px;
  color: #8f9cac;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
}

.da-range button {
  padding: 0 4px;
  font-size: 12px;
  white-space: nowrap;
}

.da-select-toggle button.is-active {
  color: #f0f7ff;
  background: linear-gradient(180deg, #3d88ff, #2d6cf3);
  box-shadow: 0 0 0 1px rgba(61, 136, 255, 0.24) inset;
}

.da-range button.is-active {
  color: #dceaff;
  background: rgba(61, 136, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(92, 153, 255, 0.18) inset;
}

.start-btn {
  margin-top: 28px;
  min-width: 96px;
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #4d8eff, #2f6ff0);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.start-btn[disabled] {
  opacity: 0.78;
  cursor: default;
}

.da-grid-top {
  display: grid;
  grid-template-columns: 1.08fr 1.02fr 1fr;
  gap: 12px;
}

.da-panel {
  border: 1px solid rgba(123, 146, 173, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(11, 20, 32, 0.96), rgba(8, 14, 24, 0.98));
}

.da-card {
  padding: 12px 14px;
}

.da-card-title {
  margin-bottom: 10px;
  color: #7fb1ff;
  font-size: 14px;
  font-weight: 700;
}

.da-device-wrap {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.da-device-image-wrap {
  display: grid;
  place-items: center;
  min-height: 150px;
}

.da-device-image-wrap img {
  max-width: 100%;
  max-height: 145px;
  object-fit: contain;
}

.da-device-head strong {
  display: block;
  color: #eaf2fb;
  font-size: 17px;
  font-weight: 700;
}

.da-device-head span {
  display: block;
  margin-top: 2px;
  color: #4ea0ff;
  font-size: 14px;
}

.da-device-text dl {
  margin: 10px 0 0;
}

.da-device-text dl > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  min-height: 24px;
}

.da-device-text dt {
  color: #9babbc;
  font-size: 12px;
}

.da-device-text dd {
  margin: 0;
  color: #d9e4ee;
  font-size: 13px;
}

.status-danger {
  color: #f26d6d;
}

.status-good {
  color: #39c68f;
}

.da-alarm-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.alarm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}

.alarm-pill b {
  font-weight: 700;
}

.tone-danger {
  color: #ff7d71;
}

.tone-danger.alarm-pill {
  border: 1px solid rgba(255, 109, 109, 0.35);
  background: rgba(255, 109, 109, 0.08);
}

.tone-warn {
  color: #f0aa4d;
}

.tone-warn.alarm-pill {
  border: 1px solid rgba(240, 170, 77, 0.35);
  background: rgba(240, 170, 77, 0.08);
}

.da-alarm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(86, 145, 218, 0.75) rgba(16, 30, 48, 0.65);
}

.da-alarm-list::-webkit-scrollbar { width: 6px; }
.da-alarm-list::-webkit-scrollbar-track { background: rgba(16, 30, 48, 0.65); border-radius: 4px; }
.da-alarm-list::-webkit-scrollbar-thumb { background: rgba(86, 145, 218, 0.75); border-radius: 4px; }

.da-alarm-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(123, 146, 173, 0.12);
  border-radius: 8px;
  background: rgba(12, 20, 32, 0.8);
}

.da-alarm-row .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.da-alarm-row strong {
  display: block;
  color: #eaf2fb;
  font-size: 14px;
}

.da-alarm-row small {
  display: block;
  margin-top: 3px;
  color: #91a2b3;
  font-size: 12px;
}

.da-alarm-row time {
  color: #91a2b3;
  font-size: 12px;
  white-space: nowrap;
}

.da-alarm-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  border: 1px dashed rgba(123, 146, 173, 0.18);
  border-radius: 8px;
  color: #7f91a4;
  background: rgba(12, 20, 32, 0.42);
  font-size: 13px;
}

.da-runtime-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.da-runtime-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 6px 10px;
  border: 1px solid rgba(123, 146, 173, 0.12);
  border-radius: 8px;
  background: rgba(12, 20, 32, 0.8);
}

.da-runtime-icon {
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  color: #5eb3ff;
  background: transparent;
  box-shadow: none;
}

.da-runtime-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.7;
}

.da-runtime-art {
  display: block;
  width: 68px !important;
  height: 68px !important;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(23, 132, 255, 0.28));
}

.tone-green .da-runtime-icon {
  color: #36d39a;
  background: transparent;
  box-shadow: none;
}

.da-runtime-item small {
  display: block;
  color: #91a2b3;
  font-size: 12px;
}

.da-runtime-item strong {
  display: block;
  margin-top: 4px;
  color: #eaf2fb;
  font-size: 14px;
  font-weight: 700;
}

.da-runtime-detail {
  display: block;
  margin-top: 3px;
  color: #6f849b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
  white-space: nowrap;
}

.da-process-panel {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  box-sizing: border-box;
  aspect-ratio: 1800 / 222;
  overflow: hidden;
}

.da-process-image {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.da-process-line {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  padding: 18px 0 0;
}

.da-process-line::before {
  position: absolute;
  top: 42px;
  left: 3%;
  right: 3%;
  height: 2px;
  background: linear-gradient(90deg, rgba(97, 135, 219, 0.75), rgba(97, 135, 219, 0.75));
  content: "";
}

.da-process-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.da-process-badge {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 2px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.da-process-step svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.8;
}

.da-process-art {
  display: block;
  width: 92px !important;
  height: 92px !important;
  max-width: none;
  object-fit: contain;
  transform: translateY(2px);
  filter: drop-shadow(0 0 8px rgba(45, 142, 255, 0.28));
}

.tone-green .da-process-badge {
  color: #42e29f;
  border-color: rgba(54, 211, 154, 0.35);
  box-shadow: inset 0 0 0 4px rgba(54, 211, 154, 0.16), 0 0 16px rgba(54, 211, 154, 0.22);
}

.tone-blue .da-process-badge {
  color: #76adff;
  border-color: rgba(118, 173, 255, 0.35);
  box-shadow: inset 0 0 0 4px rgba(118, 173, 255, 0.16), 0 0 16px rgba(118, 173, 255, 0.2);
}

.tone-amber .da-process-badge {
  color: #f0aa4d;
  border-color: rgba(240, 170, 77, 0.35);
  box-shadow: inset 0 0 0 4px rgba(240, 170, 77, 0.16), 0 0 16px rgba(240, 170, 77, 0.2);
}

.tone-azure .da-process-badge {
  color: #67d1ff;
  border-color: rgba(103, 209, 255, 0.35);
  box-shadow: inset 0 0 0 4px rgba(103, 209, 255, 0.18), 0 0 18px rgba(103, 209, 255, 0.28);
}

.da-process-step .da-process-badge {
  color: inherit;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.da-process-step strong {
  display: block;
  color: #dbe7f2;
  font-size: 13px;
  font-weight: 700;
}

.da-process-step small {
  display: block;
  margin-top: 4px;
  color: #758596;
  font-size: 12px;
  line-height: 1.45;
}

.da-process-line i {
  display: none;
}

.da-charts-panel {
  display: flex;
  flex: 1 1 auto;
  min-height: 270px;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.da-tabs {
  display: flex;
  gap: 0;
  padding: 0 14px;
  border-bottom: 1px solid rgba(123, 146, 173, 0.12);
}

.da-tabs button {
  min-height: 40px;
  padding: 0 16px;
  color: #8697a8;
  border: 0;
  background: transparent;
  font-size: 13px;
}

.da-tabs button.is-active {
  color: #eaf2fb;
  box-shadow: inset 0 -2px 0 #4e8cff;
}

.da-chart-grid {
  display: grid;
  flex: 1 1 auto;
  min-height: 210px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.da-chart-card {
  min-width: 0;
  min-height: 205px;
  padding: 12px 14px 10px;
  border-right: 1px solid rgba(123, 146, 173, 0.12);
}

.da-chart-card:last-child {
  border-right: 0;
}

.da-chart-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.da-chart-head small {
  margin-left: auto;
  color: #9db2c8;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.da-chart-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.da-chart-head strong {
  color: #dbe7f2;
  font-size: 13px;
  font-weight: 700;
}

.da-shell svg.da-trend-svg {
  display: block;
  width: 100%;
  min-height: 196px;
  height: 196px;
  overflow: visible;
}

.da-trend-svg .da-trend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.da-trend-svg .da-trend-area {
  pointer-events: none;
}

.da-trend-svg .da-trend-grid line {
  stroke: rgba(123, 146, 173, 0.22);
  stroke-width: 1;
}

.da-trend-svg .da-trend-grid line.vertical {
  stroke: rgba(123, 146, 173, 0.11);
  stroke-dasharray: 2 4;
}

.da-trend-svg .da-trend-grid text {
  fill: #718399;
  font-size: 8px;
  text-anchor: end;
}

.da-trend-svg .da-trend-threshold {
  stroke: #f05a59;
  stroke-width: 1.2;
  stroke-dasharray: 5 4;
  opacity: .75;
}

.da-trend-svg .da-trend-points circle {
  opacity: .88;
}

.da-trend-svg .da-trend-points circle.is-last {
  stroke-width: 2;
  stroke: rgba(255, 255, 255, .85);
  filter: drop-shadow(0 0 5px currentColor);
}

.da-trend-axis text {
  fill: #7f8d9c;
  font-size: 8px;
}

.da-chart-footer {
  padding: 8px 14px 14px;
  color: #7f8d9c;
  font-size: 12px;
  text-align: center;
}

.da-right-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.da-right-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 2px;
}

.da-right-head h3 {
  color: #dce8f3;
  font-size: 16px;
  font-weight: 700;
}

.da-right-caret,
.chevron {
  color: #7c8c9c;
}

.da-right-caret svg,
.chevron svg {
  width: 14px;
  height: 14px;
}

.da-result-card {
  padding: 14px;
}

.da-result-complete {
  display: flex;
  align-items: center;
  gap: 12px;
}

.da-ai-orb {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #62b7ff;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.da-ai-orb svg {
  width: 42px;
  height: 42px;
  stroke-width: 1.55;
}

.da-ai-art {
  display: block;
  width: 112px !important;
  height: 112px !important;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(45, 142, 255, 0.42));
}

.da-result-complete strong {
  display: block;
  color: #eaf2fb;
  font-size: 18px;
}

.da-result-complete small {
  display: block;
  margin-top: 4px;
  color: #8dbf8f;
  font-size: 13px;
}

.da-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.da-section-head h4 {
  color: #7fb1ff;
  font-size: 14px;
}

.tag-danger {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  color: #ff9b9b;
  background: rgba(255, 91, 91, 0.1);
  font-size: 12px;
}

.da-conclusion-title {
  color: #f4f8fc;
  font-size: 17px;
  font-weight: 700;
}

.da-confidence {
  margin-top: 6px;
  color: #8c9cab;
  font-size: 13px;
}

.da-analysis-card p {
  margin: 0;
  color: #bfcddd;
  font-size: 13px;
  line-height: 1.75;
}

.da-evidence-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.da-evidence-card li {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  color: #d9e4ee;
  font-size: 13px;
  line-height: 1.55;
}

.da-evidence-card li i {
  position: relative;
  top: 7px;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #33c991;
  box-shadow: 0 0 0 4px rgba(51, 201, 145, 0.08);
}

.da-suggestion-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.da-suggestion-card li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  margin: 8px 0;
  color: #d9e4ee;
  font-size: 13px;
  line-height: 1.55;
}

.da-suggestion-card li span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #d7e3ee;
  background: rgba(64, 132, 255, 0.16);
  font-size: 11px;
}

.da-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.primary-btn {
  color: #eaf2fb;
  background: linear-gradient(180deg, #2f63b0, #254b86);
}

.secondary-btn {
  color: #d8e4ee;
  background: linear-gradient(180deg, #253550, #1d2a41);
}

.da-result-actions button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  filter: saturate(0.55);
}

.primary-btn svg {
  width: 16px;
  height: 16px;
}

body.light #diagnosticAgentPage.active {
  color: #25313b;
  background: #f2f5f8;
}

body.light .da-shell {
  background: #f2f5f8;
}

body.light .da-left-panel,
body.light .da-main-panel,
body.light .da-right-panel,
body.light .da-panel {
  background: #ffffff;
  border-color: #d7e0e8;
}

body.light .da-left-title,
body.light .da-card-title,
body.light .da-right-head h3,
body.light .da-device-head strong,
body.light .da-device-text dd,
body.light .da-runtime-item strong,
body.light .da-chart-head strong,
body.light .da-result-complete strong,
body.light .da-conclusion-title {
  color: #1d2a34;
}

body.light .da-left-subtitle,
body.light .da-menu-group-title,
body.light .da-control label,
body.light .da-device-text dt,
body.light .da-runtime-item small,
body.light .da-chart-footer,
body.light .da-analysis-card p,
body.light .da-confidence,
body.light .da-result-complete small {
  color: #64748b;
}

body.light .da-left-bottom {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.62)),
    url('/assets/diagnostic-scenic-bg.jpg') center bottom / cover no-repeat;
}

body.light .da-menu-item {
  color: #465261;
}

body.light .da-menu-item svg {
  color: #667685;
}

body.light .da-menu-item.is-active {
  background: #e8f1ff;
}

body.light .da-select,
body.light .da-control input,
body.light .da-tabs button,
body.light .da-result-card,
body.light .da-alarm-row,
body.light .da-runtime-item {
  background: #f8fafc;
}

body.light .da-device-head span {
  color: #2f6ff0;
}

body.light .da-alarm-row strong,
body.light .da-alarm-row small,
body.light .da-alarm-row time,
body.light .da-result-complete small,
body.light .da-evidence-card li,
body.light .da-suggestion-card li {
  color: #334155;
}

body.light .da-chart-footer {
  border-top: 1px solid #e4eaf1;
}

/* Keep diagnostic surfaces in the same visual hierarchy as anomaly overview. */
#diagnosticAgentPage.active {
  --da-aov-page: #1a1a2e;
  --da-aov-surface: #1f2533;
  --da-aov-inner: rgba(15, 23, 42, 0.18);
  --da-aov-border: rgba(255, 255, 255, 0.08);
  --da-aov-inner-border: rgba(255, 255, 255, 0.08);
  --da-aov-control-border: rgba(255, 255, 255, 0.12);
  --da-aov-control: rgba(15, 23, 42, 0.35);
  --da-aov-bevel: linear-gradient(105deg, rgba(0, 0, 0, 0.10) 0%, rgba(255, 255, 255, 0.07) 100%);
  --da-aov-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.06), inset -1px -1px 0 rgba(0, 0, 0, 0.22), 0 4px 10px rgba(0, 0, 0, 0.16);
  --da-aov-hover-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.08), inset -1px -1px 0 rgba(0, 0, 0, 0.25), 0 7px 14px rgba(0, 0, 0, 0.20);
}

body.light #diagnosticAgentPage.active {
  --da-aov-page: #f2f5f8;
  --da-aov-surface: #e5e7eb;
  --da-aov-inner: #f8fafc;
  --da-aov-border: rgba(71, 85, 105, 0.34);
  --da-aov-inner-border: rgba(15, 52, 96, 0.10);
  --da-aov-control-border: #cbd5e1;
  --da-aov-control: #dbe3ec;
  --da-aov-bevel: linear-gradient(105deg, rgba(255, 255, 255, 0.72) 0%, rgba(148, 163, 184, 0.08) 100%);
  --da-aov-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.95), inset -1px -1px 0 rgba(100, 116, 139, 0.10), 0 4px 10px rgba(15, 23, 42, 0.07);
  --da-aov-hover-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.98), inset -1px -1px 0 rgba(100, 116, 139, 0.13), 0 7px 14px rgba(15, 23, 42, 0.10);
}

body:not(.light) #diagnosticAgentPage.active {
  background: var(--da-aov-page) !important;
}

#diagnosticAgentPage.active .da-shell {
  background: var(--da-aov-page);
}

#diagnosticAgentPage.active .da-left-panel,
#diagnosticAgentPage.active .da-main-panel,
#diagnosticAgentPage.active .da-right-panel {
  border-color: var(--da-aov-border);
  border-radius: 22px;
  background: var(--da-aov-surface);
  box-shadow: none;
}

#diagnosticAgentPage.active .da-panel {
  border-color: var(--da-aov-border);
  border-radius: 22px;
  background-color: var(--da-aov-surface);
  background-image: var(--da-aov-bevel);
  box-shadow: var(--da-aov-shadow);
}

#diagnosticAgentPage.active .da-right-panel .da-panel,
#diagnosticAgentPage.active .da-alarm-row,
#diagnosticAgentPage.active .da-runtime-item,
#diagnosticAgentPage.active .da-device-choice:not(.is-active) {
  border-color: var(--da-aov-inner-border);
  border-radius: 10px;
  background-color: var(--da-aov-inner);
  background-image: var(--da-aov-bevel);
  box-shadow: var(--da-aov-shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

#diagnosticAgentPage.active .da-right-panel .da-panel:hover,
#diagnosticAgentPage.active .da-alarm-row:hover,
#diagnosticAgentPage.active .da-runtime-item:hover,
#diagnosticAgentPage.active .da-device-choice:not(.is-active):hover {
  transform: translateY(-1px);
  box-shadow: var(--da-aov-hover-shadow);
}

#diagnosticAgentPage.active .da-select,
#diagnosticAgentPage.active .da-control input,
#diagnosticAgentPage.active .da-native-select,
#diagnosticAgentPage.active .da-station-trigger,
#diagnosticAgentPage.active .da-range {
  border: 1px solid var(--da-aov-control-border);
  border-radius: 7px;
  background: var(--da-aov-control);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.035), inset -1px -1px 0 rgba(0, 0, 0, 0.12);
}

#diagnosticAgentPage.active .da-global-search-menu,
#diagnosticAgentPage.active .da-device-search-menu,
#diagnosticAgentPage.active .da-station-menu {
  border-color: var(--da-aov-control-border);
  border-radius: 10px;
  background-color: var(--da-aov-surface);
  background-image: var(--da-aov-bevel);
  box-shadow: var(--da-aov-shadow), 0 14px 28px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1480px) {
  .da-workspace {
    grid-template-columns: 178px minmax(0, 1fr) 4px minmax(320px, var(--da-result-panel-width));
  }

  .da-workspace.is-left-collapsed {
    grid-template-columns: 64px minmax(0, 1fr) 4px minmax(320px, var(--da-result-panel-width));
  }
}

@media (max-width: 1280px) {
  .da-workspace {
    grid-template-columns: 178px minmax(0, 1fr);
  }

  .da-workspace.is-left-collapsed {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .da-right-panel {
    grid-column: 1 / -1;
  }

  .da-result-resizer {
    display: none;
  }

  .da-grid-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .da-runtime-panel {
    grid-column: 1 / -1;
  }

  .da-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  #diagnosticAgentPage.active {
    overflow: hidden;
  }

  .da-workspace {
    grid-template-columns: 1fr;
  }

  .da-workspace.is-left-collapsed {
    grid-template-columns: 1fr;
  }

  .da-grid-top,
  .da-toolbar,
  .da-result-actions,
  .da-chart-grid {
    grid-template-columns: 1fr;
  }

  .da-toolbar {
    align-items: stretch;
  }

  .da-global-search-wrap,
  .da-range {
    width: 100%;
  }

  .da-global-search-control {
    min-height: 0;
  }

  .da-global-search-control .da-global-search-wrap {
    width: 100%;
  }

  .da-station-context {
    position: static;
    margin-top: 12px;
  }

  .start-btn {
    margin-top: 0;
  }

  .da-device-wrap {
    grid-template-columns: 1fr;
  }

  .da-process-line {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 14px;
  }

  .da-process-line::before {
    display: none;
  }
}

@media (max-width: 720px) {
  #diagnosticAgentPage.active {
    margin: 0 -20px -20px;
  }

  .da-shell {
    padding: 10px;
  }

  .da-left-panel,
  .da-main-panel,
  .da-right-panel {
    border-radius: 12px;
  }

  .da-process-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* The reference view is closest to a browser zoom of 110%. Keep the
   diagnostic workspace at that reading size by default on desktop while
   compensating its outer dimensions so it does not create a second
   horizontal scrollbar. Mobile keeps the existing responsive scale. */
@media (min-width: 961px) {
  #diagnosticAgentPage.active .da-shell {
    zoom: 1.1;
    width: 100%;
    margin-right: -9.090909%;
    height: calc((100svh - 79px) / 1.1);
    min-height: calc((100svh - 79px) / 1.1);
  }

  #diagnosticAgentPage.active .da-workspace {
    height: calc((100svh - 107px) / 1.1);
    min-height: calc((100svh - 107px) / 1.1);
  }
}

.da-knowledge-shell .da-workspace { grid-template-columns: 178px minmax(0, 1fr); }
.da-knowledge-shell .da-workspace.is-left-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.da-knowledge-main { min-width: 0; padding: 0; overflow: hidden; }
.da-knowledge-main iframe { display: block; width: 100%; height: 100%; min-height: 0; border: 0; background: #09111f; overflow: hidden; }

.da-history-main { overflow: auto; padding: 22px; }
.da-history-page { min-height: 100%; color: #e7eef9; }
.da-history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.da-history-head h2 { margin: 0; font-size: 24px; }
.da-history-head p { margin: 6px 0 0; color: #91a1b5; font-size: 12px; }
.da-history-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.da-history-metric { padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(15,23,42,.28); }
.da-history-metric strong { display: block; font-size: 22px; color: #f4f8ff; }
.da-history-metric small { display: block; margin-top: 5px; color: #91a1b5; }
.da-history-list, .da-history-tasks { margin-top: 14px; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(15,23,42,.2); }
.da-history-row { display: grid; grid-template-columns: minmax(0,1fr) 110px 70px; align-items: center; width: 100%; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid rgba(255,255,255,.07); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.da-history-row:first-of-type { border-top: 0; }
.da-history-row b { display: block; color: #eaf2fb; }
.da-history-row small { display: block; margin-top: 4px; color: #8497ae; font-size: 11px; }
.da-history-row em { color: #79c6ff; font-size: 12px; font-style: normal; }
.da-history-row i { color: #65d6b4; font-style: normal; text-align: right; }
.da-history-row:hover { background: rgba(73,137,220,.1); }
.da-history-empty { padding: 30px 10px; color: #91a1b5; text-align: center; }
@media (max-width: 800px) { .da-history-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } .da-history-row { grid-template-columns: minmax(0,1fr) 75px; } .da-history-row i { display:none; } }

.da-result-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  color: #9fb0c6;
}

.da-result-empty strong { color: #edf4ff; font-size: 17px; }
.da-result-empty p { margin: 0; line-height: 1.7; }
.da-engine-meta { margin-top: 10px; color: #7f93ad; font-size: 11px; overflow-wrap: anywhere; }
.da-evidence-card li small,
.da-suggestion-card li small { display: block; margin-top: 3px; color: #7f93ad; font-size: 10px; }
.da-candidate-card > div:not(.da-section-head) { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; }
.da-candidate-card > div span { color: #8fbaff; white-space: nowrap; }
.da-missing-card ul { margin: 0; padding-left: 18px; color: #ffc477; font-size: 12px; line-height: 1.7; }
.da-feedback-card .da-section-head small { color: #65d6b4; }
.da-feedback-card > div:last-child { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.da-feedback-card button { min-height: 32px; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; background: rgba(15,23,42,.35); color: #dce8f8; cursor: pointer; }
.da-feedback-card button:disabled { opacity: .55; cursor: default; }

@media (max-width: 1050px) {
  .da-knowledge-shell .da-workspace { grid-template-columns: 178px minmax(0, 1fr); }
  .da-knowledge-shell .da-workspace.is-left-collapsed { grid-template-columns: 64px minmax(0, 1fr); }
}
