:root {
  --ink: #04111f;
  --ink-soft: #0a233d;
  --sky: #6cf5e8;
  --amber: #ffb55d;
  --glow: #99fff5;
  --text: #e6f4ff;
  --muted: #9bc0d6;
  --danger: #ff6f6f;
  --ok: #64f2a8;
  --void: #01040b;
  --panel: #04192b;
  --panel-2: #08243b;
  --cyan: #5cf7ff;
  --electric: #7ca4ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Chakra Petch", sans-serif;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.05em;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
}

.login-body {
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, #155a80 0%, rgba(21, 90, 128, 0) 40%),
    radial-gradient(circle at 80% 75%, #a0462a 0%, rgba(160, 70, 42, 0) 50%),
    linear-gradient(140deg, #020b14, #071628 55%, #041220);
  overflow: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(123, 196, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 196, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.login-shell {
  width: min(92vw, 460px);
  z-index: 2;
}

.login-card {
  backdrop-filter: blur(10px);
  background: rgba(6, 20, 36, 0.72);
  border: 1px solid rgba(160, 230, 255, 0.26);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: rise-in 500ms ease-out;
}

.login-card h1 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
}

.login-card .subtitle {
  margin: 0.7rem 0 1.6rem;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 0.8rem;
}

.login-form label {
  font-size: 0.9rem;
  color: var(--muted);
}

.login-form input {
  width: 100%;
  border: 1px solid rgba(112, 191, 229, 0.4);
  background: rgba(5, 17, 30, 0.85);
  color: var(--text);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  outline: none;
}

.login-form input:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(108, 245, 232, 0.2);
}

.login-form button,
.toggle-btn,
.logout-btn,
.install-btn,
.audio-btn {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 12px;
  padding: 0.82rem 1rem;
  cursor: pointer;
}

.login-form button {
  margin-top: 0.3rem;
  background: linear-gradient(120deg, #56ebdd, #6bb1ff);
  color: #052032;
  font-weight: 700;
}

.message {
  min-height: 1.2rem;
  margin: 0.2rem 0 0;
  color: var(--danger);
}

.dash-body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(80rem 40rem at -10% -10%, rgba(95, 255, 234, 0.2), transparent 55%),
    radial-gradient(70rem 35rem at 110% 0%, rgba(255, 182, 94, 0.17), transparent 58%),
    radial-gradient(60rem 40rem at 40% 120%, rgba(120, 92, 255, 0.13), transparent 65%),
    linear-gradient(150deg, #01040b 0%, #031427 45%, #020913 100%);
}

.dash-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 25% 40%, rgba(132, 246, 255, 0.1), transparent 30%),
    radial-gradient(circle at 75% 35%, rgba(255, 193, 118, 0.08), transparent 38%);
  pointer-events: none;
  z-index: 0;
}

.starfield,
.aurora-layer,
.grid-overlay,
.scanline-layer,
.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.starfield {
  z-index: 1;
}

.aurora-layer {
  z-index: 1;
  background:
    radial-gradient(55rem 25rem at 15% 75%, rgba(124, 255, 227, 0.2), transparent 70%),
    radial-gradient(52rem 25rem at 85% 20%, rgba(255, 187, 108, 0.16), transparent 72%),
    radial-gradient(58rem 23rem at 55% 110%, rgba(120, 162, 255, 0.16), transparent 72%);
  filter: blur(16px);
  opacity: 0.72;
  animation: aurora-shift 17s ease-in-out infinite alternate;
}

.grid-overlay {
  z-index: 2;
  background-image:
    linear-gradient(rgba(117, 224, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 224, 255, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
  animation: sweep-grid 24s linear infinite;
}

.scanline-layer {
  z-index: 4;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(94, 224, 255, 0.04) 3px,
    rgba(94, 224, 255, 0) 4px
  );
  mix-blend-mode: screen;
  opacity: 0.46;
  animation: scanline-shift 12s linear infinite;
}

.noise-layer {
  z-index: 6;
  opacity: 0.13;
  background-image:
    radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.26) 0 0.4px, transparent 0.8px),
    radial-gradient(circle at 83% 68%, rgba(139, 236, 255, 0.28) 0 0.5px, transparent 0.8px),
    radial-gradient(circle at 46% 38%, rgba(255, 215, 163, 0.18) 0 0.45px, transparent 0.9px);
  background-size: 9px 9px, 11px 11px, 7px 7px;
  animation: noise-shift 420ms steps(4) infinite;
}

