/* ==========================================================================
   SMARTEDGE AGRIGUARDIAN // CYBER COMMAND HUD THEME v6.0
   High-Tech Holographic Sci-Fi Operations Center • Neon Gauges • Tactical HUD
   ========================================================================== */

:root {
  /* Cybernetic Color Palette */
  --cyber-black: #04060b;
  --cyber-dark: #070b14;
  --cyber-panel: rgba(10, 16, 29, 0.85);
  --cyber-panel-hover: rgba(14, 23, 42, 0.95);
  
  --hud-border: rgba(0, 240, 255, 0.22);
  --hud-border-bright: #00f0ff;
  --hud-grid: rgba(0, 240, 255, 0.05);
  
  /* Neon Laser Spectrums */
  --neon-cyan: #00f0ff;
  --neon-cyan-glow: 0 0 15px rgba(0, 240, 255, 0.6);
  --neon-emerald: #00ff9d;
  --neon-emerald-glow: 0 0 15px rgba(0, 255, 157, 0.6);
  --neon-amber: #ffb703;
  --neon-amber-glow: 0 0 15px rgba(255, 183, 3, 0.6);
  --neon-rose: #ff0055;
  --neon-rose-glow: 0 0 15px rgba(255, 0, 85, 0.6);
  --neon-violet: #a855f7;
  --neon-violet-glow: 0 0 15px rgba(168, 85, 247, 0.6);
  
  --text-main: #f1f5f9;
  --text-muted: #8492a6;
  --text-dim: #475569;
  
  --font-hud: 'Orbitron', 'Rajdhani', -apple-system, sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Base Reset & Cyber Background */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.cyber-hud-theme {
  font-family: var(--font-body);
  background-color: var(--cyber-black);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.4;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* CRT Scanlines & Holographic Grid Background */
.hud-scanlines {
  position: fixed;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.35) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 99;
  opacity: 0.45;
}

.hud-grid-background {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(var(--hud-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hud-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.cyber-ambient-flare {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}

.flare-cyan {
  width: 600px;
  height: 600px;
  background: var(--neon-cyan);
  top: -150px;
  right: -150px;
}

.flare-emerald {
  width: 500px;
  height: 500px;
  background: var(--neon-emerald);
  bottom: -150px;
  left: -150px;
}

/* Master Layout */
.hud-layout {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-width: 1520px;
  margin: 0 auto;
  padding: 20px;
  gap: 20px;
}

/* HUD Chamfered Corner Accents */
.hud-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
  z-index: 5;
}

.hud-corner.tl { top: -1px; left: -1px; border-top: 2px solid var(--neon-cyan); border-left: 2px solid var(--neon-cyan); }
.hud-corner.tr { top: -1px; right: -1px; border-top: 2px solid var(--neon-cyan); border-right: 2px solid var(--neon-cyan); }
.hud-corner.bl { bottom: -1px; left: -1px; border-bottom: 2px solid var(--neon-cyan); border-left: 2px solid var(--neon-cyan); }
.hud-corner.br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--neon-cyan); border-right: 2px solid var(--neon-cyan); }

/* ==========================================================================
   HEADER HUD DECK
   ========================================================================== */
.hud-header {
  position: relative;
  background: var(--cyber-panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--hud-border);
  padding: 16px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hud-logo-chassis {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--neon-emerald);
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
  padding: 3px;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hud-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 255, 157, 0.4) 360deg);
  animation: radarSpin 3.5s linear infinite;
  pointer-events: none;
}

@keyframes radarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hud-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-title {
  font-family: var(--font-hud);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.neon-green {
  color: var(--neon-emerald);
  text-shadow: var(--neon-emerald-glow);
}

.hud-sys-status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-emerald);
  background: rgba(0, 255, 157, 0.12);
  border: 1px solid rgba(0, 255, 157, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
}

