:root {
  --blue: #2d82ff;
  --cyan: #25f3ff;
  --shell: #000000;
  --deep: #041120;
  --header: #092846;
  --panel: #06182b;
  --panel-title: #0a2a49;
  --sidebar: #27313f;
  --text: #eef7ff;
  --muted: #a7bbce;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
  color: var(--text);
  background: var(--shell);
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
.menu-list li,
.mini-card {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.page-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  justify-items: center;
  align-items: center;
  padding: clamp(8px, 1.08vh, 15px) 0 clamp(18px, 2.15vh, 30px);
  background: #000;
}

.device-wrap {
  width: min(100vw, calc((100vh - clamp(26px, 3.23vh, 45px)) * 1.332857));
  height: min(calc(100vh - clamp(26px, 3.23vh, 45px)), calc(100vw / 1.332857));
}

.device-frame {
  width: 100%;
  height: 100%;
  background: #020913;
  border-radius: clamp(18px, 2.35vw, 44px);
  overflow: hidden;
}

.dashboard {
  --run-speed: 2s;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background: #04101f;
  color: var(--text);
  display: grid;
  grid-template-rows: 9.65% 1fr 11.2%;
}

.dashboard-header {
  min-height: 0;
  display: grid;
  grid-template-columns: 20.4% 1fr 19.8%;
  align-items: center;
  gap: 2.1%;
  padding: 0 2.55% 0 2.25%;
  background: linear-gradient(90deg, #0a2f54, #09213b 56%, #092743);
  border-bottom: 2px solid rgba(37, 112, 168, 0.28);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 22px);
}

.brand strong {
  font-size: clamp(18px, 2.35vw, 44px);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
  color: #edf7ff;
}

.brand-mark {
  width: clamp(34px, 3.35vw, 64px);
  height: clamp(34px, 3.35vw, 64px);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark circle {
  fill: #2477ff;
}

.brand-mark path {
  fill: none;
  stroke: #e9f7ff;
  stroke-width: 3.2;
  stroke-linejoin: round;
}

.top-nav {
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: clamp(24px, 2.65vw, 52px);
}

.top-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: #d8e8f8;
  text-decoration: none;
  font-size: clamp(15px, 1.55vw, 30px);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.top-nav a:hover {
  color: #ffffff;
  filter: drop-shadow(0 0 8px rgba(37, 243, 255, 0.28));
}

.top-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(64px, 7.55vw, 142px);
  height: clamp(4px, 0.35vw, 7px);
  transform: translateX(-50%);
  background: var(--blue);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: clamp(12px, 1.3vw, 24px);
}

.header-actions button {
  height: clamp(34px, 3.9vw, 74px);
  border-radius: clamp(8px, 1.05vw, 18px);
  padding: 0 clamp(18px, 1.85vw, 34px);
  color: #fff;
  font-size: clamp(12px, 1.35vw, 26px);
  font-weight: 900;
  white-space: nowrap;
}

.header-actions button:hover,
.tabs button:hover,
.mode-chip:hover,
.apply-control:hover {
  filter: brightness(1.12);
}

.header-actions button:active,
.tabs button:active,
.mode-chip:active,
.apply-control:active,
.menu-list li:active,
.mini-card:active {
  transform: translateY(1px);
}

.ghost-btn {
  background: transparent;
  border: 3px solid rgba(197, 222, 246, 0.78);
}

.primary-btn {
  min-width: clamp(96px, 9.05vw, 169px);
  background: var(--blue);
  border: 3px solid var(--blue);
}

.primary-btn[aria-pressed="true"] {
  background: #17d4f0;
  border-color: #17d4f0;
  color: #062034;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 19.1% minmax(0, 1fr) 24.55%;
  gap: 1.05%;
  padding: 1.52% 1.08% 0.25% 1.56%;
  background: #06111e;
}

.sidebar,
.side-panel,
.scene-card,
.mini-card {
  background: var(--panel);
}

.sidebar {
  min-width: 0;
  background: linear-gradient(180deg, #2a3545, #252e3b);
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 8.75%;
  min-height: 54px;
  padding: 0 8.8%;
  color: #f0f7ff;
}

.sidebar-title strong {
  font-size: clamp(18px, 2vw, 38px);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.sidebar-title button {
  width: clamp(24px, 2.2vw, 42px);
  height: clamp(24px, 2.2vw, 42px);
  border: 0;
  background: transparent;
  color: #c7d1dc;
  font-size: clamp(24px, 2.6vw, 48px);
  line-height: 1;
  padding: 0;
}

.menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-list li {
  height: clamp(42px, 5.08vw, 72px);
  padding: 0 8.5% 0 11.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6%;
  color: #d1dce8;
  font-size: clamp(15px, 1.55vw, 29px);
  font-weight: 900;
}

.menu-list li:hover {
  color: #fff;
  background: rgba(45, 130, 255, 0.18);
}

.menu-list li::before {
  content: "⌂";
  width: 1.2em;
  margin-right: 3%;
  color: #d5e2ef;
  font-size: 0.58em;
  line-height: 1;
}

.menu-list li span {
  flex: 1;
  white-space: nowrap;
}

.menu-list li.selected {
  color: #fff;
  background: var(--blue);
}

.menu-list b {
  color: #dce8f5;
  font-size: clamp(26px, 2.55vw, 48px);
  font-weight: 300;
  line-height: 1;
}

.main-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 28.05%;
  gap: 2.55%;
}

.scene-card {
  min-height: 0;
  display: grid;
  grid-template-rows: 9.2% minmax(0, 1fr);
}

.panel-title {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 1.4vw, 26px);
  background: var(--panel-title);
  color: #dceeff;
  font-size: clamp(15px, 1.45vw, 27px);
  font-weight: 900;
  letter-spacing: 0;
}

.scene-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1vw, 20px);
}

