/* ==========================================================================
   Early Liver Cancer Detection - Clinical Bioinformatic Design System
   ========================================================================== */

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

:root {
  /* Core Color Palette */
  --bg-primary: #0a0f1d;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.65);
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Accent Colors */
  --accent-cyan: #06b6d4;
  --accent-sky: #0284c7;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #10b981 100%);
  --grad-danger: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --grad-safe: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-card: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(56, 189, 248, 0.25);
  --shadow-glow-rose: 0 0 25px rgba(244, 63, 94, 0.35);
  --shadow-glow-emerald: 0 0 25px rgba(16, 185, 129, 0.3);

  /* Dimensions */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --max-width: 1440px;
}

/* Global Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(14, 165, 233, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
}

/* App Container */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Header & Top Navigation */
.header {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 1rem;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-logo-wrap:hover {
  transform: scale(1.05);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.65);
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-icon svg {
  width: 24px;
  height: 24px;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Health Badge & Stats */
.header-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  color: #34d399;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.header-stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-pill .val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.stat-pill .lbl {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.375rem;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

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

.tab-btn.active {
  color: #fff;
  background: var(--bg-tertiary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glow);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Common Card Styles */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title-group h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-title-group p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Tab 1: ML Predictor Layout */
.ml-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.75rem;
}

@media (max-width: 1024px) {
  .ml-grid {
    grid-template-columns: 1fr;
  }
}

.presets-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.presets-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.preset-btn.preset-malignant {
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.3);
}

.preset-btn.preset-malignant:hover {
  background: rgba(244, 63, 94, 0.2);
}

.preset-btn.preset-benign {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.preset-btn.preset-benign:hover {
  background: rgba(16, 185, 129, 0.2);
}

/* Gene Slider Inputs Grid */
.gene-inputs-scroll {
  max-height: 440px;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .gene-inputs-scroll {
    grid-template-columns: 1fr;
  }
}

.gene-inputs-scroll::-webkit-scrollbar {
  width: 6px;
}
.gene-inputs-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.gene-input-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease;
}

.gene-input-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

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

.gene-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.gene-tag .expected-dir {
  font-size: 0.625rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-weight: 700;
}

.expected-dir.up {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.expected-dir.down {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.gene-val-display {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.gene-val-input {
  width: 72px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 4px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: right;
  padding: 0.2rem 0.4rem;
  outline: none;
  transition: all 0.2s ease;
}

.gene-val-input:hover {
  border-color: rgba(6, 182, 212, 0.6);
  background: rgba(15, 23, 42, 0.9);
}

.gene-val-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
  background: rgba(15, 23, 42, 1);
}

/* Custom Range Slider */
.slider-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.gene-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Action Buttons */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.btn-primary {
  flex: 1;
  background: var(--grad-primary);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-glow);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Prediction Results Output Column */
.ml-result-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gauge-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  position: relative;
}

.gauge-svg-container {
  width: 220px;
  height: 120px;
  position: relative;
}

.gauge-svg {
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-val {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  stroke-dashoffset: 251.2;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.gauge-number {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-number .percent {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.gauge-number .label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.prediction-badge-container {
  margin-top: 1rem;
  text-align: center;
}

.pred-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

.pred-pill.malignant {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fda4af;
  box-shadow: var(--shadow-glow-rose);
}

.pred-pill.benign {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
  box-shadow: var(--shadow-glow-emerald);
}

.tier-box {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  max-width: 380px;
}

/* ==========================================================================
   ML-to-Biological Progression Correlation Component
   ========================================================================== */
.ml-progression-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ml-progression-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ml-progression-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ml-progression-coord {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-full);
  color: #fff;
}

/* Mini 5-Stage Stepper Ribbon */
.ml-mini-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.ml-mini-step {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
  position: relative;
}

.ml-mini-step .step-num-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.ml-mini-step .step-name-text {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ml-mini-step .step-concordance {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Active Highlight for Stages */
.ml-mini-step.active {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.ml-mini-step.active .step-num-badge {
  background: var(--accent-cyan);
  color: #0f172a;
}

.ml-mini-step.active .step-name-text {
  color: #fff;
  font-weight: 700;
}

.ml-mini-step.active .step-concordance {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Critical Pre-Malignant Stage 4 active */
.ml-mini-step.active.stage-4 {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.ml-mini-step.active.stage-4 .step-num-badge {
  background: #f59e0b;
  color: #0f172a;
}

.ml-mini-step.active.stage-4 .step-concordance {
  color: #fcd34d;
}

/* Malignant Stage 5 active */
.ml-mini-step.active.stage-5 {
  border-color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
  box-shadow: 0 0 15px rgba(244, 63, 94, 0.35);
}

.ml-mini-step.active.stage-5 .step-num-badge {
  background: #f43f5e;
  color: #fff;
}

.ml-mini-step.active.stage-5 .step-concordance {
  color: #fda4af;
}

/* Clinical Correlation Callout Box */
.ml-correlation-box {
  background: rgba(30, 41, 59, 0.5);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ml-correlation-box.warning-window {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.ml-correlation-box.danger-window {
  border-left-color: #f43f5e;
  background: rgba(244, 63, 94, 0.08);
}

.ml-correlation-lead {
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ml-correlation-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Hallmarks Cluster */
.ml-hallmarks-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ml-hallmark-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.ml-hallmark-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #e0f2fe;
}

.ml-jump-btn {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0;
  margin-top: 0.25rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ml-jump-btn:hover {
  color: #fff;
  text-decoration: underline;
  transform: translateX(2px);
}

/* Feature Attribution Bar Chart */
.attribution-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.attribution-header {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.attribution-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.attr-item {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  transition: background 0.2s ease;
}

.attr-item:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.2);
}

.attr-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 140px;
  max-width: 180px;
}

.attr-left-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.attr-left .sym {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.8125rem;
}

.attr-raw-val {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.attr-role {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.attr-bar-wrapper {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.attr-bar {
  height: 100%;
  border-radius: 4px;
}

.attr-bar.risk-up {
  background: var(--accent-rose);
}

.attr-bar.risk-down {
  background: var(--accent-emerald);
}

.attr-val {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  min-width: 48px;
  text-align: right;
}

.attr-val.risk-up { color: #fda4af; }
.attr-val.risk-down { color: #6ee7b7; }

/* Tab 2: Datasets Grid */
.datasets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.dataset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.dataset-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-lg);
}

.dataset-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dataset-accession {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--accent-cyan);
}

.platform-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  white-space: nowrap;
}

.dataset-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.dataset-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.dataset-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
}

.stage-tag {
  font-weight: 700;
  color: #fbbf24;
}

/* Tab 3: Gene Search & Profile */
.search-bar-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 1.25rem 0.875rem 2.75rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.gene-profile-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gene-summary-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.gene-details h3 {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.gene-details p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.occurrences-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}

.data-table th {
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.6875rem;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.reg-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.6875rem;
}

.reg-badge.up {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
}

.reg-badge.down {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

/* Tab 4: Metabolic Pathways */
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.pathway-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.pathway-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.pathway-card h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pathway-genes-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.p-gene {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* Tab 5: ML Retraining Console */
.ml-console-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .ml-console-grid {
    grid-template-columns: 1fr;
  }
}

.weights-table-wrapper {
  max-height: 480px;
  overflow-y: auto;
}

/* ==========================================================================
   Biological Progression Cascade & Disease Trajectory Styles
   ========================================================================== */

.progression-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}

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

.step-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.step-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.step-card.active {
  background: rgba(30, 41, 59, 0.85);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
  transform: translateY(-3px);
}

.step-card.stage-warning.active {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.step-card.stage-danger.active {
  border-color: #f43f5e;
  box-shadow: 0 0 25px rgba(244, 63, 94, 0.35);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card.active .step-num {
  background: var(--accent-cyan);
  color: #0f172a;
  box-shadow: 0 0 10px var(--accent-cyan);
}

.step-card.stage-danger.active .step-num {
  background: var(--accent-rose);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-rose);
}

.step-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.step-concordance-pill {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-secondary);
}

.step-card.active .step-concordance-pill {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* Biological Continuum Meter */
.continuum-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.continuum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.continuum-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.continuum-pos-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.continuum-track-wrapper {
  position: relative;
  padding: 1.25rem 0 0.5rem;
}

.continuum-track {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(to right, 
    #10b981 0%, 
    #06b6d4 25%, 
    #f59e0b 50%, 
    #f97316 75%, 
    #f43f5e 100%
  );
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.continuum-marker {
  position: absolute;
  top: -8px;
  left: 20%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid #0284c7;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.8);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

.continuum-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

/* Transition Window Alert Box */
.transition-alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  animation: pulse-alert 2.5s infinite ease-in-out;
}

.transition-alert-box.danger {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.transition-alert-box.safe {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

@keyframes pulse-alert {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.1); }
  50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
}

/* Multi-Gene Trajectory SVG Chart */
.trajectory-chart-wrapper {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trajectory-svg {
  width: 100%;
  height: 280px;
  overflow: visible;
}

.grid-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-dasharray: 4;
}

.stage-divider {
  stroke: rgba(255, 255, 255, 0.12);
}

.trajectory-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease;
}

.trajectory-path.repressed {
  stroke: #10b981;
}

.trajectory-path.induced {
  stroke: #f59e0b;
}

.trajectory-path.oncofetal {
  stroke: #f43f5e;
}

.trajectory-node {
  fill: #fff;
  transition: transform 0.2s ease;
  cursor: pointer;
}

.trajectory-node:hover {
  transform: scale(1.5);
}

.trajectory-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Hallmarks Grid */
.hallmarks-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hallmark-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hallmark-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  width: fit-content;
}

.hallmark-badge.critical {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.hallmark-badge.high {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.hallmark-badge.moderate {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.hallmark-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hallmark-mech {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   Cloned Molecular Trajectory Graph in ML Predictor
   ========================================================================== */
.ml-trajectory-clone-card {
  margin-top: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease;
}

.clone-graph-filters {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.25rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.filter-pill.active {
  background: var(--accent-cyan);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.clone-live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-beacon 1.5s infinite;
}

.live-pulse-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.live-pulse-dot.danger {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

@keyframes pulse-beacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* Patient Needle and Markers in SVG */
.patient-needle-line {
  stroke: #38bdf8;
  stroke-width: 2.5;
  stroke-dasharray: 6 3;
  animation: laser-pulse 2s infinite ease-in-out;
}

.patient-needle-line.warning {
  stroke: #f59e0b;
}

.patient-needle-line.danger {
  stroke: #f43f5e;
}

@keyframes laser-pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.patient-obs-marker {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.patient-obs-marker:hover {
  transform: scale(1.6);
}

/* Reader Guide Banner */
.trajectory-guide-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

@media (max-width: 900px) {
  .trajectory-guide-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 550px) {
  .trajectory-guide-bar {
    grid-template-columns: 1fr;
  }
}

.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.guide-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.guide-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.guide-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.guide-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* 3-Step Live Correlation Guide Banner */
.correlation-sync-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}

.sync-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 170px;
}

.sync-step-badge {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.sync-step-badge.alert {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
}

.sync-step-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sync-step-title {
  font-size: 0.78125rem;
  font-weight: 700;
  color: #fff;
}

.sync-step-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.sync-arrow {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 700;
  font-size: 0.875rem;
  user-select: none;
}

.sync-step.highlight-window {
  background: rgba(245, 158, 11, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
}

/* Preset Badges */
.preset-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  margin-left: 0.35rem;
}

.preset-badge.red {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.preset-badge.yellow {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.preset-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.preset-badge.gray {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.preset-badge.green {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Biomarker Clinical Inspector Panel */
.biomarker-inspector-card {
  margin-top: 1rem;
  padding: 1.125rem 1.35rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.6));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.inspector-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inspector-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.inspector-gene-badge {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.inspector-cat-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.inspector-cat-badge.risk {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.35);
}

.inspector-cat-badge.pre-neoplastic {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}

.inspector-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inspector-meta-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.inspector-meta-role {
  font-size: 0.8125rem;
  color: #cbd5e1;
  line-height: 1.35;
}

/* 4 Metrics Clean Grid */
.inspector-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
}

@media (max-width: 820px) {
  .inspector-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 500px) {
  .inspector-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.inspector-metric-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inspector-metric-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.inspector-metric-val {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 800;
  color: #fff;
}

.inspector-metric-val.risk-up { color: #fda4af; }
.inspector-metric-val.risk-down { color: #6ee7b7; }
.inspector-metric-val.neutral { color: #38bdf8; }

.inspector-metric-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.inspector-takeaway-note {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.875rem;
  font-size: 0.8125rem;
  color: #bae6fd;
  line-height: 1.4;
}

.inspector-takeaway-note svg {
  flex-shrink: 0;
  color: #38bdf8;
}

/* Interactive SVG Tooltip */
.trajectory-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 12px rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.875rem;
  font-size: 0.75rem;
  color: #e2e8f0;
  z-index: 50;
  max-width: 280px;
  line-height: 1.35;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Interactive Gene Selection Strip */
.gene-select-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.gene-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.gene-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  transform: translateY(-1px);
}

.gene-chip.active {
  background: var(--accent-cyan);
  color: #0f172a;
  border-color: var(--accent-cyan);
  font-weight: 800;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* Footer */
.footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Progressive Molecular Gene Expression Significance Stats Bar
   ========================================================================== */
.progression-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.prog-stat-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.prog-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.85;
}

.prog-stat-card.stat-surge::before {
  background: linear-gradient(90deg, #f43f5e, #fb7185);
}
.prog-stat-card.stat-tipping::before {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.prog-stat-card.stat-collapse::before {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.prog-stat-card.stat-perturbed::before {
  background: linear-gradient(90deg, #06b6d4, #38bdf8);
}

.prog-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.prog-stat-card.stat-surge:hover {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.15);
}
.prog-stat-card.stat-tipping:hover {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}
.prog-stat-card.stat-collapse:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}
.prog-stat-card.stat-perturbed:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.prog-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.prog-stat-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.prog-stat-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tag-red {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.tag-yellow {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.prog-stat-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.prog-stat-gene {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.prog-stat-val {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

.val-red {
  color: #f43f5e;
}

.val-yellow {
  color: #f59e0b;
}

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

.val-cyan {
  color: #38bdf8;
}

.prog-stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.4rem;
  gap: 0.25rem;
}

.prog-stat-sig {
  font-family: var(--font-mono);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .progression-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .progression-stats-bar {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Clinical Biopsy PDF Report Download Buttons
   ========================================================================== */
.btn-header-pdf {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-header-pdf:hover {
  background: var(--accent-cyan);
  color: #0f172a;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.btn-download-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
}

.btn-download-pdf:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.btn-download-pdf:active {
  transform: translateY(0);
}

/* ==========================================================================
   Google Gemini AI Clinical Reasoning & Oncology Copilot
   ========================================================================== */
.gemini-reasoning-card {
  margin-top: 1.25rem;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 20px -5px rgba(168, 85, 247, 0.18);
  transition: border-color 0.2s ease;
}

.gemini-reasoning-card:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

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

.gemini-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gemini-sparkle-icon {
  font-size: 1.25rem;
}

.gemini-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #f3e8ff;
  display: block;
}

.gemini-model-tag {
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.gemini-refresh-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.gemini-refresh-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #fff;
  border-color: rgba(168, 85, 247, 0.5);
}

.gemini-content-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  min-height: 80px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.gemini-loading-shimmer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c084fc;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 0;
}

.gemini-body-text h3, .gemini-body-text h4 {
  color: #f8fafc;
  font-size: 0.875rem;
  margin: 0.6rem 0 0.25rem 0;
  font-weight: 700;
}

.gemini-body-text strong {
  color: #e2e8f0;
}

.gemini-body-text ul {
  padding-left: 1.25rem;
  margin: 0.35rem 0;
}

.gemini-body-text li {
  margin-bottom: 0.25rem;
}

.gemini-interactive-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.gemini-quick-chips {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.gemini-chip {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
  font-size: 0.6875rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gemini-chip:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #fff;
}

.gemini-input-group {
  display: flex;
  gap: 0.5rem;
}

.gemini-input {
  flex: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0.4rem 0.65rem;
  color: #fff;
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.gemini-input:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.gemini-ask-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  border: none;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.gemini-ask-btn:hover {
  opacity: 0.9;
}

/* ===================================================================
   THERAPEUTIC INTERCEPTION & ACTIONABLE TARGETS PANEL
   =================================================================== */
.therapeutic-panel {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 1.25rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease;
}

.therapeutic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.therapeutic-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.therapeutic-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(56, 189, 248, 0.1) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.therapeutic-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.therapeutic-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.curative-status-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.curative-status-pill.malignant {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.curative-status-pill.interception {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.curative-status-pill.benign {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.curative-window-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3.5px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.curative-lead {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.curative-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.curative-headline {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
}

.curative-desc {
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 0.65rem;
}

.curative-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 600px) {
  .curative-meta-row {
    grid-template-columns: 1fr;
  }
}

.curative-meta-lbl {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.curative-meta-val {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

/* Actionable Targets List */
.targets-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.targets-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.targets-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.target-card {
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.target-card:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.target-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.target-bio-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.target-bio-badge {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.target-expr-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
}

.target-expr-tag.up {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.target-expr-tag.down {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.target-evidence-pill {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.target-evidence-pill.clinical-trial {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.target-evidence-pill.interception {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.target-evidence-pill.metabolic {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.target-evidence-pill.fda-approved {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.target-class-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #e2e8f0;
}

.target-mechanism-text {
  font-size: 0.6875rem;
  color: #94a3b8;
  line-height: 1.4;
}

.target-agents-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.agent-chip {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.target-action-note {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 3px;
  padding: 0.3rem 0.5rem;
  border-left: 2px solid #f59e0b;
}

/* ==========================================================================
   Header Buttons (Novelty & PDF)
   ========================================================================== */
.btn-header-novelty {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-header-novelty:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.35);
}

.btn-header-pdf {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.btn-header-pdf:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.btn-download-pdf {
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(135deg, #0284c7 0%, #0d9488 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.85rem 1.25rem;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
  transition: all 0.2s ease;
}

.btn-download-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.5);
  border-color: #38bdf8;
}

.btn-download-pdf:active {
  transform: translateY(0);
}

/* Gemini Copy Button */
.gemini-copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.gemini-copy-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

.gemini-copy-btn.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

/* ==========================================================================
   Novelty & Science Modal (Judge Evaluation Guide)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  background: rgba(15, 23, 42, 0.96);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 0.4rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.15s ease;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.novelty-section-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  border-left: 4px solid var(--accent-cyan);
}

.novelty-section-card.urgency {
  border-left-color: #f43f5e;
  background: rgba(244, 63, 94, 0.05);
}

.novelty-section-card.novelty-highlight {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.06);
}

.novelty-section-card.dual-engine {
  border-left-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.novelty-section-card.explainable-ai {
  border-left-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}

.novelty-tag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.novelty-icon-chip {
  font-size: 1.1rem;
}

.novelty-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.novelty-text {
  font-size: 0.8125rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.novelty-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.6rem;
}

@media (max-width: 640px) {
  .novelty-subgrid {
    grid-template-columns: 1fr;
  }
}

.novelty-subitem {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.5;
}

.novelty-subitem strong {
  display: block;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.modal-footer {
  padding: 1.15rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-footer-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Tab 2: Biopsy Cohorts (7 GEO Datasets) Styling
   ========================================================================== */
.cohorts-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
  .cohorts-summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cohort-metric-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cohort-metric-card .metric-val {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.cohort-metric-card .metric-lbl {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cohort-metric-card .metric-sub {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.cohort-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: rgba(30, 41, 59, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
}

.cohort-filter-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}

.cohort-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cohort-filter-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
}

.cohort-filter-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.datasets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
}

.dataset-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.55));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dataset-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
}

.dataset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dataset-accession {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.platform-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.dataset-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.dataset-desc {
  font-size: 0.78125rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.dataset-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stage-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.stage-tag.hcc {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.3);
}

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

.stage-tag.mash {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.25);
}

.stage-tag.steatosis {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.25);
}

.cohort-comparisons-wrap {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cohort-comp-lbl {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cohort-comp-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cohort-comp-pill {
  font-size: 0.6875rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.cohort-comp-pill .count {
  color: var(--accent-cyan);
  font-weight: 700;
  font-family: var(--font-mono);
}

.cohort-btn-explore {
  width: 100%;
  margin-top: 0.75rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.cohort-btn-explore:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #fff;
}

/* ==========================================================================
   Tab 3: Metabolic Pathways Grid Styling
   ========================================================================== */
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.pathway-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pathway-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.3);
}

.pathway-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.pathway-genes-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.p-gene {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ==========================================================================
   Tab 5: ML Console Weights Table
   ========================================================================== */
.weights-table-wrapper {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}




