@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans:wght@400;500;600;700;800&family=Roboto:wght@400;500;700&display=swap");

:root {
  --bg: #050912;
  --panel: rgba(10, 8, 5, 0.28);
  --panel-strong: rgba(24, 18, 10, 0.44);
  --line: rgba(224, 184, 92, 0.14);
  --line-strong: rgba(224, 184, 92, 0.42);
  --cyan: #e0b85c;
  --cyan-soft: #f5d98a;
  --green: #55f0a7;
  --gold: #e0b85c;
  --violet: #9e5cff;
  --pink: #ff5fa8;
  --text: #dcebf2;
  --muted: #6d8494;
  --danger: #ff3f5f;
  --shadow: 0 0 34px rgba(0, 217, 255, 0.1), 0 20px 70px rgba(0, 0, 0, 0.48);
  --earth-image: url("https://th-thumbnailer.cdn-si-edu.com/pOgqTHd1W_oQM96sZRRHo0gi3y4=/fit-in/1600x0/https://tf-cmsv2-smithsonianmag-media.s3.amazonaws.com/filer/f0/b5/f0b53aa8-56a4-45cb-8a19-47033496e975/blackmarble_2016_americas_composite.png");
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 217, 255, 0.38) rgba(0, 217, 255, 0.06);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(0, 217, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 17, 29, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 217, 255, 0.78), rgba(158, 92, 255, 0.46));
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.12);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(56, 255, 76, 0.76), rgba(0, 217, 255, 0.72));
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background:
    linear-gradient(rgba(224, 184, 92, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 184, 92, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(224, 184, 92, 0.13), transparent 34%),
    radial-gradient(circle at 20% 80%, rgba(85, 240, 167, 0.12), transparent 32%),
    linear-gradient(135deg, #020202 0%, #0d0a05 48%, #020201 100%);
  background-size: 78px 78px, 78px 78px, auto, auto, auto;
}

body.font-stack {
  font-family: "Product Sans", "Google Sans", "Inter", Arial, "Helvetica Neue", Helvetica, sans-serif;
}

body.font-stack .brand-lockup strong,
body.font-stack .station-name,
body.font-stack .dept-card strong,
body.font-stack .command-form button,
body.font-stack .nav-tabs button {
  font-family: "Product Sans", "Google Sans", "Inter", Arial, "Helvetica Neue", Helvetica, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.1);
}

.earth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.earth-glow {
  position: absolute;
  left: 50%;
  top: 112%;
  width: max(980px, 104vw);
  height: max(980px, 104vw);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(224, 184, 92, 0.42), rgba(224, 184, 92, 0.12) 38%, transparent 70%);
  filter: blur(12px);
}

.earth-video {
  position: absolute;
  left: 50%;
  bottom: -42%;
  width: max(980px, 104vw);
  height: auto;
  min-height: 760px;
  object-fit: cover;
  object-position: center bottom;
  transform: translateX(-50%);
  opacity: 0.88;
  filter: saturate(0.9) contrast(1.12) brightness(0.78);
}

.earth-video-grade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 72%, rgba(224, 184, 92, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 34%, rgba(0, 0, 0, 0.38)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 42%, rgba(0, 0, 0, 0.34));
}

.earth-video-glow {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: max(760px, 82vw);
  height: 42vh;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(224, 184, 92, 0.28), rgba(224, 184, 92, 0.08) 48%, transparent 72%);
  filter: blur(18px);
}

.earth {
  position: absolute;
  left: 50%;
  top: 118%;
  width: max(900px, 96vw);
  height: max(900px, 96vw);
  border: 1px solid rgba(224, 184, 92, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.9;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 45%, rgba(0, 0, 0, 0.42) 70%, rgba(0, 0, 0, 0.72) 100%),
    radial-gradient(circle at 36% 24%, rgba(255, 232, 166, 0.22), transparent 12%),
    var(--earth-image);
  background-size: cover;
  background-position: center center;
  box-shadow:
    inset -150px -40px 180px rgba(0, 0, 0, 0.62),
    inset 58px 36px 110px rgba(224, 184, 92, 0.24),
    0 0 180px rgba(224, 184, 92, 0.28);
  animation: earthBreathe 8s ease-in-out infinite;
}

