/* ==========================================================================
   Cortesa Cosmic Intelligence & Quantum Point Cloud Design System
   High-Precision Cosmic Editorial Telemetry & IoT Control Matrix
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap');

:root {
  /* Surface & Base Palette */
  --bg-space: #02040a;
  --bg-nebula: #050a16;
  --bg-surface: #0a101c;
  --panel-glass: rgba(10, 16, 28, 0.65);
  --panel-glass-hover: rgba(16, 24, 40, 0.85);
  --panel-glass-deep: rgba(6, 10, 18, 0.9);
  --panel-border: rgba(255, 255, 255, 0.09);
  --panel-border-hover: rgba(0, 220, 255, 0.4);
  --panel-border-active: rgba(0, 240, 255, 0.6);

  /* Photonic Signals & Cosmic Glow Accents */
  --cyan-core: #79ddff;
  --cyan-bright: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --cyan-soft: rgba(0, 240, 255, 0.12);
  --blue-glow: rgba(0, 160, 255, 0.4);
  --blue-soft: rgba(0, 160, 255, 0.12);

  --emerald: #00f59b;
  --emerald-glow: rgba(0, 245, 155, 0.35);
  --emerald-soft: rgba(0, 245, 155, 0.12);

  --rose: #ff2e5b;
  --rose-glow: rgba(255, 46, 91, 0.35);
  --rose-soft: rgba(255, 46, 91, 0.12);

  --amber: #ffaa00;
  --amber-glow: rgba(255, 170, 0, 0.35);
  --amber-soft: rgba(255, 170, 0, 0.12);

  --violet: #a855f7;
  --violet-glow: rgba(168, 85, 247, 0.35);
  --violet-soft: rgba(168, 85, 247, 0.12);

  /* Typography Colors */
  --text-white: #f8fafc;
  --text-silver: #c6d0df;
  --text-muted: #7e8c9f;
  --text-dim: #4f5d73;

  /* Typography Families */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Depth & Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 1px 1px var(--panel-border);
  --shadow-glow: 0 0 35px rgba(0, 240, 255, 0.25);
  --shadow-hover: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 200, 255, 0.3);

  /* Physics Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Resets & Base Layout
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-space);
  color-scheme: dark;
}

body {
  background-color: var(--bg-space);
  color: var(--text-silver);
  font-family: var(--font-sans);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Three.js Fullscreen Background Canvas */
#webglCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

/* Cosmic Gradient Atmosphere & Vignette */
.space-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: 
    radial-gradient(circle at 50% 45%, rgba(6, 32, 70, 0.28) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(0, 140, 255, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(10, 25, 55, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 45%, transparent 20%, rgba(2, 4, 10, 0.35) 60%, rgba(2, 4, 10, 0.95) 100%),
    linear-gradient(180deg, rgba(2,4,10,0.2) 0%, transparent 20%, transparent 75%, rgba(2,4,10,0.98) 100%);
  z-index: 2;
}

/* Application Shell */
.app-shell {
  position: relative;
  z-index: 10;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 44px;
  pointer-events: none;
}

.interactive-layer {
  pointer-events: auto;
}

/* ==========================================================================
   Navigation Bar & Floating Pill Menu
   ========================================================================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0 20px;
  position: relative;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-white);
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-icon {
  width: 26px;
  height: 26px;
  stroke: var(--cyan-core);
  stroke-width: 1.8;
  fill: none;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4));
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand-name span {
  color: var(--cyan-core);
  font-weight: 600;
}

.nav-pill-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(15, 23, 38, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 8px 26px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-silver);
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-link.active {
  color: var(--cyan-bright);
  font-weight: 500;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Audio Synthesizer Toggle Button */
.btn-audio {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  padding: 7px 16px;
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.btn-audio:hover {
  color: var(--cyan-core);
  border-color: var(--cyan-core);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
}

.btn-audio.active {
  color: #02040a;
  background: var(--cyan-bright);
  border-color: var(--cyan-bright);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.6);
}

/* Feed Live Stream Action */
.btn-stream {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18, 26, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-white);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-stream:hover {
  background: rgba(32, 45, 70, 0.9);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 0 25px rgba(0, 180, 255, 0.3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulseDot 1.6s infinite ease-in-out;
}

.pulse-dot.paused {
  background: var(--rose);
  box-shadow: 0 0 10px var(--rose);
  animation: none;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.clock-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan-core);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid var(--panel-border);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Hero Section (Editorial Dual-Column Narrative)
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 60px;
}

.hero-left {
  position: relative;
  z-index: 20;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(48px, 5.2vw, 76px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.9);
}

.hero-bottom-block {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: auto;
}

.hero-subtext {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 400px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  color: #03060c;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 25px rgba(255, 255, 255, 0.25), 0 0 40px rgba(0, 200, 255, 0.2);
  transition: all var(--transition-smooth);
  cursor: pointer;
  border: none;
}

.btn-white:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 8px 35px rgba(255, 255, 255, 0.45), 0 0 60px rgba(0, 240, 255, 0.5);
}

