:root {
  --bg: #020b1b;
  --bg-deep: #010713;
  --panel-top: #07192f;
  --panel-bottom: #041225;
  --panel-line: rgba(58, 142, 226, 0.46);
  --panel-line-bright: rgba(87, 191, 255, 0.82);
  --primary: #168eff;
  --cyan: #55dfff;
  --cyan-soft: rgba(85, 223, 255, 0.18);
  --text: #edf5ff;
  --secondary: #91adce;
  --muted: #5f7b9c;
  --critical: #ff4f62;
  --warning: #ffae47;
  --notice: #4db7ff;
  --good: #2ddbb5;
  --font-sans: "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --font-mono: "Bahnschrift", "DIN Alternate", "Roboto Condensed", Consolas,
    monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000711;
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 2px;
}

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(18, 72, 137, 0.13), transparent 42%),
    #000711;
}

.stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  transform-origin: left top;
  background:
    radial-gradient(circle at 50% 45%, rgba(13, 72, 139, 0.15), transparent 34%),
    linear-gradient(180deg, #020d1e 0%, var(--bg) 52%, #020a17 100%);
  color: var(--text);
  isolation: isolate;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.2),
    transparent 7%,
    transparent 93%,
    rgba(0, 0, 0, 0.2)
  );
}

.screen-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(51, 119, 180, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 119, 180, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, black 5%, transparent 82%);
}

.screen-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
}

.screen-glow-a {
  width: 500px;
  height: 500px;
  left: 720px;
  top: 150px;
  background: rgba(18, 111, 203, 0.3);
}

.screen-glow-b {
  width: 280px;
  height: 280px;
  right: 180px;
  bottom: 120px;
  background: rgba(36, 205, 226, 0.13);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.topbar {
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 100px;
  display: grid;
  grid-template-columns: 520px minmax(700px, 1fr) 470px;
  align-items: center;
  z-index: 20;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(50, 137, 221, 0.42) 12%,
    rgba(85, 223, 255, 0.3) 50%,
    rgba(50, 137, 221, 0.42) 88%,
    transparent
  );
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
  color: var(--secondary);
}

.topbar-clock-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.35;
}

.time-readout {
  display: grid;
  gap: 4px;
}

.time-readout strong {
  color: #d9eaff;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.time-readout span,
.weather-readout span {
  color: #5f7b9c;
  font-size: 10px;
  line-height: 1;
}

.topbar-separator {
  width: 1px;
  height: 34px;
  margin: 0 8px;
  background: linear-gradient(transparent, rgba(89, 158, 222, 0.48), transparent);
}

.weather-icon {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: #74c8ff;
  stroke-width: 1.25;
}

.weather-readout {
  display: grid;
  gap: 5px;
}

.weather-readout strong {
  color: #d6e8fb;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.brand-block {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.brand-copy {
  text-align: center;
  min-width: 670px;
}

.brand-copy h1 {
  margin: 0;
  color: #f2f9ff;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
  text-shadow: 0 0 22px rgba(71, 179, 255, 0.25);
}

.brand-copy p {
  margin: 9px 0 0;
  color: #7f9abe;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.8px;
  line-height: 1;
}

.brand-line {
  position: relative;
  width: 129px;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-line::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(53, 157, 255, 0.75));
  transform: skewX(-40deg);
}

.brand-line-right::before {
  background: linear-gradient(90deg, rgba(53, 157, 255, 0.75), transparent);
  transform: skewX(40deg);
}

.brand-line i {
  position: relative;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(85, 223, 255, 0.8);
  transform: rotate(45deg);
  box-shadow: 0 0 9px rgba(85, 223, 255, 0.25);
}

.brand-line i:nth-child(2) {
  width: 11px;
  height: 11px;
  background: rgba(22, 142, 255, 0.22);
}

.brand-line-left,
.brand-line-left i {
  transform: rotate(0);
}

.topbar-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding-right: 10px;
}

.system-health {
  height: 31px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(53, 133, 202, 0.34);
  background: rgba(8, 28, 51, 0.7);
  color: #96b6d8;
  font-size: 12px;
}

.status-pulse,
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px rgba(45, 219, 181, 0.72);
}

.icon-button {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(53, 133, 202, 0.34);
  background: rgba(7, 25, 47, 0.7);
  cursor: pointer;
}

