/* Nyxmon Theme System with CSS variables for light/dark modes */

/* Common colors as CSS variables */
:root {
    /* Theme colors */
    --color-passed: #4ade80;
    --color-failed: #f87171;
    --color-warning: #fbbf24;
    --color-recovering: #facc15;
    --color-unknown: #d1d5db;
    --color-processing: #2563eb;
    
    /* Light theme variables (default) */
    --color-bg: #f9fafb;
    --color-card-bg: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #1f2937;
    --color-text-secondary: #4b5563;
    --color-header-bg: #1e3a8a;
    --color-header-text: #f9fafb;
    --color-card-header-bg: rgba(0, 0, 0, 0.03);
    --color-card-footer-bg: rgba(0, 0, 0, 0.03);
    --color-shadow: rgba(0, 0, 0, 0.1);
    
    /* Form elements */
    --color-form-bg: #ffffff;
    --color-input-bg: #ffffff;
    --color-input-border: #d1d5db;
    --color-input-text: #1f2937;
    --color-input-focus-border: #3b82f6;
    --color-input-focus-shadow: rgba(59, 130, 246, 0.2);
    --color-help-text: #6b7280;
    --color-error: #ef4444;
    
    /* Buttons and actions */
    --color-btn-primary-bg: #2563eb;
    --color-btn-primary-text: #ffffff;
    --color-btn-primary-hover: #1d4ed8;
    --color-btn-secondary-bg: #e5e7eb;
    --color-btn-secondary-text: #1f2937;
    --color-btn-secondary-hover: #d1d5db;
    --color-btn-danger-bg: #f87171;
    --color-btn-danger-text: #7f1d1d;
    --color-btn-danger-hover: #ef4444;
    --color-btn-success-bg: #a7f3d0;
    --color-btn-success-text: #065f46;
    --color-btn-success-hover: #6ee7b7;
    
    /* Status badge background colors */
    --badge-passed-bg: rgba(16, 185, 129, 0.1);
    --badge-failed-bg: rgba(239, 68, 68, 0.1);
    --badge-warning-bg: rgba(245, 158, 11, 0.1);
    --badge-recovering-bg: rgba(250, 204, 21, 0.1);
    --badge-unknown-bg: rgba(209, 213, 219, 0.1);
    --badge-processing-bg: rgba(37, 99, 235, 0.15);
}

/* Dark theme variables */
/* Apply dark theme to both html and body for consistency */
html.dark-theme,
body.dark-theme,
.dark-theme {
    --color-bg: #0f0f0f;
    --color-card-bg: #1a1a1a;
    --color-border: #333;
    --color-text: #e0e0e0;
    --color-text-secondary: #999;
    --color-header-bg: #121212;
    --color-header-text: #f9fafb;
    --color-card-header-bg: rgba(0, 0, 0, 0.2);
    --color-card-footer-bg: rgba(0, 0, 0, 0.1);
    --color-shadow: rgba(0, 0, 0, 0.5);
    
    /* Form elements */
    --color-form-bg: #1a1a1a;
    --color-input-bg: #2a2a2a;
    --color-input-border: #444;
    --color-input-text: #e0e0e0;
    --color-input-focus-border: #3b82f6;
    --color-input-focus-shadow: rgba(59, 130, 246, 0.3);
    --color-help-text: #999;
    --color-error: #f87171;
    
    /* Buttons and actions */
    --color-btn-primary-bg: #1d4ed8;
    --color-btn-primary-text: #e0e0e0;
    --color-btn-primary-hover: #2563eb;
    --color-btn-secondary-bg: #333;
    --color-btn-secondary-text: #e0e0e0;
    --color-btn-secondary-hover: #444;
    --color-btn-danger-bg: #b91c1c;
    --color-btn-danger-text: #fecaca;
    --color-btn-danger-hover: #dc2626;
    --color-btn-success-bg: #065f46;
    --color-btn-success-text: #d1fae5;
    --color-btn-success-hover: #047857;
    
    /* Status badge background colors */
    --badge-passed-bg: rgba(74, 222, 128, 0.15);
    --badge-failed-bg: rgba(248, 113, 113, 0.15);
    --badge-warning-bg: rgba(251, 191, 36, 0.15);
    --badge-recovering-bg: rgba(250, 204, 21, 0.15);
    --badge-unknown-bg: rgba(209, 213, 219, 0.15);
    --badge-processing-bg: rgba(37, 99, 235, 0.15);
}

