:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.88);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --blue: #0071e3;
  --green: #34c759;
  --amber: #ff9f0a;
  --red: #ff453a;
  --teal: #00a8a8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  --gap: clamp(10px, 1.15vw, 16px);
  --page-pad: clamp(10px, 1.35vw, 24px);
  --app-font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(245, 245, 247, 0.62) 360px),
    var(--bg);
  color: var(--ink);
  font-family: var(--app-font);
  letter-spacing: 0;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  min-height: 100vh;
  pointer-events: none;
}

.particle-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 18%, rgba(0, 113, 227, 0.12), transparent 30%),
    radial-gradient(circle at 86% 24%, rgba(52, 199, 89, 0.1), transparent 26%),
    radial-gradient(circle at 52% 92%, rgba(255, 159, 10, 0.08), transparent 30%);
}

.particle-field span {
  position: absolute;
  width: clamp(120px, 18vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0, 113, 227, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent),
    radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 56%);
  filter: blur(0.2px);
  animation: particleDrift 18s ease-in-out infinite;
}

.particle-field span:nth-child(1) { left: 6%; top: 12%; animation-delay: -2s; }
.particle-field span:nth-child(2) { right: 8%; top: 14%; animation-delay: -7s; }
.particle-field span:nth-child(3) { left: 24%; bottom: 8%; animation-delay: -11s; }
.particle-field span:nth-child(4) { right: 20%; bottom: 18%; animation-delay: -4s; }
.particle-field span:nth-child(5) { left: 48%; top: 42%; animation-delay: -14s; }

@keyframes particleDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.48;
  }
  50% {
    transform: translate3d(22px, -28px, 0) scale(1.08);
    opacity: 0.22;
  }
}

body.auth-locked #appShell,
body.auth-locked #sensorAlerts,
body.auth-locked #userChip {
  display: none !important;
}

body.auth-locked .topbar {
  display: none !important;
}

body.auth-locked #authScreen {
  display: grid !important;
}

button,
input,
select {
  font-family: var(--app-font);
}

button {
  cursor: pointer;
}