.warp-flash {
  position: fixed;
  inset: 0;
  z-index: 28;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(187, 255, 246, 0.85), rgba(120, 197, 255, 0.22) 35%, rgba(2, 8, 16, 0) 70%),
    linear-gradient(180deg, rgba(211, 255, 252, 0.38), rgba(95, 205, 255, 0.12));
}

.warp-flash.active {
  animation: warp-burst 620ms ease-out forwards;
}

.activation-sequence {
  position: fixed;
  inset: 0;
  z-index: 42;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  background: rgba(1, 8, 16, 0.88);
  transition: opacity 260ms ease;
}

.activation-sequence.hidden {
  display: none;
}

.activation-sequence.active {
  display: block;
  opacity: 1;
}

.activation-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 252, 255, 0.34), rgba(7, 31, 56, 0.64) 40%, rgba(1, 7, 14, 0.96) 78%),
    conic-gradient(
      from 0deg,
      rgba(126, 252, 255, 0.28),
      rgba(255, 190, 114, 0.23),
      rgba(126, 252, 255, 0.28),
      rgba(111, 164, 255, 0.24),
      rgba(126, 252, 255, 0.28)
    );
  filter: blur(2px) saturate(135%);
  animation: activation-veil 2.4s linear infinite;
}

.activation-rings {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.pulse-ring {
  position: absolute;
  width: min(94vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(145, 237, 255, 0.44);
  box-shadow: 0 0 42px rgba(102, 231, 255, 0.28), inset 0 0 52px rgba(90, 146, 255, 0.2);
  animation: activation-ring-expand 2.8s ease-out infinite;
}

.pulse-ring.ring-2 {
  width: min(78vw, 610px);
  animation-delay: 0.34s;
}

.pulse-ring.ring-3 {
  width: min(62vw, 470px);
  animation-delay: 0.68s;
}

.activation-grid-fx {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 226, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 226, 255, 0.15) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 10%, transparent 88%);
  animation: activation-grid-drift 4s linear infinite;
  opacity: 0.8;
}

.activation-copy {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.65rem;
  padding: 1rem;
  text-align: center;
  animation: activation-copy-rise 420ms ease-out both;
}

.activation-copy.hidden {
  display: none;
}

.activation-eyebrow {
  margin: 0;
  font-size: clamp(0.68rem, 2vw, 0.92rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(170, 230, 255, 0.9);
}

.activation-title {
  margin: 0;
  position: relative;
  text-transform: uppercase;
  font-size: clamp(1.36rem, 7vw, 3.8rem);
  letter-spacing: 0.16em;
  line-height: 1.05;
  color: #edfeff;
  text-shadow: 0 0 24px rgba(105, 232, 255, 0.52);
}

.activation-title::before,
.activation-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.activation-title::before {
  color: rgba(105, 246, 255, 0.8);
  transform: translate(2px, 0);
  clip-path: polygon(0 0, 100% 0, 100% 48%, 0 48%);
  animation: activation-title-glitch-a 1.2s steps(2, end) infinite;
}

.activation-title::after {
  color: rgba(255, 197, 126, 0.8);
  transform: translate(-2px, 0);
  clip-path: polygon(0 52%, 100% 52%, 100% 100%, 0 100%);
  animation: activation-title-glitch-b 1.5s steps(2, end) infinite;
}

.activation-countdown {
  margin: 0.2rem 0 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1rem, 4.8vw, 2.1rem);
  letter-spacing: 0.12em;
  color: rgba(222, 248, 255, 0.95);
}