.earth-surface {
  position: absolute;
  inset: -1%;
  border-radius: 50%;
  opacity: 0.5;
  background:
    radial-gradient(ellipse at 12% 44%, rgba(245, 217, 138, 0.18), transparent 12%),
    radial-gradient(ellipse at 38% 56%, rgba(85, 240, 167, 0.12), transparent 16%),
    radial-gradient(ellipse at 76% 40%, rgba(245, 217, 138, 0.12), transparent 14%);
  mix-blend-mode: soft-light;
  mask-image: radial-gradient(circle, #000 0 68%, transparent 70%);
}

.surface-a {
  animation: atmosphereRoll 14s ease-in-out infinite alternate;
}

.surface-b {
  transform: translateX(100%);
  animation: atmosphereRollB 18s ease-in-out infinite alternate;
  opacity: 0.4;
}

.earth::before,
.earth::after {
  content: "";
  position: absolute;
  inset: 9%;
  border-radius: 50%;
  border: 1px solid rgba(180, 240, 255, 0.08);
}

.earth::before {
  transform: rotateX(72deg);
}

.earth::after {
  transform: rotateY(68deg);
}

.earth-cloud {
  position: absolute;
  width: 34%;
  height: 11%;
  border-radius: 50%;
  background: rgba(245, 217, 138, 0.18);
  filter: blur(6px);
  animation: cloudOrbit 22s ease-in-out infinite alternate;
}

.cloud-a {
  left: 18%;
  top: 30%;
  --cloud-rotate: -18deg;
  transform: rotate(var(--cloud-rotate));
}

.cloud-b {
  right: 16%;
  top: 45%;
  --cloud-rotate: 22deg;
  transform: rotate(var(--cloud-rotate));
}

.cloud-c {
  left: 34%;
  bottom: 22%;
  --cloud-rotate: 10deg;
  transform: rotate(var(--cloud-rotate));
}

.data-band {
  position: absolute;
  left: 50%;
  width: 46%;
  height: 16%;
  border-top: 1px solid rgba(245, 217, 138, 0.24);
  border-bottom: 1px solid rgba(245, 217, 138, 0.12);
  opacity: 0.88;
  filter: blur(0.2px);
  animation: dataSweep 12s ease-in-out infinite alternate;
}

.data-band::before {
  content: "status.online   route.sync   agent.telemetry   queue.watch   openclaw.mock";
  position: absolute;
  left: 0;
  top: 6px;
  width: 100%;
  color: rgba(245, 226, 174, 0.74);
  font-family: Consolas, monospace;
  font-size: 7px;
  line-height: 1.55;
}

.band-a {
  top: 22%;
  transform: translateX(-4%) rotate(3deg);
}

.band-b {
  top: 48%;
  transform: translateX(-24%) rotate(-5deg);
}

.backdrop-chart {
  position: absolute;
  left: 0;
  top: 12%;
  width: 42vw;
  height: 42vh;
  opacity: 0.42;
}

.chart-line {
  fill: none;
  stroke-width: 4;
  filter: drop-shadow(0 0 8px currentColor);
}

.chart-line.cyan {
  stroke: rgba(224, 184, 92, 0.58);
}

.chart-line.red {
  stroke: rgba(255, 63, 95, 0.5);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.mission-shell {
  width: min(1440px, calc(100vw - 16px));
  height: 100vh;
  margin: 0 auto;
  padding: 8px 0;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) 72px;
  gap: 8px;
  position: relative;
  z-index: 1;
}


.hud-panel {
  border: 1px solid rgba(224, 184, 92, 0.12);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    rgba(5, 17, 29, 0.2);
  background-size: 4px 4px, 4px 4px, auto;
  box-shadow: 0 0 16px rgba(224, 184, 92, 0.05), 0 18px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(7px);
}

.topbar {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 250px;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 9px 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-lockup img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(109, 233, 255, 0.55);
  object-fit: cover;
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.32);
}

.brand-lockup strong {
  display: block;
  color: var(--cyan);
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 800;
}

.brand-lockup span,
.system-status span,
.panel-title,
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.nav-tabs button,
.quick-actions button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  background: transparent;
}

.nav-tabs button {
  padding: 0 12px;
}

.nav-tabs button.active {
  color: var(--cyan);
  border-color: rgba(158, 92, 255, 0.75);
  background: rgba(158, 92, 255, 0.16);
  box-shadow: 0 0 18px rgba(158, 92, 255, 0.18);
}

.nav-tabs span {
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(0, 217, 255, 0.12);
}

.system-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.system-status strong {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}

.mission-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 282px minmax(520px, 1fr) 340px;
  gap: 8px;
}

