/* =============================================
   SETTINGS HEALTH - ProductiveApp v5.0
   Styles pour l'onglet Santé Système
   ============================================= */

.health-loading,
.health-error-msg {
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.health-error-msg {
    color: var(--danger);
}

/* Status Row */
.health-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.health-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.health-status-healthy {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.health-status-degraded {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.health-status-unhealthy,
.health-status-error {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.health-timestamp {
    font-size: 12px;
    color: var(--text-muted);
}

/* Metrics Grid */
.health-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.health-metric-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.health-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.health-metric-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.health-metric-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.health-metric-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.health-metric-detail {
    font-size: 11px;
    color: var(--text-muted);
}

/* Section Titles */
.health-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Alerts */
.health-alerts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.health-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid;
}

.health-alert-critical {
    background: rgba(248, 113, 113, 0.1);
    border-left-color: #f87171;
}

.health-alert-warning {
    background: rgba(251, 191, 36, 0.1);
    border-left-color: #fbbf24;
}

.health-alert-info {
    background: rgba(96, 165, 250, 0.1);
    border-left-color: #60a5fa;
}

.health-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.health-alert-content {
    flex: 1;
}

.health-alert-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.health-alert-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Errors */
.health-no-errors {
    text-align: center;
    padding: 32px 20px;
    font-size: 14px;
    color: var(--text-muted);
    background: rgba(74, 222, 128, 0.05);
    border-radius: 8px;
    margin-bottom: 24px;
}

.health-errors {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.health-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.health-error:hover {
    background: var(--bg-tertiary);
}

.health-error-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.health-error-content {
    flex: 1;
    min-width: 0;
}

.health-error-message {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
    word-break: break-word;
}

.health-error-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Actions */
.health-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
    .health-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .health-status-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .health-metrics {
        grid-template-columns: 1fr;
    }

    .health-actions {
        flex-direction: column;
    }

    .health-actions .settings-btn {
        width: 100%;
    }
}