.activation-progress {
  width: min(88vw, 620px);
  height: 13px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(132, 229, 255, 0.42);
  background: rgba(4, 27, 45, 0.82);
  box-shadow: 0 0 18px rgba(97, 223, 255, 0.24);
}

.activation-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(117, 250, 239, 0.92), rgba(108, 166, 255, 0.95) 52%, rgba(255, 191, 127, 0.92)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.34) 0,
      rgba(255, 255, 255, 0.34) 2px,
      rgba(255, 255, 255, 0.04) 3px,
      rgba(255, 255, 255, 0.04) 8px
    );
  box-shadow: 0 0 22px rgba(100, 228, 255, 0.55);
  transition: width 80ms linear;
}

.activation-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  background: #000;
  transition: opacity 260ms ease;
}

.activation-video.active {
  opacity: 1;
}

.activation-sequence.video-mode .activation-backdrop,
.activation-sequence.video-mode .activation-rings,
.activation-sequence.video-mode .activation-grid-fx {
  opacity: 0;
  transition: opacity 220ms ease;
}

.boot-sequence {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(circle at 18% 14%, rgba(102, 245, 232, 0.18), transparent 40%),
    radial-gradient(circle at 84% 80%, rgba(255, 188, 120, 0.15), transparent 42%),
    linear-gradient(160deg, rgba(1, 7, 14, 0.95), rgba(2, 10, 20, 0.98));
}

.boot-sequence::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 223, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 223, 255, 0.09) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 100%);
  animation: sweep-grid 18s linear infinite;
  pointer-events: none;
}

.boot-core {
  position: relative;
  width: min(640px, 94vw);
  padding: 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(126, 230, 255, 0.33);
  background: linear-gradient(145deg, rgba(5, 19, 34, 0.9), rgba(3, 11, 20, 0.98));
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(160, 235, 255, 0.08),
    inset 0 0 28px rgba(104, 163, 255, 0.12);
  overflow: hidden;
}

.boot-core::before {
  content: "";
  position: absolute;
  inset: -60% -30%;
  background: conic-gradient(
    from 0deg,
    rgba(126, 255, 247, 0) 0deg,
    rgba(126, 255, 247, 0.2) 38deg,
    rgba(255, 197, 128, 0.2) 90deg,
    rgba(126, 255, 247, 0) 180deg
  );
  animation: spin-cw 8.5s linear infinite;
  pointer-events: none;
}

.boot-radar {
  position: relative;
  margin: 0.2rem auto 0.8rem;
  width: clamp(130px, 30vw, 172px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(131, 230, 255, 0.4);
  background:
    radial-gradient(circle, rgba(113, 250, 236, 0.18), rgba(8, 33, 54, 0.2) 56%, rgba(2, 10, 18, 0.1) 100%),
    conic-gradient(from 60deg, rgba(95, 243, 255, 0.55), rgba(95, 243, 255, 0));
  box-shadow: 0 0 24px rgba(89, 240, 255, 0.3);
  animation: boot-radar-spin 1.9s linear infinite;
}

.boot-radar::before,
.boot-radar::after {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px dashed rgba(129, 227, 255, 0.32);
}

.boot-radar::after {
  inset: 33%;
  border-style: solid;
  border-color: rgba(255, 201, 133, 0.46);
  animation: boot-radar-pulse 1.3s ease-in-out infinite;
}

.boot-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(163, 221, 248, 0.84);
  text-align: center;
}

.boot-title {
  margin: 0.36rem 0 0.45rem;
  font-size: clamp(1.2rem, 5vw, 1.86rem);
  text-align: center;
  letter-spacing: 0.1em;
  color: #d6f9ff;
}

.boot-line {
  margin: 0 0 0.72rem;
  text-align: center;
  color: rgba(188, 224, 245, 0.9);
  font-size: 0.94rem;
  animation: line-flicker 1.45s steps(2) infinite;
}