.mono {
  font-family: var(--app-font);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding:
    14px max(var(--page-pad), env(safe-area-inset-left))
    12px max(var(--page-pad), env(safe-area-inset-right));
  border-bottom: 1px solid rgba(210, 210, 215, 0.72);
  background: rgba(245, 245, 247, 0.8);
  backdrop-filter: saturate(180%) blur(18px);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 4px 6px 4px 12px;
  border: 1px solid rgba(210, 210, 215, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.user-chip button,
.admin-link,
.ghost-button {
  min-height: 30px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  font-weight: 700;
}

.admin-link {
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  text-decoration: none;
}

.user-chip button {
  padding: 0 12px;
}

.auth-screen {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3.8vw, 42px);
  background:
    linear-gradient(145deg, rgba(230, 239, 255, 0.58), rgba(245, 245, 247, 0.48) 42%, rgba(235, 251, 246, 0.46));
}

.auth-shell {
  position: relative;
  width: min(1080px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(16px, 2.4vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 28px 90px rgba(31, 35, 50, 0.18);
  backdrop-filter: saturate(180%) blur(28px);
}

.auth-visual {
  position: relative;
  min-height: 650px;
  display: grid;
  align-content: space-between;
  padding: clamp(28px, 4vw, 54px);
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(31, 41, 55, 0.92) 58%, rgba(20, 83, 95, 0.86)),
    #1d1d1f;
  color: #fff;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.auth-visual::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}

.station-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  display: grid;
  gap: 24px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 24px 70px rgba(0, 0, 0, 0.24);
}

.station-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.station-head span,
.auth-visual-copy span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 700;
}

.station-head strong {
  font-size: 22px;
  font-weight: 760;
}

.signal-orbit {
  position: relative;
  width: min(300px, 74vw);
  aspect-ratio: 1;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.signal-orbit span {
  position: absolute;
  inset: calc(var(--ring) * 1%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.signal-orbit span:nth-child(1) { --ring: 4; }
.signal-orbit span:nth-child(2) { --ring: 20; }
.signal-orbit span:nth-child(3) { --ring: 36; }

.signal-orbit i {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95), transparent 18%),
    linear-gradient(145deg, #34c759, #0071e3);
  box-shadow: 0 0 0 12px rgba(52, 199, 89, 0.12), 0 0 42px rgba(0, 113, 227, 0.48);
}

.signal-list {
  display: grid;
  gap: 10px;
}

.signal-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.signal-list span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.signal-list strong {
  font-size: 14px;
  color: #d7fff0;
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 500px;
}

.auth-visual-copy strong {
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.02;
  font-weight: 780;
}

.auth-visual-copy p {
  max-width: 430px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.8;
}

.auth-panel {
  position: relative;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 52px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: -18px 0 48px rgba(31, 35, 50, 0.06);
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 8px;
  border-radius: 8px;
  background: #1d1d1f;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.auth-panel-head {
  text-align: center;
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.auth-panel-head strong {
  color: #1d1d1f;
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.05;
}

.auth-panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(210, 210, 215, 0.74);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.86);
}

.auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-tabs button.active {
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.auth-form {
  display: none;
  gap: 12px;
}

.auth-form.active {
  display: grid;
}

.login-method-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(210, 210, 215, 0.76);
  border-radius: 8px;
  background: rgba(242, 242, 247, 0.88);
}

.login-method-toggle button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.login-method-toggle button.active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.11);
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: #1c1c1e;
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(210, 210, 215, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1f;
  font-size: 14px;
  outline: 0;
}

.auth-form input:focus {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.form-note {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.email-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  align-items: center;
}

.email-code-row button {
  height: 44px;
  border: 1px solid rgba(0, 113, 227, 0.2);
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.email-code-row button:disabled {
  opacity: 0.55;
  cursor: default;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 10px;
  align-items: end;
}

.captcha-image {
  height: 44px;
  padding: 0;
  border: 1px solid rgba(210, 210, 215, 0.94);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.captcha-image img {
  display: block;
  width: 128px;
  height: 44px;
  object-fit: cover;
}

.auth-submit {
  width: 100%;
  margin-top: 6px;
  min-height: 46px;
  border-radius: 8px !important;
  background: #1d1d1f !important;
  color: white !important;
}

.guest-button,
.ghost-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(210, 210, 215, 0.94);
  border-radius: 8px;
  background: rgba(245, 245, 247, 0.86);
  color: #1d1d1f;
  font-weight: 800;
}

.guest-button span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 50%;
  color: #1d1d1f;
  background: #fff;
  font-weight: 900;
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.auth-switch button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #1d1d1f;
  color: #fff;
  font-weight: 760;
}

.brand-title {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 760;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(210, 210, 215, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
}

.pill.subtle {
  color: var(--muted);
  font-weight: 560;
}

.pill.online {
  color: var(--green);
}

.pill.offline {
  color: var(--red);
  border-color: rgba(255, 69, 58, 0.28);
  background: rgba(255, 69, 58, 0.08);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.14);
}

.status-chip.connected .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.14);
}

.status-chip.error .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 69, 58, 0.14);
}

.sensor-alerts {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 10px;
  padding: 10px var(--page-pad) 0;
}

.sensor-alerts.show {
  display: grid;
}

.sensor-alert {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid rgba(255, 69, 58, 0.28);
  border-radius: 8px;
  background: rgba(255, 69, 58, 0.08);
}

.sensor-alert strong {
  color: var(--red);
  font-size: 14px;
}

.sensor-alert span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.page {
  position: relative;
  z-index: 10;
  display: grid;
  gap: var(--gap);
  width: 100%;
  min-height: calc(100dvh - 68px);
  padding: var(--page-pad);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--gap);
}

.sensor-card,
.metric-card,
.panel {
  border: 1px solid rgba(210, 210, 215, 0.78);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(160%) blur(14px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.sensor-card:hover,
.metric-card:hover,
.panel:hover {
  border-color: rgba(0, 113, 227, 0.24);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.data-card.is-live {
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.data-card,
.env-metric,
.danger-card,
.satellite-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.data-card {
  --accent-rgb: 0, 113, 227;
  --level: 0.28;
  --event-level: 0;
  --flow-duration: 12s;
  --coord-x: 50%;
  --coord-y: 50%;
  --wave-y: 55%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    var(--surface);
}

.data-card > *,
.env-metric > *,
.danger-card > *,
.satellite-item > * {
  position: relative;
  z-index: 1;
}

.data-card::before {
  content: "";
  position: absolute;
  inset: -24%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 25%, rgba(var(--accent-rgb), 0.24) 46%, transparent 66%),
    repeating-linear-gradient(112deg, rgba(var(--accent-rgb), 0.16) 0 1px, transparent 1px 18px);
  opacity: 0.72;
  transform: translate3d(-14%, 0, 0);
  animation: dataFlow var(--flow-duration) linear infinite;
}

.data-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.9));
  transform: scaleX(max(0.04, var(--level)));
  transform-origin: left center;
  transition: transform 0.35s ease, background 0.35s ease;
}

