/* ==============================================================================
   CardioSense AI — Clinical Decision Support & Cardiac Hemodynamics Workstation
   Design Language System (DLS): 12-Column Responsive Grid & Clinical Tokens
   Mathematically Aligned Layout, High-Contrast Typography, and Medical HUD
   ============================================================================== */

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

:root {
  /* ==========================================================================
     1. FLUID VIEWPORT & GRID TOKENS (6-TIER RESPONSIVE ARCHITECTURE)
     ========================================================================== */
  --grid-max-width: 1320px;
  --grid-gutter: 24px;
  --grid-gutter-sm: 16px;
  --grid-gap: 24px;
  --baseline-unit: 8px;

  /* ==========================================================================
     2. HIGH-CONTRAST CLINICAL PALETTE (WCAG 2.1 AAA COMPLIANT)
     ========================================================================== */
  /* Primary Action Blue (Institutional DLS) */
  --color-primary: #006FCF;          /* Clinical Action Blue (4.6:1 on white) */
  --color-primary-hover: #0056A3;    /* Active State Blue (7.4:1 on white - AAA) */
  --color-primary-deep: #002663;     /* Deep Master Navy (13.5:1 on white - AAA) */
  --color-midnight: #00175A;         /* Primary Header Midnight (14.8:1 - AAA) */
  --color-primary-light: #EFF6FF;    /* Action Surface Light Tint */
  --color-primary-border: #BFDBFE;   /* Action Border Tint */

  /* Dark Medical Viewport & HUD Void */
  --color-slate-950: #060B14;        /* 3D Viewport Deep Void */
  --color-slate-900: #0B1325;        /* Workstation Slate Background */
  --color-slate-800: #131E36;        /* HUD Surface Dark (92% opacity) */
  --color-slate-700: #1E2D4A;        /* HUD Diagnostic Borders */
  --color-slate-600: #334155;        /* Neutral Dark Border */

  /* Accreditation Accent */
  --color-gold: #B45309;             /* Darkened Amber (4.8:1 - AA) */
  --color-gold-tint: #FEF3C7;        /* Accreditation Background */

  /* Neutral Canvas & Surfaces (Clinical Dark Cockpit Theme) */
  --color-bg-page: #070B14;          /* Deep Dark Medical Canvas */
  --color-bg-card: #0E1726;          /* Dark Panel Card */
  --color-border-card: rgba(0, 229, 255, 0.16); /* Clinical Cyan Border */
  --color-border-subtle: rgba(255, 255, 255, 0.08); /* Subtle Dark Sub-Divider */
  
  /* High-Contrast Typography Tokens (WCAG 2.1 AAA on Dark) */
  --color-text-headline: #F8FAFC;    /* Bright Slate 50 (18:1 on dark) */
  --color-text-body: #E2E8F0;        /* Light Slate 200 (14:1 on dark) */
  --color-text-muted: #94A3B8;       /* Medium Slate 400 */
  --color-text-tertiary: #64748B;    /* Slate 500 */
  --color-text-link: #38BDF8;        /* Accessible Link Sky Blue */

  /* Dark HUD Typography Tokens */
  --color-hud-text-primary: #FFFFFF;   /* 19.8:1 on #0B1325 */
  --color-hud-text-secondary: #CBD5E1; /* 10.4:1 on #0B1325 (AAA) */
  --color-hud-text-accent: #38BDF8;    /* Sky 400 (8.8:1 on #0B1325 - AAA) */

  /* Clinical Diagnostic Status Tokens */
  --color-success: #047857;          /* Low Risk Green (Darkened for AAA 5.1:1) */
  --color-success-bg: #ECFDF5;
  --color-success-border: #6EE7B7;

  --color-warning: #B45309;          /* Moderate Risk Amber (Darkened 4.8:1) */
  --color-warning-bg: #FFFBEB;
  --color-warning-border: #FCD34D;

  --color-danger: #B91C1C;           /* Severe Stenosis Red (Darkened 5.7:1) */
  --color-danger-bg: #FEF2F2;
  --color-danger-border: #FCA5A5;

  --color-cyan: #0284C7;             /* Angiogram & Hemodynamic Waveforms */

  /* Elevation Shadows */
  --elevation-1: 0 1px 3px rgba(0, 23, 90, 0.06), 0 1px 2px rgba(0, 23, 90, 0.04);
  --elevation-2: 0 4px 14px rgba(0, 23, 90, 0.08), 0 2px 6px rgba(0, 23, 90, 0.04);
  --elevation-3: 0 12px 32px rgba(0, 23, 90, 0.12), 0 4px 12px rgba(0, 23, 90, 0.06);
  --elevation-viewport: 0 12px 36px rgba(6, 11, 20, 0.55);

  /* Touch Target & Form Sizing Tokens */
  --touch-target-min: 48px;          /* ANSI/AAMI HE75 Section 8.4 */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Typography Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Ultrawide & 4K Container Scaling */
@media (min-width: 1920px) {
  :root {
    --grid-max-width: 1680px;
    --grid-gutter: 36px;
    --grid-gap: 32px;
  }
}
@media (min-width: 2560px) {
  :root {
    --grid-max-width: 2160px;
    --grid-gutter: 48px;
    --grid-gap: 40px;
  }
  html {
    font-size: 18px; /* High-DPI physical viewing distance scale */
  }
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-page);
  color: var(--color-text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ==============================================================================
   1. GLOBAL CONTAINER & GRID SYSTEM
   ============================================================================== */
.container-lock {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  padding: 0 var(--grid-gutter);
}

@media (max-width: 640px) {
  .container-lock {
    padding: 0 var(--grid-gutter-sm);
  }
}

/* 12-Column Responsive Layout Utilities */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

.col-12 { grid-column: span 12; }
.col-8  { grid-column: span 8; }
.col-7  { grid-column: span 7; }
.col-6  { grid-column: span 6; }
.col-5  { grid-column: span 5; }
.col-4  { grid-column: span 4; }
.col-3  { grid-column: span 3; }

@media (max-width: 960px) {
  .col-8, .col-7, .col-6, .col-5, .col-4 {
    grid-column: span 12;
  }
}

/* ==============================================================================
   2. CLINICAL TOP UTILITY RIBBON
   ============================================================================== */
.app-utility-ribbon {
  background-color: var(--color-midnight);
  color: #FFFFFF;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.app-utility-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 16px;
  flex-wrap: wrap;
}

.app-utility-left {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.app-utility-left a {
  color: #DDE2E6;
  font-weight: 500;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}
.app-utility-left a:hover {
  color: #FFFFFF;
  text-decoration: none;
}
.app-utility-left a.active {
  color: #FFFFFF;
  font-weight: 600;
  border-bottom: 2px solid var(--color-primary);
}

.app-utility-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.compliance-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #A7F3D0;
  background: rgba(16, 185, 129, 0.14);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

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

.app-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: transparent;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.app-login-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #FFFFFF;
}

/* ==============================================================================
   3. STICKY MAIN HEADER & RESPONSIVE NAVIGATION
   ============================================================================== */
.app-header {
  background-color: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border-card);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 23, 90, 0.04);
}