.boot-progress {
  width: min(520px, 92%);
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(11, 43, 70, 0.9);
  border: 1px solid rgba(131, 226, 255, 0.28);
  overflow: hidden;
}

.boot-progress span {
  display: block;
  width: 0%;
  height: 12px;
  background:
    linear-gradient(90deg, rgba(115, 246, 230, 0.8), rgba(121, 188, 255, 0.9) 55%, rgba(255, 194, 126, 0.8)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.4) 0,
      rgba(255, 255, 255, 0.4) 2px,
      rgba(255, 255, 255, 0.06) 2px,
      rgba(255, 255, 255, 0.06) 8px
    );
  box-shadow: 0 0 16px rgba(108, 245, 232, 0.45);
  transition: width 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.boot-checks {
  margin: 0.82rem auto 0;
  width: min(520px, 92%);
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.boot-checks li {
  padding: 0.42rem 0.58rem;
  border-radius: 10px;
  font-size: 0.79rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(174, 214, 239, 0.85);
  background: rgba(6, 24, 42, 0.68);
  border: 1px solid rgba(124, 212, 255, 0.24);
}

.boot-checks li.complete {
  color: rgba(155, 255, 196, 0.95);
  border-color: rgba(120, 255, 178, 0.42);
  box-shadow: inset 0 0 0 1px rgba(120, 255, 178, 0.12);
}

.boot-checks li.pending {
  color: rgba(255, 211, 147, 0.94);
  border-color: rgba(255, 199, 128, 0.38);
}

.boot-skip {
  margin: 0.85rem auto 0.05rem;
  display: block;
  min-width: 140px;
  border: 1px solid rgba(122, 223, 255, 0.36);
  border-radius: 999px;
  background: rgba(5, 20, 34, 0.86);
  color: #d7f5ff;
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.52rem 0.9rem;
  cursor: pointer;
}

.boot-skip:hover {
  border-color: rgba(150, 243, 255, 0.66);
  box-shadow: 0 0 14px rgba(119, 244, 255, 0.32);
}

.boot-sequence.fade-out {
  animation: boot-fade-out 620ms cubic-bezier(0.3, 0.7, 0.4, 1) forwards;
  pointer-events: none;
}

.dash-shell {
  position: relative;
  z-index: 5;
  width: min(1240px, 94vw);
  margin: 0 auto;
  padding: max(1.2rem, env(safe-area-inset-top)) 0 calc(2.2rem + env(safe-area-inset-bottom));
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition: opacity 520ms ease, transform 700ms cubic-bezier(0.2, 0.82, 0.23, 1), filter 620ms ease;
}

.dash-body.ui-hidden .dash-shell {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  filter: blur(4px);
}

.dash-shell .panel {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
}

.dash-body.boot-finished .dash-shell .panel {
  animation: panel-rise 620ms cubic-bezier(0.15, 0.88, 0.32, 1) forwards;
}

.dash-body.boot-finished .dash-header.panel {
  animation-delay: 0.05s;
}

.dash-body.boot-finished .hud-grid .panel:nth-child(1) {
  animation-delay: 0.15s;
}

.dash-body.boot-finished .hud-grid .panel:nth-child(2) {
  animation-delay: 0.24s;
}

.dash-body.boot-finished .metrics .panel:nth-child(1) {
  animation-delay: 0.3s;
}

.dash-body.boot-finished .metrics .panel:nth-child(2) {
  animation-delay: 0.36s;
}

.dash-body.boot-finished .metrics .panel:nth-child(3) {
  animation-delay: 0.42s;
}

.dash-body.boot-finished .metrics .panel:nth-child(4) {
  animation-delay: 0.48s;
}

.dash-body.boot-finished .command-grid .panel:nth-child(1) {
  animation-delay: 0.56s;
}

.dash-body.boot-finished .command-grid .panel:nth-child(2) {
  animation-delay: 0.64s;
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(118, 224, 255, 0.24);
  background: linear-gradient(150deg, rgba(5, 20, 34, 0.78), rgba(4, 14, 25, 0.9));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 -40px 90px rgba(68, 125, 255, 0.08);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(130deg, rgba(126, 255, 247, 0.18), rgba(255, 191, 122, 0.1), transparent 40%);
  opacity: 0.5;
  pointer-events: none;
}

.dash-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: stretch;
  padding: 1.2rem 1.2rem 1.1rem;
}

