/* System Health Dashboard Styles */

/* Main container styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Section styles */
.dashboard-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dashboard-section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-section-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.dashboard-section-content {
    padding: 0 10px;
}

/* System status styles */
.system-status {
    margin-bottom: 20px;
}

.status-healthy {
    padding: 15px;
    background-color: #d1fae5;
    border: 1px solid #10b981;
    border-radius: 6px;
}

.status-healthy h3 {
    margin-top: 0;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reboot-scheduled {
    padding: 15px;
    background-color: #fff5f5;
    border: 1px solid #f87171;
    border-radius: 6px;
}

.reboot-scheduled h3 {
    margin-top: 0;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reboot-info {
    margin-top: 10px;
}

.reboot-attempts {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Actions panel styles */
.actions-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.action-card {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.action-card-header {
    margin-bottom: 15px;
}

.action-card-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.action-card-content {
    margin-bottom: 20px;
}

.action-description {
    margin-bottom: 15px;
    color: #4b5563;
}

/* Form styles */
.action-form {
    margin-top: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4b5563;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

/* Task info styles */
.task-info {
    margin-top: 15px;
    padding: 10px;
    background-color: #f3f4f6;
    border-radius: 4px;
}

.task-info h4 {
    margin-top: 0;
    font-size: 1rem;
    color: #4b5563;
}

/* Debug section styles */
.debug-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.debug-section h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.debug-subsection {
    margin-bottom: 20px;
}

.debug-subsection h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #4b5563;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

.debug-content {
    font-size: 0.9rem;
}

/* Table styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #4b5563;
}

.table tr:hover {
    background-color: #f1f5f9;
}

/* Message styles */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.message-success {
    background-color: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.message-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #b91c1c;
}

.message-warning {
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.message-info {
    background-color: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

/* Details/Summary styles */
details {
    margin-top: 10px;
}

details summary {
    padding: 8px 12px;
    background-color: #f3f4f6;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

details pre {
    margin-top: 10px;
    padding: 15px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Settings form styles */
.settings-form {
    max-width: 100%;
}

.settings-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.settings-group:last-child {
    border-bottom: none;
}

.settings-group h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #4b5563;
}

.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4b5563;
    flex: 0 0 200px;
}

.form-control-sm {
    width: 100px;
    padding: 6px 10px;
}

.form-select,
.form-select-sm {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #fff;
    min-width: 150px;
}

.setting-help {
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    padding-left: 24px;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    font-weight: 500;
}

.input-group {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.input-group .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.form-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #9ca3af;
    color: #4b5563;
}

.btn-outline-secondary:hover {
    background-color: #f3f4f6;
}

/* Notification styles */
.notification {
    padding: 12px 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    position: relative;
    animation: slide-in 0.3s ease-out;
}

.notification-success {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.notification-error {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
}

.notification-info {
    background-color: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

.notification-warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

@keyframes slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .actions-panel {
        flex-direction: column;
    }

    .action-card {
        min-width: 100%;
    }

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

    .form-label {
        flex: 0 0 100%;
        margin-bottom: 5px;
    }

    .setting-help {
        padding-left: 0;
    }
}

.health-check-results {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.health-check-results h3 {
    margin-top: 0;
    color: #334155;
    font-size: 1.25rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.status-badge span {
    margin-right: 6px;
}

.status-badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge-error {
    background-color: #fee2e2;
    color: #b91c1c;
}

.system-info-summary {
    margin: 15px 0;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.system-info-summary h4 {
    margin-top: 0;
    font-size: 1rem;
    color: #475569;
}

.system-info-summary ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.system-info-summary li {
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
}

.system-info-summary li:last-child {
    border-bottom: none;
}

.technical-details {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8fafc;
    border-radius: 4px;
    font-size: 0.85rem;
    overflow-x: auto;
}

.technical-details pre {
    margin: 0;
    white-space: pre-wrap;
}

.timestamp {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #64748b;
}

.health-check-pending,
.health-check-error {
    margin: 20px 0;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.rotating {
    display: inline-block;
    animation: spin 1s linear infinite;
}