.app-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 16px;
}

.app-brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-midnight) 0%, var(--color-primary) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(0, 111, 207, 0.25);
  flex-shrink: 0;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text-headline);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.1px;
}

/* Nav Menu */
.app-nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 20px;
}

.app-nav-item a {
  color: var(--color-text-headline);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.app-nav-item a:hover {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom-color: var(--color-primary);
}
.app-nav-item.active a {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Hamburger Toggle */
.app-mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--color-text-headline);
  cursor: pointer;
}

@media (max-width: 960px) {
  .app-mobile-nav-toggle {
    display: inline-flex;
  }
  .app-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0B1322;
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--color-border-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    gap: 12px;
    align-items: flex-start;
  }
  .app-nav-menu.open {
    display: flex;
  }
}

/* ==============================================================================
   4. BREADCRUMBS & MARKETING BANNER COLLAPSE (CLINICAL COCKPIT FOCUS)
   ============================================================================== */
.app-top-notification-bar {
  display: none !important;
}

.app-breadcrumb-bar {
  display: none !important;
}

.app-hero {
  display: none !important;
}

.app-utility-ribbon {
  display: none !important;
}

.app-section-header {
  display: none !important;
}

.app-nav {
  display: none !important;
}

.app-header nav,
.app-nav-menu,
.app-mobile-nav-toggle {
  display: none !important;
}

.app-header-actions {
  display: none !important;
}

.app-badge-accredited {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(0, 229, 255, 0.12);
  color: #38BDF8;
  border: 1px solid rgba(0, 229, 255, 0.3);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.app-hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 800;
  color: var(--color-text-headline);
  letter-spacing: -0.6px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.app-hero p {
  font-size: 1rem;
  color: var(--color-text-body);
  max-width: 840px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.app-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.app-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-headline);
}

.app-trust-badge svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ==============================================================================
   6. BUTTONS & SHARED CONTROLS
   ============================================================================== */
.app-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  min-height: var(--touch-target-min);
  min-width: 44px;
}

.app-btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF !important;
}
.app-btn-primary:hover {
  background-color: var(--color-primary-hover);
  text-decoration: none;
}

.app-btn-secondary {
  background-color: rgba(0, 111, 207, 0.16);
  color: #38BDF8;
  border-color: rgba(0, 229, 255, 0.35);
}
.app-btn-secondary:hover {
  background-color: rgba(0, 111, 207, 0.3);
  border-color: #00E5FF;
  color: #FFFFFF;
  text-decoration: none;
}

.app-btn-outline {
  background-color: transparent;
  color: var(--color-text-body);
  border-color: rgba(255, 255, 255, 0.22);
}
.app-btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #00E5FF;
  color: #FFFFFF;
  text-decoration: none;
}

.app-btn-sm {
  font-size: 0.8125rem;
  padding: 6px 14px;
  min-height: 40px;
}
.app-btn-md {
  font-size: 0.875rem;
  padding: 9px 18px;
  min-height: var(--touch-target-min);
}
.app-btn-lg {
  font-size: 1rem;
  padding: 12px 24px;
  min-height: 52px;
}

