/**
 * DANIO — Professional Scientific Visualization Workstation CSS
 * Complete Visual Design System Correction
 *
 * Core Principles:
 * 1. Living Computational Brain is the HERO (75–80% viewport presence, edge-to-edge).
 * 2. Floating Translucent HUD Panels: Minimal, frosted glassmorphism (backdrop-filter: blur(20px)).
 * 3. Distinct Page Architecture: Each page has its own tailored composition.
 * 4. Typography Hierarchy: Plus Jakarta Sans (Interface), Instrument Serif (Editorial/Atlas), JetBrains Mono (Data/Code).
 * 5. Deep Abyssal Navy-Black Canvas (#020408) with authentic multi-spectral fluorophore radiance.
 */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Canvas & Glassmorphic Surfaces — Refined Dark Grey Theme */
  --bg-canvas: #12151c;
  --bg-surface: rgba(24, 29, 39, 0.78);
  --bg-panel: rgba(28, 34, 46, 0.86);
  --bg-card: rgba(33, 40, 54, 0.72);
  --bg-elevated: rgba(40, 49, 66, 0.90);
  --bg-hover: rgba(50, 62, 84, 0.60);
  
  /* Precision Instrument Borders */
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-panel: rgba(148, 163, 184, 0.22);
  --border-glow: rgba(56, 189, 248, 0.45);
  --border-focus: #22d3ee;
  
  /* Text Contrast Hierarchy */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-highlight: #ffffff;
  
  /* Division Scientific Fluorophore Palette */
  --div-tel: #a855f7;     /* Telencephalon (Forebrain: ice-lavender / royal violet) */
  --div-dien: #ec4899;    /* Diencephalon (Habenula / Epithalamus) */
  --div-mes: #06b6d4;     /* Mesencephalon (Optic Tectum: electric cyan) */
  --div-cb: #10b981;      /* Cerebellum (Purkinje: seafoam emerald) */
  --div-rhomb: #f59e0b;   /* Rhombencephalon (Hindbrain / Mauthner: warm amber) */
  --div-motor: #38bdf8;   /* Motor & Spinal Stalk (Cool blue) */
  --div-tract: #94a3b8;   /* Axonal Tracts & Commissures */
  --div-app: #f43f5e;     /* Anatomical Appendages */
  
  /* Action & Vitality Indicators */
  --color-active: #22d3ee;
  --color-vitality: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-success: #10b981;
  
  /* Typography Stack */
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  
  --header-height: 52px;
  --footer-height: 28px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Master Workstation Frame */
.workstation-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: var(--bg-canvas);
  position: relative;
  overflow: hidden;
}

/* ---------------------------------------------------------------------------
 * 1. FLOATING REFINED NAVIGATION BAR
 * Translucent glassmorphism with subtle active indicator line.
 * --------------------------------------------------------------------------- */
.workstation-header {
  height: var(--header-height);
  background: rgba(18, 21, 28, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  user-select: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

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

.workstation-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-highlight);
  transition: opacity 0.15s ease;
}

.workstation-logo:hover {
  opacity: 0.9;
}

.workstation-logo-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: contain;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}

.workstation-logo-text {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--text-highlight);
}

.workstation-version-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--border-focus);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  position: relative;
}

.nav-link:hover {
  color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text-highlight);
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--border-focus);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--border-focus);
}

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

/* High-Prestige FinalSpark Neuroplatform Connectivity Badge */
.cloud-access-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}

.cloud-access-pill:hover {
  background: rgba(16, 185, 129, 0.20);
  border-color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.30);
}

.cloud-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.telemetry-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(28, 34, 46, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
}

.telemetry-chip strong {
  color: var(--color-active);
  font-weight: 600;
}

.btn-header {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  background: rgba(33, 40, 54, 0.85);
  color: var(--text-muted);
  border: 1px solid var(--border-panel);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-header:hover {
  color: var(--text-highlight);
  border-color: var(--border-focus);
  background: var(--bg-elevated);
}

/* ---------------------------------------------------------------------------
 * 2. MASTER VIEWPORT — 3D BRAIN AS FULL-BLEED HERO (75–80% VIEWPORT)
 * The 3D canvas fills 100% of the screen. Sidebars float over as translucent HUDs.
 * --------------------------------------------------------------------------- */
.workstation-body {
  position: relative;
  flex: 1;
  width: 100vw;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow: hidden;
  background: var(--bg-canvas);
}

.workstation-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #12151c;
  overflow: hidden;
  z-index: 1;
}

.viewport-canvas-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Floating Top HUD Controls */
.viewport-hud-top {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(24, 29, 39, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 30px;
  padding: 4px 10px;
  z-index: 20;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  user-select: none;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.hud-divider {
  width: 1px;
  height: 16px;
  background: rgba(56, 189, 248, 0.20);
  margin: 0 4px;
}

.hud-btn {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hud-btn:hover {
  color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.06);
}

.hud-btn.active {
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.40);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

/* Floating Sensory Stimulus Dock (Bottom-Center) */
.viewport-stimulus-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(24, 29, 39, 0.86);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 36px;
  padding: 7px 16px;
  z-index: 20;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  user-select: none;
}

.stimulus-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-right: 4px;
}