.data-card:not(.is-live)::before {
  opacity: 0.24;
  animation-play-state: paused;
  filter: grayscale(1);
}

.data-card:not(.is-live)::after {
  background: rgba(110, 110, 115, 0.24);
  transform: scaleX(0.12);
}

.coord-card::before {
  background:
    linear-gradient(90deg, transparent calc(var(--coord-x) - 1px), rgba(var(--accent-rgb), 0.24) var(--coord-x), transparent calc(var(--coord-x) + 1px)),
    linear-gradient(0deg, transparent calc(var(--coord-y) - 1px), rgba(var(--accent-rgb), 0.18) var(--coord-y), transparent calc(var(--coord-y) + 1px)),
    repeating-linear-gradient(90deg, rgba(var(--accent-rgb), 0.06) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(var(--accent-rgb), 0.05) 0 1px, transparent 1px 22px);
  inset: 0;
  transform: none;
  animation: coordinateDrift 18s ease-in-out infinite alternate;
}

.coord-toggle-card {
  cursor: pointer;
  outline: 0;
}

.coord-toggle-card:focus-visible {
  border-color: rgba(0, 113, 227, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16), var(--shadow);
}

.altitude-card::before {
  background:
    linear-gradient(180deg, transparent 0 var(--wave-y), rgba(var(--accent-rgb), 0.17) var(--wave-y), transparent 100%),
    repeating-linear-gradient(0deg, rgba(var(--accent-rgb), 0.07) 0 1px, transparent 1px 17px);
  inset: 0;
  transform: none;
  animation: altitudeFloat 7s ease-in-out infinite;
}

.speed-card::before,
.serial-card::before {
  background:
    repeating-linear-gradient(100deg, transparent 0 18px, rgba(var(--accent-rgb), 0.14) 18px 22px),
    linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.13), transparent);
  animation: streamLines var(--flow-duration) linear infinite;
}

.fix-card::before {
  background:
    linear-gradient(var(--heading), transparent 0 46%, rgba(var(--accent-rgb), 0.2) 50%, transparent 54%),
    repeating-linear-gradient(90deg, rgba(var(--accent-rgb), 0.06) 0 1px, transparent 1px 18px);
  inset: 0;
  transform: none;
  animation: fixSweep 9s ease-in-out infinite;
}

.time-card::before {
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(var(--accent-rgb), 0.11) 10px 12px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.12), transparent 32%, rgba(var(--accent-rgb), 0.08));
  animation: timeSlide var(--flow-duration) linear infinite;
}

.gsv-card::before,
.satellite-data-card::before {
  background:
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(var(--accent-rgb), 0.12) 13px 15px),
    repeating-linear-gradient(90deg, rgba(var(--accent-rgb), 0.06) 0 1px, transparent 1px 30px);
  animation: signalScan var(--flow-duration) linear infinite;
}

.env-card::before {
  background:
    linear-gradient(180deg, transparent 0 36%, rgba(var(--accent-rgb), 0.16) 54%, transparent 76%),
    repeating-linear-gradient(90deg, rgba(0, 168, 168, 0.08) 0 2px, transparent 2px 18px);
  animation: climateFlow var(--flow-duration, 12s) ease-in-out infinite;
}

.lightning-data-card::before,
.storm-card::before {
  background:
    linear-gradient(118deg, transparent 0 44%, rgba(var(--accent-rgb), 0.24) 46%, transparent 50%),
    linear-gradient(68deg, transparent 0 62%, rgba(var(--accent-rgb), 0.13) 65%, transparent 69%),
    repeating-linear-gradient(120deg, transparent 0 19px, rgba(var(--accent-rgb), 0.09) 19px 21px);
  animation: electricField var(--flow-duration) linear infinite;
}

.lightning-data-card.storm-event::before {
  animation: electricField var(--flow-duration) linear infinite, electricPulse 1.8s ease-in-out infinite;
}