.app-copy-btn {
  background: transparent;
  border: 1px solid var(--color-border-card);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.app-copy-btn:hover {
  background: #F1F5F9;
  color: var(--color-text-headline);
}

/* Main Section Structure */
.app-main {
  padding-top: 32px;
  padding-bottom: 64px;
}

.app-section {
  margin-bottom: 48px;
}

.app-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--color-border-card);
  padding-bottom: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.app-section-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-text-headline);
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-section-header p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  max-width: 820px;
  line-height: 1.5;
}

/* ==============================================================================
   7. WORKSTATION HARDWARE DETECTION CARD
   ============================================================================== */
.app-detection-card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-left: 6px solid #00E5FF;
  border-radius: var(--radius-md);
  padding: clamp(16px, 3vw, 24px);
  margin-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
  gap: 20px;
}

.app-detection-info {
  flex: 1 1 240px;
  min-width: 0;
  max-width: 100%;
}

.app-detection-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #38BDF8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.app-detection-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-headline);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-detection-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.app-detection-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.8125rem;
  color: var(--color-text-body);
}

.app-detection-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* ==============================================================================
   8. CLINICAL LAB INGESTION & CASE STUDY GRID (EQUAL HEIGHTS)
   ============================================================================== */
.ingestion-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  align-items: stretch;
}

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

/* Dropzone column */
.clinical-dropzone {
  border: 2px dashed rgba(0, 229, 255, 0.35);
  background: #0A1222;
  border-radius: var(--radius-md);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 240px;
  color: #E2E8F0;
}
.clinical-dropzone:hover, .clinical-dropzone.dragover {
  border-color: #00E5FF;
  background: rgba(0, 229, 255, 0.08);
}

.dropzone-icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.15);
  color: #00E5FF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.format-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.format-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: #131E36;
  border: 1px solid var(--color-border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

/* Case study list column */
.case-study-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  justify-content: space-between;
}

.case-study-card {
  border: 1px solid var(--color-border-subtle);
  border-left: 4px solid #334155;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: #131E36;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  color: #E2E8F0;
}
.case-study-card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  background-color: #19263E;
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.1);
}
.case-study-card.selected {
  border-color: #00E5FF;
  border-left-color: #00E5FF;
  background-color: rgba(0, 229, 255, 0.12);
}

.case-info h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-headline);
  margin-bottom: 2px;
}

.case-info p {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.case-severity-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.case-severity-badge.critical {
  color: #F87171;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.case-severity-badge.moderate {
  color: #FBBF24;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.case-severity-badge.baseline {
  color: #34D399;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Extracted Parameters Card below */
.extracted-values-box {
  margin-top: 16px;
  background: #0A1222;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.extracted-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.extracted-item {
  background: #131E36;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.extracted-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.extracted-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-headline);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.confidence-indicator {
  font-size: 0.6875rem;
  color: #34D399;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* ==============================================================================
   9. WORKSTATION MAIN GRID: FORM (5-COL) + 3D VIEWPORT (7-COL)
   ============================================================================== */
.workstation-grid {
  display: grid;
  grid-template-columns: minmax(360px, 5fr) minmax(460px, 7fr);
  gap: var(--grid-gap);
  align-items: start;
}

@media (min-width: 1024px) {
  .workstation-sticky-col {
    position: sticky;
    top: 84px;
    z-index: 100;
  }
}

@media (max-width: 1023px) {
  .workstation-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .workstation-sticky-col {
    position: static;
  }
}

/* Left Clinical Input Panel */
.clinical-input-panel {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.clinical-subhead {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #38BDF8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--color-border-subtle);
  padding-bottom: 6px;
  margin: 16px 0 12px;
}
.clinical-subhead:first-child {
  margin-top: 0;
}

/* Micro-Grid inside Clinical Input Panel for Paired Fields */
.form-paired-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .form-paired-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 12px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-headline);
  width: 100%;
}

.label-primary {
  font-weight: 700;
  color: #F8FAFC;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.label-sub.clinical-acronym {
  display: none !important; /* Hide cluttered acronym strings like (trestbps · normal < 120) from inline view to eliminate uneven multi-line row wrapping */
}

.form-value-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #38BDF8;
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.3);
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin-left: 8px;
}
.form-value-tag:hover {
  background: rgba(56, 189, 248, 0.22);
}

/* Accessible Sliders */
.clinical-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--touch-target-min);
  width: 100%;
}

.clinical-slider {
  width: 100%;
  height: 44px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  display: block;
  margin: 0;
}
.clinical-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #19263E;
}
.clinical-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #00E5FF;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
  transition: transform 0.1s ease;
  margin-top: -9px;
}
.clinical-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.clinical-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: #F8FAFC;
  background-color: #0A1222;
  outline: none;
  transition: border-color 0.15s ease;
  height: 46px;
}
.clinical-select:focus {
  border-color: #00E5FF;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25);
}

/* Right: Medical Diagnostic Viewport */
.telemetry-viewport {
  position: relative;
  width: 100%;
  height: 560px;
  background: radial-gradient(circle at 50% 40%, #0E1A33 0%, var(--color-slate-950) 100%);
  border: 1px solid var(--color-slate-700);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-viewport);
}