.scene-heading span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-heading em {
  flex: 0 0 auto;
  padding: clamp(2px, 0.22vw, 4px) clamp(8px, 0.75vw, 14px);
  color: var(--cyan);
  background: rgba(37, 243, 255, 0.09);
  border: 1px solid rgba(37, 243, 255, 0.3);
  font-size: clamp(8px, 0.72rem, 13px);
  font-style: normal;
  font-weight: 900;
}

.panel-title button {
  width: clamp(30px, 2.65vw, 50px);
  height: clamp(30px, 2.65vw, 50px);
  border: 0;
  background: transparent;
  color: #d9e8f7;
  font-size: clamp(34px, 3.05vw, 58px);
  font-weight: 900;
  line-height: 0.86;
  padding: 0;
  overflow: hidden;
}

.panel-title button:hover {
  color: #25f3ff;
  filter: drop-shadow(0 0 8px rgba(37, 243, 255, 0.45));
}

.robot-stage {
  --scene-accent: #25f3ff;
  --scene-soft: rgba(37, 243, 255, 0.18);
  --scene-border: rgba(37, 243, 255, 0.32);
  --scene-warning: #f7df1e;
  min-height: 0;
  position: relative;
  background:
    linear-gradient(rgba(12, 43, 74, 0.72), rgba(3, 17, 32, 0.72)),
    radial-gradient(circle at 54% 47%, var(--scene-soft), transparent 35%),
    #031426;
  overflow: hidden;
}

.robot-stage[data-tone="blue"] {
  --scene-accent: #2d82ff;
  --scene-soft: rgba(45, 130, 255, 0.22);
  --scene-border: rgba(45, 130, 255, 0.34);
  --scene-warning: #24d8ff;
}

.robot-stage[data-tone="green"] {
  --scene-accent: #2af0a2;
  --scene-soft: rgba(42, 240, 162, 0.18);
  --scene-border: rgba(42, 240, 162, 0.32);
  --scene-warning: #8df23f;
}

