:root {
  --future-panel: rgba(2, 18, 24, .22);
  --future-panel-strong: rgba(2, 16, 21, .36);
  --future-panel-critical: rgba(32, 9, 10, .34);
  --future-panel-blur: 3px;
  --future-cyan: #62f0e7;
  --future-green: #72f5a4;
  --future-amber: #ffc04d;
  --future-red: #ff756f;
  --future-line: rgba(98, 240, 231, .34);
  --future-line-soft: rgba(98, 240, 231, .16);
  --future-ops-width: 250px;
  --future-ai-width: 360px;
  --future-events-width: 286px;
  --future-gap: 8px;
  --future-map-height: 470px;
  --future-site-gauge-size: 184px;
}

body.utility-future-view {
  min-width: 1200px;
  min-height: 100vh;
  overflow-x: auto;
  color: #eefbfa;
  background: #02090c;
}

#future-holographic-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(22, 94, 101, .18), transparent 48%),
    linear-gradient(145deg, #061216 0%, #020709 68%, #100b05 100%);
}

#future-holographic-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(98, 240, 231, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 240, 231, .018) 1px, transparent 1px),
    radial-gradient(circle at center, transparent 38%, rgba(0, 5, 8, .28) 100%);
  background-size: 36px 36px, 36px 36px, auto;
}

.future-photo-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center center;
  background-size: cover;
  filter: saturate(.86) contrast(1.04) brightness(.78);
  transform: scale(1.015);
  transition: opacity 320ms ease, transform 480ms cubic-bezier(.2,.8,.2,1);
}

.future-photo-layer.active {
  opacity: 1;
  transform: scale(1);
}

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

body.utility-future-view.future-background-fallback #future-holographic-canvas {
  background:
    radial-gradient(circle at 48% 38%, rgba(26, 116, 119, .34), transparent 42%),
    linear-gradient(145deg, #071a20, #020709 72%);
}

body.utility-future-view > header,
body.utility-future-view .tabs,
body.utility-future-view #detail,
body.utility-future-view .demo-sandbox,
body.utility-future-view .demo-multi-bar,
body.utility-future-view .demo-ai-compact-module,
body.utility-future-view .demo-detail-drawer {
  display: none !important;
}

body.utility-future-view main,
body.utility-future-view main.demo-mode {
  display: block;
  padding: 0;
}

body.utility-future-view #workspace,
body.utility-future-view #demoPanel {
  max-height: none;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.utility-future-view .demo-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 10px;
  background: transparent;
}

body.utility-future-view .demo-topbar,
body.utility-future-view .demo-kpis,
body.utility-future-view .demo-health,
body.utility-future-view .demo-module,
body.utility-future-view .demo-ai-inbox-message,
body.utility-future-view .demo-health-card {
  border-color: var(--future-line);
  background: var(--future-panel);
  backdrop-filter: blur(var(--future-panel-blur)) saturate(118%);
  -webkit-backdrop-filter: blur(var(--future-panel-blur)) saturate(118%);
  box-shadow:
    inset 0 1px rgba(255,255,255,.055),
    inset 0 0 22px rgba(31, 193, 190, .025),
    0 10px 28px rgba(0,0,0,.18);
}

body.utility-future-view .demo-topbar,
body.utility-future-view .demo-kpis {
  position: relative;
  z-index: 8;
}

body.utility-future-view .demo-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: var(--future-ops-width) minmax(320px, 1fr) var(--future-ai-width) var(--future-events-width);
  gap: var(--future-gap);
  min-height: 640px;
  margin-top: var(--future-gap);
  align-items: start;
}

body.utility-future-view #demo-fleet-panels {
  grid-column: 1;
  position: relative;
  z-index: 6;
  transition: padding-top 480ms cubic-bezier(.2,.8,.2,1);
}

body.utility-future-view .demo-center {
  grid-column: 2;
  min-width: 0;
  padding-top: calc(var(--future-map-height) + var(--future-gap));
}

body.utility-future-view .demo-center > .demo-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.utility-future-view .demo-ai-inbox-column {
  grid-column: 3;
  display: block;
  min-width: 0;
  max-height: 632px;
  overflow: hidden;
  border-color: rgba(114, 245, 164, .38);
}

body.utility-future-view .demo-ai-inbox-column + .demo-stack {
  grid-column: 4;
}

body.utility-future-view .demo-map-module {
  position: absolute;
  z-index: 7;
  top: 0;
  left: calc(var(--future-ops-width) + var(--future-gap));
  width: calc(100% - var(--future-ops-width) - var(--future-ai-width) - var(--future-events-width) - (var(--future-gap) * 3));
  height: var(--future-map-height);
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: left 480ms cubic-bezier(.2,.8,.2,1), top 480ms cubic-bezier(.2,.8,.2,1), width 480ms cubic-bezier(.2,.8,.2,1), height 480ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms ease;
}