#portal-webgl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Diagnostic Grid Overlay */
.viewport-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Top HUD Bar */
.viewport-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 20;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 680px) {
  .viewport-hud-top {
    flex-direction: column;
    align-items: stretch;
  }
  .hud-risk-card {
    min-width: 0;
    width: 100%;
  }
  .viewport-mode-bar {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
}

.hud-risk-card {
  pointer-events: auto;
  background: rgba(11, 19, 37, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  min-width: 240px;
}

.hud-risk-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hud-pulse-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 8px #38BDF8;
  animation: hudPulse 1.4s infinite;
}

@keyframes hudPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.hud-risk-value {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin: 3px 0;
  letter-spacing: -0.5px;
}

.hud-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6875rem;
  color: #94A3B8;
  white-space: nowrap;
}

/* Diagnostic View Mode Toolbar */
.viewport-mode-bar {
  pointer-events: auto;
  display: flex;
  background: rgba(11, 19, 37, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
}

.mode-btn {
  background: transparent;
  color: #94A3B8;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 40px;
  min-width: 40px;
}
.mode-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}
.mode-btn.active {
  color: #FFFFFF;
  background: var(--color-primary);
}

.sound-btn {
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
  min-height: 40px;
  min-width: 40px;
}
.sound-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.sound-btn.active {
  color: #34D399;
  background: rgba(52, 211, 153, 0.15);
  border-color: #34D399;
}

/* Orbit Tip (Bottom Right of Viewport) */
.viewport-orbit-tip {
  position: absolute;
  bottom: 84px;
  right: 14px;
  background: rgba(11, 19, 37, 0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #CBD5E1;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

/* Bottom HUD Bar */
.viewport-hud-bottom {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 12px;
  z-index: 20;
}

@media (max-width: 720px) {
  .viewport-hud-bottom {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 440px) {
  .telemetry-vitals-pill {
    flex-wrap: wrap;
    justify-content: space-around;
  }
}

.ecg-monitor-card {
  background: rgba(11, 19, 37, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 8px 12px;
}

.ecg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.6875rem;
}

.ecg-lead-tag {
  color: #38BDF8;
  font-weight: 800;
  font-family: var(--font-mono);
}

.ecg-meta {
  color: #CBD5E1;
  font-family: var(--font-mono);
}

#portal-ecg-canvas {
  width: 100%;
  height: 44px;
  display: block;
}

.telemetry-vitals-pill {
  background: rgba(11, 19, 37, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  min-width: 100px;
  text-align: center;
}

.vitals-pill-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #94A3B8;
  text-transform: uppercase;
}

.vitals-pill-value {
  font-size: 1.125rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Telemetry Summary Cards Row */
.telemetry-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
  margin-top: 18px;
}

@media (min-width: 1200px) {
  .workstation-sticky-col {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
  }
  .telemetry-summary-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .telemetry-summary-row {
    grid-template-columns: 1fr;
  }
}

.telemetry-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.attribution-bar-item {
  margin-bottom: 8px;
}
.attribution-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-body);
  margin-bottom: 3px;
}
.attribution-bar-track {
  height: 6px;
  background: #19263E;
  border-radius: 3px;
  overflow: hidden;
}
.attribution-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==============================================================================
   9b. RADIAL GAUGE & QUICK SCENARIO STRIP (CLINICAL COCKPIT)
   ============================================================================== */
.radial-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.radial-gauge-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px auto;
}

.radial-gauge-svg {
  transform: rotate(-90deg);
}

.radial-gauge-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.radial-gauge-bar {
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.3s ease;
}

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

.radial-gauge-pct {
  font-size: 1.625rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #F8FAFC;
  line-height: 1;
}

.radial-gauge-band {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.radial-gauge-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  margin-top: 8px;
  color: #94A3B8;
}

.quick-scenario-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 12px;
  margin-bottom: 8px;
}