.btn-ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(14, 22, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-white);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: var(--radius-full);
  text-decoration: none;
  backdrop-filter: blur(16px);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-ghost-pill:hover {
  background: rgba(28, 42, 66, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.btn-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

/* Right Editorial Column */
.hero-right {
  position: relative;
  z-index: 20;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 540px;
  text-align: right;
}

.hero-metrics-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-metric-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-silver);
  background: rgba(10, 16, 28, 0.65);
  border: 1px solid var(--panel-border);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(16px);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-metric-chip b {
  color: var(--cyan-bright);
  font-weight: 600;
}

.hero-editorial-quote {
  margin-top: auto;
}

.hero-editorial-quote h3 {
  font-family: var(--font-serif);
  font-size: clamp(34px, 3.6vw, 48px);
  font-weight: 400;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
}

.hero-editorial-quote h3 em {
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--cyan-core);
}

/* Center Interactive Bust Hint Badge */
.bust-hint-badge {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 16, 28, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 7px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--cyan-bright);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transition: all var(--transition-fast);
}

.bust-hint-badge:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan-bright);
  color: #fff;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
  transform: translateX(-50%) translateY(-2px);
}

/* ==========================================================================
   Section: Interactive Unified Signal Graph
   ========================================================================== */
.section-graph {
  padding: 90px 0 60px;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--cyan-core);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.graph-container {
  position: relative;
  height: 520px;
  background: radial-gradient(circle at center, rgba(12, 22, 38, 0.7) 0%, rgba(4, 7, 14, 0.92) 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
}

#signalGraphCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.graph-telemetry-overlay {
  position: absolute;
  top: 24px;
  left: 28px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(4, 7, 14, 0.85);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.graph-telemetry-overlay b {
  color: var(--cyan-core);
  font-weight: 600;
}

/* ==========================================================================
   Hardware Hub & Local Network Diagnostics Panel
   ========================================================================== */
.hardware-hub-panel {
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.75) 0%, rgba(5, 8, 14, 0.92) 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  margin-top: 36px;
  margin-bottom: 60px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}

.hardware-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--panel-border);
}

.hardware-hub-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  color: #ffffff;
}

.hardware-hub-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.network-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.net-action-panel {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-fast);
}

.net-action-panel:hover {
  border-color: var(--panel-border-hover);
  background: rgba(14, 20, 36, 0.8);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.net-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.net-meta-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.net-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cyber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cyber:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan-core);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.btn-cyber.primary {
  background: var(--cyan-bright);
  border-color: var(--cyan-bright);
  color: #02040a;
}

.btn-cyber.primary:hover {
  background: #ffffff;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.6);
}

.btn-cyber.amber {
  background: rgba(255, 170, 0, 0.15);
  border-color: var(--amber);
  color: var(--amber);
}

.btn-cyber.amber:hover {
  background: var(--amber);
  color: #02040a;
  box-shadow: 0 0 20px var(--amber-glow);
}

.ping-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ping-result-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.ping-result-tag.online { color: var(--emerald); font-weight: 600; }
.ping-result-tag.offline { color: var(--rose); font-weight: 600; }

.badge-status {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 245, 155, 0.1);
  border: 1px solid rgba(0, 245, 155, 0.3);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Section: Telemetry Fleet & Real-Time Stream (Cortesa Cards)
   ========================================================================== */
.section-telemetry {
  padding: 60px 0 80px;
}

.dashboard-2col {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1080px) {
  .dashboard-2col {
    grid-template-columns: 1fr;
  }
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.pill-btn.active {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cyan-core);
  color: var(--cyan-bright);
  box-shadow: 0 0 12px var(--cyan-soft);
}

.sensors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.sensor-card {
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.7) 0%, rgba(5, 8, 14, 0.9) 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  transition: all var(--transition-smooth);
}

.sensor-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(0, 200, 255, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.sensor-card:hover {
  transform: translateY(-4px);
  border-color: var(--panel-border-hover);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 200, 255, 0.2);
}

.sensor-card:hover::before {
  opacity: 1;
}

.sensor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.sensor-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sensor-accent, var(--cyan-core));
  flex-shrink: 0;
}

