/**
 * Magic PTT · Network Ops
 * Full visual shell over Allmon3 — same data/API, zero Allmon look.
 */

/* Fonts loaded via index.html link tags (avoid @import blocking theme CSS). */

/* ─── Ambient shell ─── */
body.magic-ops {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.925rem;
  color: #e2e8f0;
  background-color: #020617 !important;
  background-image:
    radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px) !important;
  background-size: 22px 22px, 48px 48px, 48px 48px !important;
  min-height: 100vh;
}

.magic-ops-ambient {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.magic-ops-ambient__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: magic-ops-float 18s ease-in-out infinite;
}

.magic-ops-ambient__blob--sky {
  width: 28rem;
  height: 28rem;
  top: -8rem;
  left: -6rem;
  background: rgba(14, 165, 233, 0.22);
}

.magic-ops-ambient__blob--teal {
  width: 24rem;
  height: 24rem;
  top: 20%;
  right: -5rem;
  background: rgba(20, 184, 166, 0.16);
  animation-delay: -6s;
}

.magic-ops-ambient__blob--cyan {
  width: 20rem;
  height: 20rem;
  bottom: -4rem;
  left: 30%;
  background: rgba(6, 182, 212, 0.12);
  animation-delay: -12s;
}

.magic-ops-ambient__scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(56, 189, 248, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 8px;
  animation: magic-ops-scan 8s linear infinite;
  opacity: 0.35;
}

@keyframes magic-ops-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, 18px) scale(1.05);
  }
}

@keyframes magic-ops-scan {
  0% {
    background-position: 0 -100vh;
  }
  100% {
    background-position: 0 100vh;
  }
}

.magic-ops-shell,
.magic-ops-topbar,
.magic-ops-main {
  position: relative;
  z-index: 1;
}

/* ─── Top bar ─── */
body.magic-ops .magic-ops-topbar {
  display: flex !important;
  flex-wrap: nowrap;
  background: rgba(2, 6, 23, 0.82) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.65);
  min-height: 3.25rem;
  padding: 0.45rem 0.85rem;
  align-items: center;
  gap: 0.65rem;
}

.magic-ops-topbar__inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.magic-ops-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.magic-ops-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, 0.85);
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.magic-ops-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.magic-ops-mark:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.25);
}

.magic-ops-topbar__titles {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.magic-ops-topbar__product {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.magic-ops-topbar__feature {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #38bdf8;
}

.magic-ops-ptt-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.35rem;
  padding: 0.38rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc !important;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.magic-ops-ptt-link:hover {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(125, 211, 252, 0.55);
  color: #e0f2fe !important;
}

body.magic-ops .magic-ops-menu-toggle {
  flex-shrink: 0;
  margin-left: auto;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
}

body.magic-ops .magic-ops-status {
  display: none;
}

body.magic-ops .navbar-midbar {
  display: none !important;
}

/* ─── Command bar (was sidebar) ─── */
body.magic-ops .magic-ops-layout {
  display: block;
  margin: 0;
}

body.magic-ops .magic-ops-commandbar {
  position: sticky;
  top: 3.25rem;
  z-index: 100;
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  background: rgba(2, 6, 23, 0.78) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.75);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
}

@media (min-width: 768px) {
  body.magic-ops .magic-ops-commandbar.collapse {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
  }

  body.magic-ops .magic-ops-menu-toggle {
    display: none !important;
  }
}

.magic-ops-commandbar__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  max-width: 72rem;
  margin: 0 auto;
}

.magic-ops-commandbar__primary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.magic-ops-commandbar__primary::-webkit-scrollbar {
  display: none;
}

.magic-ops-network-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  max-width: 14rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.55);
}

body.shtf-no-logo .magic-ops-network-chip {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.magic-ops-auth {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

body.magic-ops .magic-ops-node-nav {
  display: none !important;
}

body.magic-ops .magic-ops-node-nav a[href*="ptt.shtfrn.com"] {
  display: none !important;
}

body.magic-ops .magic-ops-node-nav .d-grid,
body.magic-ops .magic-ops-auth .d-grid,
body.magic-ops .magic-ops-commandbar .col-9 {
  display: contents !important;
  width: auto !important;
  max-width: none !important;
}

body.magic-ops .magic-ops-nav-btn,
body.magic-ops .magic-ops-node-nav .btn,
body.magic-ops .magic-ops-auth .btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0.38rem 0.75rem !important;
  border-radius: 9999px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  border: 1px solid rgba(51, 65, 85, 0.95) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  color: #cbd5e1 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.magic-ops-nav-btn__label {
  line-height: 1;
}

body.magic-ops #shtf-settings-btn {
  border-color: rgba(167, 139, 250, 0.35) !important;
  background: rgba(91, 33, 182, 0.18) !important;
  color: #ddd6fe !important;
  padding-left: 0.6rem !important;
  padding-right: 0.7rem !important;
}