.icon-button:hover,
.account-button:hover {
  border-color: rgba(85, 223, 255, 0.66);
  background: rgba(11, 45, 79, 0.8);
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #9dbde0;
  stroke-width: 1.35;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  background: var(--critical);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  box-shadow: 0 0 7px rgba(255, 79, 98, 0.35);
}

.account-button {
  height: 42px;
  min-width: 142px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(53, 133, 202, 0.34);
  background: rgba(7, 25, 47, 0.7);
  cursor: pointer;
}

.account-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 223, 255, 0.36);
  background: linear-gradient(145deg, rgba(22, 142, 255, 0.22), rgba(9, 37, 68, 0.82));
}

.account-avatar svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #8dd5ff;
  stroke-width: 1.4;
}

.account-copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.account-copy b {
  color: #cfe4f8;
  font-size: 12px;
  font-weight: 500;
}

.account-copy small {
  color: #547397;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.4px;
}

.chevron {
  width: 12px;
  height: 12px;
  margin-left: auto;
  fill: none;
  stroke: #5d80a6;
  stroke-width: 1.3;
}

/* Main layout */
.side-column {
  position: absolute;
  top: 110px;
  width: 474px;
  height: 858px;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 14px;
  z-index: 10;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.side-column-left {
  left: 20px;
}

.side-column-right {
  left: 1426px;
}

.data-panel {
  position: relative;
  min-height: 0;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(91, 177, 247, 0.72),
    rgba(33, 96, 160, 0.26) 38%,
    rgba(53, 143, 224, 0.42)
  );
  clip-path: polygon(
    14px 0,
    calc(100% - 14px) 0,
    100% 14px,
    100% calc(100% - 14px),
    calc(100% - 14px) 100%,
    14px 100%,
    0 calc(100% - 14px),
    0 14px
  );
  filter: drop-shadow(0 0 12px rgba(18, 109, 194, 0.08));
}

.data-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(15, 47, 81, 0.28), transparent 32%),
    linear-gradient(180deg, var(--panel-top), var(--panel-bottom));
  clip-path: inherit;
  pointer-events: none;
}

.data-panel > * {
  position: relative;
  z-index: 1;
}

.panel-corners::before,
.panel-corners::after {
  content: "";
  position: absolute;
  z-index: 3;
  pointer-events: none;
}

.panel-corners::before {
  top: 7px;
  left: 8px;
  width: 31px;
  height: 12px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
  filter: drop-shadow(0 0 5px rgba(85, 223, 255, 0.45));
}

.panel-corners::after {
  right: 8px;
  bottom: 7px;
  width: 28px;
  height: 10px;
  border-right: 1px solid rgba(85, 223, 255, 0.74);
  border-bottom: 1px solid rgba(85, 223, 255, 0.74);
}

.panel-header {
  height: 58px;
  padding: 14px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.panel-header::after {
  content: "";
  position: absolute;
  top: 57px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(70, 162, 237, 0.5),
    rgba(70, 162, 237, 0.16) 58%,
    transparent
  );
}

.panel-header::before {
  content: "";
  position: absolute;
  top: 56px;
  left: 20px;
  width: 62px;
  height: 3px;
  background: linear-gradient(90deg, rgba(85, 223, 255, 0.8), transparent);
}

.panel-header h2 {
  margin: 0;
  color: #e4f1ff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
}

.panel-header h2 span {
  color: #7390b1;
  font-size: 12px;
  font-weight: 400;
}

.panel-header p {
  margin: 4px 0 0;
  color: #54769d;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.1px;
  line-height: 1;
}

.panel-index {
  padding-top: 3px;
  color: rgba(79, 148, 211, 0.36);
  font-family: var(--font-mono);
  font-size: 13px;
}

.panel-content {
  height: calc(100% - 58px);
  min-height: 0;
  padding: 12px 20px 16px;
}

.chart {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

/* Operation panel */
.operation-content {
  display: grid;
  grid-template-columns: 178px 1fr;
  align-items: center;
  gap: 15px;
  padding-top: 7px;
}

.score-block {
  position: relative;
  height: 180px;
}

.score-chart {
  position: absolute;
  inset: 0;
}

.score-caption {
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: #7f9fbe;
  font-size: 12px;
}

.score-caption b {
  color: #4fe0c0;
  font-weight: 500;
}

.score-state-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px rgba(45, 219, 181, 0.8);
}

.status-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(61, 125, 184, 0.18);
  border-left: 1px solid rgba(61, 125, 184, 0.18);
}