.quick-scenario-chip {
  background: rgba(14, 23, 38, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  min-height: 36px;
}

.quick-scenario-chip:hover,
.quick-scenario-chip.active {
  border-color: #00E5FF;
  background: rgba(0, 229, 255, 0.18);
  color: #FFFFFF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

/* ==============================================================================
   10. ARCHITECTURE DOWNLOAD MATRIX & TABLES (FIXED LAYOUT)
   ============================================================================== */
.app-tabs-container {
  display: flex;
  border-bottom: 2px solid var(--color-border-card);
  margin-bottom: 16px;
  gap: 8px;
  overflow-x: auto;
}

.app-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.app-tab-btn svg {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.app-tab-btn:hover {
  color: var(--color-primary);
}
.app-tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.gen-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.gen-filter-btn {
  background: #131E36;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text-body);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
}
.gen-filter-btn:hover {
  background: #1E2D4A;
  border-color: rgba(0, 229, 255, 0.4);
}
.gen-filter-btn.active {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: #00E5FF;
}

.table-responsive-wrapper {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Mathematically Locked Column Table */
.matrix-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
  min-width: 860px;
}

.col-pkg   { width: 30%; }
.col-arch  { width: 23%; }
.col-os    { width: 15%; }
.col-size  { width: 10%; }
.col-hash  { width: 12%; }
.col-act   { width: 10%; }

.matrix-table thead th {
  background-color: #0B1325;
  color: var(--color-text-headline);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--color-border-card);
  white-space: nowrap;
}

.matrix-table tbody tr {
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background-color 0.12s ease;
}
.matrix-table tbody tr:hover {
  background-color: rgba(0, 229, 255, 0.05);
}
.matrix-table tbody tr:last-child {
  border-bottom: none;
}

.matrix-table td {
  padding: 12px 14px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-badge.modern {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.4);
}
.chip-badge.standard {
  background: rgba(56, 189, 248, 0.15);
  color: #38BDF8;
  border-color: rgba(56, 189, 248, 0.35);
}
.chip-badge.legacy {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
  border-color: rgba(148, 163, 184, 0.25);
}

.hash-cell {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  display: inline-block;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* ==============================================================================
   11. LIVE SECURITY AUDIT & HEALTH CHECKUP (4x2 GRID)
   ============================================================================== */
.sec-overview-banner {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-left: 6px solid var(--color-success);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.sec-overview-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sec-status-glyph {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sec-overview-title {
  font-size: 1.1875rem;
  font-weight: 800;
  color: var(--color-text-headline);
  margin-bottom: 2px;
}

.sec-overview-subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.sec-seal-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #00E5FF;
  background: #131E36;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Strict 4-Column Diagnostic Grid */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  margin-bottom: 24px;
}

@media (max-width: 1023px) {
  .sec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .sec-grid {
    grid-template-columns: 1fr;
  }
}

.sec-diag-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sec-diag-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sec-diag-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-headline);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-status-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.sec-status-badge.pass {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #86EFAC;
}

.sec-diag-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.sec-diag-metric {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-primary);
  background: #F8FAFC;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Security Audit Stream Console */
.sec-console-box {
  background: var(--color-slate-900);
  border: 1px solid var(--color-slate-700);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.sec-console-header {
  background: var(--color-slate-800);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-slate-700);
}

.sec-console-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-console-body {
  padding: 12px 14px;
  height: 150px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: #94A3B8;
}

.console-line {
  display: flex;
  gap: 10px;
}
.console-time {
  color: #CBD5E1;
  flex-shrink: 0;
}
.console-tag {
  color: #38BDF8;
  font-weight: 600;
}
.console-msg.ok {
  color: #34D399;
}
.console-msg.info {
  color: #E2E8F0;
}

/* ==============================================================================
   12. WEBCRYPTO SHA-256 DROPZONE VERIFIER
   ============================================================================== */
.verifier-box {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.verifier-dropzone {
  border: 2px dashed rgba(0, 229, 255, 0.35);
  background: rgba(14, 23, 38, 0.6);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.verifier-dropzone:hover, .verifier-dropzone.dragover {
  border-color: #00E5FF;
  background: rgba(0, 229, 255, 0.08);
}

.verifier-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  display: none;
  align-items: flex-start;
  gap: 14px;
}
.verifier-result.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34D399;
}
.verifier-result.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #F87171;
}

/* ==============================================================================
   13. IT DEPLOYMENT GUIDELINES
   ============================================================================== */
.cli-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
}

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

.cli-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cli-card-header {
  background: #0B1322;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-headline);
}

.cli-code-block {
  background: var(--color-slate-900);
  color: #E2E8F0;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  overflow-x: auto;
  margin: 0;
}

/* ==============================================================================
   14. REGULATORY & COMPLIANCE GRID (4 COLUMNS)
   ============================================================================== */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

@media (max-width: 1023px) {
  .compliance-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .compliance-grid {
    grid-template-columns: 1fr;
  }
}

.compliance-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-top: 3px solid #00E5FF;
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.compliance-card h3 {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--color-text-headline);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compliance-card p {
  font-size: 0.8125rem;
  color: var(--color-text-body);
  line-height: 1.5;
  margin-bottom: 10px;
}

.compliance-ref-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
}

/* ==============================================================================
   15. CORPORATE WORKSTATION FOOTER (5 COLUMNS)
   ============================================================================== */
.app-footer {
  background-color: #060B14;
  color: #E2E8F0;
  padding: 56px 0 36px;
  border-top: 1px solid rgba(0, 229, 255, 0.15);
}

.app-footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 44px;
}

@media (max-width: 960px) {
  .app-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .app-footer-grid {
    grid-template-columns: 1fr;
  }
}

.app-footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #FFFFFF;
  margin-bottom: 14px;
}

.app-footer-links {
  list-style: none;
}

.app-footer-links li {
  margin-bottom: 8px;
}

.app-footer-links a {
  color: #CBD5E1;
  font-size: 0.8125rem;
  transition: color 0.15s ease;
}
.app-footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.app-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
}

.app-footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
}

.app-footer-bottom-links a {
  color: #94A3B8;
  font-size: 0.75rem;
}
.app-footer-bottom-links a:hover {
  color: #FFFFFF;
}