@media (max-width: 480px) {
  .magic-ops-nav-btn__label {
    display: none;
  }

  body.magic-ops #shtf-settings-btn {
    padding: 0.38rem 0.5rem !important;
  }

  .magic-ops-ptt-link {
    font-size: 0;
    padding: 0.38rem 0.55rem;
  }

  .magic-ops-ptt-link::after {
    content: "PTT";
    font-size: 0.72rem;
  }

  .magic-ops-network-chip {
    max-width: 9rem;
  }

  body.magic-ops .shtf-header-title {
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

body.magic-ops .magic-ops-nav-btn--home {
  border-color: rgba(56, 189, 248, 0.35) !important;
  background: rgba(14, 165, 233, 0.14) !important;
  color: #e0f2fe !important;
}

body.magic-ops .magic-ops-nav-btn:hover,
body.magic-ops .magic-ops-node-nav .btn:hover,
body.magic-ops .magic-ops-auth .btn:hover {
  border-color: rgba(45, 212, 191, 0.45) !important;
  background: rgba(14, 116, 144, 0.35) !important;
  color: #f8fafc !important;
  transform: translateY(-1px);
}

/* ─── Main / hero ─── */
body.magic-ops .magic-ops-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.magic-ops-hero {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.12);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(2, 6, 23, 0.45) 100%
  );
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 50px rgba(2, 6, 23, 0.45);
}

.magic-ops-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #94a3b8;
}

.magic-ops-hero__led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: magic-ops-led 1.4s ease-in-out infinite;
}

@keyframes magic-ops-led {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.magic-ops-hero__title {
  margin: 0.85rem 0 0.35rem;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #f8fafc;
}

.magic-ops-hero__sub {
  margin: 0;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #94a3b8;
}

/* ─── Node cards ─── */
body.magic-ops .magic-ops-dashboard > div,
body.magic-ops #asl-statmon-dashboard-area > div {
  margin-bottom: 1.35rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.1);
  background: linear-gradient(
    160deg,
    rgba(15, 23, 42, 0.88) 0%,
    rgba(2, 6, 23, 0.65) 100%
  );
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 60px rgba(2, 6, 23, 0.55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.magic-ops .magic-ops-node:hover {
  border-color: rgba(56, 189, 248, 0.22);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.08),
    0 28px 64px rgba(2, 6, 23, 0.65);
}

body.magic-ops .nodeline-header {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  background: transparent !important;
  padding: 1rem 1.15rem !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  color: #f1f5f9 !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65) !important;
}

.magic-ops-node-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(6, 78, 59, 0.35);
}

body.magic-ops .uptime-box,
body.magic-ops .numconns-box {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem !important;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(2, 6, 23, 0.55);
  color: #94a3b8 !important;
  opacity: 1 !important;
}

body.magic-ops .nodeline-header .btn,
body.magic-ops .nodeline-header button {
  border-radius: 0.5rem !important;
  border: 1px solid rgba(51, 65, 85, 0.9) !important;
  background: rgba(15, 23, 42, 0.8) !important;
  color: #94a3b8 !important;
  padding: 0.25rem 0.45rem !important;
}

body.magic-ops .nodeline-header .btn:hover,
body.magic-ops .nodeline-header button:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  color: #e2e8f0 !important;
}

/* ─── Signal equalizer bars (Magic PTT landing motif) ─── */
.magic-ops-eq {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  height: 2.5rem;
}