.status-stat {
  min-width: 0;
  height: 74px;
  padding: 13px 12px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(61, 125, 184, 0.18);
  border-bottom: 1px solid rgba(61, 125, 184, 0.18);
  background: linear-gradient(135deg, rgba(18, 64, 108, 0.17), transparent 75%);
}

.status-stat span {
  color: #7997b7;
  font-size: 11px;
  line-height: 1;
}

.status-stat strong {
  align-self: flex-end;
  color: #e6f4ff;
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}

.status-stat.is-warning strong {
  color: var(--warning);
}

/* Environment panel */
.environment-content {
  padding-top: 7px;
  padding-bottom: 10px;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.environment-row {
  min-height: 0;
  display: grid;
  grid-template-columns: 48px 132px 1fr;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid rgba(55, 116, 174, 0.16);
}

.environment-row:last-child {
  border-bottom: 0;
}

.metric-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(65, 143, 208, 0.25);
  background: linear-gradient(145deg, rgba(18, 72, 121, 0.36), rgba(6, 25, 47, 0.38));
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.metric-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: #63bdf5;
  stroke-width: 1.35;
}

.metric-label {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: baseline;
  gap: 7px;
}

.metric-label > span {
  color: #87a4c3;
  font-size: 13px;
}

.metric-label strong {
  color: #e7f5ff;
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  text-align: right;
}

.metric-label small,
.energy-summary small,
.key-metric small,
.load-stats small {
  margin-left: 3px;
  color: #7395b7;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
}

.sparkline {
  width: 100%;
  height: 35px;
  overflow: visible;
}

.spark-line {
  fill: none;
  stroke: #3ea8ec;
  stroke-width: 1.3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(62, 168, 236, 0.35));
}

.spark-area {
  fill: url("#sparkFill");
  fill: rgba(22, 142, 255, 0.09);
  stroke: none;
}

/* Alarm panel */
.alarm-content {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 8px;
}

.alarm-summary {
  height: 43px;
  display: grid;
  grid-template-columns: 104px repeat(3, 1fr);
  align-items: center;
}

.alarm-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.alarm-total span {
  color: #809cba;
  font-size: 11px;
}

.alarm-total strong {
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.alarm-total small {
  margin-left: 2px;
  color: #718eab;
  font-family: var(--font-sans);
  font-size: 9px;
}

.alarm-level {
  display: grid;
  grid-template-columns: 5px 1fr auto;
  align-items: center;
  gap: 5px;
  padding-left: 10px;
  border-left: 1px solid rgba(65, 130, 188, 0.18);
}

.alarm-level i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.alarm-level span {
  color: #7895b4;
  font-size: 10px;
}

.alarm-level b {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
}

.alarm-level.is-critical i {
  background: var(--critical);
}

.alarm-level.is-critical b {
  color: var(--critical);
}

.alarm-level.is-general i {
  background: var(--warning);
}

.alarm-level.is-general b {
  color: var(--warning);
}

.alarm-level.is-notice i {
  background: var(--notice);
}

.alarm-level.is-notice b {
  color: var(--notice);
}

.alarm-chart {
  flex: 1;
  min-height: 0;
}

/* Center navigation */
.center-column {
  position: absolute;
  top: 110px;
  left: 514px;
  width: 892px;
  height: 858px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 8;
  transition:
    left 0.45s ease,
    width 0.45s ease;
}

.central-nav {
  position: relative;
  height: 66px;
  flex: 0 0 66px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  background:
    linear-gradient(180deg, rgba(13, 41, 72, 0.78), rgba(4, 20, 39, 0.84));
  border: 1px solid rgba(54, 133, 203, 0.46);
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
}

.central-nav::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85, 223, 255, 0.42), transparent);
}

.nav-item {
  position: relative;
  min-width: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-right: 1px solid rgba(75, 133, 185, 0.16);
  background: transparent;
  color: #819bb8;
  font-size: 14px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-item:last-child {
  border-right: 0;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 -3px 12px rgba(85, 223, 255, 0.4);
}

.nav-item:hover {
  color: #c9e6ff;
  background: rgba(20, 94, 157, 0.15);
}

.nav-item.is-active {
  color: #e9f8ff;
  background:
    linear-gradient(180deg, rgba(18, 125, 215, 0.3), rgba(12, 66, 112, 0.16)),
    linear-gradient(90deg, transparent, rgba(85, 223, 255, 0.08), transparent);
}

.nav-item.is-active::after {
  opacity: 1;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
}

/* 3D room */
.room-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(58, 141, 213, 0.44);
  background:
    radial-gradient(ellipse at 50% 78%, rgba(29, 75, 106, 0.16), transparent 52%),
    linear-gradient(180deg, #04101f, #020a15 72%, #03101d);
  clip-path: polygon(
    13px 0,
    calc(100% - 13px) 0,
    100% 13px,
    100% calc(100% - 13px),
    calc(100% - 13px) 100%,
    13px 100%,
    0 calc(100% - 13px),
    0 13px
  );
}

.room-shell::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 3;
  pointer-events: none;
  border-top: 1px solid rgba(85, 223, 255, 0.12);
  border-bottom: 1px solid rgba(85, 223, 255, 0.08);
}

