/* ==========================================================================
   PRECODE AI PROJECT SPECIFIC STYLESHEET
   Extends shared-project.css with cardiorespiratory telemetry,
   ECG lead II waveform traces, alert tier status badges, and red/crimson accents.
   ========================================================================== */

:root {
  --red-primary: #DC2626;
  --red-light: #EF4444;
  --red-dark: #991B1B;
  --red-glow: rgba(220, 38, 38, 0.35);
  --red-bg: rgba(220, 38, 38, 0.08);

  --orange-risk: #EA580C;
  --yellow-risk: #CA8A04;
}

/* Red Theme Accents */
.text-accent-red {
  color: var(--red-primary);
}

.pill-red {
  background: var(--red-bg);
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--red-light);
}

.dot-red {
  background: var(--red-primary);
  box-shadow: 0 0 8px var(--red-primary);
}

.badge-red {
  background: var(--red-bg);
  border-color: rgba(220, 38, 38, 0.4);
  color: var(--red-light);
}

.btn-red {
  background: var(--red-primary);
  color: #FFFFFF;
}

.btn-red:hover {
  background: var(--red-light);
  box-shadow: 0 6px 20px var(--red-glow);
}

.val-red {
  color: var(--red-light);
  font-weight: 600;
}

.cta-red {
  border-color: rgba(220, 38, 38, 0.35);
}

.applications-grid .urgent-card,
.urgent-card {
  border-left-color: var(--red-primary) !important;
}

.applications-grid .urgent-card:hover,
.urgent-card:hover {
  border-color: var(--red-primary) !important;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15) !important;
}

.tag-urgent {
  color: #DC2626 !important;
  background: rgba(220, 38, 38, 0.12) !important;
}

.pillar-card:hover {
  border-color: var(--red-primary) !important;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15) !important;
}

.pillar-badge {
  color: var(--red-primary) !important;
  background: var(--red-bg) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}

/* Cardiorespiratory Waveform Telemetry Stage */
.ecg-vis-stage {
  position: relative;
  background: rgba(15, 20, 24, 0.85);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  padding: 18px 16px 14px 16px;
  margin-bottom: 0;
  overflow: hidden;
}

.ecg-header-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ecg-channel-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ecg-live-stat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(253, 251, 239, 0.7);
}

.ecg-canvas-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  background: 
    linear-gradient(rgba(220, 38, 38, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 38, 38, 0.04) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 4px;
  overflow: hidden;
}

.ecg-trace-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ecg-path-pulse {
  stroke: #EF4444;
  stroke-width: 2.2;
  fill: none;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: ecgSweep 3.5s ease-in-out infinite;
}

@keyframes ecgSweep {
  0% { stroke-dashoffset: 800; opacity: 0.8; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -800; opacity: 0.8; }
}

.ecg-scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, #EF4444, transparent);
  box-shadow: 0 0 12px #EF4444;
  animation: scanlineMove 3.5s linear infinite;
}

@keyframes scanlineMove {
  0% { left: 0%; opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Alert Tier Dials */
.alert-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.alert-tier-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.65rem 0.6rem;
  text-align: center;
}

.tier-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.2rem;
}

.tier-val {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  display: block;
}

.tier-sub {
  font-size: 0.65rem;
  color: rgba(253, 251, 239, 0.6);
  display: block;
}

.tier-red {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.08);
}
.tier-red .tier-label { color: #EF4444; }
.tier-red .tier-val { color: #FCA5A5; }

.tier-orange {
  border-color: rgba(234, 88, 12, 0.35);
  background: rgba(234, 88, 12, 0.08);
}
.tier-orange .tier-label { color: #FB923C; }
.tier-orange .tier-val { color: #FED7AA; }

.tier-yellow {
  border-color: rgba(202, 138, 4, 0.35);
  background: rgba(202, 138, 4, 0.08);
}
.tier-yellow .tier-label { color: #FACC15; }
.tier-yellow .tier-val { color: #FEF08A; }

/* Compact Hero Panel Size */
.hero-visual .vis-display-panel {
  max-width: 520px;
  padding: 1.15rem;
}