.robot-stage[data-tone="amber"] {
  --scene-accent: #ffd54a;
  --scene-soft: rgba(255, 213, 74, 0.18);
  --scene-border: rgba(255, 213, 74, 0.34);
  --scene-warning: #ffd54a;
}

.robot-stage[data-tone="red"] {
  --scene-accent: #ff5b7b;
  --scene-soft: rgba(255, 91, 123, 0.18);
  --scene-border: rgba(255, 91, 123, 0.34);
  --scene-warning: #ff5b7b;
}

.robot-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--scene-soft), transparent 30%, transparent 70%, var(--scene-soft)),
    linear-gradient(180deg, transparent 73%, rgba(0, 0, 0, 0.18));
  opacity: 0.82;
}

.robot-visual {
  width: 100%;
  height: 100%;
  display: block;
}

.scene-runtime {
  position: absolute;
  z-index: 3;
  left: 3%;
  right: 3%;
  bottom: 3.2%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 39%;
  gap: clamp(8px, 0.85vw, 16px);
  pointer-events: none;
}

.scene-runtime-copy,
.scene-runtime-metrics span {
  background: rgba(3, 14, 27, 0.72);
  border: 1px solid var(--scene-border);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.18);
}

.scene-runtime-copy {
  min-width: 0;
  padding: clamp(8px, 0.75vw, 14px) clamp(12px, 1vw, 20px);
  border-left: 4px solid var(--scene-accent);
}

.scene-runtime-copy span,
.mini-summary span {
  display: block;
  color: rgba(205, 231, 244, 0.74);
  font-size: clamp(7px, 0.66rem, 12px);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-runtime-copy strong {
  display: block;
  margin-top: 2px;
  color: #f1fbff;
  font-size: clamp(12px, 1.12rem, 22px);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-runtime-copy p {
  margin: clamp(4px, 0.35vw, 7px) 0 0;
  color: rgba(215, 239, 248, 0.82);
  font-size: clamp(8px, 0.74rem, 14px);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene-runtime-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.55vw, 10px);
}

.scene-runtime-metrics span {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
}

.scene-runtime-metrics b {
  color: var(--scene-accent);
  font-size: clamp(13px, 1.16rem, 23px);
  font-weight: 900;
}

.scene-runtime-metrics em {
  color: rgba(212, 235, 246, 0.72);
  font-size: clamp(7px, 0.66rem, 12px);
  font-style: normal;
  white-space: nowrap;
}

.robot,
.holo-panel {
  transform-box: fill-box;
  transform-origin: center;
}

.robot-stage .holo-panel path,
.robot-stage .holo-panel circle,
.robot-stage .holo-panel rect {
  stroke: var(--scene-accent);
}

.robot-stage .holo-panel text {
  fill: var(--scene-accent);
}

.robot-stage .belt-lights rect {
  fill: var(--scene-warning);
}

.dashboard.is-running .robot {
  animation: robot-breathe var(--run-speed) ease-in-out infinite;
}

.dashboard.is-running .holo-panel {
  animation: holo-pulse 1.2s ease-in-out infinite alternate;
}

.dashboard.is-running .belt-lights rect {
  animation: belt-pulse 0.7s ease-in-out infinite alternate;
}

.bottom-panels {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.05%;
}

.mini-card {
  min-width: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(11, 60, 101, 0.95), rgba(5, 29, 50, 0.95)),
    var(--panel);
}

.mini-card:hover {
  filter: brightness(1.12);
}

.mini-card.is-current {
  outline: 2px solid rgba(37, 243, 255, 0.45);
  outline-offset: -2px;
}

.mini-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(45, 130, 255, 0.28), transparent 58%);
  pointer-events: none;
}

.mini-title {
  position: relative;
  z-index: 1;
  height: 18.8%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6.2%;
  color: #e4f4ff;
  font-size: clamp(15px, 1.45vw, 28px);
  font-weight: 900;
}

.mini-title b {
  color: #deecfa;
  font-size: clamp(30px, 2.8vw, 52px);
  font-weight: 300;
  line-height: 1;
}

