/* ============================================================
   ISM-1 Satellite Digital Twin — Aerospace Mission Control CSS
   Modern Dark Aerospace Architecture with High-Tech HUD Styling
   ============================================================ */

:root {
  --bg-app: #070a12;
  --bg-header: #0b1120;
  --bg-card: rgba(13, 20, 36, 0.78);
  --bg-card-hover: rgba(20, 30, 52, 0.9);
  --bg-card-inner: rgba(9, 14, 26, 0.65);
  --bg-viewport: #03060f;
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-glow: rgba(56, 189, 248, 0.28);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.35);
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-blue-light: rgba(59, 130, 246, 0.15);

  --accent-green: #10b981;
  --accent-green-bg: rgba(16, 185, 129, 0.15);
  --accent-green-text: #34d399;

  --accent-red: #ef4444;
  --accent-red-bg: rgba(239, 68, 68, 0.15);
  --accent-red-text: #f87171;

  --accent-orange: #f59e0b;
  --accent-orange-bg: rgba(245, 158, 11, 0.15);
  --accent-orange-text: #fbbf24;

  --accent-gray-bg: rgba(255, 255, 255, 0.05);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  --header-h: 62px;
}

[data-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-header: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --bg-card-inner: #f8fafc;
  --bg-viewport: #060913;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-glow: rgba(37, 99, 235, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.25);
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-light: #eff6ff;

  --accent-green: #10b981;
  --accent-green-bg: #dcfce7;
  --accent-green-text: #15803d;

  --accent-red: #ef4444;
  --accent-red-bg: #fee2e2;
  --accent-red-text: #b91c1c;

  --accent-orange: #f97316;
  --accent-orange-bg: #ffedd5;
  --accent-orange-text: #c2410c;

  --accent-gray-bg: #f8fafc;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ---------------- App shell ---------------- */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ---------------- Header ---------------- */

.app-header {
  height: var(--header-h);
  flex: 0 0 auto;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  z-index: 10;
}

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

.satellite-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  flex: 0 0 auto;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 12px rgba(56, 189, 248, 0.35);
}

.header-titles {
  line-height: 1.2;
}

.sat-id-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-titles .sat-id {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  cursor: pointer;
  border-radius: 4px;
  padding: 1px 4px;
  margin: -1px -4px;
  transition: background 0.15s ease;
}
.header-titles .sat-id:hover {
  background: var(--accent-gray-bg);
}

.sat-id-edit-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.15s ease;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}
.sat-id-edit-btn:hover {
  opacity: 1;
  background: var(--accent-gray-bg);
}

.sat-id-input {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
  background: var(--bg-card-inner);
  border: 1px solid var(--accent-cyan);
  border-radius: 6px;
  padding: 2px 6px;
  outline: none;
  font-family: inherit;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.header-titles .sat-id-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-left: 4px;
}

.status-pill.active {
  background: var(--accent-green-bg);
  color: var(--accent-green-text);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.header-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  justify-content: center;
}

.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}

.hdr-btn svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.hdr-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-glow);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hdr-btn.warning {
  background: var(--accent-orange-bg);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-orange-text);
}
.hdr-btn.warning svg {
  color: var(--accent-orange-text);
}
.hdr-btn.warning:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--accent-orange);
}

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

.utc-clock {
  text-align: right;
  line-height: 1.2;
}

.utc-clock .utc-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.utc-clock .utc-time {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.settings-btn {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 7px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  font-size: 14px;
}
.settings-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-glow);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.engineer-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.engineer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e293b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.engineer-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.2;
}

.engineer-role {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
  font-weight: 500;
}

/* ---------------- Body layout ---------------- */

.app-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 290px 1fr 340px;
  min-height: 0;
  background: var(--bg-app);
  padding: 12px;
  gap: 12px;
}

.sidebar {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-left, .sidebar-right {
  background: transparent;
}

/* ---------------- Cards ---------------- */

/* ---------------- Cards ---------------- */

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 1px var(--border-glow);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.card-title-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.card-title-icon {
  font-size: 14px;
  color: var(--accent-cyan);
}

.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3.5px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.online, .badge.normal, .badge.active-badge {
  background: var(--accent-green-bg);
  color: var(--accent-green-text);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge.critical {
  background: var(--accent-red-bg);
  color: var(--accent-red-text);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}
.badge.warning {
  background: var(--accent-orange-bg);
  color: var(--accent-orange-text);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Subsystem rows */

.subsystem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin: 0 -4px;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}
.subsystem-row:hover {
  background: var(--accent-gray-bg);
}
.subsystem-row:not(:last-child) {
  margin-bottom: 2px;
}

.subsystem-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-primary);
}