.left-rail,
.right-rail,
.mission-map {
  min-height: 0;
}

.left-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 10px;
  overflow: hidden;
}

.right-rail {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 210px;
  gap: 8px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(0, 217, 255, 0.18);
}

.panel-title span {
  color: var(--cyan);
}

.panel-title strong {
  color: var(--muted);
  font-size: 10px;
}

.department-roster,
.activity-feed,
.task-queue {
  overflow: auto;
  padding: 10px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.department-roster,
.activity-panel,
.task-panel {
  position: relative;
}

.left-rail::after,
.activity-panel::after,
.task-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 17, 29, 0.92));
  z-index: 2;
}

.dept-card {
  width: 100%;
  margin: 0 0 8px;
  padding: 10px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(8, 28, 45, 0.2);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.dept-card:hover,
.dept-card.active {
  border-color: var(--line-strong);
  background: rgba(0, 217, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 217, 255, 0.08);
}

.dept-head {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 9px;
}

.dept-icon,
.station-icon,
.modal-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 217, 255, 0.32);
  color: var(--cyan);
  background: rgba(0, 217, 255, 0.06);
}

.dept-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
}

.dept-card strong {
  display: block;
  color: var(--cyan);
  font-size: 13px;
  letter-spacing: 0;
}

.dept-card small,
.activity-feed small,
.task-item small {
  color: var(--muted);
  font-size: 10px;
}

.dept-count {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.sparkline {
  width: 100%;
  height: 24px;
  margin-top: 8px;
}

.sparkline polyline {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px var(--cyan));
}

.mission-map {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  background:
    linear-gradient(30deg, transparent 0 49%, rgba(56, 255, 76, 0.035) 50%, transparent 51%),
    linear-gradient(150deg, transparent 0 49%, rgba(56, 255, 76, 0.028) 50%, transparent 51%),
    transparent;
  background-size: auto, 160px 92px, 160px 92px, auto;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.space-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.34) 0 1px, transparent 2px),
    radial-gradient(circle at 18% 82%, rgba(255, 255, 255, 0.26) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 72%, rgba(255, 255, 255, 0.32) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 44%, rgba(158, 92, 255, 0.1), transparent 20%),
    radial-gradient(circle at 58% 48%, rgba(56, 255, 76, 0.045), transparent 18%);
  pointer-events: none;
  animation: spaceDrift 18s ease-in-out infinite alternate;
}

.beam-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.beam {
  stroke: var(--cyan);
  stroke-width: 2.2;
  stroke-dasharray: 8 8;
  filter: drop-shadow(0 0 8px var(--cyan));
  animation: beamDash 900ms linear infinite;
}

.beam-dot {
  fill: var(--gold);
  filter: drop-shadow(0 0 9px var(--gold));
}

.coai-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  user-select: none;
  animation: coreBreathe 3.4s ease-in-out infinite;
}

.core-rings span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 217, 255, 0.28);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.core-rings span:nth-child(2) {
  inset: 18px;
  border-style: dashed;
  animation-direction: reverse;
  animation-duration: 12s;
}

.core-rings span:nth-child(3) {
  inset: 36px;
  border-color: rgba(255, 189, 69, 0.34);
  animation-duration: 9s;
}

.coai-core img {
  width: 86px;
  height: 86px;
  border: 2px solid rgba(109, 233, 255, 0.7);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 44px rgba(0, 217, 255, 0.38);
  z-index: 1;
}

.coai-core strong {
  margin-top: 4px;
  color: var(--cyan);
  font-size: 16px;
  text-shadow: 0 0 14px var(--cyan);
  z-index: 1;
}

.coai-core small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  z-index: 1;
}

.station-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.station {
  position: absolute;
  display: grid;
  place-items: center;
  width: 112px;
  transform: translate(-50%, -50%);
  color: var(--text);
  border: 0;
  background: transparent;
  animation: stationFloat 4.8s ease-in-out infinite;
  animation-delay: calc(var(--station-index, 0) * -320ms);
}

.station-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(0, 217, 255, 0.44);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 24px;
  background: rgba(0, 217, 255, 0.055);
  box-shadow: 0 0 24px rgba(0, 217, 255, 0.09);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.station.working .station-orb,
.station:hover .station-orb,
.station.active .station-orb {
  border-color: var(--green);
  box-shadow: 0 0 34px rgba(56, 255, 76, 0.24);
  transform: translateY(-2px) scale(1.05);
}