/* Keep the dashboard calm: data-driven card backgrounds are disabled by default. */
.data-card::before,
.data-card::after,
.env-metric::before,
.env-metric::after,
.danger-card::before,
.danger-card::after {
  display: none;
  animation: none;
}

.sensor-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: clamp(14px, 1.1vw, 18px);
  overflow: hidden;
}

.sensor-card.offline {
  border-color: rgba(255, 69, 58, 0.26);
  background: rgba(255, 255, 255, 0.8);
}

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

.sensor-copy h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.sensor-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.motion-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 113, 227, 0.22);
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
}

.motion-icon::before,
.motion-icon::after,
.motion-icon span {
  content: "";
  position: absolute;
  display: block;
}

.orbit-icon::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.orbit-icon::after {
  width: 27px;
  height: 27px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
  animation: spin 2.4s linear infinite;
}

.orbit-icon span:first-child {
  width: 32px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-24deg);
}

.orbit-icon span:last-child {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  transform: translate(13px, -7px);
  animation: pulse 1.6s ease-in-out infinite;
}

.env-icon {
  border-color: rgba(0, 168, 168, 0.24);
  background: rgba(0, 168, 168, 0.08);
  color: var(--teal);
}

.env-icon::before {
  width: 12px;
  height: 25px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.env-icon::after {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(8px);
  animation: breathe 1.8s ease-in-out infinite;
}

.env-icon span:first-child {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: translate(8px, -8px) rotate(45deg);
}

.env-icon span:last-child {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  transform: translate(-13px, -11px);
  animation: envPulse 1.35s ease-in-out infinite;
}

.lightning-icon {
  border-color: rgba(255, 159, 10, 0.28);
  background: rgba(255, 159, 10, 0.1);
  color: var(--amber);
}

.lightning-icon::before {
  width: 16px;
  height: 28px;
  background: currentColor;
  clip-path: polygon(54% 0, 16% 48%, 45% 48%, 30% 100%, 84% 38%, 55% 38%);
  animation: spark 1.2s ease-in-out infinite;
}

.lightning-icon::after {
  width: 32px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.32;
  animation: ring 1.6s ease-out infinite;
}

.lightning-icon span:first-child,
.lightning-icon span:last-child {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.lightning-icon span:first-child {
  transform: translate(-13px, -10px);
  animation: flicker 1.4s ease-in-out infinite;
}

.lightning-icon span:last-child {
  transform: translate(13px, 10px);
  animation: flicker 1.4s ease-in-out 0.4s infinite;
}

.sensor-card.offline .motion-icon {
  border-color: rgba(255, 69, 58, 0.28);
  background: rgba(255, 69, 58, 0.08);
  color: var(--red);
}

.sensor-card.offline .motion-icon::after,
.sensor-card.offline .motion-icon::before,
.sensor-card.offline .motion-icon span {
  animation-play-state: paused;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 0.75fr);
  gap: var(--gap);
  align-items: start;
}

.gnss-stack,
.side-stack {
  display: grid;
  gap: var(--gap);
}

.hero-grid,
.status-grid {
  display: grid;
  gap: var(--gap);
}

.hero-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.status-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.map-panel {
  grid-column: 1 / -1;
  min-height: 420px;
}

.track-map {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 8;
  min-height: 260px;
  margin-top: 12px;
  border: 1px solid rgba(0, 113, 227, 0.14);
  border-radius: 8px;
  background: #e8eef4;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.track-map.dragging {
  cursor: grabbing;
}

.map-tiles,
.map-overlay {
  position: absolute;
  inset: 0;
}

.map-tiles img {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.map-overlay {
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-track-line {
  fill: none;
  stroke: rgba(0, 113, 227, 0.92);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

.map-current-ring {
  fill: rgba(52, 199, 89, 0.18);
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 3;
}

.map-current-dot {
  fill: #34c759;
  stroke: white;
  stroke-width: 3;
  filter: drop-shadow(0 5px 14px rgba(0, 0, 0, 0.32));
}

.map-empty {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  background:
    linear-gradient(135deg, rgba(245, 250, 255, 0.9), rgba(238, 246, 255, 0.78)),
    repeating-linear-gradient(0deg, rgba(0, 113, 227, 0.08) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(0, 113, 227, 0.08) 0 1px, transparent 1px 32px);
}

.map-empty[hidden] {
  display: none;
}

.map-layer-control,
.map-zoom-control,
.map-locate-button {
  position: absolute;
  z-index: 5;
  padding: 6px;
  border: 1px solid rgba(210, 210, 215, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(31, 35, 50, 0.12);
  backdrop-filter: blur(14px);
  cursor: default;
}

.map-layer-control,
.map-zoom-control {
  display: flex;
  gap: 6px;
}

.map-layer-control {
  top: 12px;
  left: 12px;
}

.map-zoom-control {
  top: 12px;
  right: 12px;
}

.map-locate-button {
  right: 12px;
  bottom: 34px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.map-layer-control button,
.map-zoom-control button {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.map-layer-control button.active,
.map-layer-control button:hover,
.map-zoom-control button:hover,
.map-locate-button:hover {
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
}

.map-attribution {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 5;
  max-width: calc(100% - 20px);
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  backdrop-filter: blur(10px);
}

.map-detail-grid {
  margin-top: 12px;
  grid-template-columns: 2fr 1fr;
}

.metric-card {
  min-height: clamp(130px, 16vh, 180px);
  padding: clamp(15px, 1.2vw, 21px);
  overflow: hidden;
}

.metric-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mini-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: rgba(0, 113, 227, 0.1);
}

.coord-icon::before,
.coord-icon::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: var(--blue);
}

.coord-icon::before {
  width: 3px;
  height: 16px;
  left: 9px;
  top: 3px;
}

.coord-icon::after {
  width: 16px;
  height: 3px;
  left: 3px;
  top: 9px;
}

.altitude-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-left: 3px solid var(--blue);
  border-top: 3px solid var(--blue);
  transform: rotate(45deg);
}

.speed-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--blue);
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 2.8s linear infinite;
}

.temp-icon,
.humidity-icon,
.pressure-icon,
.gas-icon {
  background: rgba(0, 168, 168, 0.1);
}

.temp-icon::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 3px;
  width: 5px;
  height: 15px;
  border-radius: 999px;
  background: var(--teal);
}

.humidity-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 11px;
  height: 14px;
  border-radius: 10px 10px 10px 2px;
  background: var(--blue);
  transform: rotate(45deg);
}