body.utility-future-view .demo-map-module .demo-module-head {
  position: relative;
  z-index: 8;
}

body.utility-future-view #demo-saudi-map {
  position: absolute;
  inset: 27px 0 0;
  height: auto;
  min-height: 0;
  opacity: .91;
  transition: opacity 320ms ease;
}

body.utility-future-view .demo-map-module .maplibregl-canvas {
  opacity: .9;
}

body.utility-future-view .demo-map-overlay {
  z-index: 7;
}

#future-map-expand {
  display: none;
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(98,240,231,.34);
  border-radius: 3px;
  color: #cbfbf4;
  background: rgba(2,18,24,.40);
  font-size: 7px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.utility-future-view.future-site-focus .demo-map-module {
  left: 0;
  width: var(--future-ops-width);
  height: 180px;
  box-shadow: 0 0 34px rgba(37, 231, 220, .16);
}

body.utility-future-view.future-site-focus #future-map-expand {
  display: inline-flex;
}

body.utility-future-view.future-site-focus .demo-map-module .demo-module-head > span:first-child {
  display: none;
}

body.utility-future-view.future-site-focus #demo-fleet-panels {
  padding-top: 188px;
}

body.utility-future-view.future-site-focus #demo-saudi-map {
  cursor: pointer;
}

body.utility-future-view.future-site-focus .demo-map-chip {
  display: none;
}

body.utility-future-view.future-site-focus .demo-asset-marker {
  width: 21px;
  height: 21px;
  font-size: 7px;
  transform: none;
}

body.utility-future-view .demo-module-head,
body.utility-future-view .demo-ai-inbox-summary {
  border-color: rgba(255, 192, 77, .28);
  background: linear-gradient(90deg, rgba(2,18,24,.44), rgba(38,25,5,.26));
}

body.utility-future-view .demo-module-head {
  min-height: 27px;
  box-sizing: border-box;
}

body.utility-future-view .demo-chart,
body.utility-future-view .demo-ai-inbox-list,
body.utility-future-view .demo-event,
body.utility-future-view .demo-health-measurements {
  border-color: var(--future-line-soft);
  background-color: rgba(2, 16, 21, .18);
}

body.utility-future-view .demo-alarm,
body.utility-future-view .demo-ai-builder-safety,
body.utility-future-view .demo-ai-automation-card {
  background: var(--future-panel-critical);
}

body.utility-future-view button,
body.utility-future-view select {
  border-color: rgba(98, 240, 231, .28);
  background: rgba(4, 20, 25, .52);
}

body.utility-future-view button:hover:not(:disabled) {
  border-color: var(--future-cyan);
  box-shadow: 0 0 12px rgba(98,240,231,.13);
}

.future-site-hud {
  position: absolute;
  z-index: 6;
  top: 34px;
  left: calc(var(--future-ops-width) + (var(--future-gap) * 2) + 24px);
  width: calc(100% - var(--future-ops-width) - var(--future-ai-width) -
    var(--future-events-width) - (var(--future-gap) * 4) - 48px);
  min-width: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: #efffff;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  animation: future-site-hud-in 320ms ease 160ms forwards;
}

.future-site-identity {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(270px, auto);
  align-items: end;
  gap: 22px;
  padding: 0 0 11px;
  border-bottom: 1px solid rgba(98,240,231,.42);
  background: transparent;
  text-shadow: 0 2px 12px rgba(0,0,0,.92);
}

.future-site-heading {
  min-width: 0;
}

.future-site-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.future-site-identity::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 72px;
  height: 2px;
  background: var(--future-cyan);
  box-shadow: 0 0 14px rgba(98,240,231,.7);
}

