:root {
  --dash-ink: #25221f;
  --dash-muted: #66615d;
  --dash-panel: rgba(255, 253, 248, 0.78);
  --dash-border: rgba(37, 34, 31, 0.12);
  --dash-green: #78c66f;
  --dash-cyan: #5a8dee;
  --dash-amber: #f7c56b;
  --dash-red: #ff6f61;
}

body.dashboard-screen {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #f7f8f4;
}

.dashboard-screen {
  color: var(--dash-ink);
  font-family: "Avenir Next", "Trebuchet MS", "PingFang SC", sans-serif;
}

.dashboard-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  color: var(--dash-ink);
  background:
    linear-gradient(90deg, rgba(23, 23, 23, .04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, .035) 1px, transparent 1px),
    radial-gradient(circle at 49% 45%, rgba(255, 253, 248, .34), transparent 32%),
    linear-gradient(135deg, #d9e2e2 0%, #f7efe2 44%, #f4d8c0 100%);
  background-size: 36px 36px, 36px 36px, auto, cover;
}

body[data-page="dashboard"] .main {
  display: grid !important;
  grid-template-rows: 58px minmax(0, 1fr) !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body[data-page="dashboard"] .dashboard-embedded-section.section.active {
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.dashboard-embedded-section .dashboard-stage {
  height: 100%;
  min-height: 0;
  border-radius: 0;
}

.dashboard-embedded-section .dashboard-map-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #06151b;
}

.hub-atmosphere,
.scanline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scanline {
  display: none;
}

.dashboard-label-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  contain: layout style paint;
}

.dashboard-service-label {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 220px;
  color: #3f443b;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.055em;
  opacity: 0;
  white-space: nowrap;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  transform-origin: 0 50%;
  will-change: transform, opacity;
  text-shadow: 0 1px 0 rgba(255, 253, 248, 0.82), 0 8px 16px rgba(64, 77, 63, 0.12);
}

.dashboard-header {
  position: absolute;
  top: 28px;
  left: 32px;
  right: 32px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-header-end {
  justify-content: flex-end;
}

.dashboard-mode,
.module-panel,
.event-panel {
  border: 1px solid var(--dash-border);
  background: var(--dash-panel);
  box-shadow: 0 18px 52px rgba(30, 28, 25, .12);
  backdrop-filter: blur(14px);
}

.dashboard-mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--dash-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.mode-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dash-green);
  box-shadow: 0 0 18px var(--dash-green);
  animation: dotPulse 1.7s ease-in-out infinite;
}

.panel-heading span {
  color: var(--dash-muted);
  font-size: 12px;
}

.module-panel,
.event-panel {
  position: absolute;
  z-index: 4;
  width: 292px;
  border-radius: 8px;
}

.module-panel,
.event-panel {
  display: none;
}

.module-panel {
  top: 112px;
  right: 32px;
  padding: 16px;
}

.event-panel {
  right: 32px;
  bottom: 160px;
  padding: 16px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-heading strong {
  color: var(--dash-cyan);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
}

.module-list {
  display: grid;
  gap: 8px;
}

.module-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  color: #dbe7e6;
  font-size: 12px;
}

.module-row i {
  color: var(--dash-green);
  font-size: 15px;
}

.module-row b {
  color: var(--dash-muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.event-feed {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-feed li {
  position: relative;
  padding-left: 18px;
  color: #dbe7e6;
  font-size: 12px;
  line-height: 1.45;
}

.event-feed li::before {
  position: absolute;
  top: 7px;
  left: 0;
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: var(--dash-cyan);
  box-shadow: 0 0 14px var(--dash-cyan);
}

.event-feed time {
  display: block;
  color: var(--dash-muted);
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.hub-core {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: min(15%, 180px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hub-ring,
.hub-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.hub-ring {
  border: 1px solid rgba(121, 216, 255, 0.2);
}

.hub-ring-one {
  animation: orbitTilt 16s linear infinite;
}

.hub-ring-two {
  inset: 16%;
  border-color: rgba(115, 241, 182, 0.24);
  animation: orbitTilt 11s linear infinite reverse;
}

.hub-mark {
  inset: 38%;
  background: rgba(234, 255, 246, 0.1);
  border: 1px solid rgba(226, 255, 245, 0.2);
  box-shadow: inset 0 0 32px rgba(115, 241, 182, 0.2), 0 0 72px rgba(121, 216, 255, 0.26);
}

.hub-mark img {
  width: 44%;
  height: 44%;
}

@keyframes dotPulse {
  0%,
  100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.45); opacity: 1; }
}

@keyframes orbitTilt {
  from { transform: rotateX(66deg) rotateZ(0deg); }
  to { transform: rotateX(66deg) rotateZ(360deg); }
}

@media (max-width: 980px) {
  .dashboard-stage {
    min-height: 780px;
    overflow-y: auto;
  }

  .module-panel,
  .event-panel {
    right: 24px;
    width: 260px;
  }

}

@media (max-width: 720px) {
  body.dashboard-screen {
    overflow: auto;
  }

  .dashboard-stage {
    height: auto;
    min-height: 100vh;
    padding: 24px;
  }

  .dashboard-header,
  .module-panel,
  .event-panel,
  .hub-core {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    transform: none;
  }

  .dashboard-header {
    padding-bottom: 36px;
  }

  .hub-core {
    width: 78vw;
    margin: 0 auto 38px;
  }

  .module-panel,
  .event-panel {
    margin-top: 12px;
  }

}

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