.station-orb::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.station-name {
  margin-top: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.7);
}

.station-role {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  text-transform: uppercase;
}

.coai-runner {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -62%);
  transition: left 760ms cubic-bezier(.2, .85, .2, 1), top 760ms cubic-bezier(.2, .85, .2, 1);
  filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.75));
  animation: runnerIdle 2.6s ease-in-out infinite;
}

.drone-ring {
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(0, 217, 255, 0.38);
  border-top-color: rgba(255, 189, 69, 0.74);
  border-radius: 50%;
  animation: spin 5.8s linear infinite;
}

.drone-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 2px solid rgba(109, 233, 255, 0.76);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #050912;
  box-shadow: 0 0 22px rgba(0, 217, 255, 0.38);
  z-index: 3;
}

.drone-core img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kitty-ear {
  position: absolute;
  top: 9px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(224, 184, 92, 0.62);
  background: linear-gradient(135deg, rgba(224, 184, 92, 0.78), rgba(40, 27, 9, 0.92));
  box-shadow: 0 0 14px rgba(224, 184, 92, 0.22);
}

.kitty-ear.left {
  left: 19px;
  border-radius: 16px 4px 10px 4px;
  transform: rotate(-38deg);
}

.kitty-ear.right {
  right: 19px;
  border-radius: 4px 16px 4px 10px;
  transform: rotate(38deg);
}

.kitty-face {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 30px;
  height: 18px;
  transform: translate(-50%, -30%);
  pointer-events: none;
}

.kitty-face::before,
.kitty-face::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 4px;
  height: 5px;
  border-radius: 50%;
  background: rgba(2, 3, 2, 0.78);
  box-shadow: 0 0 5px rgba(224, 184, 92, 0.55);
}

.kitty-face::before {
  left: 7px;
}

.kitty-face::after {
  right: 7px;
}

.kitty-tail {
  position: absolute;
  right: 7px;
  bottom: 16px;
  z-index: 1;
  width: 23px;
  height: 23px;
  border-right: 4px solid rgba(224, 184, 92, 0.72);
  border-bottom: 4px solid rgba(224, 184, 92, 0.72);
  border-radius: 50%;
  transform: rotate(-26deg);
  filter: drop-shadow(0 0 8px rgba(224, 184, 92, 0.28));
}

.drone-wing {
  position: absolute;
  top: 35px;
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 189, 69, 0.45);
}

.drone-wing.left {
  left: 0;
  transform: rotate(-12deg);
}

.drone-wing.right {
  right: 0;
  transform: rotate(12deg);
}

.coai-runner.running .drone-wing.left {
  animation: wingLeft 360ms ease-in-out infinite alternate;
}

.coai-runner.running .drone-wing.right {
  animation: wingRight 360ms ease-in-out infinite alternate;
}

.coai-runner.running .kitty-tail {
  animation: tailWag 420ms ease-in-out infinite alternate;
}

.runner-shadow {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 44px;
  height: 8px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.38);
}

.task-bubble {
  position: absolute;
  z-index: 8;
  min-width: 80px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #061018;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  background: var(--gold);
  box-shadow: 0 0 22px rgba(255, 189, 69, 0.45);
  transition: opacity 180ms ease;
}

.hidden {
  display: none !important;
}

.map-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: min(360px, calc(100% - 36px));
  padding: 12px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 10px;
  background: rgba(4, 12, 23, 0.2);
}

.map-caption span {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.map-caption strong {
  display: block;
  margin-top: 4px;
  font-size: 14px;
}

.activity-panel,
.task-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 10px;
  overflow: hidden;
}

.activity-feed,
.task-queue {
  margin: 0;
  list-style: none;
}

.activity-item {
  display: grid;
  grid-template-columns: 54px 78px 1fr;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  padding: 4px 3px;
  border-radius: 6px;
  transition: background 160ms ease, transform 160ms ease;
}

.activity-item:hover {
  background: rgba(0, 217, 255, 0.06);
  transform: translateX(2px);
}

.activity-item time {
  color: var(--muted);
  font-size: 10px;
}

.activity-item b {
  color: var(--cyan);
  font-size: 10px;
}

.activity-item.done span {
  color: var(--gold);
}

.task-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 28, 45, 0.2);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.task-item:hover {
  border-color: rgba(0, 217, 255, 0.45);
  background: rgba(0, 217, 255, 0.08);
  transform: translateX(2px);
}

