/**
 * AlphaRelay global command UI — tactical canvas, tokens, and MVP chrome polish.
 * Load after mvp.css (and after page-specific CSS if that sheet sets body defaults you intend to override).
 */

@keyframes ar-shell-bg-sweep {
  0% {
    opacity: 0.04;
    transform: rotate(0deg) scale(1.02);
  }
  50% {
    opacity: 0.09;
    transform: rotate(0.35deg) scale(1.04);
  }
  100% {
    opacity: 0.04;
    transform: rotate(0deg) scale(1.02);
  }
}

:root {
  --ar-blue: #3e8eff;
  --ar-blue-soft: rgba(62, 142, 255, 0.14);
  --ar-green: #3ecf8e;
  --ar-amber: #e8a84a;
  --ar-purple: #b47cff;
  --ar-red: #e85d5d;
  --ar-surface-0: rgba(10, 16, 26, 0.92);
  --ar-surface-1: rgba(17, 28, 42, 0.78);
  --ar-surface-highlight: rgba(120, 170, 255, 0.06);
  --ar-edge-soft: rgba(120, 160, 210, 0.14);
  --ar-edge-strong: rgba(100, 160, 230, 0.28);
  --ar-glow: rgba(62, 142, 255, 0.22);
  --ar-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ar-font);
  color: var(--text);
  background-color: #060a10;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -15%, rgba(45, 110, 200, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(30, 70, 130, 0.2), transparent 45%),
    linear-gradient(180deg, #0a1018 0%, #060a10 48%, #070d14 100%);
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 160, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 220, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, black 10%, transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  width: 140vmax;
  height: 140vmax;
  left: 50%;
  top: -60vmax;
  margin-left: -70vmax;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(
    from 200deg at 50% 50%,
    transparent 0deg,
    rgba(62, 142, 255, 0.06) 38deg,
    transparent 76deg,
    transparent 360deg
  );
  animation: ar-shell-bg-sweep 22s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  body::after {
    animation: none;
    opacity: 0.05;
  }
}

@media print {
  body::before,
  body::after {
    display: none !important;
  }

  body {
    background: #fff !important;
    background-image: none !important;
    color: #111 !important;
  }
}

/* —— Mission overwatch + static MVP pages —— */
.mvp-breadcrumb {
  width: min(1180px, 94vw);
  margin: 18px auto 0;
  padding: 10px 0 2px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(80, 120, 170, 0.12);
}

.mvp-breadcrumb a {
  color: #8ec8ff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mvp-breadcrumb a:hover {
  color: #f0f7ff;
  text-decoration: underline;
}

.mvp-breadcrumb-sep {
  color: rgba(154, 176, 200, 0.65);
}

.container {
  width: min(1180px, 94vw);
  margin: clamp(20px, 3vw, 32px) auto;
  display: grid;
  gap: clamp(14px, 1.8vw, 20px);
}

.page-header {
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(80, 120, 170, 0.12);
}

.page-header h1 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e8f2fc;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.page-header p {
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 62ch;
}

.card {
  border-radius: 16px;
  border: 1px solid rgba(80, 120, 170, 0.14);
  background: linear-gradient(165deg, rgba(20, 34, 52, 0.9) 0%, rgba(10, 18, 30, 0.94) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 14px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}

.card:hover {
  border-color: rgba(100, 150, 210, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(62, 142, 255, 0.06);
}

button.ghost {
  border-radius: 10px;
  border: 1px solid rgba(100, 140, 190, 0.28) !important;
  background: rgba(12, 22, 36, 0.75) !important;
  color: #d2e6ff !important;
  transition:
    transform 0.15s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.2s ease;
}

button.ghost:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(140, 190, 255, 0.4) !important;
  background: rgba(22, 38, 58, 0.88) !important;
}

button:not(.ghost):not(.badge):not(:disabled) {
  border-radius: 10px;
  transition:
    transform 0.15s ease,
    filter 0.18s ease,
    box-shadow 0.2s ease;
}

button:not(.ghost):not(.badge):not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.do-not-reload-banner {
  border-radius: 12px;
  border: 1px solid rgba(232, 168, 74, 0.35);
  box-shadow: 0 0 24px rgba(232, 168, 74, 0.12);
}

/* Admin portal: styles live in admin.css (body.admin-portal). */

/* —— Static docs (download / local-setup) —— */
.apk-hero h1,
.local-hero h1 {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #e8f2fc;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.apk-hero p,
.local-hero p {
  color: rgba(180, 200, 220, 0.92);
}