.magic-ops-eq-bar {
  display: block;
  width: 4px;
  height: calc(var(--eq-base, 0.5) * 2.5rem);
  border-radius: 9999px;
  background: linear-gradient(to top, rgba(14, 165, 233, 0.35), #67e8f9);
  transform-origin: center bottom;
  animation: magic-ops-eq-idle 1.4s ease-in-out infinite;
}

.magic-ops-eq[data-eq-state="idle"] .magic-ops-eq-bar {
  animation-name: magic-ops-eq-idle;
  opacity: 0.55;
}

.magic-ops-eq[data-eq-state="tx"] .magic-ops-eq-bar,
.magic-ops-eq[data-eq-state="tx-local"] .magic-ops-eq-bar {
  animation-name: magic-ops-eq-tx;
  opacity: 1;
  background: linear-gradient(to top, rgba(244, 63, 94, 0.55), #fda4af);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.35);
}

.magic-ops-eq[data-eq-state="tx-local"] .magic-ops-eq-bar {
  background: linear-gradient(to top, rgba(219, 39, 119, 0.55), #f9a8d4);
}

.magic-ops-eq[data-eq-state="rx"] .magic-ops-eq-bar,
.magic-ops-eq[data-eq-state="rx-hot"] .magic-ops-eq-bar {
  animation-name: magic-ops-eq-rx;
  opacity: 1;
  background: linear-gradient(to top, rgba(16, 185, 129, 0.5), #6ee7b7);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.35);
}

.magic-ops-eq[data-eq-state="rx-hot"] .magic-ops-eq-bar {
  animation-name: magic-ops-eq-rx-fast;
}

.magic-ops-eq[data-eq-state="telemetry"] .magic-ops-eq-bar {
  animation-name: magic-ops-eq-tx;
  opacity: 0.9;
  background: linear-gradient(to top, rgba(251, 191, 36, 0.45), #fde68a);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

/* Channel-locked coloring: Transmit = red, Receive = green.
   Bars sit dim/idle in their channel color, then flare bright when keyed.
   ID selectors deliberately outrank the generic data-eq-state rules above. */
#magic-ops-hero-eq-tx .magic-ops-eq-bar,
.magic-ops-rf-pill--tx .magic-ops-eq-bar {
  background: linear-gradient(to top, rgba(244, 63, 94, 0.3), #fda4af);
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.18);
  opacity: 0.55;
}

#magic-ops-hero-eq-tx[data-eq-state="tx"] .magic-ops-eq-bar,
#magic-ops-hero-eq-tx[data-eq-state="tx-local"] .magic-ops-eq-bar,
.magic-ops-rf-pill--tx .magic-ops-eq[data-eq-state="tx"] .magic-ops-eq-bar,
.magic-ops-rf-pill--tx .magic-ops-eq[data-eq-state="tx-local"] .magic-ops-eq-bar {
  background: linear-gradient(to top, rgba(244, 63, 94, 0.7), #fecdd3);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.55);
  opacity: 1;
}

#magic-ops-hero-eq-rx .magic-ops-eq-bar,
.magic-ops-rf-pill--rx .magic-ops-eq-bar {
  background: linear-gradient(to top, rgba(16, 185, 129, 0.3), #6ee7b7);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.18);
  opacity: 0.55;
}

#magic-ops-hero-eq-rx[data-eq-state="rx"] .magic-ops-eq-bar,
#magic-ops-hero-eq-rx[data-eq-state="rx-hot"] .magic-ops-eq-bar,
.magic-ops-rf-pill--rx .magic-ops-eq[data-eq-state="rx"] .magic-ops-eq-bar,
.magic-ops-rf-pill--rx .magic-ops-eq[data-eq-state="rx-hot"] .magic-ops-eq-bar {
  background: linear-gradient(to top, rgba(16, 185, 129, 0.7), #a7f3d0);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.55);
  opacity: 1;
}

.magic-ops-eq--mini {
  height: 1.85rem;
}

.magic-ops-eq--mini .magic-ops-eq-bar {
  width: 3px;
  height: calc(var(--eq-base, 0.5) * 1.85rem);
}

.magic-ops-eq--micro {
  height: 1.15rem;
  gap: 2px;
}

.magic-ops-eq--micro .magic-ops-eq-bar {
  width: 2px;
  height: calc(var(--eq-base, 0.5) * 1.15rem);
}

.magic-ops-eq--hero {
  height: 3rem;
}

.magic-ops-eq--hero .magic-ops-eq-bar {
  width: 5px;
  height: calc(var(--eq-base, 0.5) * 3rem);
}

@keyframes magic-ops-eq-idle {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(0.75);
  }
}

@keyframes magic-ops-eq-tx {
  0%,
  100% {
    transform: scaleY(0.3);
  }
  25% {
    transform: scaleY(0.95);
  }
  50% {
    transform: scaleY(0.55);
  }
  75% {
    transform: scaleY(1);
  }
}

@keyframes magic-ops-eq-rx {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  40% {
    transform: scaleY(0.88);
  }
  70% {
    transform: scaleY(0.5);
  }
}

@keyframes magic-ops-eq-rx-fast {
  0%,
  100% {
    transform: scaleY(0.4);
  }
  33% {
    transform: scaleY(1);
  }
  66% {
    transform: scaleY(0.62);
  }
}

/* Topbar RF HUD */
.magic-ops-rf-hud {
  display: none;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

body.magic-ops-on-air .magic-ops-rf-hud,
body.magic-ops-receiving .magic-ops-rf-hud {
  display: inline-flex;
}

.magic-ops-rf-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.45rem 0.22rem 0.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.75);
  opacity: 0.45;
  transition: opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.magic-ops-rf-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

.magic-ops-rf-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.magic-ops-rf-hud[data-tx="1"] .magic-ops-rf-pill--tx {
  opacity: 1;
  border-color: rgba(251, 113, 133, 0.5);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.2);
}

.magic-ops-rf-hud[data-tx="1"] .magic-ops-rf-pill--tx .magic-ops-rf-dot {
  background: #fb7185;
  box-shadow: 0 0 8px #fb7185;
  animation: magic-ops-led-tx 0.55s steps(2, jump-none) infinite;
}

.magic-ops-rf-hud[data-rx="1"] .magic-ops-rf-pill--rx {
  opacity: 1;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.18);
}

.magic-ops-rf-hud[data-rx="1"] .magic-ops-rf-pill--rx .magic-ops-rf-dot {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: magic-ops-led-rx 1s ease-in-out infinite;
}

@keyframes magic-ops-led-rx {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* Hero dual RF channels */
.magic-ops-hero__rf {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
}

.magic-ops-hero__rf-channel {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(2, 6, 23, 0.45);
}

.magic-ops-hero__rf-tag {
  display: block;
  margin-bottom: 0.55rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.magic-ops-hero__rf-tag--tx {
  color: #fda4af;
}

.magic-ops-hero__rf-tag--rx {
  color: #6ee7b7;
}

.magic-ops-hero__led--tx {
  background: #fb7185 !important;
  box-shadow: 0 0 14px #fb7185 !important;
  animation: magic-ops-led-tx 0.55s steps(2, jump-none) infinite !important;
}

.magic-ops-hero__led--rx {
  background: #34d399 !important;
  box-shadow: 0 0 14px #34d399 !important;
  animation: magic-ops-led-rx 1s ease-in-out infinite !important;
}

.magic-ops-hero__led--traffic {
  background: #fbbf24 !important;
  box-shadow: 0 0 14px #fbbf24 !important;
  animation: magic-ops-led-tx 0.45s steps(2, jump-none) infinite !important;
}

@keyframes magic-ops-led-tx {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.magic-ops-hero__badge--on-air {
  border-color: rgba(251, 113, 133, 0.45) !important;
  color: #fecdd3 !important;
}

.magic-ops-hero__badge--receiving {
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #a7f3d0 !important;
}

.magic-ops-hero__badge--traffic {
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #fde68a !important;
}

body.magic-ops-on-air .magic-ops-topbar {
  border-bottom-color: rgba(251, 113, 133, 0.35);
  box-shadow:
    0 12px 40px rgba(2, 6, 23, 0.65),
    0 0 32px rgba(244, 63, 94, 0.08);
}

body.magic-ops-receiving:not(.magic-ops-on-air) .magic-ops-topbar {
  border-bottom-color: rgba(52, 211, 153, 0.32);
  box-shadow:
    0 12px 40px rgba(2, 6, 23, 0.65),
    0 0 28px rgba(16, 185, 129, 0.08);
}

body.magic-ops-traffic .magic-ops-topbar {
  border-bottom-color: rgba(251, 191, 36, 0.35);
  box-shadow:
    0 12px 40px rgba(2, 6, 23, 0.65),
    0 0 36px rgba(251, 191, 36, 0.1);
}

/* Node card RF glow */
body.magic-ops .magic-ops-node {
  position: relative;
  overflow: hidden;
}

.magic-ops-node-glow,
.magic-ops-node-scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.magic-ops-node-glow {
  background:
    radial-gradient(ellipse at top left, rgba(244, 63, 94, 0.14), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(16, 185, 129, 0.1), transparent 50%);
}

.magic-ops-node-scan {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.03) 48%,
    transparent 100%
  );
  background-size: 100% 6px;
  animation: magic-ops-scan 6s linear infinite;
}

body.magic-ops .magic-ops-node--tx .magic-ops-node-glow,
body.magic-ops .magic-ops-node--traffic .magic-ops-node-glow {
  opacity: 1;
  background: radial-gradient(ellipse at center top, rgba(244, 63, 94, 0.2), transparent 62%);
}

body.magic-ops .magic-ops-node--rx .magic-ops-node-glow {
  opacity: 1;
  background: radial-gradient(ellipse at center top, rgba(16, 185, 129, 0.18), transparent 62%);
}

body.magic-ops .magic-ops-node--traffic .magic-ops-node-glow {
  background:
    radial-gradient(ellipse at top left, rgba(244, 63, 94, 0.18), transparent 55%),
    radial-gradient(ellipse at top right, rgba(16, 185, 129, 0.16), transparent 55%);
}

body.magic-ops .magic-ops-node--tx .magic-ops-node-scan,
body.magic-ops .magic-ops-node--traffic .magic-ops-node-scan {
  opacity: 0.35;
}

body.magic-ops .magic-ops-node--tx {
  border-color: rgba(251, 113, 133, 0.42) !important;
  box-shadow:
    0 0 0 1px rgba(251, 113, 133, 0.08),
    0 24px 60px rgba(2, 6, 23, 0.55),
    0 0 40px rgba(244, 63, 94, 0.12) !important;
}

body.magic-ops .magic-ops-node--rx {
  border-color: rgba(52, 211, 153, 0.38) !important;
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.08),
    0 24px 60px rgba(2, 6, 23, 0.55),
    0 0 36px rgba(16, 185, 129, 0.1) !important;
}

body.magic-ops .magic-ops-node--traffic {
  border-color: rgba(251, 191, 36, 0.4) !important;
  animation: magic-ops-traffic-border 2.2s ease-in-out infinite;
}

@keyframes magic-ops-traffic-border {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(251, 113, 133, 0.1),
      0 24px 60px rgba(2, 6, 23, 0.55),
      0 0 36px rgba(244, 63, 94, 0.12);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(52, 211, 153, 0.12),
      0 24px 60px rgba(2, 6, 23, 0.55),
      0 0 40px rgba(16, 185, 129, 0.14);
  }
}

.magic-ops-node-badge--tx {
  color: #fecdd3 !important;
  border-color: rgba(251, 113, 133, 0.45) !important;
  background: rgba(127, 29, 29, 0.45) !important;
  animation: magic-ops-led-tx 0.55s steps(2, jump-none) infinite;
}

.magic-ops-node-badge--rx {
  color: #a7f3d0 !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  background: rgba(6, 78, 59, 0.45) !important;
  animation: magic-ops-led-rx 1s ease-in-out infinite;
}

.magic-ops-node-badge--traffic {
  color: #fde68a !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  background: rgba(120, 53, 15, 0.45) !important;
  animation: magic-ops-led-tx 0.45s steps(2, jump-none) infinite;
}

.magic-ops-link-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

body.magic-ops tr.magic-ops-rx-active {
  animation: magic-ops-row-rx 2.4s ease-in-out infinite;
}

@keyframes magic-ops-row-rx {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.08);
  }
}

body.magic-ops tr.magic-ops-rx-active td {
  background: rgba(6, 78, 59, 0.22) !important;
}

body.magic-ops tr.magic-ops-rx-active td:first-child {
  box-shadow: inset 4px 0 0 #34d399;
}

body.magic-ops .magic-ops-tx-wrap[data-tx-state="tx-local"] {
  border-color: rgba(244, 114, 182, 0.45) !important;
}

/* TX status strip */
body.magic-ops .magic-ops-tx-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0.85rem 1rem !important;
  padding: 0.7rem 1rem !important;
  border-radius: 0.65rem !important;
  border: 1px solid transparent !important;
}

body.magic-ops .magic-ops-tx-wrap:has(.am3-no-tx) {
  background: linear-gradient(
    90deg,
    rgba(6, 78, 59, 0.55),
    rgba(15, 23, 42, 0.35)
  ) !important;
  border-color: rgba(45, 212, 191, 0.25) !important;
  box-shadow: inset 0 0 24px rgba(45, 212, 191, 0.06);
}

body.magic-ops .magic-ops-tx-wrap:has(.am3-tx-local),
body.magic-ops .magic-ops-tx-wrap:has(.am3-tx-network) {
  animation: magic-ops-tx 1.1s ease-in-out infinite;
  border-color: rgba(251, 113, 133, 0.45) !important;
  box-shadow:
    inset 0 0 28px rgba(251, 113, 133, 0.18),
    0 0 24px rgba(244, 63, 94, 0.15);
  background: linear-gradient(
    90deg,
    rgba(127, 29, 29, 0.45),
    rgba(15, 23, 42, 0.35)
  ) !important;
}

body.magic-ops .magic-ops-tx-wrap .nodetxline {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  color: inherit;
}

body.magic-ops .magic-ops-tx-wrap:has(.am3-no-tx) .nodetxline {
  color: #99f6e4 !important;
}

body.magic-ops .magic-ops-tx-wrap:has(.am3-tx-local) .nodetxline,
body.magic-ops .magic-ops-tx-wrap:has(.am3-tx-network) .nodetxline {
  color: #fecdd3 !important;
}

body.magic-ops .magic-ops-tx-wrap .nodetxline.am3-no-tx,
body.magic-ops .magic-ops-tx-wrap .nodetxline.am3-tx-local,
body.magic-ops .magic-ops-tx-wrap .nodetxline.am3-tx-network,
body.magic-ops .magic-ops-tx-wrap .nodetxline.am3-tx-telemetry {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  animation: none !important;
}

/* Fallback before JS wraps TX lines */
body.magic-ops .nodetxline {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin: 0.85rem 1rem !important;
  padding: 0.7rem 1rem !important;
  border-radius: 0.65rem !important;
  border: 1px solid transparent !important;
}

body.magic-ops .nodetxline.am3-no-tx {
  background: linear-gradient(
    90deg,
    rgba(6, 78, 59, 0.55),
    rgba(15, 23, 42, 0.35)
  ) !important;
  color: #99f6e4 !important;
  border-color: rgba(45, 212, 191, 0.25) !important;
  box-shadow: inset 0 0 24px rgba(45, 212, 191, 0.06);
}

body.magic-ops .nodetxline.am3-tx-local,
body.magic-ops .nodetxline.am3-tx-network {
  animation: magic-ops-tx 1.1s ease-in-out infinite;
  border-color: rgba(251, 113, 133, 0.45) !important;
  box-shadow:
    inset 0 0 28px rgba(251, 113, 133, 0.18),
    0 0 24px rgba(244, 63, 94, 0.15);
}

@keyframes magic-ops-tx {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.12);
  }
}

