.system-health-page {
    --health-ok: #198754;
    --health-warning: #d97706;
    --health-critical: #dc3545;
    --health-unknown: #758195;
}

.system-health-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 24px;
    margin-bottom: 22px;
    border: 1px solid rgba(32, 48, 71, .08);
    border-radius: 18px;
    background: linear-gradient(135deg, #fff 0%, #f7f9fc 100%);
    box-shadow: 0 12px 34px rgba(32, 48, 71, .07);
}

.system-health-hero__status {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 210px;
}

.system-health-status-dot,
.system-health-check__status {
    display: inline-block;
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: var(--health-unknown);
    box-shadow: 0 0 0 5px rgba(117, 129, 149, .12);
}

.system-health-hero[data-overall="healthy"] .system-health-status-dot {
    background: var(--health-ok);
    box-shadow: 0 0 0 6px rgba(25, 135, 84, .12);
}

.system-health-hero[data-overall="warning"] .system-health-status-dot {
    background: var(--health-warning);
    box-shadow: 0 0 0 6px rgba(217, 119, 6, .13);
}

.system-health-hero[data-overall="critical"] .system-health-status-dot {
    background: var(--health-critical);
    box-shadow: 0 0 0 6px rgba(220, 53, 69, .13);
}

.system-health-hero__eyebrow {
    display: block;
    color: #7b8797;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.system-health-hero__status strong {
    color: #213047;
    font-size: 1.15rem;
}

.system-health-hero__counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.system-health-count {
    padding: 5px 10px;
    border-radius: 999px;
    color: #566276;
    background: #edf1f6;
    font-size: .78rem;
}

.system-health-count--critical strong { color: var(--health-critical); }
.system-health-count--warning strong { color: var(--health-warning); }
.system-health-count--healthy strong { color: var(--health-ok); }
.system-health-count--unknown strong { color: var(--health-unknown); }

.system-health-hero__time {
    margin-left: auto;
    color: #7b8797;
    font-size: .78rem;
    white-space: nowrap;
}

.system-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.system-health-card {
    overflow: hidden;
    border: 1px solid rgba(32, 48, 71, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(32, 48, 71, .06);
}

.system-health-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
    border-bottom: 1px solid #edf0f4;
}

.system-health-card__header h2 {
    margin: 0;
    color: #26364d;
    font-size: .98rem;
    font-weight: 750;
}

.system-health-card__icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #3468d4;
    background: #edf3ff;
}

.system-health-check {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) minmax(110px, auto);
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #f1f3f6;
}

.system-health-check:last-child {
    border-bottom: 0;
}

.system-health-check--healthy .system-health-check__status {
    background: var(--health-ok);
    box-shadow: none;
}

.system-health-check--warning .system-health-check__status {
    background: var(--health-warning);
    box-shadow: none;
}

.system-health-check--critical .system-health-check__status {
    background: var(--health-critical);
    box-shadow: none;
}

.system-health-check__content {
    min-width: 0;
}

.system-health-check__content strong,
.system-health-check__content small {
    display: block;
}

.system-health-check__content strong {
    color: #2b384c;
    font-size: .86rem;
}

.system-health-check__content small {
    margin-top: 2px;
    overflow: hidden;
    color: #7a8596;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-health-check__summary {
    color: #536076;
    font-size: .8rem;
    font-weight: 650;
    text-align: right;
}

.system-health-refresh.is-loading i {
    animation: system-health-spin .8s linear infinite;
}

@keyframes system-health-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
    .system-health-grid { grid-template-columns: 1fr; }
    .system-health-hero { align-items: flex-start; flex-direction: column; }
    .system-health-hero__time { margin-left: 0; }
}

@media (max-width: 575.98px) {
    .system-health-check {
        grid-template-columns: 12px minmax(0, 1fr);
    }

    .system-health-check__summary {
        grid-column: 2;
        text-align: left;
    }
}