.subsystem-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 13px;
  flex: 0 0 auto;
}

.chip {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-green-bg);
  color: var(--accent-green-text);
  border: 1px solid rgba(16, 185, 129, 0.3);
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.chip.standby {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.subsystem-row.dimmed {
  opacity: 0.72;
}

.subsystem-row.dimmed .subsystem-icon {
  color: var(--text-muted);
}


/* Sensor directory rows */

.sensor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin: 0 -4px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}
.sensor-row:hover {
  background: var(--accent-gray-bg);
  border-color: rgba(56, 189, 248, 0.18);
}
.sensor-row:not(:last-child) {
  margin-bottom: 2px;
}

.sensor-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sensor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
}
.sensor-dot.ok {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.sensor-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}
.sensor-dot.crit {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseCrit 1.8s infinite;
}

@keyframes pulseCrit {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.6; }
}

.sensor-name {
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--text-primary);
}
.sensor-id {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.2;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.sensor-value {
  text-align: right;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}
.sensor-unit {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 3px;
}

/* View mode buttons */

.viewmode-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card-inner);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.viewmode-btn:last-child { margin-bottom: 0; }
.viewmode-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}
.viewmode-btn.selected {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4), 0 0 1px #38bdf8;
}
.vm-label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vm-icon {
  font-size: 14px;
  color: var(--accent-cyan);
}
.viewmode-btn.selected .vm-icon {
  color: #ffffff;
}
.chip-orbit-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}
.viewmode-btn.selected .chip-orbit-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}
.viewmode-btn .pct {
  font-weight: 700;
  opacity: 0.95;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.slider-row { margin-top: 6px; margin-bottom: 10px; }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent-cyan);
  height: 5px;
  border-radius: 3px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  cursor: pointer;
}

/* Sun & solar control */

.toggle-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.15s ease;
}
.toggle-btn.on {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}

.sun-distance-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 158, 11, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.sun-distance-box .sd-label { font-weight: 700; font-size: 12.5px; color: var(--accent-orange-text); }
.sun-distance-box .sd-sub { font-size: 10px; color: var(--accent-orange-text); opacity: 0.9; font-weight: 600; }
.sun-distance-box .sd-tag {
  background: #ea580c;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

.deploy-group { margin-top: 12px; }
.deploy-label { font-size: 10px; color: var(--text-muted); font-weight: 700; letter-spacing: 0.05em; margin-bottom: 8px; }
.deploy-buttons { display: flex; gap: 6px; }
.deploy-buttons button {
  flex: 1 1 0;
  padding: 7.5px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.15s ease;
}
.deploy-buttons button:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.deploy-buttons button.active {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.25);
}

.speed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------------- Center viewport ---------------- */

.viewport-wrap {
  position: relative;
  background: var(--bg-viewport);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border), 0 10px 40px rgba(0, 0, 0, 0.6);
}

#viewport-canvas-host {
  position: absolute;
  inset: 0;
}

.viewport-overlay-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 5;
  pointer-events: none;
}
.viewport-overlay-top > * { pointer-events: auto; }

.sun-mode-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ea580c;
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sun-mode-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
}
.sun-mode-pill.off {
  background: #334155;
  box-shadow: 0 2px 10px rgba(51, 65, 85, 0.3);
}

.view-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(10, 16, 28, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 5px 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.view-toolbar button {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
  transition: all 0.15s ease;
}
.view-toolbar button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent-cyan);
}
.view-toolbar .divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