.future-site-eyebrow {
  display: block;
  color: var(--future-cyan);
  font: 700 8px ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.future-site-identity h2 {
  min-width: 0;
  margin: 5px 0 0;
  padding: 0;
  border: 0;
  color: #fff;
  font: 500 24px system-ui, sans-serif;
  letter-spacing: .015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.future-site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 6px;
  color: rgba(239,255,255,.82);
  font: 9px ui-monospace, monospace;
}

.future-open-site {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(98,240,231,.48);
  border-radius: 50%;
  color: #d9fffb;
  background: rgba(2,18,24,.20);
  box-shadow: inset 0 0 15px rgba(98,240,231,.04);
  font: 700 15px system-ui, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  pointer-events: auto;
}

.future-open-site[disabled] {
  opacity: .48;
  pointer-events: none;
}

.future-site-weather {
  position: relative;
  display: grid;
  grid-template-columns: minmax(100px, 1.25fr) repeat(2, minmax(62px, .75fr));
  align-items: end;
  gap: 5px 12px;
  min-width: 270px;
  color: rgba(225,255,252,.84);
  font-family: ui-monospace, monospace;
  text-align: right;
  pointer-events: none;
}

.future-weather-current,
.future-weather-point {
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(98,240,231,.26);
}

.future-site-weather span,
.future-site-weather small {
  display: block;
  color: rgba(215,250,247,.67);
  font-size: 7px;
  letter-spacing: .05em;
  line-height: 1.35;
  text-transform: uppercase;
}

.future-site-weather strong {
  display: block;
  margin: 2px 0;
  color: #f5ffff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.future-weather-current small {
  white-space: nowrap;
}

.future-weather-freshness {
  grid-column: 1 / -1;
  color: rgba(114,245,164,.78) !important;
  text-align: right;
}

.future-site-weather.stale .future-weather-freshness {
  color: var(--future-amber) !important;
}

.future-site-weather.unavailable {
  display: flex;
  min-width: 180px;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 4px;
}

.future-site-weather.unavailable .future-weather-status {
  color: rgba(226,255,252,.62);
}

@keyframes future-site-hud-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.future-site-instruments {
  display: grid;
  grid-template-columns: var(--future-site-gauge-size) minmax(0, 720px);
  align-items: center;
  justify-content: start;
  gap: 22px;
  width: min(100%, calc(var(--future-site-gauge-size) + 22px + 720px));
  margin-top: 17px;
}

.future-site-gauge {
  --future-gauge-accent: var(--future-cyan);
  position: relative;
  width: var(--future-site-gauge-size);
  height: var(--future-site-gauge-size);
  filter: drop-shadow(0 0 9px var(--future-gauge-accent));
}

.future-site-gauge.tone-green { --future-gauge-accent: var(--future-green); }
.future-site-gauge.tone-amber { --future-gauge-accent: var(--future-amber); }
.future-site-gauge.tone-red { --future-gauge-accent: var(--future-red); }

.future-site-gauge-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 225deg,
    var(--future-gauge-accent) 0deg,
    var(--future-gauge-accent) var(--future-gauge-angle),
    rgba(210,255,251,.16) var(--future-gauge-angle),
    rgba(210,255,251,.16) 270deg,
    transparent 270deg);
  -webkit-mask: radial-gradient(farthest-side,
    transparent calc(100% - 8px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side,
    transparent calc(100% - 8px), #000 calc(100% - 7px));
}

.future-site-gauge::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(98,240,231,.16);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(2,18,24,.13), transparent 68%),
    repeating-conic-gradient(from 225deg,
      rgba(210,255,251,.30) 0deg 1deg,
      transparent 1deg 9deg);
  -webkit-mask: radial-gradient(farthest-side,
    transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side,
    transparent calc(100% - 3px), #000 calc(100% - 2px));
}

.future-site-gauge-marker {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 7px #fff, 0 0 16px var(--future-gauge-accent);
  transform: rotate(calc(-135deg + var(--future-gauge-angle)))
    translateY(calc(var(--future-site-gauge-size) * -.46));
  transform-origin: center;
}

.future-site-gauge-value {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  text-shadow: 0 2px 11px #000;
}

.future-site-gauge-value small,
.future-site-gauge-value span {
  color: rgba(226,255,252,.70);
  font: 7px ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.future-site-gauge-value strong {
  margin: 4px 0;
  color: #fff;
  font: 600 22px ui-monospace, monospace;
}

.future-site-gauge-zero,
.future-site-gauge-max {
  position: absolute;
  bottom: 5px;
  color: rgba(226,255,252,.62);
  font: 7px ui-monospace, monospace;
}

.future-site-gauge-zero { left: 16px; }
.future-site-gauge-max { right: 16px; }

.future-site-history {
  width: 100%;
  max-width: 720px;
  min-width: 0;
  align-self: stretch;
  padding: 7px 0 0;
  border-top: 1px solid rgba(98,240,231,.18);
  background: transparent;
  text-shadow: 0 2px 9px rgba(0,0,0,.92);
}

.future-site-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(222,255,251,.78);
  font: 700 8px ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.future-site-history.stale .future-site-history-head small {
  color: var(--future-amber);
}

.future-site-history-svg {
  display: block;
  width: 100%;
  height: calc(var(--future-site-gauge-size) - 28px);
  overflow: visible;
}

.future-site-history-line {
  fill: none;
  stroke: var(--future-cyan);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(98,240,231,.64));
}

.future-site-history-area {
  fill: url(#future-site-history-fill);
}

.future-site-history-zero {
  stroke: rgba(255,255,255,.22);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.future-site-history-endpoint {
  fill: #fff;
  stroke: var(--future-cyan);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(98,240,231,.84));
}

.future-site-history-svg text {
  fill: rgba(226,255,252,.68);
  font: 7px ui-monospace, monospace;
}

.future-site-history-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: rgba(226,255,252,.70);
  font: 9px ui-monospace, monospace;
}