.task-item .task-icon {
  color: var(--cyan);
  font-size: 18px;
}

.task-item strong {
  display: block;
  font-size: 12px;
}

.task-actions {
  display: flex;
  gap: 5px;
}

.task-actions button {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(0, 217, 255, 0.35);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(0, 217, 255, 0.08);
}

.task-actions button.reject {
  border-color: rgba(255, 63, 95, 0.4);
  color: var(--danger);
}

.command-dock {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  padding: 10px 12px;
}

.command-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 8px;
}

.command-form input {
  min-height: 42px;
  border: 1px solid rgba(0, 217, 255, 0.32);
  border-radius: 8px;
  color: var(--text);
  padding: 0 14px;
  background: rgba(8, 28, 45, 0.22);
  outline: none;
}

.command-form input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.08);
}

.command-form button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0, 217, 255, 0.13);
}

.quick-actions {
  display: flex;
  gap: 6px;
}

.quick-actions button {
  padding: 0 10px;
  border-color: rgba(0, 217, 255, 0.2);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 86vh;
  overflow: auto;
  border-radius: 14px;
  padding: 22px;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 217, 255, 0.28);
  border-radius: 8px;
  color: var(--cyan);
  background: transparent;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.modal-icon {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  font-size: 28px;
}

.modal-head h2 {
  margin: 0;
  color: var(--cyan);
  font-size: 30px;
}

.modal-head p,
.modal-detail {
  margin: 0;
  color: var(--muted);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.telemetry-grid div {
  padding: 12px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 217, 255, 0.06);
}

.telemetry-grid span,
.modal-card h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.telemetry-grid strong {
  color: var(--cyan);
  font-size: 24px;
}

.agent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.agent-chips span {
  padding: 6px 9px;
  border: 1px solid rgba(0, 217, 255, 0.18);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  background: rgba(0, 217, 255, 0.08);
}

.activity-item:first-child {
  animation: newEvent 420ms ease-out;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes earthBreathe {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.015);
  }
}

@keyframes atmosphereRoll {
  from {
    transform: translateX(-4%) skewX(-2deg);
    opacity: 0.32;
  }
  to {
    transform: translateX(7%) skewX(2deg);
    opacity: 0.58;
  }
}

@keyframes atmosphereRollB {
  from {
    transform: translateX(8%) skewX(2deg);
    opacity: 0.24;
  }
  to {
    transform: translateX(-6%) skewX(-2deg);
    opacity: 0.42;
  }
}

@keyframes cloudOrbit {
  from {
    transform: translateX(-6%) rotate(var(--cloud-rotate, 0deg));
  }
  to {
    transform: translateX(10%) rotate(var(--cloud-rotate, 0deg));
  }
}

@keyframes dataSweep {
  from {
    margin-left: -8%;
    opacity: 0.36;
  }
  to {
    margin-left: 18%;
    opacity: 0.86;
  }
}

@keyframes coreBreathe {
  0%,
  100% {
    filter: drop-shadow(0 0 18px rgba(0, 217, 255, 0.24));
  }
  50% {
    filter: drop-shadow(0 0 34px rgba(0, 217, 255, 0.42));
  }
}

@keyframes stationFloat {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -6px;
  }
}

@keyframes runnerIdle {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -5px;
  }
}

@keyframes spaceDrift {
  from {
    transform: translate3d(-8px, -4px, 0) scale(1);
  }
  to {
    transform: translate3d(8px, 5px, 0) scale(1.02);
  }
}

@keyframes newEvent {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes beamDash {
  to {
    stroke-dashoffset: -32;
  }
}

@keyframes wingLeft {
  from {
    transform: rotate(-18deg) translateX(-2px);
  }
  to {
    transform: rotate(4deg) translateX(2px);
  }
}

@keyframes wingRight {
  from {
    transform: rotate(18deg) translateX(2px);
  }
  to {
    transform: rotate(-4deg) translateX(-2px);
  }
}

@keyframes tailWag {
  from {
    transform: rotate(-34deg) translateX(-1px);
  }
  to {
    transform: rotate(-12deg) translateX(2px);
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .mission-shell {
    height: auto;
    grid-template-rows: auto auto auto;
  }

  .topbar,
  .mission-grid,
  .command-dock {
    grid-template-columns: 1fr;
  }

  .mission-map {
    min-height: 680px;
  }

  .right-rail {
    grid-template-rows: 320px 220px;
  }
}