.room-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.room-frame-corner {
  position: absolute;
  width: 49px;
  height: 19px;
}

.corner-tl {
  top: 7px;
  left: 7px;
  border-top: 2px solid var(--cyan);
  border-left: 2px solid var(--cyan);
}

.corner-tr {
  top: 7px;
  right: 7px;
  border-top: 1px solid rgba(85, 223, 255, 0.62);
  border-right: 1px solid rgba(85, 223, 255, 0.62);
}

.corner-bl {
  bottom: 7px;
  left: 7px;
  border-bottom: 1px solid rgba(85, 223, 255, 0.62);
  border-left: 1px solid rgba(85, 223, 255, 0.62);
}

.corner-br {
  right: 7px;
  bottom: 7px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
}

.three-mount {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.three-mount canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.three-mount canvas:active {
  cursor: grabbing;
}

.room-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 10, 21, 0.32), transparent 14%, transparent 82%, rgba(2, 8, 16, 0.44)),
    radial-gradient(ellipse at center, transparent 46%, rgba(0, 6, 14, 0.32) 100%);
}

.room-projection-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.zone-marker {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 83px;
  height: 37px;
  padding: 0 10px 0 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
  border: 1px solid rgba(83, 193, 255, 0.5);
  background: rgba(5, 20, 38, 0.88);
  color: #d9f2ff;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -100%);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.zone-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 1px;
  height: 12px;
  background: linear-gradient(rgba(85, 223, 255, 0.8), transparent);
}

.zone-marker:hover,
.zone-marker.is-active {
  border-color: rgba(85, 223, 255, 0.95);
  background: rgba(10, 45, 78, 0.94);
  box-shadow: 0 0 18px rgba(85, 223, 255, 0.18);
}

.zone-pin {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 1px solid rgba(85, 223, 255, 0.9);
  transform: rotate(45deg);
}

.zone-pin::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: rgba(85, 223, 255, 0.75);
  box-shadow: 0 0 8px rgba(85, 223, 255, 0.65);
}

.zone-marker-copy {
  display: flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.zone-marker-copy b {
  font-size: 12px;
  font-weight: 600;
}

.zone-marker-copy span {
  color: #73c7f9;
  font-family: var(--font-mono);
  font-size: 11px;
}

.room-hud {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.room-hud-top {
  top: 19px;
  left: 23px;
  right: 98px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6886a7;
  font-size: 11px;
}

.room-breadcrumb span {
  color: #58c8ff;
}

.room-breadcrumb i {
  width: 23px;
  height: 1px;
  background: linear-gradient(90deg, rgba(85, 223, 255, 0.3), rgba(85, 223, 255, 0.72));
}

.room-breadcrumb b {
  color: #95b2cf;
  font-weight: 400;
}

.room-scene-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #557492;
  font-family: var(--font-mono);
  font-size: 9px;
}

.room-scene-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.room-controls {
  position: absolute;
  top: 16px;
  right: 17px;
  z-index: 9;
  display: flex;
  gap: 7px;
}

.room-control-button {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 137, 207, 0.42);
  background: rgba(5, 23, 43, 0.8);
  cursor: pointer;
}

.room-control-button:hover {
  border-color: rgba(85, 223, 255, 0.72);
  background: rgba(8, 46, 80, 0.88);
}

.room-control-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #8ec9ef;
  stroke-width: 1.35;
}

.room-instruction {
  position: absolute;
  left: 50%;
  bottom: 82px;
  z-index: 6;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(123, 161, 193, 0.58);
  font-size: 9px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.room-instruction.is-hidden {
  opacity: 0;
}

.mouse-orbit {
  position: relative;
  width: 11px;
  height: 16px;
  border: 1px solid rgba(109, 166, 209, 0.54);
  border-radius: 6px;
}

.mouse-orbit::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 1px;
  height: 4px;
  background: #73b8e9;
}