.title-wrap {
  position: relative;
}

.glitch {
  position: relative;
  font-size: clamp(1.6rem, 3.3vw, 2.6rem);
  text-transform: uppercase;
  line-height: 1.08;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.65;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  transform: translate(1px, 0);
  clip-path: polygon(0 0, 100% 0, 100% 46%, 0 46%);
  animation: glitch-a 2.8s infinite linear;
}

.glitch::after {
  color: var(--amber);
  transform: translate(-1px, 0);
  clip-path: polygon(0 56%, 100% 56%, 100% 100%, 0 100%);
  animation: glitch-b 3.2s infinite linear;
}

.dash-header .subtitle {
  margin: 0.55rem 0 0;
  color: rgba(192, 226, 255, 0.86);
  font-size: 0.97rem;
  max-width: 55ch;
}

.header-readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  align-content: space-between;
  gap: 0.7rem;
}

.readout {
  background: rgba(6, 22, 40, 0.73);
  border: 1px solid rgba(133, 221, 255, 0.24);
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
  display: grid;
  gap: 0.28rem;
}

.readout span {
  color: rgba(183, 219, 242, 0.82);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.readout strong {
  font-family: "Orbitron", sans-serif;
  font-size: 1.03rem;
  color: #dff9ff;
}

.logout-btn {
  background: linear-gradient(130deg, #ffca7d, #ffaf6a);
  color: #351500;
  font-size: 0.72rem;
  font-weight: 700;
  justify-self: stretch;
}

.install-btn {
  background: linear-gradient(125deg, #8efef6, #69bfff);
  color: #04243d;
  font-size: 0.72rem;
  font-weight: 800;
  justify-self: stretch;
  border: 1px solid rgba(145, 244, 255, 0.8);
}

.install-btn.hidden {
  display: none;
}

.audio-btn {
  background: linear-gradient(130deg, #c8e4ff, #9cc9ff);
  color: #06253f;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(179, 218, 255, 0.75);
}

.audio-btn.pending {
  background: linear-gradient(130deg, #ffe7bd, #ffce89);
  border-color: rgba(255, 211, 149, 0.8);
  color: #412100;
}

.audio-btn.active {
  background: linear-gradient(130deg, #9affdc, #70e6ff);
  border-color: rgba(145, 255, 223, 0.85);
  color: #043423;
  box-shadow: 0 0 18px rgba(112, 238, 255, 0.3);
}

.audio-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hud-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.18fr 1fr;
  gap: 1rem;
}

.reactor-panel,
.control-panel {
  padding: 1rem 1rem 1.1rem;
}

.panel-tag {
  margin: 0;
  text-transform: uppercase;
  color: rgba(166, 220, 247, 0.86);
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 700;
}

.reactor-chamber {
  margin: 0.8rem auto 0.72rem;
  width: clamp(220px, 29vw, 320px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(110, 245, 255, 0.34);
}

.ring-a {
  inset: 5%;
  animation: spin-cw 9s linear infinite;
}

.ring-b {
  inset: 14%;
  border-style: dashed;
  animation: spin-ccw 7s linear infinite;
}

.ring-c {
  inset: 24%;
  border-color: rgba(255, 191, 124, 0.45);
  animation: spin-cw 5.8s linear infinite;
}

.ring-d {
  inset: 34%;
  border-style: dotted;
  border-width: 2px;
  animation: spin-ccw 4.8s linear infinite;
}

.core {
  position: absolute;
  inset: 43%;
  border-radius: 50%;
  background: radial-gradient(circle, #bbfff8 0%, #62f5d9 30%, #1f93d0 62%, #08253d 100%);
  box-shadow:
    0 0 22px rgba(100, 247, 235, 0.7),
    0 0 50px rgba(78, 158, 255, 0.4);
  animation: core-pulse 2.6s ease-in-out infinite;
}

.core::before {
  content: "";
  position: absolute;
  inset: -34%;
  border-radius: 50%;
  border: 2px solid rgba(138, 243, 255, 0.38);
  animation: spin-cw 2.7s linear infinite;
}

.indicator.beacon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.indicator.beacon.on {
  background: var(--ok);
  box-shadow: 0 0 0 7px rgba(100, 242, 168, 0.24), 0 0 16px rgba(100, 242, 168, 0.85);
  animation: beacon-pulse 1.2s ease-out infinite;
}

.indicator.beacon.off {
  background: #7f8da3;
  box-shadow: 0 0 0 5px rgba(127, 141, 163, 0.2);
}

.status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.mode-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(130, 226, 255, 0.44);
  color: #9dd6ff;
  font-size: 0.74rem;
}

.energy-rails {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.energy-rails span {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 255, 228, 0.1), rgba(126, 255, 228, 0.72), rgba(126, 255, 228, 0.12));
  background-size: 170% 100%;
  animation: rail-flow 2.6s linear infinite;
}

.energy-rails span:nth-child(2) {
  animation-delay: 0.25s;
}

.energy-rails span:nth-child(3) {
  animation-delay: 0.5s;
}

.control-panel {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.toggle-btn {
  width: min(100%, 340px);
  justify-self: start;
  min-height: 56px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(144, 229, 255, 0.5);
  color: #03161f;
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 1;
  transition: transform 120ms ease, filter 180ms ease;
}

.toggle-btn::before {
  content: "";
  position: absolute;
  inset: -140%;
  z-index: -2;
  background: conic-gradient(
    from 0deg,
    rgba(127, 226, 255, 0) 0deg,
    rgba(127, 226, 255, 0.75) 60deg,
    rgba(255, 198, 126, 0.78) 140deg,
    rgba(127, 226, 255, 0) 220deg,
    rgba(127, 226, 255, 0) 360deg
  );
  animation: spin-cw 4.6s linear infinite;
}

.toggle-btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -1;
  border-radius: 10px;
}

.toggle-btn.enabled::after {
  background: linear-gradient(125deg, #7dffd8, #6ee9ff 60%, #8fa7ff);
}

.toggle-btn.disabled::after {
  background: linear-gradient(125deg, #ffca85, #ffb66f 65%, #ffd8a6);
}

.toggle-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.toggle-btn:active {
  transform: translateY(1px);
}

.toggle-btn:disabled {
  cursor: wait;
  filter: saturate(0.7);
}

.hint {
  margin: 0;
  color: rgba(186, 220, 240, 0.92);
}

.micro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.7rem;
}

.micro-card {
  background: rgba(5, 18, 34, 0.72);
  border: 1px solid rgba(125, 215, 255, 0.25);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  display: grid;
  gap: 0.3rem;
}

.micro-card span {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(175, 218, 245, 0.78);
}

.micro-card strong {
  font-family: "Orbitron", sans-serif;
  font-size: 1.13rem;
  color: #e5fbff;
}

.metrics {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.9rem;
}

.command-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 0.9rem;
  align-items: start;
}

.terminal-panel {
  padding: 0.9rem 0.9rem 0.75rem;
}

.terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.72rem;
}

.terminal-head h2 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(186, 222, 248, 0.9);
}

.terminal-status {
  min-width: 82px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(142, 220, 255, 0.38);
  padding: 0.22rem 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #9fd8ff;
  background: rgba(4, 18, 33, 0.75);
}

.log-list {
  margin: 0;
  padding: 0.2rem 0.1rem 0.1rem;
  list-style: none;
  max-height: 350px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.log-item {
  position: relative;
  display: block;
  margin: 0 0 0.42rem;
  padding: 0.53rem 0.68rem;
  border-radius: 11px;
  background: rgba(7, 26, 45, 0.72);
  border: 1px solid rgba(118, 205, 255, 0.24);
  font-size: 0.84rem;
  line-height: 1.35;
  color: #d6f3ff;
  animation: rise-in 280ms ease-out;
}

.log-item::before {
  content: attr(data-time);
  display: block;
  margin-bottom: 0.22rem;
  font-size: 0.65rem;
  letter-spacing: 0.11em;
  color: rgba(180, 218, 244, 0.74);
}

.log-item.success {
  border-color: rgba(101, 255, 177, 0.42);
  box-shadow: inset 0 0 0 1px rgba(101, 255, 177, 0.1);
}

.log-item.warn {
  border-color: rgba(255, 201, 120, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 201, 120, 0.1);
}

.log-item.error {
  border-color: rgba(255, 133, 133, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 133, 133, 0.12);
}

.metric-card {
  padding: 0.95rem 1rem;
  isolation: isolate;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: -45% auto auto -55%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127, 247, 255, 0.15), transparent 72%);
  z-index: -1;
  animation: drift-glow 11s ease-in-out infinite;
}

.metric-card h2 {
  margin: 0 0 0.56rem;
  font-size: 0.78rem;
  color: rgba(178, 216, 240, 0.84);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-card p {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  font-size: 1.05rem;
}

#last-status.status-ok {
  color: #7fffbf;
}

#last-status.status-warn {
  color: #ffc588;
}

#last-status.status-fail {
  color: #ff8f8f;
}

