/* Real-Time System Stats Dashboard CSS */
.sys-detail-card {
    margin-top: 16px;
    display: grid;
    gap: 16px;
}

#sys-status-badge {
    user-select: none;
    font-family: var(--md-sys-font-code);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sys-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--md-sys-color-success);
    box-shadow: 0 0 8px var(--md-sys-color-success);
    animation: sys-pulse 1.8s infinite;
}

/* Wide Timeline Chart */
.chart-card--wide {
    grid-column: 1 / -1;
}

.chart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.chart-axis-label {
    font-size: 10px;
    fill: var(--md-sys-color-on-surface-variant);
    font-family: var(--md-sys-font-code);
}

.chart-grid-line {
    stroke: var(--md-sys-color-surface-container-high);
    stroke-dasharray: 4 4;
    stroke-width: 1;
}

.chart-caption {
    font-size: 11px;
    color: var(--md-sys-color-on-surface-variant);
    text-align: center;
    margin-top: 6px;
    font-family: var(--md-sys-font-brand);
}

.metric__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0;
}

.metric__val-box {
    display: flex;
    align-items: center;
    min-width: 0;
}

.metric__badge {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--md-sys-font-code);
    padding: 2px 8px;
    border-radius: var(--md-radius-pill);
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    white-space: nowrap;
    flex-shrink: 0;
}

.metric__badge--warning {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.metric__badge--danger {
    background-color: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
}

.net-speed-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--md-sys-font-code);
    white-space: nowrap;
    overflow: hidden;
}

.net-up { color: var(--md-sys-color-primary); }
.net-down { color: var(--md-sys-color-success); }

.metric__track {
    position: relative;
    height: 8px;
    border-radius: var(--md-radius-pill);
    background-color: var(--md-sys-color-surface-container-high);
    overflow: hidden;
    margin: 6px 0;
}

.metric__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: var(--md-radius-pill);
    transition: width var(--md-transition-normal), left var(--md-transition-normal), background-color var(--md-transition-fast);
}

.metric__fill--primary { background-color: var(--md-sys-color-primary); }
.metric__fill--warning { background-color: var(--md-sys-color-secondary); }
.metric__fill--danger { background-color: var(--md-sys-color-error); }

.metric__fill--app {
    z-index: 2;
    background-color: var(--md-sys-color-success) !important;
    box-shadow: 0 0 6px var(--md-sys-color-success);
}

.metric__fill--tx { z-index: 1; background-color: var(--md-sys-color-primary); }
.metric__fill--rx { z-index: 1; background-color: var(--md-sys-color-success); }

@keyframes sys-pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}
