This is a complex dashboard request for hospital climate resilience. Let me break down the key components:
- HVAC Redundancy - Monitoring HVAC systems, backup systems, failover status, temperature zones
- Medication Cold Chain Integrity - Temperature monitoring for medications/vaccines, cold storage status, alerts for temperature excursions
- Patient Evacuation Triggers - Weather events, infrastructure failures, evacuation status, patient capacity
This needs to be a professional, data-rich dashboard with:
- Real-time monitoring feel
- Clear visual hierarchy
- Interactive elements
- Professional medical/industrial aesthetic
- Multiple dynamic elements (animations, charts, status indicators)
Design approach:
- Dark theme for command center feel (common in monitoring dashboards)
- Color coding: Green (normal), Amber/Yellow (warning), Red (critical), Blue (info)
- Grid-based layout
- Clear typography with monospace for data
- Animated status indicators
- Interactive elements for toggling views
I'll create:
- Header with system status and timestamp
- HVAC panel with redundancy status, zone temperatures, backup systems
- Cold chain panel with storage units, temperature graphs, alerts
- Evacuation panel with triggers, patient counts, risk levels
- Overall resilience score
- Animated alerts/notifications
- Interactive elements for drill-down
Let me code this properly with good structure and meaningful interactions.
Hospital Climate Resilience Dashboard
This is a comprehensive command interface for monitoring hospital infrastructure during climate events. The design uses a dark command-center aesthetic with clear status indicators, real-time data visualization, and interactive controls.
Key Features:
- HVAC redundancy monitoring with failover simulation
- Medication cold chain integrity tracking with temperature visualization
- Patient evacuation triggers with risk assessment matrix
- Interactive alerts and drill-down capabilities
- Animated status indicators and data streams
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hospital Climate Resilience Command</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--bg-primary: #0a0e14;
--bg-secondary: #111820;
--bg-card: #151c26;
--border: #1e2a3a;
--text-primary: #e6edf3;
--text-muted: #7d8590;
--accent-cyan: #00d4ff;
--accent-green: #00ff88;
--accent-amber: #ffb800;
--accent-red: #ff4757;
--accent-purple: #a855f7;
}
* {
box-sizing: border-box;
}
body {
font-family: 'Space Grotesk', sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
min-height: 100vh;
margin: 0;
}
.mono {
font-family: 'JetBrains Mono', monospace;
}
.bg-grid {
background-image:
linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
background-size: 40px 40px;
}
.card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 8px;
}
.glow-cyan {
box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}
.glow-red {
box-shadow: 0 0 20px rgba(255, 71, 87, 0.3);
}
.glow-green {
box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}
.pulse-dot {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.5; transform: scale(1.2); }
}
.scan-line {
position: relative;
overflow: hidden;
}
.scan-line::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
animation: scan 3s linear infinite;
}
@keyframes scan {
0% { top: 0; opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { top: 100%; opacity: 0; }
}
.status-indicator {
width: 10px;
height: 10px;
border-radius: 50%;
}
.status-normal {
background: var(--accent-green);
box-shadow: 0 0 8px var(--accent-green);
}
.status-warning {
background: var(--accent-amber);
box-shadow: 0 0 8px var(--accent-amber);
}
.status-critical {
background: var(--accent-red);
box-shadow: 0 0 8px var(--accent-red);
animation: blink 1s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.progress-bar {
height: 6px;
background: var(--bg-secondary);
border-radius: 3px;
overflow: hidden;
}
.progress-fill {
height: 100%;
border-radius: 3px;
transition: width 0.5s ease;
}
.temp-gauge {
position: relative;
height: 120px;
background: linear-gradient(to top,
var(--accent-cyan) 0%,
var(--accent-green) 30%,
var(--accent-amber) 70%,
var(--accent-red) 100%);
border-radius: 6px;
width: 20px;
}
.temp-marker {
position: absolute;
left: -8px;
right: -8px;
height: 3px;
background: white;
box-shadow: 0 0 6px rgba(255,255,255,0.8);
transition: bottom 0.3s ease;
}
.chart-line {
stroke-dasharray: 1000;
stroke-dashoffset: 1000;
animation: draw 2s ease forwards;
}
@keyframes draw {
to { stroke-dashoffset: 0; }
}
.fade-in {
animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.btn {
padding: 8px 16px;
border-radius: 6px;
font-weight: 600;
font-size: 13px;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid transparent;
}
.btn:focus-visible {
outline: 2px solid var(--accent-cyan);
outline-offset: 2px;
}
.btn-primary {
background: var(--accent-cyan);
color: var(--bg-primary);
}
.btn-primary:hover {
background: #00b8e6;
transform: translateY(-1px);
}
.btn-danger {
background: var(--accent-red);
color: white;
}
.btn-danger:hover {
background: #e63e4c;
transform: translateY(-1px);
}
.btn-outline {
background: transparent;
border-color: var(--border);
color: var(--text-primary);
}
.btn-outline:hover {
border-color: var(--accent-cyan);
color: var(--accent-cyan);
}
.zone-card {
transition: all 0.3s ease;
}
.zone-card:hover {
border-color: var(--accent-cyan);
transform: translateY(-2px);
}
.evacuation-level {
padding: 4px 12px;
border-radius: 4px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.alert-banner {
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from { transform: translateX(-100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
.tooltip {
position: absolute;
background: var(--bg-secondary);
border: 1px solid var(--border);
padding: 8px 12px;
border-radius: 6px;
font-size: 12px;
z-index: 100;
pointer-events: none;
opacity: 0;
transition: opacity 0.2s;
}
[data-tooltip]:hover .tooltip {
opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
.scrollbar-thin::-webkit-scrollbar {
width: 6px;
}
.scrollbar-thin::-webkit-scrollbar-track {
background: var(--bg-secondary);
}
.scrollbar-thin::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
</style>
</head>
<body class="bg-grid">
<div id="app" class="min-h-screen">
<!-- Header -->
<header class="border-b border-[#1e2a3a] bg-[#111820]/90 backdrop-blur-sm sticky top-0 z-50">
<div class="max-w-[1600px] mx-auto px-4 py-3 flex items-center justify-between">
<div class="flex items-center gap-4">
<div class="flex items-center gap-3">
<svg class="w-8 h-8 text-[#00d4ff]" viewBox="0 0 32 32" fill="none">
<rect x="2" y="12" width="28" height="18" rx="2" stroke="currentColor" stroke-width="2"/>
<path d="M16 6V12M12 6H20" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<rect x="6" y="16" width="6" height="6" rx="1" fill="currentColor" opacity="0.5"/>
<rect x="14" y="16" width="4" height="10" rx="1" fill="currentColor"/>
<rect x="20" y="16" width="6" height="6" rx="1" fill="currentColor" opacity="0.5"/>
</svg>
<div>
<h1 class="text-lg font-bold tracking-tight">Climate Resilience Command</h1>
<p class="text-xs text-[#7d8590] mono">METROPOLITAN GENERAL HOSPITAL</p>
</div>
</div>
</div>
<div class="flex items-center gap-6">
<div class="flex items-center gap-2">
<div class="status-indicator status-normal pulse-dot"></div>
<span class="text-sm text-[#7d8590]">System Online</span>
</div>
<div class="h-6 w-px bg-[#1e2a3a]"></div>
<div class="text-right">
<div class="mono text-sm" id="current-time">--:--:--</div>
<div class="text-xs text-[#7d8590]" id="current-date">--</div>
</div>
<div class="h-6 w-px bg-[#1e2a3a]"></div>
<button id="alert-btn" class="btn btn-outline flex items-center gap-2" aria-label="View alerts">
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/>
<path d="M13.73 21a2 2 0 0 1-3.46 0"/>
</svg>
<span id="alert-count">3</span>
</button>
</div>
</div>
</header>
<!-- Alert Banner -->
<div id="alert-banner" class="hidden bg-[#ff4757]/10 border-b border-[#ff4757]/30">
<div class="max-w-[1600px] mx-auto px-4 py-3 flex items-center justify-between">
<div class="flex items-center gap-3">
<svg class="w-5 h-5 text-[#ff4757]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<line x1="12" y1="8" x2="12" y2="12"/>
<line x1="12" y1="16" x2="12.01" y2="16"/>
</svg>
<span class="font-medium">EVACUATION PROTOCOL STANDBY</span>
<span class="text-[#7d8590]">— External temperature exceeding safe thresholds</span>
</div>
<button id="dismiss-alert" class="text-[#7d8590] hover:text-white transition-colors" aria-label="Dismiss alert">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="18" y1="6" x2="6" y2="18"/>
<line x1="6" y1="6" x2="18" y2="18"/>
</svg>
</button>
</div>
</div>
<!-- Main Content -->
<main class="max-w-[1600px] mx-auto p-4">
<!-- Top Stats Row -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
<div class="card p-4 glow-cyan">
<div class="flex items-center justify-between mb-2">
<span class="text-[#7d8590] text-sm">Resilience Score</span>
<svg class="w-4 h-4 text-[#00d4ff]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
</svg>
</div>
<div class="text-3xl font-bold text-[#00ff88] mono" id="resilience-score">87</div>
<div class="text-xs text-[#7d8590] mt-1">+3 from last hour</div>
</div>
<div class="card p-4">
<div class="flex items-center justify-between mb-2">
<span class="text-[#7d8590] text-sm">HVAC Units Active</span>
<svg class="w-4 h-4 text-[#00d4ff]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83"/>
</svg>
</div>
<div class="text-3xl font-bold mono">14<span class="text-lg text-[#7d8590]">/16</span></div>
<div class="text-xs text-[#ffb800] mt-1">2 on backup power</div>
</div>
<div class="card p-4">
<div class="flex items-center justify-between mb-2">
<span class="text-[#7d8590] text-sm">Cold Chain Status</span>
<svg class="w-4 h-4 text-[#00ff88]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<path d="M3 9h18M9 21V9"/>
</svg>
</div>
<div class="text-3xl font-bold text-[#00ff88] mono">98.2<span class="text-lg">%</span></div>
<div class="text-xs text-[#7d8590] mt-1">All units within range</div>
</div>
<div class="card p-4">
<div class="flex items-center justify-between mb-2">
<span class="text-[#7d8590] text-sm">Evacuation Status</span>
<svg class="w-4 h-4 text-[#ffb800]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"/>
<polyline points="16,17 21,12 16,7"/>
<line x1="21" y1="12" x2="9" y2="12"/>
</svg>
</div>
<div class="text-3xl font-bold text-[#ffb800] mono">STANDBY</div>
<div class="text-xs text-[#ffb800] mt-1">2 triggers approaching threshold</div>
</div>
</div>
<!-- Main Grid -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- HVAC Panel -->
<div class="lg:col-span-2">
<div class="card p-5 scan-line">
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-lg font-bold">HVAC Redundancy Matrix</h2>
<p class="text-sm text-[#7d8590]">Real-time climate control infrastructure</p>
</div>
<div class="flex gap-2">
<button class="btn btn-outline text-xs" id="hvac-failover-btn">
Simulate Failover
</button>
<button class="btn btn-primary text-xs">
Optimize
</button>
</div>
</div>
<!-- Zone Grid -->
<div class="grid grid-cols-2 md:grid-cols-4 gap-3 mb-5">
<div class="zone-card card p-3" data-zone="er">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[#7d8590]">ER / TRAUMA</span>
<div class="status-indicator status-normal"></div>
</div>
<div class="text-xl font-bold mono">21.4°C</div>
<div class="flex items-center gap-2 mt-2">
<span class="text-xs text-[#00d4ff]">Primary Active</span>
<span class="text-xs text-[#7d8590]">| Backup Ready</span>
</div>
<div class="progress-bar mt-2">
<div class="progress-fill bg-[#00ff88]" style="width: 92%"></div>
</div>
</div>
<div class="zone-card card p-3" data-zone="icu">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[#7d8590]">ICU</span>
<div class="status-indicator status-warning"></div>
</div>
<div class="text-xl font-bold mono">23.8°C</div>
<div class="flex items-center gap-2 mt-2">
<span class="text-xs text-[#ffb800]">Backup Active</span>
<span class="text-xs text-[#7d8590]">| Primary Down</span>
</div>
<div class="progress-bar mt-2">
<div class="progress-fill bg-[#ffb800]" style="width: 67%"></div>
</div>
</div>
<div class="zone-card card p-3" data-zone="surgery">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[#7d8590]">SURGERY</span>
<div class="status-indicator status-normal"></div>
</div>
<div class="text-xl font-bold mono">20.1°C</div>
<div class="flex items-center gap-2 mt-2">
<span class="text-xs text-[#00d4ff]">Dual Active</span>
<span class="text-xs text-[#00ff88]">| Full Redundancy</span>
</div>
<div class="progress-bar mt-2">
<div class="progress-fill bg-[#00ff88]" style="width: 100%"></div>
</div>
</div>
<div class="zone-card card p-3" data-zone="pharmacy">
<div class="flex items-center justify-between mb-2">
<span class="text-xs font-medium text-[#7d8590]">PHARMACY</span>
<div class="status-indicator status-normal"></div>
</div>
<div class="text-xl font-bold mono">18.2°C</div>
<div class="flex items-center gap-2 mt-2">
<span class="text-xs text-[#00d4ff]">Primary Active</span>
<span class="text-xs text-[#7d8590]">| Backup Ready</span>
</div>
<div class="progress-bar mt-2">
<div class="progress-fill bg-[#00ff88]" style="width: 88%"></div>
</div>
</div>
</div>
<!-- Temperature Trend -->
<div class="mb-4">
<div class="flex items-center justify-between mb-3">
<span class="text-sm font-medium">24-Hour Temperature Trend</span>
<div class="flex gap-4 text-xs">
<span class="flex items-center gap-1"><span class="w-3 h-0.5 bg-[#00d4ff]"></span> ICU</span>
<span class="flex items-center gap-1"><span class="w-3 h-0.5 bg-[#00ff88]"></span> Surgery</span>
<span class="flex items-center gap-1"><span class="w-3 h-0.5 bg-[#ffb800]"></span> ER</span>
</div>
</div>
<svg id="temp-chart" viewBox="0 0 600 120" class="w-full" aria-label="Temperature trend chart">
<!-- Grid lines -->
<defs>
<pattern id="grid" width="25" height="20" patternUnits="userSpaceOnUse">
<path d="M 25 0 L 0 0 0 20" fill="none" stroke="#1e2a3a" stroke-width="0.5"/>
</pattern>
</defs>
<rect width="600" height="120" fill="url(#grid)"/>
<!-- Safe zone -->
<rect x="0" y="30" width="600" height="60" fill="#00ff88" opacity="0.05"/>
<!-- Temperature lines -->
<path id="icu-line" class="chart-line" d="" fill="none" stroke="#00d4ff" stroke-width="2"/>
<path id="surgery-line" class="chart-line" d="" fill="none" stroke="#00ff88" stroke-width="2"/>
<path id="er-line" class="chart-line" d="" fill="none" stroke="#ffb800" stroke-width="2"/>
<!-- Labels -->
<text x="0" y="10" fill="#7d8590" font-size="10" font-family="JetBrains Mono">28°C</text>
<text x="0" y="65" fill="#00ff88" font-size="10" font-family="JetBrains Mono">22°C SAFE</text>
<text x="0" y="115" fill="#7d8590" font-size="10" font-family="JetBrains Mono">16°C</text>
</svg>
</div>
<!-- Power Status -->
<div class="grid grid-cols-2 gap-4">
<div class="bg-[#111820] rounded-lg p-3">
<div class="text-xs text-[#7d8590] mb-2">Power Source</div>
<div class="flex items-center gap-3">
<svg class="w-8 h-8 text-[#00ff88]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/>
</svg>
<div>
<div class="font-bold">Grid Primary</div>
<div class="text-xs text-[#00ff88]">99.8% Uptime</div>
</div>
</div>
</div>
<div class="bg-[#111820] rounded-lg p-3">
<div class="text-xs text-[#7d8590] mb-2">Backup Generators</div>
<div class="flex items-center gap-3">
<svg class="w-8 h-8 text-[#00d4ff]" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="6" width="20" height="12" rx="2"/>
<path d="M6 12h4M14 12h4"/>
</svg>
<div>
<div class="font-bold">4 / 4 Ready</div>
<div class="text-xs text-[#00d4ff]">48hr fuel reserve</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Cold Chain Panel -->
<div class="card p-5">
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-lg font-bold">Cold Chain Integrity</h2>
<p class="text-sm text-[#7d8590]">Medication storage monitoring</p>
</div>
<button class="btn btn-outline text-xs" id="add-storage-btn">
+ Add Unit
</button>
</div>
<div class="space-y-3 max-h-[400px] overflow-y-auto scrollbar-thin pr-2" id="cold-chain-list">
<!-- Populated by JS -->
</div>
<!-- Cold Chain Summary -->
<div class="mt-4 pt-4 border-t border-[#1e2a3a]">
<div class="grid grid-cols-3 gap-3 text-center">
<div>
<div class="text-2xl font-bold text-[#00ff88] mono" id="units-normal">8</div>
<div class="text-xs text-[#7d8590]">Normal</div>
</div>
<div>
<div class="text-2xl font-bold text-[#ffb800] mono" id="units-warning">1</div>
<div class="text-xs text-[#7d8590]">Warning</div>
</div>
<div>
<div class="text-2xl font-bold text-[#ff4757] mono" id="units-critical">0</div>
<div class="text-xs text-[#7d8590]">Critical</div>
</div>
</div>
</div>
</div>
</div>
<!-- Evacuation Panel -->
<div class="mt-6">
<div class="card p-5">
<div class="flex items-center justify-between mb-5">
<div>
<h2 class="text-lg font-bold">Patient Evacuation Triggers</h2>
<p class="text-sm text-[#7d8590]">Climate event response protocol</p>
</div>
<div class="flex gap-2">
<button class="btn btn-outline text-xs" id="drill-btn">
Run Drill
</button>
<button class="btn btn-danger text-xs" id="evacuate-btn">
Initiate Evacuation
</button>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<!-- Trigger Cards -->
<div class="bg-[#111820] rounded-lg p-4 border border-[#1e2a3a]" data-trigger="ambient">
<div class="flex items-center justify-between mb-3">
<span class="text-sm font-medium">Ambient Temperature</span>
<span class="evacuation-level bg-[#ffb800]/20 text-[#ffb800]">MONITOR</span>
</div>
<div class="text-3xl font-bold mono mb-2">38.2°C</div>
<div class="text-xs text-[#7d8590] mb-3">Threshold: 40°C</div>
<div class="progress-bar">
<div class="progress-fill bg-[#ffb800]" style="width: 91%"></div>
</div>
<div class="text-xs text-[#ffb800] mt-2">91% to threshold</div>
</div>
<div class="bg-[#111820] rounded-lg p-4 border border-[#1e2a3a]" data-trigger="power">
<div class="flex items-center justify-between mb-3">
<span class="text-sm font-medium">Power Stability</span>
<span class="evacuation-level bg-[#00ff88]/20 text-[#00ff88]">NOMINAL</span>
</div>
<div class="text-3xl font-bold mono mb-2">99.8%</div>
<div class="text-xs text-[#7d8590] mb-3">Threshold: 85%</div>
<div class="progress-bar">
<div class="progress-fill bg-[#00ff88]" style="width: 15%"></div>
</div>
<div class="text-xs text-[#00ff88] mt-2">15% to threshold</div>
</div>
<div class="bg-[#111820] rounded-lg p-4 border border-[#1e2a3a]" data-trigger="hvac">
<div class="flex items-center justify-between mb-3">
<span class="text-sm font-medium">HVAC Capacity</span>
<span class="evacuation-level bg-[#ffb800]/20 text-[#ffb800]">CAUTION</span>
</div>
<div class="text-3xl font-bold mono mb-2">78%</div>
<div class="text-xs text-[#7d8590] mb-3">Threshold: 60%</div>
<div class="progress-bar">
<div class="progress-fill bg-[#ffb800]" style="width: 55%"></div>
</div>
<div class="text-xs text-[#ffb800] mt-2">55% to threshold</div>
</div>
<div class="bg-[#111820] rounded-lg p-4 border border-[#1e2a3a]" data-trigger="water">
<div class="flex items-center justify-between mb-3">
<span class="text-sm font-medium">Water Supply</span>
<span class="evacuation-level bg-[#00ff88]/20 text-[#00ff88]">NOMINAL</span>
</div>
<div class="text-3xl font-bold mono mb-2">100%</div>
<div class="text-xs text-[#7d8590] mb-3">Threshold: 75%</div>
<div class="progress-bar">
<div class="progress-fill bg-[#00ff88]" style="width: 0%"></div>
</div>
<div class="text-xs text-[#00ff88] mt-2">0% to threshold</div>
</div>
</div>
<!-- Evacuation Zones -->
<div class="mt-6">
<h3 class="text-sm font-bold mb-3">Evacuation Priority Zones</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="bg-[#ff4757]/10 border border-[#ff4757]/30 rounded-lg p-4">
<div class="flex items-center gap-2 mb-2">
<span class="text-xs font-bold text-[#ff4757]">PRIORITY 1</span>
<span class="text-xs text-[#7d8590]">Immediate</span>
</div>
<div class="text-lg font-bold mb-1">ICU / Critical Care</div>
<div class="flex items-center justify-between">
<span class="text-2xl font-bold mono">24</span>
<span class="text-xs text-[#7d8590]">patients</span>
</div>
</div>
<div class="bg-[#ffb800]/10 border border-[#ffb800]/30 rounded-lg p-4">
<div class="flex items-center gap-2 mb-2">
<span class="text-xs font-bold text-[#ffb800]">PRIORITY 2</span>
<span class="text-xs text-[#7d8590]">Secondary</span>
</div>
<div class="text-lg font-bold mb-1">Surgery / Recovery</div>
<div class="flex items-center justify-between">
<span class="text-2xl font-bold mono">18</span>
<span class="text-xs text-[#7d8590]">patients</span>
</div>
</div>
<div class="bg-[#00d4ff]/10 border border-[#00d4ff]/30 rounded-lg p-4">
<div class="flex items-center gap-2 mb-2">
<span class="text-xs font-bold text-[#00d4ff]">PRIORITY 3</span>
<span class="text-xs text-[#7d8590]">Standard</span>
</div>
<div class="text-lg font-bold mb-1">General / Pediatrics</div>
<div class="flex items-center justify-between">
<span class="text-2xl font-bold mono">156</span>
<span class="text-xs text-[#7d8590]">patients</span>
</div>
</div>
</div>
</div>
<!-- Transport Status -->
<div class="mt-6 grid grid-cols-1 md:grid-cols-4 gap-4">
<div class="bg-[#111820] rounded-lg p-3">
<div class="text-xs text-[#7d8590] mb-1">Ambulances Ready</div>
<div class="text-xl font-bold mono text-[#00ff88]">12</div>
</div>
<div class="bg-[#111820] rounded-lg p-3">
<div class="text-xs text-[#7d8590] mb-1">Partner Hospitals</div>
<div class="text-xl font-bold mono">4</div>
</div>
<div class="bg-[#111820] rounded-lg p-3">
<div class="text-xs text-[#7d8590] mb-1">Total Beds Available</div>
<div class="text-xl font-bold mono text-[#00d4ff]">89</div>
</div>
<div class="bg-[#111820] rounded-lg p-3">
<div class="text-xs text-[#7d8590] mb-1">Est. Full Evac Time</div>
<div class="text-xl font-bold mono">4.5<span class="text-sm text-[#7d8590]">hrs</span></div>
</div>
</div>
</div>
</div>
<!-- Activity Log -->
<div class="mt-6 card p-5">
<div class="flex items-center justify-between mb-4">
<h2 class="text-lg font-bold">System Activity Log</h2>
<button class="btn btn-outline text-xs">Export Log</button>
</div>
<div class="space-y-2 max-h-[200px] overflow-y-auto scrollbar-thin" id="activity-log">
<!-- Populated by JS -->
</div>
</div>
</main>
<!-- Modal -->
<div id="modal" class="fixed inset-0 bg-black/70 backdrop-blur-sm z-50 hidden items-center justify-center" role="dialog" aria-modal="true">
<div class="card p-6 max-w-md w-full mx-4 glow-cyan">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-bold" id="modal-title">Modal Title</h3>
<button id="modal-close" class="text-[#7d8590] hover:text-white" aria-label="Close modal">
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="18" y1="6" x2="6" y2="18"/>
<line x1="6" y1="6" x2="18" y2="18"/>
</svg>
</button>
</div>
<div id="modal-content">
<!-- Dynamic content -->
</div>
</div>
</div>
</div>
<script>
// Data
const coldChainUnits = [
{ id: 1, name: 'Vaccine Storage A', temp: -20.2, min: -25, max: -15, status: 'normal', medication: 'mRNA Vaccines' },
{ id: 2, name: 'Blood Bank Primary', temp: 4.1, min: 2, max: 6, status: 'normal', medication: 'Blood Products' },
{ id: 3, name: 'Insulin Storage', temp: 5.2, min: 2, max: 8, status: 'normal', medication: 'Insulin' },
{ id: 4, name: 'Chemotherapy Unit', temp: 3.8, min: 2, max: 8, status: 'normal', medication: 'Chemotherapy' },
{ id: 5, name: 'Biologics Freezer', temp: -78.5, min: -86, max: -70, status: 'normal', medication: 'Biologics' },
{ id: 6, name: 'Antibiotics Storage', temp: 7.8, min: 2, max: 8, status: 'warning', medication: 'IV Antibiotics' },
{ id: 7, name: 'Vaccine Storage B', temp: -21.1, min: -25, max: -15, status: 'normal', medication: 'Vaccines' },
{ id: 8, name: 'Lab Specimens', temp: -80.2, min: -86, max: -70, status: 'normal', medication: 'Specimens' },
{ id: 9, name: 'Emergency Meds', temp: 4.5, min: 2, max: 8, status: 'normal', medication: 'Emergency Stock' },
];
const activityLog = [
{ time: '14:32:15', type: 'info', message: 'HVAC Zone ICU switched to backup unit' },
{ time: '14:28:03', type: 'warning', message: 'Ambient temperature alert: 38.2°C detected' },
{ time: '14:15:22', type: 'info', message: 'Cold chain check completed - all units nominal' },
{ time: '14:00:00', type: 'info', message: 'Hourly system health check completed' },
{ time: '13:45:11', type: 'success', message: 'Backup generator test passed - 4/4 units ready' },
{ time: '13:30:00', type: 'info', message: 'External weather alert: Heat advisory in effect' },
{ time: '13:15:44', type: 'warning', message: 'Antibiotics Storage approaching upper threshold' },
{ time: '13:00:00', type: 'info', message: 'Shift handoff protocol initiated' },
];
const tempData = {
icu: [22, 22.5, 23, 23.2, 23.8, 24, 23.5, 23.8, 24, 23.8, 23.5, 23.8],
surgery: [20, 20.2, 20.1, 20, 20.3, 20.1, 20, 20.2, 20.1, 20, 20.1, 20.1],
er: [21, 21.2, 21.5, 21.8, 22, 21.5, 21.8, 22, 21.5, 21.8, 21.4, 21.4]
};
// DOM Elements
const modal = document.getElementById('modal');
const modalTitle = document.getElementById('modal-title');
const modalContent = document.getElementById('modal-content');
const modalClose = document.getElementById('modal-close');
const coldChainList = document.getElementById('cold-chain-list');
const activityLogEl = document.getElementById('activity-log');
const alertBtn = document.getElementById('alert-btn');
const alertBanner = document.getElementById('alert-banner');
const dismissAlert = document.getElementById('dismiss-alert');
const evacuateBtn = document.getElementById('evacuate-btn');
const drillBtn = document.getElementById('drill-btn');
const hvacFailoverBtn = document.getElementById('hvac-failover-btn');
const addStorageBtn = document.getElementById('add-storage-btn');
// Initialize
function init() {
updateTime();
setInterval(updateTime, 1000);
renderColdChain();
renderActivityLog();
renderTempChart();
setupEventListeners();
// Staggered entrance animation
document.querySelectorAll('.card').forEach((card, i) => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
setTimeout(() => {
card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
card.style.opacity = '1';
card.style.transform = 'translateY(0)';
}, i * 100);
});
}
function updateTime() {
const now = new Date();
document.getElementById('current-time').textContent = now.toLocaleTimeString('en-US', { hour12: false });
document.getElementById('current-date').textContent = now.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric' });
}
function renderColdChain() {
coldChainList.innerHTML = coldChainUnits.map(unit => {
const statusClass = unit.status === 'normal' ? 'status-normal' :
unit.status === 'warning' ? 'status-warning' : 'status-critical';
const tempColor = unit.status === 'normal' ? '#00ff88' :
unit.status === 'warning' ? '#ffb800' : '#ff4757';
return `
<div class="bg-[#111820] rounded-lg p-3 border border-[#1e2a3a] hover:border-[#00d4ff] transition-colors cursor-pointer" data-unit-id="${unit.id}">
<div class="flex items-center justify-between mb-2">
<span class="text-sm font-medium">${unit.name}</span>
<div class="status-indicator ${statusClass}"></div>
</div>
<div class="flex items-end justify-between">
<div>
<div class="text-xl font-bold mono" style="color: ${tempColor}">${unit.temp}°C</div>
<div class="text-xs text-[#7d8590]">Range: ${unit.min}°C to ${unit.max}°C</div>
</div>
<div class="text-xs text-[#7d8590] text-right">${unit.medication}</div>
</div>
</div>
`;
}).join('');
// Update summary counts
const normal = coldChainUnits.filter(u => u.status === 'normal').length;
const warning = coldChainUnits.filter(u => u.status === 'warning').length;
const critical = coldChainUnits.filter(u => u.status === 'critical').length;
document.getElementById('units-normal').textContent = normal;
document.getElementById('units-warning').textContent = warning;
document.getElementById('units-critical').textContent = critical;
}
function renderActivityLog() {
activityLogEl.innerHTML = activityLog.map(entry => {
const iconColor = entry.type === 'warning' ? '#ffb800' :
entry.type === 'success' ? '#00ff88' :
entry.type === 'error' ? '#ff4757' : '#00d4ff';
return `
<div class="flex items-start gap-3 p-2 rounded hover:bg-[#111820] transition-colors">
<span class="mono text-xs text-[#7d8590] whitespace-nowrap">${entry.time}</span>
<div class="w-2 h-2 rounded-full mt-1.5 flex-shrink-0" style="background: ${iconColor}"></div>
<span class="text-sm">${entry.message}</span>
</div>
`;
}).join('');
}
function renderTempChart() {
const chartWidth = 600;
const chartHeight = 120;
const padding = 10;
function tempToY(temp) {
// Map 16-28°C to chart height
const minTemp = 16;
const maxTemp = 28;
const range = maxTemp - minTemp;
const normalized = (temp - minTemp) / range;
return chartHeight - padding - (normalized * (chartHeight - 2 * padding));
}
function generatePath(data) {
const points = data.length;
const step = (chartWidth - 2 * padding) / (points - 1);
let path = '';
data.forEach((temp, i) => {
const x = padding + i * step;
const y = tempToY(temp);
path += (i === 0 ? 'M' : 'L') + ` ${x} ${y}`;
});
return path;
}
document.getElementById('icu-line').setAttribute('d', generatePath(tempData.icu));
document.getElementById('surgery-line').setAttribute('d', generatePath(tempData.surgery));
document.getElementById('er-line').setAttribute('d', generatePath(tempData.er));
}
function showModal(title, content) {
modalTitle.textContent = title;
modalContent.innerHTML = content;
modal.classList.remove('hidden');
modal.classList.add('flex');
modal.querySelector('button').focus();
}
function hideModal() {
modal.classList.add('hidden');
modal.classList.remove('flex');
}
function addLogEntry(type, message) {
const now = new Date();
const time = now.toLocaleTimeString('en-US', { hour12: false });
activityLog.unshift({ time, type, message });
renderActivityLog();
}
function setupEventListeners() {
// Modal close
modalClose.addEventListener('click', hideModal);
modal.addEventListener('click', (e) => {
if (e.target === modal) hideModal();
});
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') hideModal();
});
// Alert button
alertBtn.addEventListener('click', () => {
showModal('Active Alerts', `
<div class="space-y-3">
<div class="flex items-start gap-3 p-3 bg-[#ff4757]/10 border border-[#ff4757]/30 rounded-lg">
<svg class="w-5 h-5 text-[#ff4757] flex-shrink-0 mt-0.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<line x1="12" y1="8" x2="12" y2="12"/>
<line x1="12" y1="16" x2="12.01" y2="16"/>
</svg>
<div>
<div class="font-medium text-[#ff4757]">High Temperature Warning</div>
<div class="text-sm text-[#7d8590]">External ambient exceeding safe thresholds. Evacuation protocols on standby.</div>
</div>
</div>
<div class="flex items-start gap-3 p-3 bg-[#ffb800]/10 border border-[#ffb800]/30 rounded-lg">
<svg class="w-5 h-5 text-[#ffb800] flex-shrink-0 mt-0.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
<line x1="12" y1="9" x2="12" y2="13"/>
<line x1="12" y1="17" x2="12.01" y2="17"/>
</svg>
<div>
<div class="font-medium text-[#ffb800]">HVAC Capacity Degraded</div>
<div class="text-sm text-[#7d8590]">ICU zone running on backup. Primary unit requires maintenance.</div>
</div>
</div>
<div class="flex items-start gap-3 p-3 bg-[#ffb800]/10 border border-[#ffb800]/30 rounded-lg">
<svg class="w-5 h-5 text-[#ffb800] flex-shrink-0 mt-0.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<path d="M3 9h18M9 21V9"/>
</svg>
<div>
<div class="font-medium text-[#ffb800]">Cold Chain Warning</div>
<div class="text-sm text-[#7d8590]">Antibiotics Storage unit approaching upper temperature threshold.</div>
</div>
</div>
</div>
`);
});
// Alert banner
dismissAlert.addEventListener('click', () => {
alertBanner.classList.add('hidden');
});
// Evacuate button
evacuateBtn.addEventListener('click', () => {
showModal('Confirm Evacuation', `
<div class="space-y-4">
<div class="p-4 bg-[#ff4757]/10 border border-[#ff4757]/30 rounded-lg">
<p class="text-sm">This will initiate a full hospital evacuation protocol. All patients will be transferred to partner facilities.</p>
</div>
<div class="text-sm text-[#7d8590]">
<p><strong>Patients to evacuate:</strong> 198</p>
<p><strong>Estimated time:</strong> 4.5 hours</p>
<p><strong>Partner facilities notified:</strong> 4</p>
</div>
<div class="flex gap-3">
<button class="btn btn-danger flex-1" onclick="confirmEvacuation()">Confirm Evacuation</button>
<button class="btn btn-outline flex-1" onclick="hideModal()">Cancel</button>
</div>
</div>
`);
});
// Drill button
drillBtn.addEventListener('click', () => {
addLogEntry('info', 'Evacuation drill initiated - all systems checked');
showModal('Drill Initiated', `
<div class="text-center py-4">
<svg class="w-16 h-16 text-[#00d4ff] mx-auto mb-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
<path d="M9 12l2 2 4-4"/>
</svg>
<p class="text-lg font-medium">Evacuation Drill Started</p>
<p class="text-sm text-[#7d8590] mt-2">All systems operating normally. Staff have been notified.</p>
</div>
`);
});
// HVAC failover simulation
hvacFailoverBtn.addEventListener('click', () => {
const zoneCard = document.querySelector('[data-zone="surgery"]');
const indicator = zoneCard.querySelector('.status-indicator');
const statusText = zoneCard.querySelector('.text-xs.text-\\[\\#00d4ff\\]');
indicator.classList.remove('status-normal');
indicator.classList.add('status-warning');
statusText.textContent = 'Failover Test';
statusText.classList.remove('text-[#00d4ff]');
statusText.classList.add('text-[#ffb800]');
addLogEntry('warning', 'HVAC failover test initiated for Surgery zone');
setTimeout(() => {
indicator.classList.remove('status-warning');
indicator.classList.add('status-normal');
statusText.textContent = 'Dual Active';
statusText.classList.remove('text-[#ffb800]');
statusText.classList.add('text-[#00d4ff]');
addLogEntry('success', 'HVAC failover test completed - system restored');
}, 3000);
});
// Cold chain unit click
coldChainList.addEventListener('click', (e) => {
const unitCard = e.target.closest('[data-unit-id]');
if (unitCard) {
const unitId = parseInt(unitCard.dataset.unitId);
const unit = coldChainUnits.find(u => u.id === unitId);
if (unit) {
showModal(unit.name, `
<div class="space-y-4">
<div class="grid grid-cols-2 gap-4">
<div>
<div class="text-xs text-[#7d8590]">Current Temperature</div>
<div class="text-2xl font-bold mono" style="color: ${unit.status === 'normal' ? '#00ff88' : '#ffb800'}">${unit.temp}°C</div>
</div>
<div>
<div class="text-xs text-[#7d8590]">Status</div>
<div class="text-lg font-medium capitalize">${unit.status}</div>
</div>
</div>
<div class="p-3 bg-[#111820] rounded-lg">
<div class="text-xs text-[#7d8590] mb-2">Temperature Range</div>
<div class="flex items-center justify-between">
<span class="mono">${unit.min}°C</span>
<div class="flex-1 mx-4 h-2 bg-gradient-to-r from-[#00d4ff] via-[#00ff88] to-[#ff4757] rounded"></div>
<span class="mono">${unit.max}°C</span>
</div>
</div>
<div>
<div class="text-xs text-[#7d8590]">Contents</div>
<div class="font-medium">${unit.medication}</div>
</div>
<button class="btn btn-primary w-full">View History</button>
</div>
`);
}
}
});
// Zone cards hover effect
document.querySelectorAll('.zone-card').forEach(card => {
card.addEventListener('mouseenter', () => {
card.style.boxShadow = '0 0 20px rgba(0, 212, 255, 0.2)';
});
card.addEventListener('mouseleave', () => {
card.style.boxShadow = 'none';
});
});
}
function confirmEvacuation() {
hideModal();
addLogEntry('error', 'EVACUATION PROTOCOL INITIATED - All staff notified');
alertBanner.classList.remove('hidden');
alertBanner.classList.add('alert-banner');
// Update resilience score
const scoreEl = document.getElementById('resilience-score');
scoreEl.textContent = '42';
scoreEl.classList.remove('text-[#00ff88]');
scoreEl.classList.add('text-[#ff4757]');
}
// Simulate live data updates
function simulateDataUpdates() {
setInterval(() => {
// Update cold chain temperatures slightly
coldChainUnits.forEach(unit => {
const variance = (Math.random() - 0.5) * 0.2;
unit.temp = Math.round((unit.temp + variance) * 10) / 10;
// Check if still in range
if (unit.temp > unit.max || unit.temp < unit.min) {
unit.status = 'warning';
}
});
renderColdChain();
}, 5000);
// Update resilience score
setInterval(() => {
const score = 85 + Math.floor(Math.random() * 10);
document.getElementById('resilience-score').textContent = score;
}, 10000);
}
// Initialize on load
init();
simulateDataUpdates();
</script>
</body>
</html>
Key Features Explained
1. HVAC Redundancy Matrix
- Real-time monitoring of 4 critical zones (ER, ICU, Surgery, Pharmacy)
- Primary/Backup status indicators with visual health bars
- 24-hour temperature trend chart with SVG visualization
- Failover simulation button to test backup systems
- Power source monitoring with generator status
2. Cold Chain Integrity
- 9 medication storage units with individual temperature monitoring
- Visual status indicators (green/amber/red)
- Temperature range display with current readings
- Summary counts for normal/warning/critical units
- Click-through to detailed unit information
3. Evacuation Triggers
- 4 key climate triggers: Ambient Temperature, Power Stability, HVAC Capacity, Water Supply
- Progress bars showing proximity to thresholds
- Priority-based evacuation zones (ICU/Critical, Surgery, General)
- Transport resource status (ambulances, partner hospitals, beds)
- Drill mode for testing protocols
Interactive Elements
- Simulate Failover: Tests HVAC backup systems
- Run Drill: Initiates practice evacuation protocol
- Initiate Evacuation: Full evacuation confirmation flow
- Alert Panel: View all active system alerts
- Unit Details: Click any cold chain unit for detailed view
- Live Data Simulation: Temperature and scores update automatically
The dashboard uses a dark command-center aesthetic with cyan accents, clear typography hierarchy, and meaningful animations for status changes.