.hud-subtitle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.hud-pipe { color: var(--text-dim); }
.hud-coord { color: var(--neon-cyan); }
.hud-security { color: #a78bfa; }

/* Status Matrix Pills */
.hud-network-matrix {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(5, 10, 20, 0.8);
  border: 1px solid var(--hud-border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.hud-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}

.hud-pill.online .hud-beacon,
.hud-pill .ws-beacon,
.hud-pill .mqtt-beacon {
  background: var(--neon-emerald);
  box-shadow: 0 0 10px var(--neon-emerald);
  animation: beaconBlink 1.8s infinite;
}

@keyframes beaconBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.hud-latency {
  font-size: 0.72rem;
  color: var(--neon-emerald);
  background: rgba(0, 255, 157, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
}

.hud-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--neon-cyan);
  border-radius: 4px;
}

.clock-prefix { color: var(--text-dim); }

/* ==========================================================================
   HOLOGRAPHIC POLYHOUSE TAC-STRIP
   ========================================================================== */
.hud-tac-strip {
  position: relative;
  background: var(--cyber-panel);
  border: 1px solid var(--hud-border);
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.tac-bg-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: contrast(1.3) brightness(0.8);
}

.tac-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 6, 11, 0.95) 0%, rgba(7, 11, 20, 0.78) 50%, rgba(4, 6, 11, 0.95) 100%);
  pointer-events: none;
}

.tac-content {
  position: relative;
  z-index: 2;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.tac-badge-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tac-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.green-glow {
  background: rgba(0, 255, 157, 0.15);
  border: 1px solid rgba(0, 255, 157, 0.45);
  color: var(--neon-emerald);
}

.blink-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-emerald);
  box-shadow: 0 0 6px var(--neon-emerald);
  margin-right: 4px;
}

.cyan-glow {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--neon-cyan);
}

