/* ============================================================
   PATIENT VITAL SIGNS MONITOR — ICU Style
   ============================================================ */

/* ── Section header ── */
.vitals-monitor-section { background: rgba(0,0,0,0.15); border-radius: var(--radius-md); padding: 14px !important; }
.vitals-live-badge {
    margin-left: auto;
    font-size: 9px; font-weight: 800; letter-spacing: 1px;
    color: #4ADE80; animation: vitalPulse 1.4s ease-in-out infinite;
}
@keyframes vitalPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ── Emergency Alert Strip ── */
.vitals-alert-strip {
    padding: 7px 12px; border-radius: var(--radius-sm); margin-bottom: 10px;
    background: rgba(255,59,59,0.15); border: 1px solid rgba(255,59,59,0.4);
    color: #FF6B6B; font-size: 11px; font-weight: 700;
    animation: alertFlash 0.8s ease-in-out infinite alternate;
}
@keyframes alertFlash { from { border-color: rgba(255,59,59,0.3); } to { border-color: rgba(255,59,59,0.8); box-shadow: 0 0 12px rgba(255,59,59,0.3); } }

/* ── ECG Canvas ── */
.vitals-ecg-wrap {
    background: rgba(0,0,0,0.4); border-radius: var(--radius-sm);
    border: 1px solid rgba(74,222,128,0.12); overflow: hidden;
    margin-bottom: 12px; position: relative;
}
.ecg-canvas { width: 100% !important; display: block; }

/* ── Vitals Grid ── */
.vitals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

/* ── Vital Card ── */
.vital-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: var(--radius-sm);
    padding: 10px 10px 8px;
    display: flex; flex-direction: column; gap: 3px;
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.vital-card::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.03), transparent 70%);
    pointer-events: none;
}
.vital-card.sev-normal  { border-color: rgba(74,222,128,0.25); }
.vital-card.sev-warning { border-color: rgba(255,177,0,0.35); box-shadow: 0 0 10px rgba(255,177,0,0.08); }
.vital-card.sev-critical { border-color: rgba(255,59,59,0.45); box-shadow: 0 0 12px rgba(255,59,59,0.15); animation: cardPulse 1.2s ease infinite; }
@keyframes cardPulse { 0%,100% { box-shadow: 0 0 8px rgba(255,59,59,0.1); } 50% { box-shadow: 0 0 18px rgba(255,59,59,0.3); } }

.vc-icon { font-size: 14px; margin-bottom: 2px; }
.vc-body { display: flex; align-items: baseline; gap: 3px; }
.vc-value { font-size: 20px; font-weight: 800; color: var(--text-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.vital-card.sev-normal  .vc-value { color: #4ADE80; }
.vital-card.sev-warning .vc-value { color: #FFB100; }
.vital-card.sev-critical .vc-value { color: #FF6B6B; }
.vc-unit  { font-size: 9px; color: var(--text-muted); font-weight: 600; }
.vc-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 700; }

/* Mini progress bar */
.vc-bar-wrap {
    height: 3px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; margin-top: 3px;
}
.vc-bar {
    height: 100%; border-radius: 2px; width: 0%;
    transition: width 1s ease, background 0.5s ease;
}
.vital-card.sev-normal  .vc-bar { background: #4ADE80; }
.vital-card.sev-warning .vc-bar { background: #FFB100; }
.vital-card.sev-critical .vc-bar { background: #FF6B6B; }

.vc-status {
    font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}
.vital-card.sev-normal  .vc-status { color: #4ADE80; }
.vital-card.sev-warning .vc-status { color: #FFB100; }
.vital-card.sev-critical .vc-status { color: #FF6B6B; }

/* Heartbeat pulse ring on HR card */
#vc-hr.sev-normal::after {
    content: ''; position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #4ADE80;
    animation: heartPulse 1s ease-in-out infinite;
}
@keyframes heartPulse {
    0%   { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,0.6); }
    70%  { transform: scale(1.1); opacity: 0.8; box-shadow: 0 0 0 6px rgba(74,222,128,0); }
    100% { transform: scale(1); opacity: 1; }
}
#vc-hr.sev-critical::after { background: #FF6B6B; animation: heartPulse 0.6s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(255,59,59,0); }

/* ── Patient Status Summary ── */
.vitals-summary {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: var(--radius-sm);
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.06);
}
.vs-status-dot { font-size: 10px; animation: vitalPulse 1.4s ease-in-out infinite; }
.vs-status-text { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.vs-status-dot.normal   { color: #4ADE80; }
.vs-status-dot.warning  { color: #FFB100; animation-duration: 1s; }
.vs-status-dot.critical { color: #FF6B6B; animation-duration: 0.6s; }