.error-zone {
  padding: 0.95rem 1rem;
  border-color: rgba(255, 141, 141, 0.38);
}

.error-zone h2 {
  margin: 0 0 0.46rem;
  font-size: 0.78rem;
  color: #ffb1b1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.error-zone p {
  margin: 0;
  font-family: "Orbitron", sans-serif;
  color: #ffe2e2;
}

.error-zone.has-error {
  box-shadow:
    0 0 0 1px rgba(255, 138, 138, 0.45),
    0 14px 34px rgba(0, 0, 0, 0.35),
    inset 0 0 35px rgba(255, 91, 91, 0.16);
  animation: alarm-pulse 1.6s ease-in-out infinite;
}

.dash-body.reactor-live .core {
  box-shadow:
    0 0 28px rgba(100, 247, 235, 0.8),
    0 0 75px rgba(100, 247, 235, 0.28),
    0 0 100px rgba(126, 164, 255, 0.25);
}

.dash-body.reactor-live .mode-tag {
  border-color: rgba(118, 255, 178, 0.65);
  color: #8ffcc3;
}

.dash-body.reactor-live .energy-rails span {
  background: linear-gradient(90deg, rgba(97, 248, 170, 0.15), rgba(97, 248, 170, 0.88), rgba(97, 248, 170, 0.14));
}