.purple-glow {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.tac-headline {
  font-family: var(--font-hud);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 4px;
}

.tac-subtext {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 650px;
}

.tac-telemetry-right {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tac-data-module {
  background: rgba(4, 8, 16, 0.85);
  border: 1px solid var(--hud-border);
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}

.module-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.module-val {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
}

.module-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.text-emerald { color: var(--neon-emerald); text-shadow: var(--neon-emerald-glow); }
.text-cyan { color: var(--neon-cyan); text-shadow: var(--neon-cyan-glow); }
.text-amber { color: var(--neon-amber); text-shadow: var(--neon-amber-glow); }

/* ==========================================================================
   SECTION 1: CIRCULAR NEON GAUGES & METERS
   ========================================================================== */
.hud-gauges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.hud-meter-pod {
  position: relative;
  background: var(--cyber-panel);
  border: 1px solid var(--hud-border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-meter-pod:hover {
  transform: translateY(-4px);
  border-color: var(--hud-border-bright);
  box-shadow: 0 8px 35px rgba(0, 240, 255, 0.2);
}

.pod-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.pod-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pod-icon {
  font-size: 1.4rem;
}

.pod-title {
  font-family: var(--font-hud);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.pod-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}

.live-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(0, 255, 157, 0.15);
  border: 1px solid var(--neon-emerald);
  color: var(--neon-emerald);
  box-shadow: 0 0 8px rgba(0, 255, 157, 0.3);
}

.live-tag.offline {
  background: rgba(255, 0, 85, 0.15);
  border-color: var(--neon-rose);
  color: var(--neon-rose);
  box-shadow: 0 0 8px rgba(255, 0, 85, 0.3);
}

.mode-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--neon-violet);
  color: #c084fc;
}

/* CIRCULAR RADIAL SVG GAUGE DIAL */
.radial-gauge-container {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 10px auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.radial-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 12;
}

.radial-bar {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 389.5;
  stroke-dashoffset: 389.5;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.arc-temp {
  stroke: url(#grad-temp);
  filter: drop-shadow(0 0 6px rgba(255, 183, 3, 0.8));
}

.arc-hum {
  stroke: url(#grad-hum);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.8));
}

.arc-soil {
  stroke: url(#grad-soil);
  filter: drop-shadow(0 0 6px rgba(0, 255, 157, 0.8));
}

.radial-center-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hud-big-metric {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.num-glow {
  font-family: var(--font-hud);
  font-size: 2.3rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

.unit-glow {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.radial-sub-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* POD FOOTER */
.pod-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pod-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.meta-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.hud-chip-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.badge-optimal {
  background: rgba(0, 255, 157, 0.15);
  color: var(--neon-emerald);
  border: 1px solid rgba(0, 255, 157, 0.3);
}

.badge-normal {
  background: rgba(0, 240, 255, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

/* ==========================================================================
   WATER PUMP HOLOGRAPHIC REACTOR CORE
   ========================================================================== */
.reactor-core-container {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 10px auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reactor-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.outer-ring {
  inset: 4px;
  border: 2px dashed rgba(0, 240, 255, 0.3);
  animation: rotateCore 18s linear infinite;
}

.middle-ring {
  inset: 18px;
  border: 2px solid rgba(0, 240, 255, 0.15);
  border-top-color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  animation: counterRotate 12s linear infinite;
}

.blade-ring {
  inset: 32px;
  border: 2px dotted rgba(168, 85, 247, 0.3);
  animation: rotateCore 6s linear infinite;
}

.reactor-core-glow {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.25) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.reactor-center-display {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.reactor-state-text {
  font-family: var(--font-hud);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-muted);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
}

.reactor-sub-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* Active Pumping State for Reactor */
.pump-card.pump-on .outer-ring {
  border-color: var(--neon-emerald);
  animation-duration: 4s;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
}

.pump-card.pump-on .middle-ring {
  border-top-color: var(--neon-emerald);
  border-bottom-color: var(--neon-emerald);
  animation-duration: 2.5s;
}

.pump-card.pump-on .reactor-core-glow {
  background: radial-gradient(circle, rgba(0, 255, 157, 0.6) 0%, transparent 70%);
}

.pump-card.pump-on .reactor-state-text {
  color: var(--neon-emerald);
  text-shadow: var(--neon-emerald-glow);
}

@keyframes rotateCore {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes counterRotate {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* ==========================================================================
   SECTION 2: COMMAND SWITCHBOARD & OSCILLOSCOPE HUD
   ========================================================================== */
.hud-command-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 20px;
}

@media (max-width: 1040px) {
  .hud-command-grid {
    grid-template-columns: 1fr;
  }
}

.hud-panel {
  position: relative;
  background: var(--cyber-panel);
  border: 1px solid var(--hud-border);
  padding: 22px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.hud-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-glyph {
  font-size: 1.3rem;
}

.panel-heading {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.panel-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

.hud-sys-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--hud-border);
  color: var(--neon-cyan);
}

/* Switchboard Summary Bar */
.switchboard-summary-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.switch-summary-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.live-status-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  border: 1px solid rgba(255, 0, 85, 0.4);
  color: var(--neon-rose);
  background: rgba(255, 0, 85, 0.1);
}

/* Master Cyber Switch Buttons */
.master-controllers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 580px) {
  .master-controllers-grid {
    grid-template-columns: 1fr;
  }
}

.cyber-switch-btn {
  position: relative;
  background: rgba(5, 10, 20, 0.9);
  border: 1px solid var(--hud-border);
  padding: 18px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
}

.cyber-switch-btn:hover {
  transform: translateY(-3px);
  border-color: var(--hud-border-bright);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.switch-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.switch-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.switch-reticle-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hud-border);
  font-size: 1.4rem;
}

.reticle-spin {
  position: absolute;
  inset: -3px;
  border: 1px dashed var(--neon-emerald);
  animation: rotateCore 14s linear infinite;
  pointer-events: none;
}

.pump-spin {
  border-color: var(--neon-cyan);
}

.switch-status-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
}

.badge-active-auto {
  background: rgba(0, 255, 157, 0.18);
  border: 1px solid var(--neon-emerald);
  color: var(--neon-emerald);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.35);
}

.badge-manual {
  background: rgba(255, 183, 3, 0.18);
  border: 1px solid var(--neon-amber);
  color: var(--neon-amber);
}

.badge-pump-off {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid #64748b;
  color: #94a3b8;
}

.badge-pump-on {
  background: rgba(0, 255, 157, 0.25);
  border: 1px solid var(--neon-emerald);
  color: var(--neon-emerald);
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.5);
}

.switch-title {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.switch-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.3;
  margin-bottom: 12px;
}

.switch-action-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--neon-emerald);
}

.auto-controller.active-auto {
  background: linear-gradient(135deg, rgba(0, 255, 157, 0.12) 0%, rgba(5, 10, 20, 0.95) 100%);
  border-color: var(--neon-emerald);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.pump-controller.active-pump {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(5, 10, 20, 0.95) 100%);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.pump-controller.active-pump .switch-action-prompt {
  color: var(--neon-rose);
}

/* Offline Lock Notice */
.controls-locked {
  position: relative;
  opacity: 0.7;
}

.offline-control-notice {
  background: rgba(255, 0, 85, 0.12);
  border: 1px solid rgba(255, 0, 85, 0.35);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #fca5a5;
  margin-bottom: 16px;
}

.lock-glyph { font-size: 1rem; }

/* HYSTERESIS THRESHOLD CHASSIS */
.hud-threshold-chassis {
  background: rgba(4, 8, 16, 0.75);
  border: 1px solid var(--hud-border);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.threshold-chassis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.matrix-title {
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.matrix-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.threshold-sliders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hud-input-pod {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pod-lbl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pod-lbl-row label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.indicator-chip {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
}

.indicator-chip.red-chip {
  background: rgba(255, 0, 85, 0.2);
  color: #ff4d6d;
}

.indicator-chip.green-chip {
  background: rgba(0, 255, 157, 0.2);
  color: var(--neon-emerald);
}

.hud-number-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.hud-number-wrapper input {
  width: 100%;
  background: #020408;
  border: 1px solid var(--hud-border);
  padding: 10px 50px 10px 14px;
  font-family: var(--font-hud);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.hud-number-wrapper input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.input-adc-badge {
  position: absolute;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.input-subnote {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-cyber-dispatch {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #059669 0%, #00ff9d 100%);
  border: none;
  padding: 14px;
  color: #04060b;
  font-family: var(--font-hud);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.btn-cyber-dispatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 255, 157, 0.7);
}

/* ==========================================================================
   OSCILLOSCOPE TELEMETRY HUD
   ========================================================================== */
.oscilloscope-legend {
  display: flex;
  gap: 14px;
}

.legend-channel {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ch-temp .ch-dot { background: #ffbe0b; box-shadow: 0 0 8px #ffbe0b; }
.ch-temp { color: #ffbe0b; }

.ch-hum .ch-dot { background: #00f0ff; box-shadow: 0 0 8px #00f0ff; }
.ch-hum { color: #00f0ff; }

.ch-soil .ch-dot { background: #00ff9d; box-shadow: 0 0 8px #00ff9d; }
.ch-soil { color: var(--neon-emerald); }

.canvas-viewport {
  position: relative;
  background: #020408;
  border: 1px solid var(--hud-border);
  padding: 10px;
  margin-bottom: 12px;
}

#telemetryChart {
  width: 100%;
  height: 290px;
  display: block;
}

.scope-footer-hud {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.scope-v {
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION 3: DIAGNOSTICS & AUDIT TRAIL TERMINAL
   ========================================================================== */
.hud-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 960px) {
  .hud-lower-grid {
    grid-template-columns: 1fr;
  }
}

.diag-hex-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.diag-cell {
  background: rgba(4, 8, 16, 0.85);
  border: 1px solid var(--hud-border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.diag-key {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.diag-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.diag-val.status-ok {
  color: var(--neon-emerald);
  text-shadow: var(--neon-emerald-glow);
}

/* AUDIT TERMINAL FEED */
.btn-clear-terminal {
  background: transparent;
  border: 1px solid var(--hud-border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clear-terminal:hover {
  border-color: var(--neon-rose);
  color: var(--neon-rose);
}

.terminal-feed-container {
  background: #020408;
  border: 1px solid var(--hud-border);
  padding: 12px;
  height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.76rem;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-left: 2px solid #475569;
  background: rgba(255, 255, 255, 0.02);
}

.event-row.info { border-left-color: var(--neon-cyan); }
.event-row.warning { border-left-color: var(--neon-amber); }
.event-row.error { border-left-color: var(--neon-rose); }

.event-time { color: var(--text-dim); }
.event-badge {
  font-weight: 700;
  color: var(--neon-cyan);
}
.event-msg { color: var(--text-main); flex: 1; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.hud-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--hud-border);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-brand {
  font-family: var(--font-hud);
  font-weight: 700;
  color: var(--text-muted);
}