.app-footer-bottom p {
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* ==============================================================================
   16. MODAL DIALOGS & NOTIFICATIONS
   ============================================================================== */
.app-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 11, 20, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-modal-dialog {
  background: #0D1626;
  color: #E2E8F0;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.app-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}
.app-modal-close:hover {
  color: #F8FAFC;
}

.app-modal-body {
  padding: 24px;
  color: #E2E8F0;
}

.app-modal-footer {
  padding: 14px 24px;
  background: #09101C;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.app-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-midnight);
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 23, 90, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

/* ==============================================================================
   14. COCKPIT PATIENT CHIP, 3D LESION PIN & WORKSPACE SWITCHER
   ============================================================================== */

/* Header Patient Chip */
.header-patient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 23, 38, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.8125rem;
  color: #E2E8F0;
  margin-left: 16px;
}

@media (max-width: 900px) {
  .header-patient-chip {
    display: none;
  }
}

.patient-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
}

.patient-name {
  font-weight: 700;
  color: #F8FAFC;
}

.patient-sep {
  color: #475569;
}

.patient-id {
  font-family: var(--font-mono);
  color: #38BDF8;
}

.patient-protocol {
  font-size: 0.75rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* 3D Viewport Interactive Lesion Callout */
.viewport-lesion-callout {
  position: absolute;
  pointer-events: none;
  z-index: 15;
  display: flex;
  align-items: flex-start;
  transform: translate(-10px, -20px);
  transition: opacity 0.2s ease;
}

.lesion-beacon {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beacon-core {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00E5FF;
  box-shadow: 0 0 10px #00E5FF, 0 0 20px rgba(0, 229, 255, 0.8);
}

.beacon-pulse-ring {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #00E5FF;
  animation: beaconPulse 1.8s infinite ease-out;
}

@keyframes beaconPulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.lesion-leader-group {
  display: flex;
  align-items: center;
  margin-left: 2px;
  margin-top: -6px;
}

.lesion-leader-svg {
  overflow: visible;
  width: 42px;
}

.lesion-badge {
  background: rgba(14, 23, 38, 0.92);
  border: 1px solid #00E5FF;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 4px;
  padding: 3px 8px;
  color: #F8FAFC;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 229, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.lesion-badge-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px #EF4444;
}

/* Cockpit View Switcher Nav Bar */
.cockpit-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(14, 23, 38, 0.8);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-md);
  margin-top: 24px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.cockpit-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94A3B8;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cockpit-nav-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.cockpit-nav-btn.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: #00E5FF;
  color: #00E5FF;
}

/* ==============================================================================
   COCKPIT MEDICAL WORKSTATION DESIGN (EXACT MATCH TO SPEC MOCKUP)
   ============================================================================== */

/* Master Cockpit Layout */
.app-cockpit-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: #070B14;
}

/* 1. Left Vertical Icon Dock */
.cockpit-dock {
  width: 58px;
  background-color: #0A111F;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 20px;
  flex-shrink: 0;
  z-index: 100;
}

.dock-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dock-icon-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.06);
}

.dock-icon-btn.active {
  color: #00E5FF;
  background: rgba(0, 229, 255, 0.14);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.dock-avatar {
  margin-top: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #00E5FF;
  object-fit: cover;
}

/* 2. Cockpit Main Container */
.cockpit-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: #070B14;
}

/* 3. Sleek Cockpit Header */
.app-header {
  height: 56px;
  min-height: 56px;
  background: #0B1322;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.header-brand-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 800;
  color: #F8FAFC;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-brand-pulse-icon {
  color: #00E5FF;
}