.dash-body.reactor-live .terminal-status {
  border-color: rgba(118, 255, 178, 0.52);
  color: #90ffc8;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sweep-grid {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 52px 104px, 104px 52px;
  }
}

@keyframes aurora-shift {
  0% {
    transform: translate3d(-2%, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(2%, -1.5%, 0) scale(1.06);
  }
}

@keyframes scanline-shift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(14px);
  }
}

@keyframes noise-shift {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(0.6px, -0.6px);
  }
  50% {
    transform: translate(-0.5px, 0.5px);
  }
  75% {
    transform: translate(0.3px, 0.3px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes spin-cw {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin-ccw {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes core-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.22);
  }
}

@keyframes beacon-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(100, 242, 168, 0.38), 0 0 9px rgba(100, 242, 168, 0.8);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(100, 242, 168, 0), 0 0 14px rgba(100, 242, 168, 0.5);
  }
}

@keyframes rail-flow {
  from {
    background-position: -120% 0;
  }
  to {
    background-position: 120% 0;
  }
}

@keyframes glitch-a {
  0%,
  92%,
  100% {
    transform: translate(1px, 0);
    opacity: 0.55;
  }
  93% {
    transform: translate(-3px, -1px);
    opacity: 0.95;
  }
  96% {
    transform: translate(4px, 1px);
    opacity: 0.9;
  }
}

