/* Background Monitoring Indicator */
.background-monitoring-indicator {
    display: none;
    margin: 8px 20px;
    padding: 12px 16px;
    background: #f0fdf4;
    color: #15803d;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
}

.background-monitoring-indicator.show {
    display: block;
}

.background-monitoring-indicator.persistent {
    background: #f9fafb;
    color: #6b7280;
    border-color: #e5e7eb;
}

.monitoring-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.monitoring-icon {
    font-size: 18px;
}

.monitoring-info {
    flex: 1;
}

.monitoring-info strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.monitoring-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
}

.monitoring-stats {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.stat-item {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

.stat-item.up { color: #22c55e; }
.stat-item.down { color: #ef4444; }
.stat-item.slow { color: #f97316; }

body {
    background: #fafafa;
    min-height: 100vh;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    color: #111827;
}

body.dark-mode {
    background-color: #1e1e2d;
    color: #e4e6eb;
}

/* header styles moved to header.css */

/* Refresh Overlay — blur + centered loader */
.refresh-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.35);
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(6px); }
}

.refresh-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 280px;
    height: 160px;
    padding: 32px 48px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.overlay-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.overlay-text {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

.overlay-progress-info {
    display: none;
}

/* Refresh button animation */
#refresh-btn.refreshing {
    pointer-events: none;
    opacity: 0.6;
}

#refresh-btn.refreshing i {
    animation: spin 1s linear infinite;
}

/* Test Button */
#test-btn {
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

#test-btn:hover, #test-btn:focus {
    background: #ea580c;
}

#test-btn.testing {
    pointer-events: none;
    opacity: 0.6;
}

#test-btn.testing i {
    animation: spin 1s linear infinite;
}

/* Test Progress Bar */
.test-progress-container {
    margin-top: 8px;
    width: 100%;
}

.test-progress-bar {
    width: 100%;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.test-progress-fill {
    height: 100%;
    background: #f97316;
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.test-progress-fill::before { display: none; }

.test-progress-percentage {
    display: none;
}

.test-progress-text {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.test-progress-text::before {
    content: '';
    width: 10px;
    height: 10px;
    border: 2px solid #f97316;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* websocket-status styles are in header.css */

/* Stats dashboard and stat-card styles are in enhanced-cards.css */

/* Tab Navigation */
.tabs {
    display: flex;
    margin-bottom: 12px;
    border-bottom: 1px solid #e1e4e8;
}

.tab {
    padding: 7px 12px;
    margin-right: 2px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-size: 0.98rem;
    font-weight: 500;
}

.tab i {
    margin-right: 8px;
}

.tab:hover {
    background-color: rgba(0,0,0,0.03);
}

.tab.active {
    background-color: white;
    border: 1px solid #e1e4e8;
    border-bottom: 2px solid white;
    margin-bottom: -1px;
    color: #f97316;
}

body.dark-mode .tab:hover {
    background-color: rgba(255,255,255,0.05);
}

body.dark-mode .tab.active {
    background-color: #2d2d3a;
    border-color: #444;
    border-bottom: 2px solid #2d2d3a;
}

.tab-content {
    display: none;
    background-color: #fafafa;
    padding: 20px 24px;
    border-radius: 0;
    margin-bottom: 0;
}

body.dark-mode .tab-content {
    background-color: #2d2d3a;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Overview Tab */
/* .sites-grid styles are in reactive-dashboard.css */

/* Site card status colors now in reactive-dashboard.css */

.site-header {
    margin-bottom: 8px;
}

.site-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark mode card styles now in reactive-dashboard.css */

.site-status-display {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.status-up {
    background-color: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.status-slow {
    background-color: rgba(255, 165, 2, 0.15);
    color: #ffa502;
}

.status-down {
    background-color: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.site-status-display i {
    margin-right: 8px;
    font-size: 18px;
}

.site-details {
    margin-top: auto;
    font-size: 14px;
    color: #777;
}

body.dark-mode .site-details {
    color: #aaa;
}

.site-details p {
    margin: 6px 0;
    display: flex;
    align-items: center;
}

.site-details i {
    margin-right: 8px;
    width: 14px;
}

.test-now-btn {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.test-now-btn i {
    margin-right: 8px;
}

.test-now-btn:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #212529;
}

body.dark-mode .test-now-btn {
    background-color: #3f3f4f;
    border-color: #4a4a5a;
    color: #e4e6eb;
}

body.dark-mode .test-now-btn:hover {
    background-color: #4a4a5a;
    border-color: #555565;
}

/* Charts Tab */
.charts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-card {
    background: #fff;
    border-radius: 6px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    height: 300px;
}

.chart-card h3 {
    margin-top: 0;
    font-size: 16px;
    text-align: center;
    margin-bottom: 15px;
}

/* Manual Test Tab */
#manual-test-tab {
    background: #fafafa;
    border-radius: 0;
    padding: 32px 0 48px 0;
    min-height: 600px;
}

#manual-test-tab h2 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

.test-controls {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin: 0 auto;
    max-width: 1100px;
}

.control-group {
    flex: 1 1 0;
    min-width: 320px;
}

#site-selection {
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 14px;
    max-height: 340px;
    overflow-y: auto;
}
#site-checkboxes {
    max-height: none;
    overflow-y: visible;
    padding: 0;
    border: none;
    background: none;
}

.selection-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0 7px 2px;
    border-radius: 6px;
    transition: background 0.18s;
}
.selection-row:hover {
    background: #fff7ed;
}

#site-selection label {
    font-size: 1.04rem;
    color: #222;
    cursor: pointer;
}

#site-selection input[type="checkbox"] {
    accent-color: #f97316;
    width: 16px;
    height: 16px;
}

.test-options {
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 14px;
    margin-bottom: 16px;
}

.option-row {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#test-type {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    background: #fff;
    color: #111827;
    margin-top: 2px;
    outline: none;
}

#test-type:focus {
    border-color: #f97316;
}

#stealth-mode {
    width: 16px;
    height: 16px;
    accent-color: #f97316;
}