/* Orbit Simulation HUD overlay */
.orbit-hud {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}
.orbit-hud-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 16, 28, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), 0 0 16px rgba(56, 189, 248, 0.15);
}
.orbit-hud-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #e2e8f0;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.orbit-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseGlow 1.8s infinite;
}
.orbit-hud-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.15s ease;
}
.orbit-hud-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}
.orbit-hud-btn.active {
  background: #e11d48;
  border-color: #f43f5e;
  color: #fff;
}
.orbit-hud-btn.accent {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border: none;
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}
.orbit-hud-btn.accent:hover {
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}
.orbit-hud-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}
.orbit-speed-group {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px;
  border-radius: 6px;
}
.orbit-speed-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.orbit-speed-btn.active {
  background: #2563eb;
  color: #fff;
}
.orbit-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}
.legend-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.legend-chip.clickable {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}
.legend-chip.clickable:hover {
  background: rgba(255, 255, 255, 0.12);
}
.legend-chip.active {
  color: #f8fafc;
  font-weight: 700;
}
.legend-chip.dimmed {
  opacity: 0.38;
}
.orbit-hud-btn.celestial-btn {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde68a;
}
.orbit-hud-btn.celestial-btn:hover {
  background: rgba(251, 191, 36, 0.25);
}
.orbit-hud-btn.celestial-btn.moon-active {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
}
.orbit-hud-btn.celestial-btn.moon-active:hover {
  background: rgba(148, 163, 184, 0.3);
}
.l-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.l-dot.sun { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.l-dot.earth { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.l-dot.sat { background: #34d399; box-shadow: 0 0 6px #34d399; }
.l-dot.moon { background: #cbd5e1; box-shadow: 0 0 6px #cbd5e1; }

.viewport-caption {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.02em;
  z-index: 5;
  font-weight: 500;
  pointer-events: none;
}

.viewport-placeholder-msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  text-align: center;
  padding: 0 40px;
}

/* ---------------- Right sidebar specifics ---------------- */

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  font-size: 12.5px;
  transition: all 0.15s ease;
  border-radius: 8px;
}
.info-row:hover {
  background: var(--accent-gray-bg);
}
.info-row:not(:last-child) { border-bottom: 1px solid var(--border-subtle); }
.info-row .info-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex: 0 0 auto;
}
.info-row .info-label { flex: 1 1 auto; color: var(--text-secondary); font-weight: 600; font-size: 12px; }
.info-row .info-value { font-weight: 700; text-align: right; color: var(--text-primary); font-size: 12px; }
.info-row .info-value.accent {
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.metric-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 10px;
  text-align: left;
  transition: all 0.2s ease;
}
.metric-box:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.metric-box .metric-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.metric-box .metric-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  font-family: 'JetBrains Mono', monospace;
}
.metric-box .metric-value .unit {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

.subcard {
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
  transition: all 0.2s ease;
}
.subcard:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.subcard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.subcard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.subcard-metric .sm-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.subcard-metric .sm-value {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-family: 'JetBrains Mono', monospace;
}
.subcard-metric .sm-value.accent {
  color: var(--accent-cyan);
}

.attitude-row { margin-bottom: 12px; }
.attitude-row:last-child { margin-bottom: 0; }
.attitude-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}
.attitude-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 1px;
}
.attitude-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Scrollbar polish */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(56, 189, 248, 0.4); }
.sidebar::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1150px) {
  .app-body { grid-template-columns: 270px 1fr 310px; }
}

/* ---------------- Toasts ---------------- */