.future-site-history-state.error {
  color: var(--future-amber);
}

.future-ai-scope {
  position: relative;
  z-index: 2;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(98,240,231,.20);
  color: #bdf7eb;
  background: rgba(2, 22, 26, .32);
  font-size: 8px;
  letter-spacing: .025em;
}

#demo-ai-panel > .future-ai-scope {
  border-bottom-color: rgba(255,192,77,.26);
  color: #f1d28a;
}

body.utility-future-view .demo-health {
  position: relative;
  z-index: 4;
  margin-top: var(--future-gap);
  overflow: hidden;
}

body.utility-future-view .demo-health-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(172px, 1fr));
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
}

body.utility-future-view .demo-health-card {
  appearance: none;
  min-height: 150px;
  padding: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

body.utility-future-view .demo-health-card[aria-pressed="true"],
body.utility-future-view .demo-health-card.selected {
  border-color: var(--future-amber);
  box-shadow: inset 0 0 0 1px rgba(255,192,77,.24), 0 0 18px rgba(255,156,32,.14);
}

body.utility-future-view .demo-health-photo-wrap {
  aspect-ratio: 16 / 8;
}

body.utility-future-view .demo-health-photo {
  opacity: .83;
}

body.utility-future-view .demo-health-measurements {
  min-height: 42px;
}

body.utility-future-view .demo-ai-panel {
  z-index: 30;
  grid-template-rows: auto auto 61px minmax(0, 1fr) auto;
  border-color: rgba(98,240,231,.44);
  background: rgba(2, 12, 17, .84);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

body.utility-future-view .demo-ai-panel > .future-ai-scope { grid-row: 1; }
body.utility-future-view .demo-ai-panel > .demo-ai-panel-head { grid-row: 2; }

body.utility-future-view .demo-ai-tabs {
  grid-row: 3;
  box-sizing: border-box;
  height: 61px;
  min-height: 61px;
  max-height: 61px;
  overflow: hidden;
}

body.utility-future-view .demo-ai-tab {
  height: 61px;
  min-height: 0;
  max-height: 61px;
  overflow: hidden;
}

body.utility-future-view .demo-ai-content {
  grid-row: 4;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body.utility-future-view .demo-ai-composer {
  grid-row: 5;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  body.utility-future-view {
    --future-panel: rgba(3, 15, 20, .70);
    --future-panel-strong: rgba(3, 15, 20, .82);
    --future-panel-critical: rgba(27, 10, 12, .82);
  }
}

@media (max-width: 1499px) {
  :root {
    --future-ops-width: 220px;
    --future-ai-width: 300px;
    --future-events-width: 250px;
    --future-site-gauge-size: 148px;
  }

  body.utility-future-view .demo-grid {
    grid-template-columns: var(--future-ops-width) minmax(280px, 1fr) var(--future-ai-width) var(--future-events-width);
  }

  body.utility-future-view .demo-ai-inbox-message,
  body.utility-future-view .demo-module-body {
    padding-left: 7px;
    padding-right: 7px;
  }

  .future-site-hud {
    top: 28px;
    left: calc(var(--future-ops-width) + (var(--future-gap) * 2) + 12px);
    width: calc(100% - var(--future-ops-width) - var(--future-ai-width) -
      var(--future-events-width) - (var(--future-gap) * 4) - 24px);
  }

  .future-site-identity {
    grid-template-columns: minmax(160px, 1fr) minmax(252px, auto);
    gap: 12px;
  }

  .future-site-identity h2 {
    font-size: 19px;
  }

  .future-site-meta {
    gap: 4px 10px;
    font-size: 7px;
  }

  .future-site-weather {
    grid-template-columns: minmax(90px, 1.2fr) repeat(2, minmax(58px, .8fr));
    gap: 4px 7px;
    min-width: 252px;
  }

  .future-weather-current,
  .future-weather-point {
    padding-left: 6px;
  }

  .future-site-weather strong {
    font-size: 12px;
  }

  .future-site-weather span,
  .future-site-weather small {
    font-size: 6px;
  }

  .future-site-instruments {
    grid-template-columns: var(--future-site-gauge-size) minmax(0, 720px);
    gap: 12px;
    width: min(100%, calc(var(--future-site-gauge-size) + 12px + 720px));
    margin-top: 12px;
  }

  .future-site-gauge-value strong {
    font-size: 17px;
  }

  .future-site-history-svg {
    height: 120px;
  }
}

@media (max-width: 1199px) {
  body.utility-future-view::after {
    content: "EnergyOS Utility Situation Room requires a desktop display of at least 1200 px.";
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 32px;
    color: #d9fbf6;
    background: #02090c;
    font: 16px system-ui, sans-serif;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.utility-future-view *,
  body.utility-future-view *::before,
  body.utility-future-view *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