.assistant-launcher {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 15;
  height: 54px;
  min-width: 165px;
  padding: 0 16px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(58, 187, 245, 0.52);
  background:
    linear-gradient(100deg, rgba(8, 53, 88, 0.94), rgba(4, 24, 44, 0.96));
  text-align: left;
  cursor: pointer;
  clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
  box-shadow: 0 0 30px rgba(22, 142, 255, 0.14);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.assistant-launcher:hover {
  transform: translateY(-2px);
  border-color: rgba(85, 223, 255, 0.88);
}

.assistant-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 223, 255, 0.46);
  background: radial-gradient(circle, rgba(22, 142, 255, 0.28), rgba(6, 34, 63, 0.8));
}

.assistant-avatar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #84e2ff;
  stroke-width: 1.35;
}

.assistant-launcher > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.assistant-launcher b {
  color: #d9f7ff;
  font-size: 14px;
  font-weight: 600;
}

.assistant-launcher small {
  color: #6d9bbe;
  font-size: 9px;
}

.launcher-pulse {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}

/* Assistant drawer */
.assistant-drawer {
  position: absolute;
  top: 13px;
  right: 13px;
  bottom: 13px;
  z-index: 30;
  width: 382px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(67, 171, 236, 0.52);
  background:
    linear-gradient(180deg, rgba(8, 32, 57, 0.98), rgba(3, 16, 31, 0.99));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 28px));
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.25s ease;
}

.assistant-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.drawer-header {
  flex: 0 0 70px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(75, 151, 211, 0.2);
  background: linear-gradient(90deg, rgba(22, 142, 255, 0.1), transparent);
}

.drawer-agent {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-agent-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(85, 223, 255, 0.42);
  background: radial-gradient(circle, rgba(22, 142, 255, 0.26), rgba(4, 24, 45, 0.9));
}

.drawer-agent-avatar svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #80ddff;
  stroke-width: 1.35;
}

.drawer-agent h3 {
  margin: 0 0 4px;
  color: #e0f6ff;
  font-size: 16px;
  font-weight: 600;
}

.drawer-agent h3 span {
  margin-left: 6px;
  color: var(--good);
  font-size: 9px;
  font-weight: 400;
}

.drawer-agent p {
  margin: 0;
  color: #5c7f9f;
  font-size: 9px;
}

.drawer-close,
.popover-close {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(64, 130, 185, 0.28);
  background: rgba(6, 25, 46, 0.7);
  cursor: pointer;
}

.drawer-close:hover,
.popover-close:hover {
  border-color: rgba(85, 223, 255, 0.6);
}

.drawer-close svg,
.popover-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #89abc9;
  stroke-width: 1.4;
}

.assistant-conversation {
  flex: 1;
  min-height: 108px;
  overflow-y: auto;
  padding: 14px 14px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 126, 181, 0.5) transparent;
}

.chat-message {
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.chat-message.is-user {
  align-items: flex-end;
}

.chat-bubble {
  max-width: 292px;
  padding: 10px 12px;
  border: 1px solid rgba(61, 139, 198, 0.25);
  border-left-color: rgba(85, 223, 255, 0.64);
  background: rgba(13, 47, 78, 0.45);
  color: #bcd8ee;
  font-size: 12px;
  line-height: 1.6;
}

.chat-message.is-user .chat-bubble {
  border-right-color: rgba(85, 223, 255, 0.64);
  border-left-color: rgba(61, 139, 198, 0.25);
  background: rgba(19, 74, 123, 0.5);
  color: #e0f4ff;
}

.chat-message time {
  color: #4f6e8d;
  font-family: var(--font-mono);
  font-size: 8px;
}

.chat-message.is-progress .chat-bubble {
  border-left-color: rgba(85, 223, 255, 0.7);
}

.progress-dots {
  margin-left: 4px;
  color: #71ddff;
  animation: progressPulse 1.1s ease-in-out infinite;
}

@keyframes progressPulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.suggested-command {
  width: fit-content;
  padding: 7px 10px;
  border: 1px dashed rgba(64, 151, 219, 0.4);
  color: #71bdeb;
  background: rgba(13, 58, 95, 0.2);
  font-size: 10px;
  cursor: pointer;
}

.suggested-command:hover {
  border-color: rgba(85, 223, 255, 0.68);
  color: #c4eeff;
}

.device-detail {
  display: none;
  margin: 0 14px 10px;
  border: 1px solid rgba(255, 79, 98, 0.36);
  background: linear-gradient(135deg, rgba(94, 20, 32, 0.24), rgba(8, 27, 46, 0.58));
}

.device-detail.is-visible {
  display: block;
  animation: detailIn 0.3s ease both;
}

@keyframes detailIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.device-detail-head {
  padding: 10px 11px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(176, 74, 87, 0.2);
}

.device-detail-head span {
  color: #c4848d;
  font-family: var(--font-mono);
  font-size: 8px;
}

.device-detail-head h4 {
  margin: 2px 0 0;
  color: #f3f9ff;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 500;
}

.device-status-pill {
  padding: 4px 7px;
  border: 1px solid rgba(255, 79, 98, 0.5);
  color: #ff7b8b;
  font-size: 9px;
}

.device-detail-body {
  padding: 9px 11px 11px;
}

.device-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(82, 125, 160, 0.16);
}