/* Link table */
body.magic-ops .table-responsive {
  padding: 0.35rem 0.85rem 1.1rem;
}

body.magic-ops .magic-ops-link-table {
  --bs-table-bg: transparent;
  --bs-table-border-color: rgba(51, 65, 85, 0.55);
  border-collapse: separate;
  border-spacing: 0 0.4rem;
  margin-bottom: 0;
}

body.magic-ops .magic-ops-link-table thead th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
  padding: 0.35rem 0.75rem !important;
}

body.magic-ops .magic-ops-link-table tbody tr {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 0.55rem;
  box-shadow: inset 0 0 0 1px rgba(51, 65, 85, 0.65);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

body.magic-ops .magic-ops-link-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.65);
}

body.magic-ops .magic-ops-link-table tbody td {
  font-size: 0.82rem;
  vertical-align: middle;
  border: none !important;
  padding: 0.65rem 0.75rem !important;
  color: #cbd5e1;
}

body.magic-ops .magic-ops-link-table tbody td:first-child {
  border-radius: 0.55rem 0 0 0.55rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: #7dd3fc;
}

body.magic-ops .magic-ops-link-table tbody td:last-child {
  border-radius: 0 0.55rem 0.55rem 0;
}

body.magic-ops tr.magic-ops-rx-active td:first-child {
  box-shadow: inset 4px 0 0 #34d399;
}