/* Base Styles */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, 
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
    background-color: var(--color-header-bg);
    color: var(--color-header-text);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-link {
    color: var(--color-header-text);
    text-decoration: none;
}

.header-link:hover {
    text-decoration: underline;
}

/* Theme Switch Styling - Redesigned for better appearance */
.theme-switch {
    display: flex;
    align-items: center;
    margin-left: 20px;
    /* Use visibility instead of opacity for better appearance across page loads */
    visibility: visible;
}

.theme-label {
    color: var(--color-header-text);
    font-size: 0.8rem;
    margin: 0 8px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

/* Highlight active theme label */
.light-label {
    opacity: 1;
    font-weight: 600;
}

.dark-label {
    opacity: 0.7;
}

/* When in dark mode, highlight dark label */
.dark-theme .dark-label {
    opacity: 1;
    font-weight: 600;
}

.dark-theme .light-label {
    opacity: 0.7;
    font-weight: normal;
}

.theme-switch-toggle {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
    /* Ensure stability during page transitions */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.theme-switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    /* Eliminate transition during changes */
    transition: none;
}

.theme-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: background-color .3s;
    border-radius: 34px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    background-color: #f0f4fa; /* Light blue background for better contrast */
    /* Ensure stability during page transitions */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.theme-switch-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: transform .3s, background-color .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 3;
}

input:checked + .theme-switch-slider {
    background-color: #1a2138; /* Dark blue background for dark mode */
}

input:focus + .theme-switch-slider {
    box-shadow: 0 0 3px #3b82f6;
}

input:checked + .theme-switch-slider:before {
    transform: translateX(28px);
    background-color: #e0e0e0; /* Lighter color for the thumb in dark mode */
}

/* Remove the sun/moon icons for a simpler toggle */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4 {
    margin-top: 0;
    color: var(--color-text);
    transition: color 0.3s;
}

h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 30px 0 20px 0;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
}

.dashboard-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px var(--color-shadow);
}

.service-btn {
    background-color: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text);
}

.check-btn {
    background-color: var(--color-btn-success-bg);
    color: var(--color-btn-success-text);
}

/* Sections */
.services-overview,
.health-checks-overview {
    margin-bottom: 40px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
}

/* Service Card */
.service-card {
    background: var(--color-card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 120px;
    box-shadow: 0 2px 5px var(--color-shadow);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--color-shadow);
}

/* Service States */
.service-card.passed { border-top: 4px solid var(--color-passed); }
.service-card.failed { border-top: 4px solid var(--color-failed); }
.service-card.warning { border-top: 4px solid var(--color-warning); }
.service-card.recovering { border-top: 4px solid var(--color-recovering); }
.service-card.unknown { border-top: 4px solid var(--color-unknown); }

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--color-card-header-bg);
    border-bottom: 1px solid var(--color-border);
}

.service-name {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-text);
}

.service-link {
    color: inherit;
    text-decoration: none;
}

.service-link:hover {
    text-decoration: underline;
}