.toast-container {
  position: fixed;
  top: 72px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateX(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  max-width: 380px;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.info { border-left: 4px solid var(--accent-cyan); }
.toast.success { border-left: 4px solid var(--accent-green); }
.toast.warn { border-left: 4px solid var(--accent-orange); }
.toast.error { border-left: 4px solid var(--accent-red); }

/* ---------------- Modals ---------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-header);
  border-radius: 20px;
  border: 1px solid var(--border-glow);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.modal-overlay.open .modal-card {
  transform: scale(1);
}
.modal-card.large {
  max-width: 760px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  border-radius: 6px;
  padding: 2px 6px;
  transition: all 0.15s ease;
}
.modal-close:hover {
  background: var(--accent-gray-bg);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* Snapshots List */
.snapshots-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 0;
  font-weight: 500;
}
.snapshot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--bg-card-inner);
  transition: all 0.15s ease;
}
.snapshot-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}
.snapshot-info-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
}
.snapshot-info-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}
.snapshot-actions { display: flex; gap: 8px; }
.snapshot-btn-load {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.snapshot-btn-del {
  background: var(--accent-red-bg);
  color: var(--accent-red-text);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

/* Settings & Sparkline Charts */
.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 8px;
}
.tab-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  background: var(--accent-blue-light);
  color: var(--accent-cyan);
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.chart-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.chart-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sparkline-svg {
  width: 100%;
  height: 80px;
  overflow: visible;
}

.system-logs-box {
  background: var(--bg-viewport);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 14px;
  border-radius: 12px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
}
.log-entry {
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.log-entry.info { color: var(--accent-cyan); }
.log-entry.warn { color: var(--accent-orange); }
.log-entry.error { color: var(--accent-red); }

/* ==========================================================================
   SELECTED SENSOR DETAILS PANEL & 3D CANVAS BADGE
   Matches expert-orbit-twin-sync reference photos
   ========================================================================== */

/* Floating 3D Sensor Canvas Badge */
.sensor-canvas-badge {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 25;
  transition: opacity 0.15s ease;
}

.scb-inner {
  background: rgba(10, 16, 28, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.7);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 14px rgba(56, 189, 248, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 6px;
  text-align: center;
  min-width: 90px;
}

.scb-name {
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.scb-id {
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
  margin-top: 1px;
}

/* Sensor row selection highlight in Left Sidebar */
.sensor-row {
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.sensor-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}
.sensor-row.selected {
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25) !important;
}

/* Selected Sensor Details Panel in Right Sidebar */
.selected-sensor-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeInSensorPanel 0.22s ease-out;
}

@keyframes fadeInSensorPanel {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sensor-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sensor-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sensor-category-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sensor-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.3px;
}

.sensor-id-pill {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.sensor-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sensor-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s ease;
}
.sensor-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* 3 Stat Cards Row */
.sensor-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sensor-stat-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-label {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 3px 0;
  font-family: 'JetBrains Mono', monospace;
}

.stat-value .stat-unit {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.health-val {
  color: #10b981;
}

.time-val {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.health-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
}

.health-fill {
  height: 100%;
  background: #10b981;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Card Sections */
.sensor-card-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sensor-section-header {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Live Telemetry Rows */
.sensor-telemetry-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sensor-telem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 11.5px;
}

.st-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.st-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.st-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 62px;
  text-align: right;
}

.st-unit {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
}

.st-dot-range {
  font-size: 9.5px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 58px;
  justify-content: flex-end;
}

.st-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.st-dot.green {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.st-dot.orange {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}

.st-dot.red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

/* Thresholds & Ranges Table */
.thresholds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.thresholds-table thead th {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-align: left;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
}

.thresholds-table tbody td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.tf-field {
  font-weight: 500;
  color: var(--text-secondary);
}

.tf-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-primary);
}

.tf-warn {
  font-family: 'JetBrains Mono', monospace;
  color: #f59e0b;
}

.tf-crit {
  font-family: 'JetBrains Mono', monospace;
  color: #ef4444;
}

/* Real-Time Telemetry Graph */
.sensor-graph-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.sg-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.sg-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.sg-tab-btn.active {
  background: var(--accent-cyan);
  color: #020617;
  font-weight: 700;
  border-color: var(--accent-cyan);
}

.sensor-graph-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px;
  overflow: hidden;
  margin-top: 4px;
}

#sensor-sparkline-canvas {
  width: 100%;
  height: 85px;
  display: block;
}



/* ---------------- Transmission Data Card ---------------- */
#card-transmission {
  margin-top: 2px;
}

.transmission-box {
  background: var(--bg-card-inner);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 10px;
  transition: all 0.2s ease;
}

.transmission-box:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.transmission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  font-family: 'JetBrains Mono', monospace;
}

.transmission-time {
  color: var(--text-secondary);
  font-size: 10px;
}

.transmission-body {
  display: flex;
  flex-direction: column;
  background: rgba(10, 16, 28, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 44px;
  max-height: 220px;
  overflow-y: auto;
}

.transmission-fields-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.transmission-field-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.35;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.08);
}

.transmission-field-row:last-child {
  border-bottom: none;
}

.tf-prompt {
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.tf-key {
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  background: rgba(56, 189, 248, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  flex-shrink: 0;
}

.tf-val, .transmission-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  word-break: break-word;
  line-height: 1.35;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.transmission-prompt {
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 14px;
  line-height: 1.2;
}

.transmission-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

@keyframes dataGlowFlash {
  0% { color: #ffffff; text-shadow: 0 0 16px rgba(56, 189, 248, 1); transform: scale(1.02); }
  50% { color: #7dd3fc; text-shadow: 0 0 12px rgba(56, 189, 248, 0.7); }
  100% { color: #38bdf8; text-shadow: 0 0 8px rgba(56, 189, 248, 0.4); transform: scale(1); }
}

.tf-val.data-flash, .transmission-text.data-flash {
  display: inline-block;
  animation: dataGlowFlash 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}