:host {
    display: block;
    min-width: 0;
    --system-status-card-bg: var(--p-content-background);
    --system-status-card-border: var(--p-content-border-color);
    --system-status-card-divider: var(--p-surface-100);
}

:host-context(.p-dark) {
    --system-status-card-bg: color-mix(in srgb, var(--p-surface-900) 92%, var(--p-surface-950) 8%);
    --system-status-card-border: color-mix(in srgb, var(--p-surface-700) 82%, var(--p-surface-600) 18%);
    --system-status-card-divider: var(--p-surface-800);
}

:host(.system-status-card-host--wide) {
    grid-column: 1 / -1;
}

.system-status-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    border: 1px solid var(--system-status-card-border);
    border-radius: 8px;
    background: var(--system-status-card-bg);
    overflow: hidden;
}

.system-status-card__header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 1.05rem;
    border-bottom: 1px solid var(--system-status-card-divider);
}

.system-status-card__title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
}

.system-status-card h2 {
    margin: 0;
    color: var(--p-text-color);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 750;
}

.system-status-card__tools {
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.system-status-card__metric {
    display: grid;
    gap: 0.2rem;
    justify-items: end;
    min-width: 7rem;
}

.system-status-card__metric span {
    color: var(--p-text-muted-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.system-status-card__metric strong {
    color: var(--p-text-color);
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 750;
}

.system-status-card__body {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.05rem;
}

.system-status-card__action {
    display: flex;
    justify-content: flex-end;
    padding: 0.85rem 1.05rem;
    border-top: 1px solid var(--system-status-card-divider);
}

@media (max-width: 760px) {
    .system-status-card__header {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .system-status-card__tools {
        flex-wrap: wrap;
        justify-content: flex-end;
        margin-left: auto;
    }
}