.pressure-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--teal);
  border-radius: 50%;
}

.pressure-icon::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  width: 2px;
  height: 8px;
  background: var(--teal);
  transform-origin: bottom center;
  transform: rotate(42deg);
}

.gas-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid var(--green);
  border-radius: 50%;
}

.gas-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
}

.metric-label,
dt,
label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 17px;
  color: var(--ink);
  font-size: clamp(24px, 1.8vw, 34px);
  font-weight: 760;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.metric-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.unit {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.metric-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.coord-toggle-card .metric-note::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0.62;
}

.panel {
  padding: clamp(15px, 1.2vw, 20px);
}

.panel-tight {
  min-height: clamp(186px, 21vh, 240px);
}

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

.heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 2px;
  min-height: 34px;
  padding: 3px;
  border: 1px solid rgba(210, 210, 215, 0.76);
  border-radius: 8px;
  background: rgba(242, 242, 247, 0.88);
}

.segmented-control button {
  min-width: 50px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.segmented-control button.active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.11);
}

.segmented-control button:disabled {
  cursor: default;
  opacity: 0.52;
}

h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
  margin: 0;
}

.detail-grid div {
  min-width: 0;
}

.visual-card-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 15px;
}

.quality-ring {
  --ring: 0%;
  width: 108px;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 0 58%, transparent 59%),
    conic-gradient(var(--green) var(--ring), rgba(210, 210, 215, 0.55) 0);
  box-shadow: inset 0 0 0 1px rgba(210, 210, 215, 0.72), 0 14px 30px rgba(31, 35, 50, 0.1);
}

.quality-ring span {
  font-size: 30px;
  font-weight: 860;
  line-height: 1;
}

.quality-ring small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.visual-summary,
.time-visual,
.serial-visual,
.gsv-visual {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.visual-summary strong,
.time-visual strong,
.serial-visual strong,
.gsv-visual strong {
  min-width: 0;
  color: var(--ink);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 860;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.visual-summary span,
.time-visual span,
.serial-visual span,
.gsv-visual span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.visual-summary b {
  color: var(--ink);
}

.signal-meter,
.flow-meter {
  overflow: hidden;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(210, 210, 215, 0.54);
}

.signal-meter i,
.flow-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.35s ease;
}

.flow-meter i {
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.32) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, var(--blue), #00a8a8);
}

