/* Email Dashboard Styles */
.email-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.dashboard-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.card-content {
    padding: 20px;
}

/* Status Indicators */
.status-indicator .success { 
    color: #28a745; 
    font-weight: 600;
}

.status-indicator .warning { 
    color: #ffc107; 
    font-weight: 600;
}

.status-indicator .error { 
    color: #dc3545; 
    font-weight: 600;
}

.status-indicator .loading { 
    color: #6c757d; 
    font-style: italic;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Health Checks */
.health-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #dee2e6;
}

.health-item .health-status.success {
    border-left-color: #28a745;
}

.health-item .health-status.error {
    border-left-color: #dc3545;
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 20px 0;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-section h2 {
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0;
    font-size: 18px;
    color: #495057;
}

.campaigns-table-container {
    overflow-x: auto;
    padding: 20px;
}

.activity-log {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    margin: 20px;
    padding: 15px;
    background: #fafafa;
}

.log-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.log-item:last-child {
    border-bottom: none;
}

.log-time {
    color: #666;
    font-weight: bold;
}

.log-message {
    color: #333;
}

/* Testing Page Styles */
.testing-sections {
    display: grid;
    gap: 30px;
    margin: 20px 0;
}

.test-section {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0;
}

.section-header h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #495057;
}

.section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.test-form, .cron-info, .simulation-form, .system-info {
    padding: 20px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #0073aa;
}

.info-item strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

/* Action Buttons */
.cron-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cron-actions .button {
    transition: all 0.3s ease;
}

.cron-actions .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Test Results */
.test-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ddd;
    font-weight: 500;
}

.test-result.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.test-result.error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.test-result.warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.test-result.info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Loading States */
.loading-row {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.loading-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner.is-active {
    visibility: visible;
    margin-right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .email-dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cron-actions {
        flex-direction: column;
    }
    
    .cron-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Animation for status changes */
@keyframes statusChange {
    0% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.status-indicator span {
    animation: statusChange 0.3s ease;
}

/* Custom button styles */
.button-test {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.button-test:hover {
    background: linear-gradient(135deg, #005a87 0%, #004666 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,115,170,0.3) !important;
}

.button-test:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}