.service-summary {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-checks-count {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Status badges */
.service-status,
.health-check-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status styles */
.status-passed,
.badge-passed {
    background: var(--badge-passed-bg);
    color: var(--color-passed);
    border: 1px solid var(--color-passed);
}

.status-failed,
.badge-failed {
    background: var(--badge-failed-bg);
    color: var(--color-failed);
    border: 1px solid var(--color-failed);
}

.status-warning,
.badge-warning {
    background: var(--badge-warning-bg);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.status-recovering,
.badge-recovering {
    background: var(--badge-recovering-bg);
    color: var(--color-recovering);
    border: 1px solid var(--color-recovering);
}

.status-unknown,
.badge-unknown {
    background: var(--badge-unknown-bg);
    color: var(--color-unknown);
    border: 1px solid var(--color-unknown);
}

.badge-processing {
    background: var(--badge-processing-bg);
    color: var(--color-processing);
    border: 1px solid var(--color-processing);
    animation: pulse 1.5s infinite;
}

.badge-due {
    background: var(--badge-warning-bg);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

/* Health Checks Container */
.health-checks {
    list-style: none;
    padding: 0;
}

.health-checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    grid-gap: 20px;
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

/* Service Check Sections */
.service-checks-section {
    margin-bottom: 3rem;
    padding-top: 0.5rem;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.service-checks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.service-checks-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    font-size: 1.2rem;
}

.service-checks-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.service-checks-link:hover {
    color: var(--color-btn-primary-bg);
    text-decoration: none;
}

/* Small button variant */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* Health Check Card */
.health-check {
    background: var(--color-card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px var(--color-shadow);
    margin-bottom: 16px;
    height: 100%; /* Ensure all cards have the same height */
}

/* Health check details layout */
.health-check-details {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 1rem;
}

.health-check-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.75rem;
}

.health-check-status {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.health-check-middle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.health-check-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* In grid layout remove margin */
.health-checks-grid .health-check {
    margin-bottom: 0;
}

.health-check:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--color-shadow);
}

/* Card States */
.health-check.passed { border-left: 4px solid var(--color-passed); }
.health-check.failed { border-left: 4px solid var(--color-failed); }
.health-check.warning { border-left: 4px solid var(--color-warning); }
.health-check.recovering { border-left: 4px solid var(--color-recovering); }
.health-check.unknown { border-left: 4px solid var(--color-unknown); }

/* Card Header */
.health-check-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-card-header-bg);
}

.health-check-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text);
}

.health-check-url {
    font-size: 0.875rem;
    color: #8b5cf6;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    text-decoration: none;
    display: block;
}

.health-check-url:hover {
    text-decoration: underline;
}

/* Card Status Badge */
.health-check-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Content */
.health-check-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 140px; /* Set minimum height to prevent resize during state changes */
}

/* Progress Ring */
.progress-container {
    position: relative;
    width: 80px;
    height: 80px;
    min-width: 80px; /* Ensure consistent width */
}

/* Check Details */
.check-details {
    flex-grow: 1;
    padding-left: 16px;
}

.check-detail {
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
}

.check-detail:last-child {
    margin-bottom: 0;
}

.check-detail-label {
    color: var(--color-text-secondary);
    margin-right: 8px;
    font-size: 0.75rem;
    min-width: 80px;
}

.check-detail-value {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
}

.time-value {
    color: var(--color-passed);
}

/* Card Footer */
.health-check-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-card-footer-bg);
}

/* Check Result Info */
.check-result-info {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

/* Run Now Button */
.run-check-button {
    background-color: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

.run-check-button:hover {
    background-color: var(--color-btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--color-shadow);
}

.run-check-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Styles (Generic) */
.btn, .action-btn, .new-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover, .action-btn:hover, .new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--color-shadow);
}

/* Primary Button */
.btn-primary, .new-service-btn, .new-check-btn {
    background-color: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text);
}

.btn-primary:hover, .new-service-btn:hover, .new-check-btn:hover {
    background-color: var(--color-btn-primary-hover);
}

/* Secondary Button */
.btn-secondary, .view-btn, .cancel-button {
    background-color: var(--color-btn-secondary-bg);
    color: var(--color-btn-secondary-text);
}

.btn-secondary:hover, .view-btn:hover, .cancel-button:hover {
    background-color: var(--color-btn-secondary-hover);
}

/* Success Button */
.btn-success, .edit-btn, .submit-button {
    background-color: var(--color-btn-success-bg);
    color: var(--color-btn-success-text);
}

.btn-success:hover, .edit-btn:hover, .submit-button:hover {
    background-color: var(--color-btn-success-hover);
}

/* Danger Button */
.btn-danger, .delete-btn {
    background-color: var(--color-btn-danger-bg);
    color: var(--color-btn-danger-text);
}

.btn-danger:hover, .delete-btn:hover {
    background-color: var(--color-btn-danger-hover);
}

/* Empty state messages */
.no-services-message,
.no-checks-message {
    padding: 2rem;
    text-align: center;
    background-color: var(--color-card-bg);
    border-radius: 0.5rem;
    margin: 1rem 0;
    border: 1px solid var(--color-border);
}