.time-visual {
  margin-bottom: 15px;
  padding: 12px 13px;
  border: 1px solid rgba(210, 210, 215, 0.66);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.serial-visual,
.gsv-visual {
  margin-bottom: 15px;
}

.gsv-visual {
  grid-template-columns: minmax(0, auto) minmax(110px, 1fr);
  align-items: end;
}

.compact-visual-grid {
  gap: 12px;
}

.wide-detail {
  grid-column: 1 / -1;
}

.compact-detail {
  margin-top: 17px;
}

dt {
  margin-bottom: 6px;
}

dd {
  margin: 0;
  min-height: 22px;
  font-size: 16px;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.path {
  font-family: var(--app-font);
  font-size: 13px;
  line-height: 1.45;
}

.environment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.env-metric {
  --accent-rgb: 0, 168, 168;
  --level: 0.4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(210, 210, 215, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.env-metric::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.12), transparent 72%),
    repeating-linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0 1px, transparent 1px 14px);
  opacity: 0.72;
  animation: microFlow 8s ease-in-out infinite;
}

.env-metric::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: 3px;
  background: rgba(var(--accent-rgb), 0.8);
  transform: scaleX(max(0.04, var(--level)));
  transform-origin: left center;
  transition: transform 0.35s ease, background 0.35s ease;
}

.temp-metric {
  --accent-rgb: 0, 168, 168;
}

.humidity-metric {
  --accent-rgb: 0, 113, 227;
}

.pressure-metric {
  --accent-rgb: 0, 168, 168;
}

.gas-metric {
  --accent-rgb: 52, 199, 89;
}

.danger-card {
  --accent-rgb: 255, 159, 10;
  --level: 0.12;
  --event-level: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(210, 210, 215, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.danger-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(100deg, transparent 0 48%, rgba(var(--accent-rgb), 0.22) 52%, transparent 58%),
    repeating-linear-gradient(118deg, transparent 0 15px, rgba(var(--accent-rgb), 0.08) 15px 17px);
  opacity: 0.5;
  animation: electricField 7s linear infinite;
}

.danger-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 100%;
  height: 3px;
  background: rgba(var(--accent-rgb), 0.86);
  transform: scaleX(max(0.04, var(--level)));
  transform-origin: left center;
}

.danger-card dd {
  font-size: 26px;
  line-height: 1.05;
}

.danger-card strong {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.danger-low {
  border-color: rgba(52, 199, 89, 0.28);
  background: rgba(52, 199, 89, 0.08);
}

.danger-medium {
  border-color: rgba(255, 159, 10, 0.32);
  background: rgba(255, 159, 10, 0.1);
}

.danger-high,
.danger-severe {
  border-color: rgba(255, 69, 58, 0.32);
  background: rgba(255, 69, 58, 0.1);
}

.danger-high dd,
.danger-severe dd {
  color: var(--red);
}

.danger-medium dd {
  color: var(--amber);
}

.danger-low dd {
  color: var(--green);
}

.lightning-detail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.satellite-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 10px;
  min-height: clamp(150px, 20vh, 300px);
}

.satellite-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(210, 210, 215, 0.64);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.satellite-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.satellite-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.satellite-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.satellite-label strong {
  color: var(--ink);
  font-size: 21px;
  line-height: 1.1;
}

.satellite-signal {
  min-width: 42px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--blue);
  font-weight: 800;
}

.satellite-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.signal-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(210, 210, 215, 0.75);
}

.signal-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--green));
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.42fr) auto;
  gap: 12px;
  align-items: end;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