.mini-summary {
  position: absolute;
  z-index: 2;
  right: 6.2%;
  bottom: 6.8%;
  min-width: 34%;
  padding: clamp(5px, 0.55vw, 10px) clamp(8px, 0.72vw, 14px);
  text-align: right;
  background: rgba(4, 19, 35, 0.68);
  border-right: 3px solid var(--cyan);
}

.mini-summary strong {
  display: block;
  color: var(--cyan);
  font-size: clamp(14px, 1.22rem, 26px);
  font-weight: 900;
  line-height: 1;
}

.mini-card svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: calc(100% - max(36px, 18.8%));
  display: block;
}

.analytics {
  min-width: 0;
  display: grid;
  grid-template-rows: 31.2% 30.4% 1fr;
  gap: 2.58%;
}

.side-panel {
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 20.5% minmax(0, 1fr);
}

.ai-radar {
  grid-template-rows: 20.5% minmax(0, 1fr) auto;
}

.trend-panel {
  grid-template-rows: 20.5% auto minmax(0, 1fr);
}

.realtime-panel {
  grid-template-rows: 19% auto minmax(0, 1fr) auto;
}

.ai-radar svg,
.line-chart {
  width: 100%;
  height: 100%;
  padding: 4.3%;
  display: block;
}

.graph-summary {
  min-height: clamp(32px, 3vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.62vw, 12px);
  padding: 0 5.6% 4.8%;
}

.graph-summary span {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(37, 243, 255, 0.15);
}

.graph-summary b {
  color: var(--cyan);
  font-size: clamp(10px, 0.98vw, 18px);
}

.graph-summary em {
  color: rgba(199, 217, 232, 0.76);
  font-size: clamp(7px, 0.62vw, 12px);
  font-style: normal;
  white-space: nowrap;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3.9%;
  padding: 4.7% 5.6% 0;
}

.tabs button {
  height: clamp(28px, 2.65vw, 50px);
  min-width: 0;
  border: 2px solid #1d4d7e;
  background: #071a31;
  color: #c1d7ea;
  font-size: clamp(11px, 1.08vw, 20px);
  font-weight: 900;
  white-space: nowrap;
}

.tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5.2% 5.6% 0;
  color: #c7d9e8;
  font-size: clamp(11px, 1.08vw, 20px);
  font-weight: 900;
}

.legend-row.lower {
  padding: 0 5.6% 5.2%;
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.7vw, 13px);
  min-width: 0;
  white-space: nowrap;
}