@keyframes glitch-b {
  0%,
  90%,
  100% {
    transform: translate(-1px, 0);
    opacity: 0.5;
  }
  91% {
    transform: translate(3px, 1px);
    opacity: 0.9;
  }
  95% {
    transform: translate(-4px, -1px);
    opacity: 0.85;
  }
}

@keyframes drift-glow {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.44;
  }
  50% {
    transform: translate(28px, 18px);
    opacity: 0.72;
  }
}

@keyframes alarm-pulse {
  0%,
  100% {
    border-color: rgba(255, 141, 141, 0.38);
  }
  50% {
    border-color: rgba(255, 113, 113, 0.92);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes boot-radar-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes boot-radar-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.66;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes line-flicker {
  0%,
  24%,
  100% {
    opacity: 1;
  }
  25%,
  27% {
    opacity: 0.35;
  }
  46%,
  48% {
    opacity: 0.5;
  }
}

@keyframes boot-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(1.04);
    filter: blur(8px);
    visibility: hidden;
  }
}

@keyframes warp-burst {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  28% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes activation-veil {
  0% {
    transform: scale(1) rotate(0deg);
    filter: blur(2px) saturate(130%);
  }
  100% {
    transform: scale(1.08) rotate(360deg);
    filter: blur(2px) saturate(155%);
  }
}

@keyframes activation-grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 120px 180px, 180px 120px;
  }
}

@keyframes activation-ring-expand {
  0% {
    opacity: 0.85;
    transform: scale(0.74);
  }
  72% {
    opacity: 0.42;
    transform: scale(1.16);
  }
  100% {
    opacity: 0;
    transform: scale(1.32);
  }
}

@keyframes activation-title-glitch-a {
  0%,
  72%,
  100% {
    transform: translate(2px, 0);
    opacity: 0.65;
  }
  74% {
    transform: translate(-8px, -2px);
    opacity: 1;
  }
  78% {
    transform: translate(5px, 3px);
    opacity: 0.95;
  }
}

@keyframes activation-title-glitch-b {
  0%,
  69%,
  100% {
    transform: translate(-2px, 0);
    opacity: 0.6;
  }
  70% {
    transform: translate(7px, 2px);
    opacity: 0.95;
  }
  76% {
    transform: translate(-5px, -2px);
    opacity: 0.88;
  }
}

@keyframes activation-copy-rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1080px) {
  .dash-header {
    grid-template-columns: 1fr;
  }

  .header-readouts {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .logout-btn {
    justify-self: start;
  }

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

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

@media (max-width: 700px) {
  .dash-shell {
    width: min(1240px, 95vw);
  }

  .boot-core {
    width: 96vw;
    padding: 0.9rem 0.75rem;
  }

  .boot-line {
    font-size: 0.86rem;
  }

  .header-readouts {
    grid-template-columns: 1fr;
  }

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

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

  .metric-card p {
    font-size: 0.92rem;
  }

  .terminal-panel {
    padding: 0.75rem;
  }

  .log-list {
    max-height: 42vh;
  }

  .reactor-chamber {
    width: min(82vw, 290px);
  }
}

@media (max-width: 480px) {
  .dash-shell {
    width: 96vw;
  }

  .boot-title {
    font-size: 1.07rem;
  }

  .boot-checks li {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .dash-header,
  .reactor-panel,
  .control-panel {
    padding-inline: 0.75rem;
  }

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

  .toggle-btn {
    width: 100%;
  }
}

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