.test-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 32px;
    width: 100%;
}
#run-test-btn {
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-container {
    width: 100%;
    margin-top: 8px;
    background: #f3f4f6;
    border-radius: 3px;
    height: 6px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: #f97316;
    width: 0;
    transition: width 0.3s;
}

@media (max-width: 1100px) {
    .test-controls {
        flex-direction: column;
        gap: 32px;
        padding: 24px 8px 18px 8px;
    }
    .control-group {
        min-width: 0;
    }
}

/* Reports Tab - base styles are in reports.css */
.reports-controls {
    margin-bottom: 16px;
}

.filter-row {
    display: flex;
    gap: 8px;
}

/* Settings Tab - base styles are in settings.css */

.text-center {
    text-align: center;
}

/* Notification System */
.notification-center {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.notification {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: slideIn 0.3s;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s;
}

body.dark-mode .notification {
    background-color: #34343f;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.notification.error {
    border-left: 4px solid #F44336;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.warning {
    border-left: 4px solid #FF9800;
}

.notification.info {
    border-left: 4px solid #f97316;
}

.notification i {
    margin-right: 10px;
    font-size: 18px;
}

.notification p {
    margin: 0;
    font-size: 14px;
}

.notification .close-btn {
    margin-left: auto;
    cursor: pointer;
    font-size: 16px;
    color: #888;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* General Controls */
button {
    padding: 8px 16px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: background 0.15s;
    font-size: 13px;
}

button:hover {
    background: #ea580c;
}

select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

input[type="text"],
input[type="email"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    
    .test-controls,
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .test-action {
        grid-column: span 1;
    }
    
    .save-settings-btn {
        grid-column: span 1;
    }
    
    .sites-grid {
        flex-direction: column;
        gap: 10px;
    }
    
    .site-card {
        width: 100%;
        min-width: 0;
        margin: 8px 0;
    }
}

/* Overview controls - base styles are in overview-controls.css */

/* Legacy group styles removed - using unified grid now */

/* Card action buttons are in reactive-dashboard.css */

/* Realtime Tab Specific Styles */
#realtime-tab .reactive-dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

/* Section headings */
.tab-section-header h2, .tab-content > h2 {
    font-size: 16px;
    color: #111827;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.tab-section-header h2 i, .tab-content > h2 i {
    font-size: 14px;
    color: #f97316;
    margin-right: 4px;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 0;
    border-right: 1px solid #e5e7eb;
    z-index: 10;
    min-height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
}

.sidebar-tabs {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-top: 8px;
}

.sidebar .tab {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    color: #6b7280;
    font-size: 13px;
    padding: 10px 12px;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.15s, background 0.15s;
    position: relative;
    font-weight: 500;
    border-radius: 6px;
    box-sizing: border-box;
    gap: 10px;
}

.sidebar .tab i {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar .tab span {
    font-size: 13px;
    margin-top: 0;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}

.sidebar .tab.active {
    color: #f97316;
    background: #fff7ed;
}

.sidebar .tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 2px 2px 0;
    background: #f97316;
}

.sidebar .tab:hover {
    color: #f97316;
    background: #fafafa;
}

.main-content {
    flex: 1 1 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    background: #fafafa;
}

@media (max-width: 900px) {
    .sidebar { width: 56px; padding: 0; }
    .sidebar-tabs { padding: 4px; }
    .sidebar .tab span { display: none; }
    .sidebar .tab { padding: 12px 0; justify-content: center; }
    .sidebar .tab i { width: auto; }
    .sidebar .tab.active::after { display: none; }
}

/* Speed Tab Styles */
.speed-tab-main-content {
    margin-top: 15px; /* Add some space below the H2 title */
}

/* .pagespeed-input-container base styles are in input-buttons.css */

#pagespeed-results-content {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}


.pagespeed-metrics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 18px;
    margin-bottom: 28px;
    justify-content: flex-start;
}

/* stat-card styles are in enhanced-cards.css */

.screenshot-container {
    margin-top: 20px;
    text-align: center; /* Center the screenshot and its title */
}

.screenshot-container h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #333;
}
.dark-mode .screenshot-container h3 {
    color: #e4e6eb;
}