.device-facts div {
  padding: 7px 8px;
  display: grid;
  gap: 4px;
  background: #071c31;
}

.device-facts span {
  color: #5f7f9f;
  font-size: 8px;
}

.device-facts b {
  color: #d6ebfa;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.device-facts b.is-critical {
  color: var(--critical);
}

.device-recommendation {
  margin-top: 8px;
  padding: 8px 9px;
  border-left: 2px solid rgba(255, 174, 71, 0.7);
  background: rgba(101, 65, 21, 0.16);
  color: #b9c9d9;
  font-size: 10px;
  line-height: 1.55;
}

.device-recommendation b {
  color: #ffc76e;
  font-weight: 500;
}

.assistant-composer {
  flex: 0 0 auto;
  padding: 10px 12px 11px;
  border-top: 1px solid rgba(67, 138, 194, 0.2);
}

.command-input-wrap {
  height: 40px;
  display: grid;
  grid-template-columns: 1fr 38px 38px;
  border: 1px solid rgba(66, 148, 216, 0.34);
  background: rgba(3, 17, 32, 0.82);
}

.command-input-wrap:focus-within {
  border-color: rgba(85, 223, 255, 0.64);
}

.command-input-wrap input {
  min-width: 0;
  padding: 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dbf2ff;
  font-size: 11px;
}

.command-input-wrap input::placeholder {
  color: #4d6c8a;
}

.voice-button,
.send-button {
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(66, 148, 216, 0.22);
  background: transparent;
  cursor: pointer;
}

.voice-button:hover,
.send-button:hover {
  background: rgba(22, 142, 255, 0.16);
}

.voice-button.is-listening {
  background: rgba(255, 79, 98, 0.16);
}

.voice-button.is-listening svg {
  stroke: #ff7786;
  filter: drop-shadow(0 0 5px rgba(255, 79, 98, 0.7));
}

.voice-button svg,
.send-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #7ec8ef;
  stroke-width: 1.35;
}

.send-button {
  background: rgba(22, 142, 255, 0.18);
}

.voice-status {
  margin-top: 6px;
  color: #4f6d89;
  font-size: 8px;
  line-height: 1.3;
}

.voice-status.is-active {
  color: #ff8996;
}

.voice-status.is-unsupported {
  color: #bf9551;
}

/* Zone popover */
.zone-popover {
  position: absolute;
  top: 57px;
  right: 17px;
  z-index: 26;
  width: 252px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(68, 169, 229, 0.55);
  background:
    linear-gradient(145deg, rgba(9, 42, 71, 0.98), rgba(3, 18, 34, 0.98));
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.zone-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.popover-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.popover-eyebrow {
  color: #4f88b2;
  font-family: var(--font-mono);
  font-size: 8px;
}

.zone-popover h3 {
  margin: 5px 0 11px;
  color: #e0f5ff;
  font-size: 22px;
  font-weight: 600;
}

.popover-temp {
  padding: 9px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid rgba(70, 143, 201, 0.2);
  border-bottom: 1px solid rgba(70, 143, 201, 0.2);
}

.popover-temp span {
  color: #7996b4;
  font-size: 10px;
}

.popover-temp strong {
  color: #6ce2ff;
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
}

.popover-temp small {
  margin-left: 2px;
  font-size: 11px;
}

.popover-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.popover-grid span {
  color: #6987a4;
  font-size: 9px;
}

.popover-grid b {
  display: block;
  margin-top: 3px;
  color: #cce7f8;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.room-focus-toolbar {
  position: absolute;
  top: 17px;
  left: 20px;
  z-index: 9;
  display: none;
  align-items: center;
  gap: 15px;
  color: #7d9cb9;
  font-size: 10px;
}

.focus-return {
  height: 32px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(70, 156, 223, 0.4);
  background: rgba(5, 24, 45, 0.82);
  color: #acd4ef;
  font-size: 10px;
  cursor: pointer;
}

.focus-return:hover {
  border-color: rgba(85, 223, 255, 0.72);
}

.focus-return svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}