.stim-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  background: rgba(33, 40, 54, 0.75);
  border: 1px solid var(--border-panel);
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stim-btn.stim-prey { color: #22d3ee; border-color: rgba(34, 211, 238, 0.35); }
.stim-btn.stim-prey:hover { background: rgba(34, 211, 238, 0.25); box-shadow: 0 0 14px rgba(34, 211, 238, 0.35); transform: translateY(-1px); }

.stim-btn.stim-predator { color: #ef4444; border-color: rgba(239, 68, 68, 0.35); }
.stim-btn.stim-predator:hover { background: rgba(239, 68, 68, 0.25); box-shadow: 0 0 14px rgba(239, 68, 68, 0.35); transform: translateY(-1px); }

.stim-btn.stim-drumming { color: #f59e0b; border-color: rgba(245, 158, 11, 0.35); }
.stim-btn.stim-drumming:hover { background: rgba(245, 158, 11, 0.25); box-shadow: 0 0 14px rgba(245, 158, 11, 0.35); transform: translateY(-1px); }

.stim-btn.stim-flow { color: #10b981; border-color: rgba(16, 185, 129, 0.35); }
.stim-btn.stim-flow:hover { background: rgba(16, 185, 129, 0.25); box-shadow: 0 0 14px rgba(16, 185, 129, 0.35); transform: translateY(-1px); }

/* Floating Editorial Title Chip (Top-Left) */
.viewport-info-chip {
  position: absolute;
  top: 16px;
  left: 18px;
  background: rgba(24, 29, 39, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 10px 16px;
  z-index: 15;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.viewport-info-chip .title {
  color: var(--text-highlight);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

#viewport-chip-coords {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
 * 3. FLOATING TRANSLUCENT HUD DRAWERS (LEFT & RIGHT)
 * Tucked away smoothly so the living brain breathes and shines.
 * --------------------------------------------------------------------------- */
.workstation-sidebar {
  position: absolute;
  top: 16px;
  bottom: 16px;
  background: rgba(24, 29, 39, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 25;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.sidebar-left {
  left: 16px;
  width: 320px;
}

.sidebar-right {
  right: 16px;
  width: 350px;
}

.sidebar-left.collapsed {
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
}

.sidebar-right.collapsed {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

/* Persistent Edge Drawer Tabs (When Sidebars Are Collapsed) */
.edge-drawer-tab {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(24, 29, 39, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 12px 7px;
  cursor: pointer;
  z-index: 22;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.edge-tab-left {
  left: 0;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  border-left: none;
}

.edge-tab-right {
  right: 0;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  border-right: none;
}

.edge-drawer-tab:hover {
  background: rgba(36, 46, 64, 0.95);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.workstation-body:has(.sidebar-left.collapsed) .edge-tab-left {
  display: flex;
}
.workstation-body:has(.sidebar-right.collapsed) .edge-tab-right {
  display: flex;
}

.sidebar-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(28, 34, 46, 0.65);
}

.sidebar-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-highlight);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  background: rgba(33, 40, 54, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 2px 6px;
  border-radius: 4px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  color: var(--text-highlight);
  background: rgba(255, 255, 255, 0.08);
}

/* Sidebar Search Box */
.sidebar-search-box {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(24, 29, 39, 0.5);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  background: rgba(20, 24, 32, 0.9);
  border: 1px solid var(--border-panel);
  border-radius: 6px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 7px 28px 7px 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.2);
}

.search-clear-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 2px;
}

.search-clear-btn:hover {
  color: var(--text-main);
}

/* Sidebar Neurotransmitter Filters */
.sidebar-filter-row {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sidebar-filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(28, 34, 46, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  color: var(--text-main);
  border-color: var(--border-panel);
}

.filter-chip.active {
  color: var(--border-focus);
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  font-weight: 600;
}

/* Scroll Container */
.sidebar-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.2) transparent;
}

.sidebar-scrollable::-webkit-scrollbar {
  width: 5px;
}

.sidebar-scrollable::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.2);
  border-radius: 3px;
}

/* Anatomy Tree Accordion */
.tree-division-group {
  margin-bottom: 4px;
}

.division-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.1s ease;
}

.division-header:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-highlight);
}

.division-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.division-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

.division-count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  font-weight: normal;
}

.division-chevron {
  font-size: 8px;
  color: var(--text-dim);
  transition: transform 0.15s ease;
}

.division-header.expanded .division-chevron {
  transform: rotate(90deg);
}

.division-children {
  display: none;
  flex-direction: column;
  background: rgba(18, 21, 28, 0.4);
}

.division-header.expanded + .division-children {
  display: flex;
}

.region-tree-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 6px 30px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all 0.1s ease;
}

.region-tree-item:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--text-highlight);
}

.region-tree-item.selected {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border-left-color: #38bdf8;
  font-weight: 600;
}