body.magic-ops .node-conn-keyed td {
  box-shadow: inset 3px 0 0 #34d399;
}

body.magic-ops .node-conn-noconn {
  opacity: 0.75;
}

/* App-sourced live key: a SIP pool station transmitting right now (abuse view).
   Distinct rose/red treatment so it pops vs. the green "keyed link" rows. */
body.magic-ops tr.magic-ops-app-keyed td {
  background: rgba(127, 29, 29, 0.3) !important;
  animation: magic-ops-row-tx 1.4s ease-in-out infinite;
}

body.magic-ops tr.magic-ops-app-keyed th:first-child,
body.magic-ops tr.magic-ops-app-keyed td:first-child {
  box-shadow: inset 4px 0 0 #fb7185 !important;
}

@keyframes magic-ops-row-tx {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.14);
  }
}

.magic-ops-onair-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 9999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fecdd3;
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(251, 113, 133, 0.5);
  animation: magic-ops-led-tx 0.55s steps(2, jump-none) infinite;
}

/* ─── Modals ─── */
body.magic-ops footer {
  display: none !important;
}

body.magic-ops .modal-content {
  background: linear-gradient(160deg, #0f172a, #020617);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 1rem;
  color: #e2e8f0;
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.75);
}

body.magic-ops .modal-header {
  border-bottom-color: rgba(51, 65, 85, 0.75);
}