/* Right panels */
.load-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 5px;
  padding-bottom: 8px;
}

.load-top {
  flex: 0 0 102px;
  display: grid;
  grid-template-columns: 171px 1fr;
  align-items: center;
  gap: 8px;
}

.load-chart {
  height: 102px;
}

.load-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.load-stats > div:not(.load-state) {
  display: grid;
  gap: 4px;
}

.load-stats span {
  color: #7894b2;
  font-size: 9px;
}

.load-stats strong {
  color: #e6f5ff;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
}

.load-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.load-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 7px rgba(45, 219, 181, 0.6);
}

.load-state span {
  color: #53cbb1;
}

.load-trend-chart {
  flex: 1;
  min-height: 0;
}

.energy-content {
  display: flex;
  flex-direction: column;
  padding-top: 7px;
  padding-bottom: 6px;
}

.energy-summary {
  flex: 0 0 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.energy-summary > div:first-child {
  display: grid;
  gap: 4px;
}

.energy-summary span {
  color: #7896b5;
  font-size: 10px;
}

.energy-summary strong {
  color: #e8f6ff;
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
}

.energy-change {
  display: flex;
  align-items: center;
  gap: 4px;
}

.energy-change svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--good);
  stroke-width: 1.35;
}

.energy-change strong {
  color: var(--good);
  font-size: 16px;
}

.energy-change span {
  margin-left: 3px;
  color: #6685a2;
  font-size: 9px;
}

.energy-chart {
  flex: 1;
  min-height: 0;
}

.distribution-content {
  display: grid;
  grid-template-columns: 202px 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
  padding-bottom: 10px;
}

.distribution-chart {
  height: 184px;
}

.distribution-legend {
  display: grid;
  gap: 0;
}

.legend-row {
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(63, 126, 183, 0.15);
}

.legend-row:last-child {
  border-bottom: 0;
}

.legend-row span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #839fbd;
  font-size: 11px;
}

.legend-row i {
  width: 6px;
  height: 6px;
  background: var(--legend-color);
  box-shadow: 0 0 5px color-mix(in srgb, var(--legend-color) 45%, transparent);
}

.legend-row strong {
  color: #d7ebfb;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
}

.legend-row small {
  margin-left: 1px;
  color: #6683a0;
  font-size: 9px;
  font-weight: 400;
}

/* Bottom band */
.bottom-band {
  position: absolute;
  left: 20px;
  top: 988px;
  width: 1880px;
  height: 74px;
  z-index: 12;
  padding: 1px;
  display: grid;
  grid-template-columns: 474px minmax(760px, 1fr) 390px;
  align-items: stretch;
  background: linear-gradient(
    90deg,
    rgba(79, 167, 235, 0.66),
    rgba(48, 119, 178, 0.24) 50%,
    rgba(79, 167, 235, 0.55)
  );
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
}

.bottom-band::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 44, 75, 0.6), rgba(4, 19, 35, 0.94));
  clip-path: inherit;
}

.active-alert {
  position: relative;
  min-width: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-right: 1px solid rgba(86, 147, 199, 0.2);
  background: linear-gradient(90deg, rgba(103, 24, 37, 0.2), transparent);
}

.alert-icon-wrap {
  position: relative;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 79, 98, 0.42);
  background: rgba(109, 22, 36, 0.28);
}

.alert-icon-wrap svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #ff6577;
  stroke-width: 1.25;
}

.alert-copy {
  min-width: 0;
}

.alert-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.alert-meta time {
  color: #6e8dab;
  font-family: var(--font-mono);
  font-size: 10px;
}

.alert-meta b {
  padding: 2px 5px;
  border: 1px solid rgba(255, 79, 98, 0.34);
  color: #ff7c8b;
  font-size: 8px;
  font-weight: 400;
}

