/**
 * SAM Status Dashboard CSS
 * Styles specific to the system status dashboard
 */

/* ===================================================================
   Status Badges
   =================================================================== */

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    display: inline-block;
}

/* These were hardcoded Bootstrap-4-era pastel triplets (bg + dark text +
   pastel border). Bootstrap 5.3 ships exactly the right primitives, and —
   unlike `.bg-light` / `.table-light` — it DOES redefine all three in its
   dark block. So expressing the badges in terms of them makes them
   theme-correct with no dark-mode rules of their own.

   Two of the three backgrounds are already byte-identical (`#fff3cd` IS
   --bs-warning-bg-subtle, `#f8d7da` IS --bs-danger-bg-subtle); the greens and
   the text/border tones shift slightly, from the Bootstrap 4 palette to the
   Bootstrap 5 one. Declared, and the right direction: they now match every
   other subtle badge in the app. */
.status-online {
    background-color: var(--bs-success-bg-subtle);
    color: var(--bs-success-text-emphasis);
    border: 1px solid var(--bs-success-border-subtle);
}

.status-degraded {
    background-color: var(--bs-warning-bg-subtle);
    color: var(--bs-warning-text-emphasis);
    border: 1px solid var(--bs-warning-border-subtle);
}

.status-offline {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text-emphasis);
    border: 1px solid var(--bs-danger-border-subtle);
}

/* ===================================================================
   Metric Cards
   =================================================================== */

.metric-card {
    background: var(--surface-tertiary);
    border-left: 4px solid var(--ncar-blue);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
}

.metric-card h6 {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.metric-card .value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

/* ===================================================================
   Tables
   =================================================================== */

.queue-table,
.filesystem-table,
.nodetype-table {
    font-size: 0.9rem;
}

/* ===================================================================
   Outage Cards
   =================================================================== */

.outage-card {
    border-left: 4px solid var(--bs-danger);
    margin-bottom: 1rem;
}

.outage-card.severity-critical {
    border-left-color: var(--bs-danger);
}

.outage-card.severity-major {
    border-left-color: var(--bs-orange);
}

.outage-card.severity-minor {
    border-left-color: var(--bs-warning);
}

.outage-card.severity-maintenance {
    border-left-color: var(--ncar-light-blue);
}

/* ===================================================================
   Reservation Cards
   =================================================================== */

.reservation-card {
    border-left: 4px solid var(--ncar-light-blue);
}

/* ===================================================================
   Status Severity Border Utilities
   Used to replace inline style="border-left: ..." attributes.
   !important matches Bootstrap's .border-start specificity.
   =================================================================== */

.border-status-success { border-left: 4px solid var(--bs-success) !important; }
.border-status-info    { border-left: 4px solid var(--bs-info) !important; }
.border-status-primary { border-left: 4px solid var(--bs-primary) !important; }
.border-status-warning { border-left: 4px solid var(--bs-warning) !important; }

/* ===================================================================
   Login Node Load Stack
   Three tightly-stacked micro progress bars (1min / 5min / 15min).
   When all three values are equal they read as a single bar.
   =================================================================== */

.load-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 80px;
}

.load-stack .progress {
    height: 5px;
    border-radius: 0;
    background-color: var(--surface-secondary);
    overflow: hidden;
}

.load-stack .progress:first-child {
    border-radius: 3px 3px 0 0;
}

.load-stack .progress:last-child {
    border-radius: 0 0 3px 3px;
}

.load-stack .progress-bar {
    transition: width 0.4s ease;
}

/* ===================================================================
   Utility Styles
   =================================================================== */

.last-updated {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.no-data-message {
    text-align: center;
    color: var(--text-tertiary);
    padding: 2rem;
    font-style: italic;
}