body.magic-ops .modal-title {
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.magic-ops .form-control {
  background: rgba(2, 6, 23, 0.65);
  border-color: rgba(51, 65, 85, 0.95);
  color: #e2e8f0;
}

body.magic-ops .form-control:focus {
  background: rgba(2, 6, 23, 0.85);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.15);
  color: #f8fafc;
}

body.magic-ops .nav-tabs {
  border-bottom-color: rgba(51, 65, 85, 0.75);
}

body.magic-ops .nav-tabs .nav-link {
  color: #94a3b8;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

body.magic-ops .nav-tabs .nav-link.active {
  color: #7dd3fc;
  background: transparent;
  border-bottom-color: #38bdf8;
}

body.magic-ops .magic-ops-btn {
  border-radius: 0.55rem !important;
  font-weight: 600;
}

body.magic-ops .magic-ops-btn--ghost {
  background: transparent !important;
  border-color: rgba(51, 65, 85, 0.95) !important;
}

/* ─── Branding / logo ─── */
body.magic-ops .header-banner-img {
  max-height: 44px;
  width: auto;
}

body.magic-ops .shtf-header-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  background: linear-gradient(90deg, #7dd3fc, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.shtf-no-logo .shtf-header-title {
  display: none !important;
}

body.magic-ops:not(.shtf-no-logo) .navbar-midbar {
  display: none !important;
}

body.shtf-no-logo #header-banner-img {
  display: none !important;
}