.alert-copy p {
  margin: 5px 0 0;
  color: #cfdeed;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-wave {
  position: absolute;
  left: 77px;
  bottom: 11px;
  width: 280px;
  height: 17px;
  opacity: 0.28;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 5px,
      rgba(255, 79, 98, 0.38) 5px 7px
    );
  mask-image: linear-gradient(90deg, black, transparent);
}

.key-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.key-metric {
  min-width: 0;
  height: 43px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-right: 1px solid rgba(72, 133, 185, 0.2);
}

.key-metric:last-child {
  border-right: 0;
}

.key-metric svg {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: none;
  stroke: #5fb9ee;
  stroke-width: 1.3;
}

.key-metric > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.key-metric strong {
  color: #e2f3ff;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.key-metric span {
  color: #6e8eac;
  font-size: 9px;
  white-space: nowrap;
}

.enter-room-button {
  margin: 9px 11px 9px 16px;
  min-width: 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(54, 170, 237, 0.6);
  background:
    linear-gradient(100deg, rgba(15, 109, 183, 0.46), rgba(8, 45, 77, 0.55));
  color: #d9f3ff;
  font-size: 13px;
  cursor: pointer;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.enter-room-button:hover {
  border-color: var(--cyan);
  background:
    linear-gradient(100deg, rgba(17, 132, 212, 0.62), rgba(8, 56, 92, 0.65));
}

.enter-room-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #78dcff;
  stroke-width: 1.4;
}

/* Focus mode */
.stage.is-room-focus .side-column {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98);
}

.stage.is-room-focus .center-column {
  left: 20px;
  width: 1880px;
}

.stage.is-room-focus .room-focus-toolbar {
  display: flex;
}

.stage.is-room-focus .room-hud-top {
  display: none;
}

.stage.is-room-focus .assistant-launcher {
  right: 24px;
  bottom: 24px;
}

.stage.is-room-focus .assistant-drawer {
  width: 408px;
  top: 17px;
  right: 17px;
  bottom: 17px;
}

.stage.is-room-focus .zone-marker {
  min-width: 96px;
}

.stage.is-room-focus .bottom-band {
  opacity: 0.88;
}

/* Toast and loading */
.toast {
  position: absolute;
  left: 50%;
  bottom: 88px;
  z-index: 70;
  min-width: 280px;
  max-width: 600px;
  padding: 10px 16px;
  border: 1px solid rgba(67, 157, 223, 0.48);
  background: rgba(5, 24, 44, 0.95);
  color: #bcd9ef;
  font-size: 11px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(13, 74, 136, 0.18), transparent 30%),
    #020b1b;
  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-mark {
  width: 68px;
  height: 54px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.loading-mark span {
  width: 8px;
  background: linear-gradient(180deg, var(--cyan), var(--primary));
  animation: loadingBars 1.15s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(85, 223, 255, 0.32);
}

.loading-mark span:nth-child(1) {
  height: 21px;
  animation-delay: -0.3s;
}

.loading-mark span:nth-child(2) {
  height: 42px;
}

.loading-mark span:nth-child(3) {
  height: 29px;
  animation-delay: -0.16s;
}

@keyframes loadingBars {
  0%,
  100% {
    transform: scaleY(0.55);
    opacity: 0.45;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.loading-screen h2 {
  margin: 22px 0 7px;
  color: #cfeeff;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 2px;
}

.loading-screen p {
  margin: 0;
  color: #527697;
  font-size: 11px;
}

.loading-track {
  width: 260px;
  height: 2px;
  margin-top: 22px;
  background: rgba(53, 113, 168, 0.24);
  overflow: hidden;
}

.loading-track i {
  display: block;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: loadingTrack 1.4s ease-in-out infinite;
}

@keyframes loadingTrack {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(340%);
  }
}

.fatal-error {
  position: absolute;
  inset: 0;
  z-index: 110;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #020b1b;
  text-align: center;
}

.fatal-error[hidden] {
  display: none;
}

.fatal-error h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.fatal-error p {
  color: var(--secondary);
}

.fatal-error button {
  margin-top: 14px;
  padding: 9px 18px;
  border: 1px solid var(--primary);
  background: rgba(22, 142, 255, 0.16);
  cursor: pointer;
}

/* Scrollbar */
.assistant-conversation::-webkit-scrollbar {
  width: 5px;
}

.assistant-conversation::-webkit-scrollbar-thumb {
  background: rgba(62, 126, 181, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
