/* System Health page + header status dot */
:root {
    --sh-ok: #10b981;
    --sh-warn: #f59e0b;
    --sh-bad: #ef4444;
    --sh-info: #94a3b8;
}
.sh-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--sh-info);
    flex: none;
}
.sh-dot.ok {
    background: var(--sh-ok);
}
.sh-dot.warn {
    background: var(--sh-warn);
}
.sh-dot.bad {
    background: var(--sh-bad);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* header summary dot */
.sh-header-dot {
    display: none;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.78rem;
}
.sh-header-dot.show {
    display: inline-flex;
}
.sh-header-dot .sh-dot {
    width: 12px;
    height: 12px;
}

.sh-section {
    margin-top: 24px;
}
.sh-section > h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sh-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    margin-top: 24px;
    flex-wrap: wrap;
}
.sh-banner .sh-dot {
    width: 18px;
    height: 18px;
}
.sh-banner.ok {
    border-left: 5px solid var(--sh-ok);
}
.sh-banner.warn {
    border-left: 5px solid var(--sh-warn);
}
.sh-banner.bad {
    border-left: 5px solid var(--sh-bad);
}
.sh-banner .sh-title {
    font-weight: 600;
    font-size: 1.05rem;
}
.sh-banner .sh-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.sh-banner .sh-spacer {
    flex: 1;
}

.sh-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.sh-card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 16px;
    min-width: 0;
}
.sh-card.bad {
    border-color: var(--sh-bad);
    background: rgba(239, 68, 68, 0.06);
}
.sh-card .sh-k {
    color: var(--text-secondary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sh-card .sh-v {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 4px 0;
}
.sh-card .sh-d {
    color: var(--text-secondary);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

/* mobile-friendly list of statuses */
.sh-dotlist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sh-dotlist li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.sh-dotlist li:last-child {
    border-bottom: none;
}
.sh-dotlist .sh-dot {
    margin-top: 5px;
}
.sh-dotlist .sh-name {
    font-weight: 600;
    font-size: 0.92rem;
}
.sh-dotlist .sh-desc {
    color: var(--text-secondary);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.sh-table-wrap {
    overflow-x: auto;
}
.sh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.sh-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-medium);
    white-space: nowrap;
}
.sh-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}
.sh-table td.sh-wrap {
    overflow-wrap: anywhere;
    min-width: 160px;
}
.sh-pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--bg-hover);
    color: var(--text-secondary);
}
.sh-pill.js {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}
.sh-pill.php {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}
.sh-pill.slow {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.sh-strips {
    display: grid;
    gap: 8px;
}
.sh-strip-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: center;
    font-size: 0.82rem;
}
.sh-strip {
    display: flex;
    gap: 2px;
}
.sh-strip i {
    flex: 1;
    height: 22px;
    border-radius: 3px;
    background: var(--border-light);
    min-width: 3px;
}
.sh-strip i.ok {
    background: var(--sh-ok);
}
.sh-strip i.warn {
    background: var(--sh-warn);
}
.sh-strip i.bad {
    background: var(--sh-bad);
}

.sh-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.sh-note {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 8px;
}
.sh-chart-box {
    position: relative;
    height: 280px;
}
.sh-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.8rem;
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 4px;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .sh-strip-row {
        grid-template-columns: 1fr;
    }
    .sh-banner {
        padding: 12px 14px;
    }
    .sh-header-dot span.sh-label {
        display: none;
    }
}