body.shtf-no-logo .navbar-midbar {
  margin-left: 0;
}

.shtf-logo-preview {
  max-height: 50px;
  max-width: 220px;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 4px 8px;
}

/* Hide any leftover Allmon package chrome */
body.magic-ops nav#sidebarMenu .text-center.text-wrap,
body.magic-ops nav#sidebarMenu img[alt="asl-logo"],
body.magic-ops .sidebar.bg-light {
  display: none !important;
}

@media (max-width: 767.98px) {
  body.magic-ops .magic-ops-commandbar {
    position: fixed;
    top: 3.25rem;
    left: 0;
    right: 0;
    max-height: calc(100vh - 3.25rem);
    overflow-y: auto;
    border-bottom: none;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.85);
  }

  body.magic-ops .magic-ops-commandbar__inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  body.magic-ops .magic-ops-auth {
    width: auto;
    margin-left: auto;
  }

  body.magic-ops .magic-ops-main {
    padding-top: 0.5rem;
  }

  body.magic-ops .magic-ops-hero__title {
    font-size: 1.55rem;
  }

  body.magic-ops .magic-ops-link-table thead {
    display: none;
  }

  body.magic-ops .magic-ops-link-table tbody tr {
    display: block;
    margin-bottom: 0.65rem;
    padding: 0.35rem 0;
  }

  body.magic-ops .magic-ops-link-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.75rem !important;
    border-radius: 0 !important;
  }

  body.magic-ops .magic-ops-link-table tbody td::before {
    content: attr(data-label);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    flex-shrink: 0;
  }

  .magic-ops-hero__rf {
    grid-template-columns: 1fr;
  }

  .magic-ops-rf-hud {
    display: none !important;
  }

  body.magic-ops .magic-ops-tx-wrap .magic-ops-eq:last-child {
    display: none;
  }

  body.magic-ops .magic-ops-tx-wrap {
    gap: 0.55rem;
  }
}