.legend-row b {
  min-width: 0;
  color: inherit;
  font: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend {
  width: clamp(11px, 1.15vw, 21px);
  height: clamp(11px, 1.15vw, 21px);
  display: inline-block;
  border-radius: 50%;
}

.legend-yellow {
  background: #ffd739;
}

.legend-red {
  background: #ff405d;
}

.legend-blue {
  background: #2b84ff;
}

.legend-pink {
  background: #ff6282;
}

.donut-block {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 43% 1fr;
  align-items: center;
  gap: 3.7%;
  padding: 1.5% 5.2%;
}

.donut {
  --donut-blue: 55%;
  --donut-yellow: 76%;
  aspect-ratio: 1;
  width: 100%;
  max-width: 174px;
  justify-self: center;
  border-radius: 50%;
  background: conic-gradient(#2b84ff 0 var(--donut-blue), #ffd83a var(--donut-blue) var(--donut-yellow), #ff5b7b var(--donut-yellow) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 26px rgba(43, 132, 255, 0.28);
}

.donut span {
  width: 56%;
  height: 56%;
  border-radius: 50%;
  background: #06182b;
}

.metric-stack {
  display: grid;
  gap: clamp(9px, 1vw, 18px);
  color: #c6d8e6;
  font-size: clamp(11px, 1.1vw, 21px);
  font-weight: 900;
}

.metric-stack span {
  min-height: clamp(34px, 3.2vw, 60px);
  display: grid;
  place-items: center;
  padding: 0 10%;
  background: rgba(255, 255, 255, 0.065);
  line-height: 1.12;
}

.dashboard-footer {
  min-height: 0;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 31%;
  align-items: stretch;
  gap: clamp(12px, 1.2vw, 24px);
  padding: clamp(7px, 0.72vw, 14px) 2%;
  color: rgba(179, 198, 215, 0.62);
  background: #051222;
  border-top: 2px solid rgba(31, 92, 133, 0.28);
  font-size: clamp(9px, 0.9vw, 17px);
  font-weight: 900;
  letter-spacing: 0;
}

.status-console {
  min-width: 0;
  display: grid;
  grid-template-columns: 35% 28% minmax(0, 1fr);
  gap: clamp(8px, 0.85vw, 16px);
  align-items: stretch;
}

.status-copy,
.runtime-log,
.status-metrics span,
.status-actions button {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(37, 243, 255, 0.11);
}

.status-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 clamp(10px, 1vw, 18px);
}

.status-copy strong {
  color: #eaf8ff;
  font-size: clamp(11px, 1.08vw, 20px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-copy span {
  color: rgba(194, 215, 231, 0.72);
  font-size: clamp(8px, 0.72vw, 14px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.55vw, 10px);
}

.status-metrics span {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}

.status-metrics b {
  color: var(--cyan);
  font-size: clamp(12px, 1.12vw, 21px);
}

.status-metrics em {
  color: rgba(194, 215, 231, 0.75);
  font-size: clamp(7px, 0.68vw, 13px);
  font-style: normal;
}

.status-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(6px, 0.55vw, 10px);
}

.status-actions button {
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 clamp(8px, 0.85vw, 16px);
  color: rgba(217, 246, 255, 0.78);
  background: rgba(255, 255, 255, 0.045);
  font-size: clamp(7px, 0.68vw, 13px);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 3px solid rgba(37, 243, 255, 0.55);
}

.status-actions button:hover {
  color: #fff;
  border-color: rgba(37, 243, 255, 0.34);
  background: rgba(45, 130, 255, 0.18);
}

.runtime-log {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 0.72fr 1.6fr;
  align-items: center;
  gap: clamp(6px, 0.65vw, 12px);
  padding: 0 clamp(10px, 1vw, 18px);
  color: rgba(179, 198, 215, 0.67);
  text-align: center;
}

.runtime-log span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.control-drawer {
  position: absolute;
  z-index: 30;
  top: 11.8%;
  right: 2.15%;
  width: min(430px, 27%);
  padding: clamp(14px, 1.3vw, 24px);
  color: #e9f7ff;
  background:
    linear-gradient(180deg, rgba(10, 42, 73, 0.98), rgba(5, 21, 38, 0.98)),
    #06182b;
  border: 2px solid rgba(37, 243, 255, 0.38);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(37, 243, 255, 0.16);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(12px, 1.1vw, 22px);
}

.drawer-head strong {
  font-size: clamp(16px, 1.55vw, 30px);
  font-weight: 900;
}

.close-control,
.close-detail {
  width: clamp(30px, 2.2vw, 42px);
  height: clamp(30px, 2.2vw, 42px);
  border: 1px solid rgba(216, 238, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: #e9f7ff;
  font-size: clamp(20px, 1.9vw, 36px);
  line-height: 1;
}

.control-row {
  display: grid;
  grid-template-columns: 31% 1fr 16%;
  align-items: center;
  gap: clamp(8px, 0.85vw, 16px);
  margin: clamp(10px, 1vw, 18px) 0;
  font-size: clamp(11px, 1.05vw, 20px);
  font-weight: 900;
}

.control-row input {
  width: 100%;
  accent-color: var(--cyan);
}

.control-row b {
  color: var(--cyan);
  text-align: right;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 0.65vw, 12px);
  margin-top: clamp(14px, 1.3vw, 24px);
}

.mode-chip,
.apply-control {
  min-width: 0;
  border: 2px solid #1d4d7e;
  background: #071a31;
  color: #c1d7ea;
  font-size: clamp(10px, 0.95vw, 18px);
  font-weight: 900;
}

.mode-chip {
  height: clamp(30px, 2.45vw, 46px);
}

.mode-chip.active {
  border-color: var(--cyan);
  color: #062034;
  background: var(--cyan);
}

.apply-control {
  width: 100%;
  height: clamp(34px, 2.9vw, 54px);
  margin-top: clamp(12px, 1.2vw, 22px);
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.detail-modal {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 4%;
  background: rgba(0, 6, 14, 0.62);
  backdrop-filter: blur(4px);
}

.detail-card {
  width: min(560px, 40%);
  min-width: 360px;
  padding: clamp(18px, 1.8vw, 34px);
  color: #eaf8ff;
  background:
    linear-gradient(180deg, rgba(9, 44, 77, 0.98), rgba(5, 20, 36, 0.98)),
    #06182b;
  border: 2px solid rgba(37, 243, 255, 0.42);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(37, 243, 255, 0.18);
}

.detail-card h2 {
  margin: 0 0 clamp(16px, 1.5vw, 28px);
  padding-right: clamp(36px, 3vw, 56px);
  font-size: clamp(20px, 2vw, 38px);
  line-height: 1.16;
}

.detail-card p {
  margin: clamp(16px, 1.5vw, 28px) 0 0;
  color: #bcd5e8;
  font-size: clamp(12px, 1.05vw, 20px);
  font-weight: 800;
  line-height: 1.55;
}

.close-detail {
  float: right;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 18px);
}

.detail-grid span {
  display: grid;
  place-items: center;
  min-height: clamp(70px, 6vw, 112px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(37, 243, 255, 0.18);
}

.detail-grid b {
  color: var(--cyan);
  font-size: clamp(20px, 2vw, 38px);
}

.detail-grid em {
  color: #bcd5e8;
  font-size: clamp(11px, 1vw, 19px);
  font-style: normal;
  font-weight: 900;
}

.detail-actions {
  margin: clamp(14px, 1.35vw, 26px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(8px, 0.75vw, 14px);
  list-style: none;
}

.detail-actions li {
  min-height: clamp(28px, 2.45vw, 46px);
  display: flex;
  align-items: center;
  padding: 0 clamp(12px, 1.1vw, 20px);
  color: #d9f6ff;
  font-size: clamp(11px, 1vw, 19px);
  font-weight: 800;
  background: rgba(37, 243, 255, 0.08);
  border-left: 3px solid rgba(37, 243, 255, 0.7);
}

.toast {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: 10.5%;
  transform: translateX(-50%);
  min-width: clamp(180px, 16vw, 300px);
  padding: clamp(10px, 0.9vw, 16px) clamp(18px, 1.5vw, 28px);
  color: #062034;
  text-align: center;
  font-size: clamp(12px, 1.05vw, 20px);
  font-weight: 900;
  background: rgba(37, 243, 255, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

@keyframes robot-breathe {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(-0.8deg);
  }
}

@keyframes holo-pulse {
  from {
    opacity: 0.72;
  }

  to {
    opacity: 1;
  }
}

@keyframes belt-pulse {
  from {
    opacity: 0.45;
  }

  to {
    opacity: 1;
    filter: drop-shadow(0 0 7px #f7df1e);
  }
}

@media (max-aspect-ratio: 4 / 3) {
  body {
    overflow-y: auto;
  }
}

@media (max-width: 760px) {
  .device-wrap {
    width: 100vw;
    height: calc(100vw / 1.332857);
  }

  .dashboard-header {
    grid-template-columns: 22% 1fr 20%;
    gap: 1.2%;
  }

  .top-nav {
    gap: 3.1%;
  }

  .header-actions button {
    border-width: 1px;
    padding: 0 8px;
  }

  .ghost-btn {
    display: none;
  }

  .control-drawer {
    width: 46%;
  }

  .detail-card {
    width: 70%;
    min-width: 0;
  }
}