.screenshot-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

/* Styles for multiple screenshots */
.multi-screenshot-container {
    margin-top: 20px;
}

.multi-screenshot-container h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: #333;
    text-align: left;
}
.dark-mode .multi-screenshot-container h3 {
    color: #e4e6eb;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.screenshot-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    background: #fafafa;
    text-align: center;
}

.screenshot-item h4 { /* For screenshot titles (e.g., page URL or menu item name) */
    font-size: 0.9rem;
    margin-top: 0;
    margin-bottom: 8px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dark-mode .screenshot-item h4 {
    color: #b0b8c5;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 5px;
}


.loader {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #f97316;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: 16px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Lightbox Modal Styles */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top - higher than notification center */
    padding-top: 100px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#lightboxCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Make screenshot images in the grid clickable */
.screenshot-item img {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.screenshot-item img:hover {
    opacity: 0.8;
    border-color: #f97316; /* Highlight on hover */
}

/* Detailed SEO Analysis Tab Styles */
#detailed-seo-tab .detailed-seo-main-content {
    padding: 15px;
}


#run-detailed-seo-analysis:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.seo-analysis-report {
    margin-top: 25px;
    padding: 10px;
    background-color: var(--background-color, #f8f9fa); /* Use CSS var, fallback */
    border-radius: 10px;
}
body.dark-mode .seo-analysis-report {
    background-color: var(--dark-background-color, #1e1e2d); /* Use CSS var, fallback */
}

/* ===== Status utility classes (used by broken links & other tabs) ===== */
.status-ok, .status-pass { color: #28a745; }
.status-warning, .status-warn { color: #ffc107; }
.status-error, .status-fail { color: #dc3545; }
.status-info, .status-neutral { color: #17a2b8; }
.status-unknown { color: #6c757d; }

body.dark-mode .status-ok, body.dark-mode .status-pass { color: #52c41a; }
body.dark-mode .status-warning, body.dark-mode .status-warn { color: #ffd966; }
body.dark-mode .status-error, body.dark-mode .status-fail { color: #ff7882; }
body.dark-mode .status-info, body.dark-mode .status-neutral { color: #34a8eb; }
body.dark-mode .status-unknown { color: #adb5bd; }

.action-button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    background-color: #f97316;
    color: white;
}

.action-button:hover {
    opacity: 0.9;
}

.action-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-button i {
    font-size: 0.9em;
}

.delete-btn {
    background-color: #dc3545;
}

.delete-btn:hover {
    background-color: #c82333;
}

.site-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions .action-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    color: white;
    text-decoration: none;
}

.header-actions .action-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.header-actions .action-button:active {
    transform: translateY(0);
}

/* Header Action Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* .header-action-btn and .add-btn styles moved to header.css */

.remove-btn {
    background-color: #6c757d;
    border: 1px solid #6c757d;
}

.remove-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.remove-btn.delete-mode {
    background-color: #dc3545;
    border-color: #dc3545;
}

.remove-btn.delete-mode:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Modern Animations and Effects */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
    to {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

/* Reports Table Action Buttons */
.actions-cell {
    width: 150px;
    text-align: center;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 90px;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.action-btn i {
    font-size: 0.9em;
}

.pdf-btn {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.pdf-btn:hover {
    border-color: #f97316;
    color: #f97316;
}

.view-btn {
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.view-btn:hover {
    border-color: #f97316;
    color: #f97316;
}

/* Enhanced Reports Filter Layout */
.reports-controls {
    margin-bottom: 25px;
}

.filter-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: end;
    padding: 16px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.15s;
    outline: none;
}

.filter-select:focus {
    border-color: #f97316;
}

.date-filter {
    justify-self: center;
}

.date-inputs-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.date-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-input-container i {
    position: absolute;
    left: 14px;
    color: #6c757d;
    z-index: 1;
    pointer-events: none;
    font-size: 0.9rem;
}

.date-input {
    padding: 10px 14px 10px 34px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    min-width: 150px;
    cursor: pointer;
    transition: border-color 0.15s;
    outline: none;
}

.date-input:focus {
    border-color: #f97316;
}

.date-separator {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 8px;
    white-space: nowrap;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-self: end;
}

.filter-actions > div:first-child {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-date-btn {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.quick-date-btn:hover {
    border-color: #f97316;
    color: #f97316;
}

.clear-date-btn {
    padding: 6px 10px;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #fff;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.clear-date-btn:hover {
    background: #fef2f2;
}

.filter-button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #f97316;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.filter-button:hover {
    background: #ea580c;
}

.filter-button i {
    font-size: 0.9em;
}

/* Responsive layout for smaller screens */
@media (max-width: 1200px) {
    .filter-row {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .date-filter {
        justify-self: center;
    }
    
    .filter-actions {
        justify-self: center;
        align-items: center;
    }
    
    .date-inputs-wrapper {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .filter-row {
        padding: 20px;
        gap: 15px;
    }
    
    .filter-select {
        min-width: 100%;
    }
    
    .date-inputs-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    .date-input {
        min-width: 100%;
    }
    
    .filter-actions > div:first-child {
        justify-content: center;
    }
}

/* AI help panel styles are in ai-chat.css */
/* Modal styles are in header.css */

/* ── Online Users / Active Tests Sidebar Panel ── */
.sidebar-online-panel {
    margin: 8px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #374151;
}

.online-panel-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.online-panel-header i {
    color: #9ca3af;
    font-size: 11px;
}

.online-badge {
    margin-left: auto;
    background: #10b981;
    color: #fff;
    border-radius: 99px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
}

.online-users-list,
.active-tests-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 5px;
    color: #4b5563;
    font-size: 12px;
}

.online-user-item.is-me {
    background: #f0fdf4;
    color: #166534;
    font-weight: 600;
}

.user-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    flex-shrink: 0;
}

.active-test-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 5px;
    color: #92400e;
    background: #fffbeb;
    font-size: 11px;
}

.active-test-item i {
    color: #f59e0b;
}

.test-user {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55px;
}

.test-url {
    color: #78716c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Testing badge on site cards */
.site-card.being-tested {
    outline: 2px solid #f59e0b;
}

.testing-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    z-index: 5;
}

/* Hide online panel text labels when sidebar is collapsed */
@media (max-width: 768px) {
    .sidebar-online-panel { display: none; }
}

