/* Ontario Health Dashboard - Modern Styling */

:root {
    --primary: #0066cc;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --critical: #8b0000;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --border: #dfe6e9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    opacity: 0.95;
    font-size: 1.1rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.card-header h2 {
    font-size: 1.5rem;
    color: var(--text);
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
}

.badge-live {
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Metric Cards */
.metric {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
}

.metric:hover {
    transform: translateX(4px);
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.metric-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
}

.status-low { 
    background: var(--success); 
    color: white; 
}

.status-moderate { 
    background: var(--warning); 
    color: var(--text); 
}

.status-high { 
    background: #ff7675; 
    color: white; 
}

.status-critical { 
    background: var(--critical); 
    color: white; 
}

.status-very-high {
    background: var(--danger);
    color: white;
}

/* Hospital Cards */
.hospital-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
}

.hospital-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.wait-time {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* Chart Container */
.chart-container {
    min-height: 300px;
    height: 400px;
    padding: 1rem;
    position: relative;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Source Note */
.source-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer a {
    color: #74b9ff;
    text-decoration: none;
}

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

#last-update {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 2rem;
    }
}