/* Detail View Styles */
.service-info {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.service-id {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.service-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    margin-left: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-data {
    background-color: var(--color-card-bg);
    padding: 1rem;
    border-radius: 0.25rem;
    font-family: monospace;
    white-space: pre-wrap;
    margin-top: 1rem;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.service-link {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-btn-primary-bg);
    text-decoration: none;
}

.service-link:hover {
    text-decoration: underline;
}

.no-services-message p,
.no-checks-message p,
.empty-message p {
    margin-bottom: 1.5rem;
}

.empty-action {
    margin-top: 1.5rem;
}

/* Check Timer and Progress Ring styling */
check-timer,
progress-ring {
    --timer-bg-color: var(--color-card-bg);
    --timer-text-color: var(--color-text);
    --timer-border-color: var(--color-border);
    --timer-due-bg-color: var(--badge-warning-bg);
    --timer-due-text-color: var(--color-warning);
    --timer-due-border-color: var(--color-warning);
    --progress-bg-color: var(--color-card-bg);
    --progress-ring-bg: #333;
}

/* Fixed sizing for check-timer to keep layout consistent */
check-timer {
    width: 120px;
    min-width: 120px;
}

/* Keep progress ring centered */
progress-ring {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Specifically style themed components */
.dark-theme check-timer.themed,
.dark-theme progress-ring.themed {
    --timer-bg-color: var(--color-card-bg);
    --timer-text-color: var(--color-text);
    --timer-border-color: var(--color-border);
    --timer-due-bg-color: var(--badge-warning-bg);
    --timer-due-text-color: var(--color-warning);
    --timer-due-border-color: var(--color-warning);
    --progress-bg-color: var(--color-card-bg);
    --progress-ring-bg: #555;
}

/* Processing Animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--color-form-bg);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px var(--color-shadow);
    border: 1px solid var(--color-border);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-link {
    color: var(--color-text);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Special styling for checkbox form fields */
.form-field.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
}

.form-field.checkbox-field label {
    order: 2;
    margin-bottom: 0;
}

.form-field label {
    font-weight: 600;
    color: var(--color-text);
}

.form-field input,
.form-field textarea, 
.form-field select {
    padding: 0.75rem;
    border: 1px solid var(--color-input-border);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: inherit;
    background-color: var(--color-input-bg);
    color: var(--color-input-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Custom styling for form checkboxes */
.form-field input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    accent-color: var(--color-btn-primary-bg);
    cursor: pointer;
    padding: 0;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--color-input-focus-border);
    box-shadow: 0 0 0 3px var(--color-input-focus-shadow);
    outline: none;
}

.help-text {
    font-size: 0.875rem;
    color: var(--color-help-text);
}

.field-errors {
    margin-top: 0.25rem;
}

.error {
    color: var(--color-error);
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* List View Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.service-list, 
.healthcheck-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.list-card {
    background-color: var(--color-card-bg);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px var(--color-shadow);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px var(--color-shadow);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-card-header-bg);
}

.list-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.list-content {
    padding: 1rem;
}

.list-data {
    background-color: var(--color-card-bg);
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
    margin-bottom: 1rem;
    max-height: 100px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.list-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-message {
    padding: 2rem;
    text-align: center;
    background-color: var(--color-card-bg);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px var(--color-shadow);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

/* Warning Message */
.warning-message {
    background-color: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    color: var(--color-error);
    border-left: 4px solid var(--color-btn-danger-bg);
}

.dark-theme .warning-message {
    background-color: rgba(220, 38, 38, 0.2);
    border-left: 4px solid var(--color-btn-danger-bg);
}

/* Result status styles */
.result-status {
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-ok {
    background-color: var(--badge-passed-bg);
    color: var(--color-passed);
    border: 1px solid var(--color-passed);
}

.status-error {
    background-color: var(--badge-failed-bg);
    color: var(--color-failed);
    border: 1px solid var(--color-failed);
}

/* Health check detail styles */
.health-check-details {
    margin: 1.5rem 0;
}

.health-check-detail {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.result-date {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .health-checks-grid {
        grid-template-columns: 1fr;
    }

    .health-check-details {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1rem;
    }
    
    .health-check-left,
    .health-check-middle,
    .health-check-right {
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    
    .progress-container {
        margin: 0 auto;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-actions {
        margin-top: 1rem;
        width: 100%;
        justify-content: space-between;
    }
}