select,
input {
  width: 100%;
  height: 43px;
  border: 1px solid rgba(174, 174, 178, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

select:focus,
input:focus {
  border-color: rgba(0, 113, 227, 0.8);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.primary-button,
.preset-grid button {
  height: 43px;
  border: 0;
  border-radius: 999px;
  font-weight: 750;
}

.primary-button {
  min-width: 92px;
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
}

.primary-button:active,
.preset-grid button:active {
  transform: translateY(1px);
}

.command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 12px;
}

.command-form input {
  font-family: var(--app-font);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.preset-grid button {
  padding: 0 12px;
  border: 1px solid rgba(210, 210, 215, 0.9);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 20;
  min-width: 180px;
  max-width: calc(100% - 28px);
  padding: 11px 14px;
  border-radius: 8px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

.empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--muted);
  font-size: 14px;
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 0.45;
    transform: translate(13px, -7px) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translate(13px, -7px) scale(1.08);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: translateY(8px) scale(0.92);
  }
  50% {
    transform: translateY(8px) scale(1.06);
  }
}

@keyframes envPulse {
  0%, 100% {
    opacity: 0.45;
    transform: translate(-13px, -11px) scale(0.82);
  }
  50% {
    opacity: 1;
    transform: translate(-13px, -11px) scale(1.08);
  }
}

@keyframes spark {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes ring {
  0% {
    opacity: 0.38;
    transform: scale(0.72);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@keyframes flicker {
  0%, 100% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes dataFlow {
  0% {
    transform: translate3d(-18%, 0, 0);
  }
  100% {
    transform: translate3d(18%, 0, 0);
  }
}

@keyframes coordinateDrift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 0 0, 0 0, 26px 0, 0 26px;
  }
}

@keyframes altitudeFloat {
  0%, 100% {
    background-position: 0 0, 0 0;
  }
  50% {
    background-position: 0 -10px, 0 7px;
  }
}

@keyframes streamLines {
  0% {
    transform: translate3d(-18%, 0, 0);
  }
  100% {
    transform: translate3d(18%, 0, 0);
  }
}

@keyframes fixSweep {
  0%, 100% {
    opacity: 0.34;
  }
  50% {
    opacity: 0.58;
  }
}

@keyframes timeSlide {
  0% {
    transform: translate3d(-12%, 0, 0);
  }
  100% {
    transform: translate3d(12%, 0, 0);
  }
}

@keyframes signalScan {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 -28px, 32px 0;
  }
}

@keyframes climateFlow {
  0%, 100% {
    transform: translate3d(-10%, 0, 0);
    opacity: 0.34;
  }
  50% {
    transform: translate3d(10%, 0, 0);
    opacity: 0.5;
  }
}

@keyframes microFlow {
  0%, 100% {
    background-position: 0 0, 0 0;
  }
  50% {
    background-position: 8px 0, 10px 0;
  }
}

@keyframes electricField {
  0% {
    transform: translate3d(-12%, 0, 0);
  }
  100% {
    transform: translate3d(12%, 0, 0);
  }
}

@keyframes electricPulse {
  0%, 100% {
    opacity: 0.28;
  }
  40% {
    opacity: 0.7;
  }
  44% {
    opacity: 0.2;
  }
  52% {
    opacity: 0.62;
  }
}

@media (max-width: 1180px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .auth-screen {
    place-items: start center;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .auth-visual {
    min-height: 360px;
    padding: 28px;
  }

  .station-card {
    width: 100%;
  }

  .auth-visual-copy strong {
    font-size: 34px;
  }

  .auth-panel {
    padding: 28px;
  }

  .overview-grid,
  .side-stack {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .command-form {
    grid-template-columns: 1fr;
  }

  .environment-grid,
  .detail-grid,
  .map-detail-grid,
  .visual-card-grid,
  .gsv-visual {
    grid-template-columns: 1fr;
  }

  .brand-subtitle {
    white-space: normal;
  }

  .panel-heading {
    align-items: flex-start;
  }

  .heading-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 10px;
  }

  .auth-visual {
    min-height: 300px;
    padding: 22px;
  }

  .signal-orbit {
    width: min(210px, 70vw);
  }

  .signal-orbit i {
    width: 56px;
    height: 56px;
  }

  .auth-panel {
    padding: 22px;
  }

  .captcha-row {
    grid-template-columns: 1fr;
  }

  .email-code-row {
    grid-template-columns: 1fr;
  }

  .captcha-image,
  .captcha-image img {
    width: 100%;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .status-chip {
    justify-content: center;
  }

  .sensor-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .sensor-card .pill {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .panel-heading {
    flex-direction: column;
  }

  .heading-actions,
  .segmented-control {
    width: 100%;
  }

  .segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .track-map {
    aspect-ratio: 1 / 1;
    min-height: 320px;
  }

  .map-layer-control {
    right: 12px;
  }

  .map-layer-control button {
    flex: 1;
  }

  .map-zoom-control {
    top: auto;
    bottom: 44px;
  }

  .map-locate-button {
    right: 12px;
    bottom: 8px;
  }

  .map-attribution {
    left: 10px;
    right: auto;
  }
}

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