.header-patient-context-text {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: #94A3B8;
  margin-left: 24px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.header-patient-context-text strong {
  color: #F8FAFC;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-save-btn {
  background: #00E5FF;
  color: #05101E;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.header-save-btn:hover {
  background: #38BDF8;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

/* 4. Biomarkers Panel */
.biomarkers-cockpit-panel {
  background: #0D1626;
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.biomarkers-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.biomarkers-headline {
  font-size: 0.95rem;
  font-weight: 700;
  color: #F8FAFC;
  margin: 0;
}

.btn-new-biomarker {
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00E5FF;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-new-biomarker:hover {
  background: rgba(0, 229, 255, 0.12);
}

/* Biomarker Cards Grid */
.biomarkers-cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.bmc-card {
  background: #131E33;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.15s ease;
}

.bmc-card:hover, .bmc-card:focus-within {
  border-color: rgba(0, 229, 255, 0.35);
  background: #16243D;
}

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

.bmc-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
}

.bmc-acronym {
  font-size: 0.625rem;
  color: #64748B;
  white-space: nowrap;
}

.bmc-value-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.bmc-val-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: #F8FAFC;
  font-feature-settings: 'tnum' on;
}

.bmc-sparkline-svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* 5. Center-Right Subgrid Layout */
.cockpit-subgrid-container {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: 12px;
}

@media (max-width: 1279px) {
  .cockpit-subgrid-container {
    grid-template-columns: 1fr;
  }
}

.cockpit-middle-zone {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cockpit-middle-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 12px;
  height: 340px;
}

@media (max-width: 900px) {
  .cockpit-middle-top-row {
    grid-template-columns: 1fr;
    height: auto;
  }
}

/* Card Shell */
.cockpit-card-shell {
  background: #0D1626;
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.cockpit-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 19, 34, 0.6);
  flex-shrink: 0;
}

.cockpit-card-title-text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #E2E8F0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 3D Heart Card Viewport */
.cockpit-viewport-card {
  position: relative;
  flex: 1;
  min-height: 0;
}

.cockpit-viewport-card #portal-viewport-box {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.cockpit-viewport-card canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Floating Toolbar on 3D Viewport */
.viewport-floating-toolbar {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.floating-tool-btn {
  width: 28px;
  height: 28px;
  background: rgba(14, 23, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: #CBD5E1;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(6px);
}

.floating-tool-btn:hover {
  color: #00E5FF;
  border-color: #00E5FF;
  background: rgba(0, 229, 255, 0.15);
}

.floating-search-btn {
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 28px;
  height: 28px;
  background: rgba(14, 23, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(6px);
}

/* ECG Telemetry Oscilloscope Card */
.cockpit-telemetry-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.telemetry-oscilloscope-viewport {
  flex: 1;
  position: relative;
  background: #060B14;
  min-height: 0;
}

.telemetry-oscilloscope-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.telemetry-bottom-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 19, 34, 0.8);
  font-size: 0.75rem;
  color: #94A3B8;
  flex-shrink: 0;
}

/* ECG Lead-II Rhythm Strip */
.cockpit-rhythm-strip-card {
  height: 120px;
  min-height: 120px;
}

.rhythm-strip-viewport {
  flex: 1;
  position: relative;
  background: #060B14;
}

.rhythm-strip-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Right Diagnostic Panel Column */
.cockpit-right-diagnostics-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cockpit-diag-panel {
  background: #0D1626;
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.diag-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.diag-title-text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #E2E8F0;
}

/* Radial Risk Gauge */
.radial-risk-circle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6px 0;
}

.gauge-center-readout {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-pct-text {
  font-size: 1.6rem;
  font-weight: 900;
  color: #F8FAFC;
  line-height: 1;
}

.gauge-category-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: #F43F5E;
  margin-top: 3px;
}

/* SHAP Feature Contribution Bars */
.shap-bars-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}

.shap-bar-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shap-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #94A3B8;
}

.shap-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.shap-fill {
  height: 100%;
  background: #00E5FF;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.shap-axis-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  color: #64748B;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

/* Clinical Recommendation */
.rec-narrative-text {
  font-size: 0.78rem;
  color: #CBD5E1;
  line-height: 1.5;
  margin: 6px 0 10px;
}

.rec-urgency-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.rec-urgency-fill {
  height: 100%;
  background: #00E5FF;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ==============================================================================
   COCKPIT HARMONIZATION & 1-TO-1 MOCKUP ALIGNMENT
   ============================================================================== */
.cockpit-dock {
  height: 100vh !important;
  position: sticky !important;
  top: 0 !important;
  justify-content: space-between !important;
}

.dock-top-group, .dock-bottom-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cockpit-card {
  background: #0B111A;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.cockpit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cockpit-card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #E2E8F0;
  letter-spacing: 0.2px;
  margin: 0;
}

.cockpit-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cockpit-icon-btn {
  background: transparent;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cockpit-icon-btn:hover {
  color: #00E5FF;
}

.cockpit-new-btn {
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: #00E5FF;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.cockpit-new-btn:hover {
  background: rgba(0, 229, 255, 0.25);
}

/* 3D Heart Viewport Container */
.heart-model-card {
  margin-bottom: 12px;
}

.heart-model-card .telemetry-viewport {
  height: 380px !important;
  background: radial-gradient(circle at 50% 45%, #0B1526 0%, #050912 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.12) !important;
  border-radius: 8px !important;
}

.floating-controls-cluster {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 25;
}

.floating-tool-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: rgba(11, 19, 35, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.floating-tool-btn:hover {
  color: #00E5FF;
  border-color: #00E5FF;
  background: rgba(0, 229, 255, 0.15);
}

.floating-bottom-tool {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 25;
}

/* ECG Rhythm Strip Card */
.ecg-strip-card {
  display: flex;
  flex-direction: column;
}

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

.ecg-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #10B981;
}

.ecg-playback-controls {
  display: flex;
  gap: 4px;
}

.ecg-ctrl-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #94A3B8;
  font-size: 0.6875rem;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
}

.ecg-ctrl-btn:hover, .ecg-ctrl-btn.active {
  color: #10B981;
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.12);
}

.ecg-wide-canvas-container {
  width: 100%;
  height: 85px;
  background: #060B12;
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

#portal-ecg-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Right Column: Diagnostics */
.cockpit-right-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cockpit-card-menu-btn {
  color: #64748B;
  font-size: 1.1rem;
  cursor: pointer;
}

.radial-gauge-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 6px auto 10px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-gauge-svg {
  transform: rotate(-90deg);
}

.radial-gauge-track {
  stroke: rgba(255, 255, 255, 0.06);
}

.radial-gauge-bar {
  transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}

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

.radial-gauge-pct {
  font-size: 1.625rem;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.1;
}

.radial-gauge-band {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 2px;
}

.radial-gauge-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #94A3B8;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.clinical-risk-blurb {
  font-size: 0.725rem;
  color: #CBD5E1;
  line-height: 1.45;
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 6px;
  padding: 8px 10px;
  border-left: 3px solid #00E5FF;
  text-align: left;
}

.shap-attribution-card {
  display: flex;
  flex-direction: column;
}

.shap-tornado-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attribution-bar-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.attribution-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #94A3B8;
}

.attribution-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.attribution-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.shap-scale-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  color: #64748B;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}

.recommendation-card {
  display: flex;
  flex-direction: column;
}

.recommendation-text {
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.45;
  margin-bottom: 12px;
}

.recommendation-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.recommendation-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00E5FF, #38BDF8);
  border-radius: 2px;
}