.sensor-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sensor-loc {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.status-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.status-tag.online { background: rgba(0, 245, 155, 0.15); color: var(--emerald); border: 1px solid rgba(0, 245, 155, 0.3); }
.status-tag.standby { background: rgba(255, 170, 0, 0.15); color: var(--amber); border: 1px solid rgba(255, 170, 0, 0.3); }
.status-tag.offline { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); border: 1px solid rgba(100, 116, 139, 0.3); }
.status-tag.alert { background: rgba(255, 46, 91, 0.2); color: var(--rose); border: 1px solid rgba(255, 46, 91, 0.4); animation: blink 1s infinite alternate; }

@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}

.sensor-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
}

.sensor-main-val {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.sensor-num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.sensor-unit {
  font-size: 13px;
  color: var(--text-muted);
}

.sparkline-box {
  width: 100px;
  height: 38px;
  flex-shrink: 0;
}

.sensor-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.sensor-bar-progress {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--sensor-accent, var(--cyan-core));
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.sensor-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--panel-border);
  font-family: var(--font-mono);
  font-size: 11px;
}

.sensor-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sensor-meta-item .lbl {
  color: var(--text-dim);
  font-size: 9px;
  text-transform: uppercase;
}

.sensor-meta-item .val {
  color: var(--text-silver);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Real-Time Terminal Feed & Diagnostics Deck
   ========================================================================== */
.diagnostics-panel {
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.7) 0%, rgba(5, 8, 14, 0.9) 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}

.terminal-feed {
  background: #02040a;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-silver);
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.4;
  word-break: break-all;
  animation: logEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.event-entry.info .event-msg { color: var(--text-silver); }
.event-entry.warn .event-msg { color: var(--amber); }
.event-entry.danger .event-msg { color: var(--rose); font-weight: 600; }

.event-time {
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
}

@keyframes logEnter {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   Section: Synchronized To-Do Task Terminal
   ========================================================================== */
.section-todos {
  padding: 40px 0 100px;
}

.todos-container {
  background: linear-gradient(180deg, rgba(12, 18, 30, 0.75) 0%, rgba(5, 8, 14, 0.92) 100%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-card);
}

.todos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.todo-stat-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.todo-input-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.cyber-input {
  flex: 1;
  background: rgba(4, 7, 14, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-full);
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #fff;
  outline: none;
  transition: all var(--transition-fast);
}

.cyber-input:focus {
  border-color: var(--cyan-core);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  background: rgba(6, 10, 20, 0.95);
}

.cyber-input::placeholder {
  color: var(--text-dim);
}

.cyber-select {
  background: rgba(4, 7, 14, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: #fff;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.todos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.todo-item {
  background: rgba(8, 12, 22, 0.65);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all var(--transition-fast);
}

.todo-item:hover {
  background: rgba(14, 22, 38, 0.85);
  border-color: var(--panel-border-hover);
}

.todo-item.completed {
  opacity: 0.5;
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.todo-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.todo-check-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #02040a;
  transition: all var(--transition-fast);
}

.todo-check-btn:hover {
  border-color: var(--cyan-core);
}

.todo-check-btn.checked {
  background: var(--emerald);
  border-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.todo-text {
  font-size: 14px;
  color: #fff;
  font-weight: 400;
}

.todo-priority-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  font-weight: 600;
}

.todo-priority-badge.high { background: rgba(255, 46, 91, 0.15); color: var(--rose); border: 1px solid rgba(255, 46, 91, 0.3); }
.todo-priority-badge.medium { background: rgba(255, 170, 0, 0.15); color: var(--amber); border: 1px solid rgba(255, 170, 0, 0.3); }
.todo-priority-badge.low { background: rgba(0, 229, 255, 0.15); color: var(--cyan-bright); border: 1px solid rgba(0, 229, 255, 0.3); }

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(180deg, #0b1322 0%, #04070e 100%);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-xl);
  padding: 38px 40px;
  width: min(520px, 92vw);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(0, 200, 255, 0.2);
  transform: scale(0.95);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-card h3 {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 8px;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-stack {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  background: rgba(10, 16, 28, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--cyan-core);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 400px;
}

.toast-item.warning { border-left-color: var(--amber); }
.toast-item.danger { border-left-color: var(--rose); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1100px) {
  .hero {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    min-height: auto;
  }
  .hero-left, .hero-right {
    max-width: 100%;
    min-height: auto;
    text-align: left;
  }
  .hero-right {
    text-align: left;
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .app-shell {
    padding: 0 20px;
  }
  .nav-pill-menu {
    display: none;
  }
  .hero-heading {
    font-size: 38px;
  }
  .hero-editorial-quote h3 {
    font-size: 28px;
  }
  .todo-input-bar {
    flex-direction: column;
  }
}