.region-item-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.region-item-abbrev {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  margin-left: 6px;
}

.region-item-count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
 * 4. SCIENTIFIC NEURO-INSPECTOR (RIGHT HUD)
 * --------------------------------------------------------------------------- */
.inspector-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspector-section {
  background: rgba(26, 32, 44, 0.70);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
}

.inspector-section-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.stat-box {
  background: rgba(33, 40, 54, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
}

.stat-box-label {
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.stat-box-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-highlight);
  font-variant-numeric: tabular-nums;
}

.stat-box-sub {
  font-size: 9px;
  color: var(--text-dim);
}

.region-hero-card {
  background: rgba(33, 40, 54, 0.80);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.region-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--hero-color, #38bdf8);
}

.region-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.region-hero-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-highlight);
}

.region-hero-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.region-hero-div {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.region-function-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(18, 21, 28, 0.5);
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 2px solid var(--border-panel);
}

.biophysics-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 10px;
}

.biophysics-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.biophysics-table tr:last-child {
  border-bottom: none;
}

.biophysics-table td {
  padding: 5px 4px;
}

.biophysics-table td.label {
  color: var(--text-dim);
}

.biophysics-table td.val {
  text-align: right;
  color: var(--text-main);
  font-weight: 600;
}

.partner-chips-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
}

.partner-chip-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: rgba(33, 40, 54, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.1s ease;
}

.partner-chip-item:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--border-focus);
}

.partner-chip-item .name {
  color: var(--text-muted);
}

.partner-chip-item .weight {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #38bdf8;
}

.inspector-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.btn-inspector-action {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  background: rgba(33, 40, 54, 0.8);
  color: var(--text-main);
  border: 1px solid var(--border-panel);
  text-align: center;
  transition: all 0.15s ease;
}

.btn-inspector-action:hover {
  background: var(--bg-elevated);
  border-color: var(--border-focus);
  color: var(--text-highlight);
}

.btn-inspector-action.primary {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
}

.btn-inspector-action.primary:hover {
  background: rgba(56, 189, 248, 0.28);
}

/* ---------------------------------------------------------------------------
 * 5. BOTTOM STATUS LINE
 * --------------------------------------------------------------------------- */
.workstation-footer {
  height: var(--footer-height);
  background: rgba(18, 21, 28, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  user-select: none;
  z-index: 100;
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-item strong {
  color: var(--text-muted);
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* ---------------------------------------------------------------------------
 * 6. PAGE-SPECIFIC CUSTOM ARCHITECTURES
 * --------------------------------------------------------------------------- */

/* Page 4: Anatomical Atlas Editorial Style */
.page-atlas-layout {
  display: grid;
  grid-template-columns: 58% 42%;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.atlas-editorial-panel {
  overflow-y: auto;
  padding: 32px 36px;
  background: rgba(20, 24, 32, 0.95);
  border-left: 1px solid var(--border-panel);
}

.editorial-header {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 8px;
}

.editorial-sub {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Page 5: Experiment Laboratory Console */
.experiment-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.15s ease;
  font-size: 11px;
}

.experiment-nav-item:hover {
  background: rgba(56, 189, 248, 0.08);
}

.experiment-nav-item.active {
  background: rgba(56, 189, 248, 0.15);
  border-left: 3px solid #38bdf8;
  color: #38bdf8;
  font-weight: 600;
}

/* Page 6: Research Publication Paper */
.paper-title {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 10px;
}

.paper-abstract {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.7;
  background: rgba(28, 34, 46, 0.6);
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 3px solid var(--border-focus);
  margin-bottom: 24px;
}

/* ---------------------------------------------------------------------------
 * 7. RESPONSIVE DESIGN
 * --------------------------------------------------------------------------- */
.mobile-only {
  display: none !important;
}

@media (max-width: 900px) {
  .mobile-only {
    display: inline-flex !important;
  }
  .header-nav {
    display: none;
  }

  .sidebar-left {
    left: 0;
    width: 85vw;
    max-width: 320px;
    transform: translateX(-100%);
  }
  .sidebar-left.open {
    transform: translateX(0);
  }

  .sidebar-right {
    right: 0;
    width: 85vw;
    max-width: 340px;
    transform: translateX(100%);
  }
  .sidebar-right.open {
    transform: translateX(0);
  }

  .viewport-hud-top {
    width: calc(100% - 24px);
    overflow-x: auto;
    justify-content: flex-start;
  }
  .viewport-stimulus-bar {
    width: calc(100% - 24px);
    overflow-x: auto;
    justify-content: flex-start;
  }
  .workstation-footer {
    display: none;
  }
  .workstation-body {
    height: calc(100vh - var(--header-height));
  }
}

/* ---------------------------------------------------------------------------
 * FinalSpark Live Cloud Telemetry Styles
 * --------------------------------------------------------------------------- */
.finalspark-status-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid;
  transition: all 0.3s ease;
  display: inline-block;
}

.finalspark-waveform-canvas {
  width: 100%;
  height: 64px;
  background: #12151c;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 4px;
  display: block;
}