/* 2-Column Biomarkers Grid */
.biomarkers-cockpit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.bmc-card {
  background: #0E1624;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 86px;
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.bmc-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  background-color: #111B2C;
}

.bmc-card-wide {
  grid-column: span 2;
}

.bmc-card .form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.bmc-card .label-primary {
  font-size: 0.75rem;
  color: #94A3B8;
  font-weight: 500;
}

.bmc-card .label-sub {
  font-size: 0.65rem;
  color: #64748B;
}

.bmc-card .form-value-tag {
  font-size: 1.125rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 4px;
  display: block;
}

.bmc-card .clinical-slider-wrapper {
  position: relative;
  margin-top: 2px;
  display: flex;
  flex-direction: column;
}

.bmc-card .mini-sparkline {
  width: 100%;
  height: 14px;
  margin-bottom: 2px;
  opacity: 0.7;
  pointer-events: none;
}

.bmc-card .clinical-select {
  height: 38px;
  padding: 4px 8px;
  font-size: 0.8125rem;
  margin-top: 4px;
}

.bmc-card .clinical-slider {
  height: 4px;
  margin: 6px 0;
}

.bmc-card .clinical-slider::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
}

/* ==============================================================================
   16. COCKPIT HEADER ACTIONS, MOBILE TRACKER & QR PAIRING MODAL
   ============================================================================== */
.header-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-mobile-btn {
  background: rgba(0, 111, 207, 0.22);
  color: #38BDF8;
  border: 1px solid rgba(0, 229, 255, 0.4);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 38px;
}
.header-mobile-btn:hover {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00E5FF;
  color: #FFFFFF;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

.mobile-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 6px #34D399;
  animation: pulseDot 2s infinite ease-in-out;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
}

.header-login-btn {
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  min-height: 38px;
}
.header-login-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.4);
}

.header-save-btn {
  background: #00E5FF;
  color: #06101E;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  min-height: 38px;
}
.header-save-btn:hover {
  background: #38BDF8;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.45);
}

/* Nav Drawer */
.app-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: #0B1322;
  border-right: 1px solid rgba(0, 229, 255, 0.2);
  z-index: 2500;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
}
.app-nav-drawer.open {
  transform: translateX(0);
}
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-links {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}
.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #CBD5E1;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
}
.drawer-nav-item:hover, .drawer-nav-item.active {
  background: rgba(0, 229, 255, 0.12);
  color: #38BDF8;
}

/* ==============================================================================
   17. MOBILE COMPANION TRACKER & QR SYSTEM
   ============================================================================== */
#app-mobile-companion {
  display: none;
  min-height: 100vh;
  background-color: #070B14;
  color: #E2E8F0;
  padding: 16px;
  max-width: 540px;
  margin: 0 auto;
}

.mobile-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.mobile-pairing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mobile-qr-box {
  background: #FFFFFF;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 229, 255, 0.25);
  margin: 20px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-pin-input {
  background: #0A1222;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 8px;
  color: #00E5FF;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  padding: 10px;
  width: 200px;
  margin: 10px auto;
  outline: none;
}
.mobile-pin-input:focus {
  border-color: #00E5FF;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.3);
}

.mobile-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-card {
  background: #0E1726;
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mobile-vitals-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.mobile-vital-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.mobile-vital-tile .mv-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8FAFC;
}
.mobile-vital-tile .mv-lbl {
  font-size: 0.6875rem;
  color: #94A3B8;
  margin-top: 2px;
}

/* Mobile Camera Scanner Modal Simulation */
.mobile-scanner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.scanner-viewfinder {
  position: relative;
  width: 260px;
  height: 260px;
  border: 2px solid rgba(0, 229, 255, 0.5);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
  margin-bottom: 24px;
}
.scanner-reticle-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: #00E5FF;
  border-style: solid;
}
.reticle-tl { top: 0; left: 0; border-width: 4px 0 0 4px; }
.reticle-tr { top: 0; right: 0; border-width: 4px 4px 0 0; }
.reticle-bl { bottom: 0; left: 0; border-width: 0 0 4px 4px; }
.reticle-br { bottom: 0; right: 0; border-width: 0 4px 4px 0; }

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: #00E5FF;
  box-shadow: 0 0 12px #00E5FF, 0 0 20px #00E5FF;
  animation: laserSweep 2s infinite ease-in-out;
}
@keyframes laserSweep {
  0% { top: 5%; opacity: 0.8; }
  50% { top: 95%; opacity: 1; }
  100% { top: 5%; opacity: 0.8; }
}
