/* ==========================================
   Hide old/legacy sections
   ========================================== */
.site-detail-header#siteDetailHeader,
.time-period-selector,
#siteStatsGrid,
.stats-grid,
.site-detail-nav .site-actions,
.site-detail-nav,
.site-tabs-nav,
.siterooster-site-detail,
.site-detail-footer {
    display: none !important;
}

/* Hide all old sections below tabs */
.detail-section,
.content-monitoring-header,
.content-monitor-section {
    display: none !important;
}
/* ==========================================
   SiteRooster Site Detail Page - Sidebar Layout
   Matching dashboard design system
   ========================================== */

/* ==========================================
   CSS Variables (inherit from dashboard)
   ========================================== */
:root {
    --siterooster-orange: #ff6b47;
    --siterooster-coral: #ff8a73;
    --siterooster-dark: #2a1810;
    --siterooster-navy: #1a1a2e;
    --siterooster-cream: #fef7f3;
    --siterooster-light: #fff9f7;
    
    /* Status colors */
    --status-green: #10b981;
    --status-green-light: #34d399;
    --status-green-bg: #ecfdf5;
    --status-red: #ef4444;
    --status-red-light: #f87171;
    --status-red-bg: #fef2f2;
    --status-orange: #f59e0b;
    --status-orange-light: #fbbf24;
    --status-orange-bg: #fffbeb;
    --status-blue: #6366f1;
    --status-blue-bg: #eef2ff;
    
    /* Neutral colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.06);
    
    /* Border radius */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    
    /* Layout */
    --sr-sidebar-width: 260px;
    --sr-header-height: 56px;
}

/* ==========================================
   Site Detail Specific Container
   ========================================== */
.sr-site-detail-container {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

.sr-site-detail-container .sr-main-content {
    flex: 1;
    margin-left: var(--sr-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   Site Switcher (in sidebar)
   ========================================== */

.sr-site-switcher {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    width: 80%;
}

.sr-site-switcher-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.sr-site-switcher-btn:hover {
    border-color: var(--siterooster-orange);
    background: #fff;
}

.sr-site-favicon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sr-site-favicon img {
    width: 20px;
    height: 20px;
}

.sr-site-favicon svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.sr-site-switcher-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.sr-site-switcher-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--siterooster-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-site-switcher-url {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-site-switcher-arrow {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

/* ==========================================
   Secondary Button Style
   ========================================== */
.sr-btn-secondary {
    background: #fff;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.sr-btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

/* ==========================================
   Page Content (site detail specific)
   ========================================== */
.sr-site-detail-container .sr-page-content {
    padding: 24px;
    
}

/* Tab content container */
.sr-tab-content-container {
    margin-top: 24px;
}

/* Site header card adjustments for new layout */
.sr-site-detail-container .site-header-card {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* ==========================================
   Responsive: Hide sidebar on mobile
   ========================================== */
@media (max-width: 768px) {
    .sr-site-detail-container .sr-sidebar {
        transform: translateX(-100%);
        position: fixed;
    }
    
    .sr-site-detail-container .sr-main-content {
        margin-left: 0;
    }
}

/* ==========================================
   Sidebar Base Styles (from dashboard)
   ========================================== */
.sr-sidebar {
    width: var(--sr-sidebar-width);
    background: #fff;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

/* Logo */
.sr-sidebar-logo {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}

.sr-sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.sr-sidebar-logo img {
    height: 32px;
    width: auto;
}

.sr-sidebar-logo span {
    font-weight: 700;
    font-size: 18px;
    color: var(--siterooster-dark);
}

/* Navigation */
.sr-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.sr-nav-section {
    margin-bottom: 24px;
}

.sr-nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    padding: 0 12px 8px;
}

.sr-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.sr-nav-item:hover {
    background: var(--gray-50);
    color: var(--siterooster-dark);
}

.sr-nav-item.active {
    background: var(--siterooster-cream);
    color: var(--siterooster-orange);
}

.sr-nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Sidebar Footer / User Menu */
.sr-sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--gray-100);
}

.sr-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.sr-user-menu:hover {
    background: var(--gray-50);
}

.sr-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--siterooster-orange), var(--siterooster-coral));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}

.sr-user-info {
    flex: 1;
    min-width: 0;
}

.sr-user-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--siterooster-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-user-plan {
    font-size: 11px;
    color: var(--gray-500);
}

.sr-user-settings-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.sr-logout-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-top: 4px;
    border-radius: 8px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sr-logout-link:hover {
    background: var(--gray-50);
    color: var(--status-red);
}

.sr-logout-link svg {
    width: 16px;
    height: 16px;
}

/* Top Header */
.sr-top-header {
    height: var(--sr-header-height);
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Breadcrumb */
.sr-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.sr-breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.15s ease;
}

.sr-breadcrumb a:hover {
    color: var(--siterooster-orange);
}

.sr-breadcrumb-separator {
    color: var(--gray-400);
}

.sr-breadcrumb-current {
    color: var(--siterooster-dark);
    font-weight: 500;
}

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

/* Buttons */
.sr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-decoration: none;
}

.sr-btn svg {
    width: 16px;
    height: 16px;
}

.sr-btn-primary {
    background: var(--siterooster-orange);
    color: #fff;
}

.sr-btn-primary:hover {
    background: #e55a3a;
}

/* ==========================================
   Site Header Card
   ========================================== */
.site-header-card {
    max-width: 1200px;
    margin: 0 auto 24px auto;
    padding: 0 20px;
}

.site-header-card-inner {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Status bar at top */
.site-status-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--gray-300) 0%, var(--gray-400) 100%);
}

.site-status-bar.status-up {
    background: linear-gradient(90deg, var(--status-green) 0%, var(--status-green-light) 100%);
}

.site-status-bar.status-down {
    background: linear-gradient(90deg, var(--status-red) 0%, var(--status-red-light) 100%);
}

.site-status-bar.status-error {
    background: linear-gradient(90deg, var(--status-orange) 0%, var(--status-orange-light) 100%);
}

.site-header-content {
    padding: 32px;
}

.site-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
}

.site-header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-status-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}

.site-status-icon.status-up {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.site-status-icon.status-down {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.site-status-icon.status-error {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.site-header-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--siterooster-dark);
    margin: 0 0 4px 0;
}

.site-header-text .site-url {
    font-size: 15px;
    color: var(--gray-400);
    text-decoration: none;
}

.site-header-text .site-url:hover {
    color: var(--siterooster-orange);
}

/* Header actions */
.site-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.status-badge-live.status-up {
    background: linear-gradient(135deg, var(--status-green) 0%, var(--status-green-light) 100%);
}

.status-badge-live.status-down {
    background: linear-gradient(135deg, var(--status-red) 0%, var(--status-red-light) 100%);
}

.status-badge-live .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

.btn-check-now {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-check-now:hover {
    border-color: var(--siterooster-orange);
    color: var(--siterooster-orange);
}

.btn-check-now:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-check-now.checking {
    background: var(--gray-100);
    color: var(--gray-500);
    border-color: var(--gray-200);
}

.btn-check-now.check-complete {
    background: var(--green-50, #ecfdf5);
    color: var(--green-600, #059669);
    border-color: var(--green-200, #a7f3d0);
}

.btn-check-now.check-failed {
    background: var(--red-50, #fef2f2);
    color: var(--red-600, #dc2626);
    border-color: var(--red-200, #fecaca);
}

.btn-check-now.cooldown {
    background: var(--gray-100);
    color: var(--gray-400);
    border-color: var(--gray-200);
    cursor: not-allowed;
}

/* Quick stats row */
.site-header-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.header-stat {
    display: flex;
    flex-direction: column;
}

.header-stat-label {
    font-size: 12px;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 500;
}

.header-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--siterooster-dark);
}

.header-stat-value.status-good {
    color: var(--status-green);
}

.header-stat-value.status-warning {
    color: var(--status-orange);
}

.header-stat-value.status-bad {
    color: var(--status-red);
}

/* ==========================================
   Tabs Container
   ========================================== */
.site-tabs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-tabs-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Tab Content */
.site-tab-content {
    padding: 32px;
    display: none;
}

.site-tab-content.active {
    display: block;
}

/* ==========================================
   Overview Tab - New Design (Promptwatch-inspired)
   ========================================== */

/* Key Metrics Row */
.sr-overview-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.sr-overview-metrics .sr-metric-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.sr-overview-metrics .sr-metric-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}

.sr-overview-metrics .sr-metric-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.sr-overview-metrics .sr-metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--siterooster-dark);
}

.sr-metric-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sr-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
}

.sr-metric-card.status-up .sr-status-dot {
    background: var(--status-green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.sr-metric-card.status-down .sr-status-dot {
    background: var(--status-red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.sr-metric-card.status-up .sr-metric-value {
    color: var(--status-green);
}

.sr-metric-card.status-down .sr-metric-value {
    color: var(--status-red);
}

.sr-metric-card.status-warning .sr-metric-value {
    color: var(--status-orange);
}

.sr-metric-card.status-good .sr-metric-value {
    color: var(--status-green);
}

/* Card Base Styles */
.sr-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.sr-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.sr-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sr-card-title svg {
    color: var(--gray-400);
}

.sr-card-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    margin: 4px 0 0 0;
}

.sr-card-body {
    padding: 24px;
}

/* Chart Card */
.sr-chart-card .sr-card-body {
    padding: 16px 24px 24px;
}

.sr-chart-container {
    height: 250px;
    position: relative;
}

.sr-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Period Selector */
.sr-chart-period-selector {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 8px;
}

.sr-period-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sr-period-btn:hover {
    color: var(--siterooster-dark);
}

.sr-period-btn.active {
    background: #fff;
    color: var(--siterooster-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Summary Grid */
.sr-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.sr-summary-card .sr-card-body {
    padding: 20px 24px;
}

/* Summary Stats */
.sr-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.sr-summary-stat {
    text-align: center;
}

.sr-summary-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--siterooster-dark);
    line-height: 1.2;
}

.sr-summary-stat-label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

/* Summary Footer */
.sr-summary-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

.sr-summary-detail {
    font-size: 13px;
    color: var(--gray-500);
}

.sr-summary-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--siterooster-orange);
    text-decoration: none;
    transition: color 0.15s ease;
}

.sr-summary-link:hover {
    color: #e55a3a;
}

/* SEO Summary */
.sr-seo-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.sr-seo-score {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--status-green-bg), #d1fae5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sr-seo-score-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--status-green);
}

.sr-seo-score.warning {
    background: linear-gradient(135deg, var(--status-orange-bg), #fef3c7);
}

.sr-seo-score.warning .sr-seo-score-value {
    color: var(--status-orange);
}

.sr-seo-score.bad {
    background: linear-gradient(135deg, var(--status-red-bg), #fee2e2);
}

.sr-seo-score.bad .sr-seo-score-value {
    color: var(--status-red);
}

.sr-seo-issues {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sr-seo-issue {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: 6px;
}

.sr-seo-issue-label {
    font-size: 13px;
    color: var(--gray-600);
}

.sr-seo-issue-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--siterooster-dark);
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
}

.sr-seo-issue-count.warning {
    color: var(--status-orange);
    background: var(--status-orange-bg);
}

.sr-seo-issue-count.bad {
    color: var(--status-red);
    background: var(--status-red-bg);
}

/* Content Load Performance Colors */
.sr-perf-good {
    color: var(--status-green);
    font-weight: 500;
}

.sr-perf-moderate {
    color: var(--status-orange);
    font-weight: 500;
}

.sr-perf-poor {
    color: var(--status-red);
    font-weight: 500;
}

/* Clickable SEO rows */
.sr-seo-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.sr-seo-row:hover {
    background-color: var(--gray-50);
}

/* ==========================================
   SEO Page Detail Slide-out Panel
   ========================================== */

.sr-seo-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sr-seo-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sr-seo-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.sr-seo-panel.active {
    transform: translateX(0);
}

.sr-seo-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.sr-seo-panel-title h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
}

.sr-seo-panel-url {
    font-size: 13px;
    color: var(--gray-500);
    word-break: break-all;
    max-width: 320px;
}

.sr-seo-panel-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sr-seo-panel-close {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    color: var(--gray-500);
}

.sr-seo-panel-close:hover {
    color: var(--gray-700);
    background: var(--gray-100) !important;
}

.sr-seo-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.sr-seo-panel-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.sr-seo-panel-section:last-child {
    border-bottom: none;
}

.sr-seo-panel-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.sr-seo-panel-section h4 svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.sr-seo-panel-status {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.sr-seo-panel-status.status-good {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.sr-seo-panel-status.status-warning {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.sr-seo-panel-status.status-error {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.sr-seo-panel-content {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

.sr-seo-panel-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sr-seo-panel-metric {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
}

.sr-seo-panel-metric-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 2px;
}

.sr-seo-panel-metric-label {
    font-size: 12px;
    color: var(--gray-500);
}

.sr-seo-panel-text {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
    font-family: inherit;
    word-break: break-word;
}

.sr-seo-panel-text.empty {
    color: var(--status-red);
    font-style: italic;
}

.sr-seo-panel-length {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray-500);
}

.sr-seo-panel-length.warning {
    color: var(--status-orange);
}

.sr-seo-panel-length.error {
    color: var(--status-red);
}

.sr-seo-panel-recommendation {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--status-blue-bg);
    border-radius: 6px;
    font-size: 12px;
    color: var(--status-blue);
}

.sr-seo-panel-h1-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sr-seo-panel-h1-item {
    background: var(--gray-50);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.sr-seo-panel-h1-item .h1-number {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.sr-seo-panel-h1-item .h1-text {
    word-break: break-word;
}

.sr-seo-panel-canonical-url {
    background: var(--gray-50);
    padding: 12px;
    border-radius: 8px;
    word-break: break-all;
    font-family: monospace;
    font-size: 12px;
}

.sr-seo-panel-image-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.sr-seo-panel-image-item {
    background: var(--gray-50);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 11px;
    word-break: break-all;
    color: var(--gray-600);
}

.sr-seo-panel-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.sr-seo-panel-pagination span {
    font-size: 12px;
    color: var(--gray-500);
}

.sr-seo-panel-footer {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.sr-seo-panel-footer .sr-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 14px;
    font-size: 13px;
    gap: 6px;
}

.sr-seo-panel-footer .sr-btn svg {
    width: 14px;
    height: 14px;
}

/* Header buttons - smaller */
.sr-seo-panel-actions .sr-btn {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
}

.sr-seo-panel-actions .sr-btn svg {
    width: 14px;
    height: 14px;
}

/* Copy success animation */
.sr-copy-success {
    position: relative;
}

.sr-copy-success::after {
    content: 'Copied!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-700);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    animation: fadeInOut 1.5s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(5px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
}

/* Panel loading and error states */
.sr-seo-panel-loading,
.sr-seo-panel-error {
    padding: 20px;
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

.sr-seo-panel-error {
    color: var(--status-red);
}

/* Spin animation for buttons */
@keyframes sr-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sr-spin {
    animation: sr-spin 1s linear infinite;
}

/* Button success state */
.sr-btn.sr-btn-success {
    background: var(--status-green) !important;
    border-color: var(--status-green) !important;
    color: #fff !important;
}

/* Uptime Visual */
.sr-uptime-visual {
    margin-bottom: 16px;
}

.sr-uptime-blocks {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.sr-uptime-block {
    flex: 1;
    height: 32px;
    border-radius: 4px;
    background: var(--status-green);
    opacity: 0.8;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sr-uptime-block:hover {
    opacity: 1;
    transform: scaleY(1.1);
}

.sr-uptime-block.partial {
    background: var(--status-orange);
}

.sr-uptime-block.down {
    background: var(--status-red);
}

.sr-uptime-block.no-data {
    background: var(--gray-200);
}

.sr-uptime-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.sr-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--gray-500);
}

.sr-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.sr-legend-dot.online { background: var(--status-green); }
.sr-legend-dot.partial { background: var(--status-orange); }
.sr-legend-dot.down { background: var(--status-red); }

/* Activity Card */
.sr-activity-card .sr-card-body {
    padding: 0;
}

.sr-activity-body {
    max-height: 400px;
    overflow-y: auto;
}

.sr-activity-list {
    display: flex;
    flex-direction: column;
}

.sr-activity-loading {
    padding: 40px;
    text-align: center;
    color: var(--gray-500);
}

.sr-activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s ease;
}

.sr-activity-item:hover {
    background: var(--gray-50);
}

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

.sr-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sr-activity-icon.status-up {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.sr-activity-icon.status-down {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.sr-activity-icon.status-warning {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.sr-activity-icon.status-info {
    background: var(--status-blue-bg);
    color: var(--status-blue);
}

.sr-activity-icon svg {
    width: 18px;
    height: 18px;
}

.sr-activity-content {
    flex: 1;
    min-width: 0;
}

.sr-activity-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--siterooster-dark);
    margin-bottom: 2px;
}

.sr-activity-detail {
    font-size: 13px;
    color: var(--gray-500);
}

.sr-activity-meta {
    text-align: right;
    flex-shrink: 0;
}

.sr-activity-time {
    font-size: 13px;
    color: var(--gray-400);
}

.sr-activity-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

.sr-activity-badge.success {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.sr-activity-badge.warning {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.sr-activity-badge.error {
    background: var(--status-red-bg);
    color: var(--status-red);
}

/* Responsive: Overview */
@media (max-width: 1200px) {
    .sr-overview-metrics {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sr-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sr-overview-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sr-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .sr-summary-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sr-seo-summary {
        flex-direction: column;
        align-items: center;
    }
}

/* ==========================================
   Uptime Tab
   ========================================== */
.uptime-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.uptime-stat-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.uptime-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--status-green);
}

.uptime-stat-label {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Response time chart in uptime tab */
.uptime-chart-section {
    margin-bottom: 32px;
}

.uptime-chart-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0 0 16px 0;
}

.response-chart-container {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 24px;
}

.response-chart-container canvas {
    width: 100% !important;

}

/* Incident History Table */
.incident-history h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0 0 16px 0;
}

.incident-table {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.incident-table-header {
    display: grid;
    grid-template-columns: 150px 1fr 120px 100px;
    padding: 12px 16px;
    background: var(--gray-50);
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.incident-row {
    display: grid;
    grid-template-columns: 150px 1fr 120px 100px;
    padding: 16px;
    border-top: 1px solid var(--gray-100);
    font-size: 14px;
    align-items: center;
}

.incident-row:hover {
    background: var(--gray-50);
}

.incident-date {
    color: var(--gray-500);
}

.incident-description {
    color: var(--siterooster-dark);
}

.incident-duration {
    color: var(--gray-500);
}

.incident-status {
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.incident-status.resolved {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.incident-status.ongoing {
    background: var(--status-red-bg);
    color: var(--status-red);
}

/* Empty state for incidents */
.incident-empty {
    padding: 40px;
    text-align: center;
    color: var(--gray-400);
}

.incident-empty::before {
    content: '';
    display: block;
    font-size: 32px;
    margin-bottom: 12px;
}

/* ==========================================
   Content Tab
   ========================================== */
.content-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .content-stats-grid {
        grid-template-columns: 1fr;
    }
}

.content-stat-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.content-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--siterooster-dark);
}

.content-stat-label {
    font-size: 14px;
    color: var(--gray-500);
}

/* Content sections - Site Wide Crawl, Page Monitors, Keyword Monitors */
.content-section {
    margin-bottom: 32px;
}

.content-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.content-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-section-header .section-subtitle {
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 400;
    margin-left: 8px;
}

.content-section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Crawl stats row */
.crawl-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.crawl-stat {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.crawl-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--siterooster-dark);
    display: block;
}

.crawl-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Changes List */
.changes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.change-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.change-item-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.change-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.change-type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.change-type-dot.new { background: var(--status-blue); }
.change-type-dot.modified { background: var(--status-orange); }
.change-type-dot.removed { background: var(--status-red); }

.change-item-info {
    display: flex;
    flex-direction: column;
}

.change-item-url {
    font-size: 14px;
    font-weight: 500;
    color: var(--siterooster-dark);
}

.change-item-meta {
    font-size: 13px;
    color: var(--gray-400);
}

.change-word-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.change-word-badge.positive {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.change-word-badge.negative {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.btn-view-all {
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-view-all:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

/* Page Monitors & Keyword Monitors Lists */
.monitors-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.monitor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.monitor-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.monitor-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--siterooster-dark);
}

.monitor-item-meta {
    font-size: 13px;
    color: var(--gray-400);
}

.monitor-item-actions {
    display: flex;
    gap: 8px;
}

/* Empty state for monitors */
.monitors-empty {
    padding: 40px;
    text-align: center;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    color: var(--gray-400);
}

/* ==========================================
   Settings Tab
   ========================================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0 0 20px 0;
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--siterooster-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--siterooster-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 71, 0.1);
}

.form-help {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 6px;
}

/* Toggle switches */
.toggle-list {
    display: flex;
    flex-direction: column;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.toggle-label {
    font-size: 14px;
    color: var(--siterooster-dark);
}

.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--gray-200);
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.toggle-switch.active {
    background: var(--status-green);
}

.toggle-switch::after {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: left 0.2s ease;
}

.toggle-switch.active::after {
    left: 22px;
}

/* Danger Zone */
.danger-zone {
    margin-top: 48px;
    padding: 24px;
    background: var(--status-red-bg);
    border-radius: var(--radius-md);
    border: 1px solid #fecaca;
    grid-column: 1 / -1;
}

.danger-zone h3 {
    font-size: 16px;
    font-weight: 600;
    color: #991b1b;
    margin: 0 0 8px 0;
}

.danger-zone p {
    font-size: 14px;
    color: var(--gray-500);
    margin: 0 0 16px 0;
}

.btn-delete-site {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--status-red);
    background: transparent;
    color: var(--status-red);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-site:hover {
    background: var(--status-red);
    color: white;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--siterooster-orange) 0%, var(--siterooster-coral) 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 71, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* Frequency select */
.frequency-select {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    font-size: 13px;
    color: var(--gray-600);
    background: white;
    cursor: pointer;
}

/* ==========================================
   Modals (keep existing modal styles)
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-large .modal-content {
    max-width: 700px;
}

.modal-xl .modal-content {
    max-width: 900px;
}

/* ==========================================
   Enhanced Monitor Detail Modals
   ========================================== */

/* Chart containers */
.monitor-charts-section {
    padding: 20px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.monitor-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.monitor-chart-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--gray-200);
}

.monitor-chart-card h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.monitor-chart-container {
    height: 160px;
    position: relative;
}

.monitor-chart-container canvas {
    max-height: 160px;
}

/* Stats grid for modals */
.monitor-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.monitor-stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--gray-200);
    text-align: center;
}

.monitor-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--siterooster-dark);
    line-height: 1.2;
}

.monitor-stat-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.monitor-stat-card.highlight {
    background: linear-gradient(135deg, rgba(255, 107, 71, 0.1), rgba(255, 138, 115, 0.05));
    border-color: rgba(255, 107, 71, 0.2);
}

.monitor-stat-card.highlight .monitor-stat-value {
    color: var(--siterooster-orange);
}

/* History timeline section */
.monitor-history-section {
    padding: 20px 24px;
}

.monitor-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.monitor-history-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
}

.monitor-history-count {
    font-size: 13px;
    color: var(--gray-500);
}

/* Status change timeline */
.status-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.status-timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    position: relative;
}

.status-timeline-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.status-timeline-icon.icon-found {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.status-timeline-icon.icon-not-found {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.status-timeline-icon.icon-change {
    background: var(--status-blue-bg);
    color: var(--status-blue);
}

.status-timeline-icon.icon-snapshot {
    background: var(--gray-100);
    color: var(--gray-500);
}

.status-timeline-content {
    flex: 1;
    min-width: 0;
}

.status-timeline-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin-bottom: 2px;
}

.status-timeline-meta {
    font-size: 13px;
    color: var(--gray-500);
}

.status-timeline-detail {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

.status-timeline-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.status-timeline-badge.badge-found {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.status-timeline-badge.badge-not-found {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.status-timeline-badge.badge-change {
    background: var(--status-blue-bg);
    color: var(--status-blue);
}

/* URL discovery list */
.url-discovery-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.url-discovery-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    gap: 12px;
}

.url-discovery-link {
    color: var(--siterooster-orange);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-discovery-link:hover {
    text-decoration: underline;
}

.url-discovery-date {
    font-size: 12px;
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Crawl trends section */
.crawl-trends-section {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-top: 20px;
}

.crawl-trends-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crawl-trends-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
}

.crawl-trends-body {
    padding: 20px;
}

.crawl-trends-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.crawl-chart-card {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px;
}

.crawl-chart-card h5 {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.crawl-chart-container {
    height: 180px;
    position: relative;
}

/* Empty state for charts */
.chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
    text-align: center;
}

.chart-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.5;
}

.chart-empty-text {
    font-size: 13px;
}

/* Responsive adjustments for charts */
@media (max-width: 800px) {
    .modal-xl .modal-content {
        max-width: 95%;
    }
    
    .monitor-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .monitor-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .crawl-trends-charts {
        grid-template-columns: 1fr;
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-600);
}

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

.modal-header-actions .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================
   All Changes Modal
   ========================================== */

#allChangesModal .modal-header-content {
    flex: 1;
}

.all-changes-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.all-changes-title-icon {
    font-size: 22px;
}

.all-changes-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--siterooster-dark);
    margin: 0;
}

/* Summary bar */
.all-changes-summary-bar {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.all-changes-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.all-changes-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--siterooster-dark);
}

.all-changes-stat-value.stat-new {
    color: var(--status-green);
}

.all-changes-stat-value.stat-modified {
    color: var(--status-orange);
}

.all-changes-stat-value.stat-removed {
    color: var(--status-red);
}

.all-changes-stat-label {
    font-size: 14px;
    color: var(--gray-500);
}

/* Toolbar with filters and search */
.all-changes-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-100);
    gap: 16px;
    flex-wrap: wrap;
}

.all-changes-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.filter-btn.active {
    background: var(--siterooster-dark);
    border-color: var(--siterooster-dark);
    color: white;
}

.filter-btn.filter-new.active {
    background: var(--status-green);
    border-color: var(--status-green);
}

.filter-btn.filter-modified.active {
    background: var(--status-orange);
    border-color: var(--status-orange);
}

.filter-btn.filter-removed.active {
    background: var(--status-red);
    border-color: var(--status-red);
}

.filter-icon {
    font-weight: 700;
    font-size: 14px;
}

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Search */
.all-changes-search {
    position: relative;
    min-width: 220px;
}

.all-changes-search input {
    width: 80%;
    padding: 10px 14px 10px 38px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.all-changes-search input:focus {
    outline: none;
    border-color: var(--siterooster-orange);
}

.all-changes-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gray-400);
}

/* Changes list container */
.all-changes-list-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

/* Individual change item */
.all-changes-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--gray-100);
    gap: 14px;
    transition: background-color 0.15s ease;
}

.all-changes-item:hover {
    background: var(--gray-50);
}

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

.all-changes-item.hidden {
    display: none;
}

/* Change type icon */
.change-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.change-type-icon.type-new {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.change-type-icon.type-modified {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.change-type-icon.type-removed {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.change-type-icon.type-indexed {
    background: var(--status-blue-bg);
    color: var(--status-blue);
}

/* Change item content */
.all-changes-item-content {
    flex: 1;
    min-width: 0;
}

.all-changes-item-url {
    font-size: 14px;
    font-weight: 500;
    color: var(--siterooster-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    margin-bottom: 2px;
}

.all-changes-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--gray-500);
}

.all-changes-item-type {
    text-transform: capitalize;
}

/* Change item actions */
.all-changes-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.all-changes-item-actions .btn {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.all-changes-item:hover .all-changes-item-actions .btn {
    opacity: 1;
}

/* Empty and no results states */
.all-changes-empty {
    text-align: center;
    padding: 60px 24px;
    color: var(--gray-500);
}

.all-changes-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.all-changes-empty-text {
    font-size: 15px;
    margin: 0;
}

/* Footer showing count */
#allChangesModal .modal-footer {
    justify-content: space-between;
    align-items: center;
}

.all-changes-showing {
    font-size: 13px;
    color: var(--gray-500);
}

/* Responsive */
@media (max-width: 600px) {
    .all-changes-summary-bar {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .all-changes-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .all-changes-filters {
        justify-content: center;
    }
    
    .all-changes-search {
        min-width: 100%;
    }
    
    .all-changes-item-actions .btn {
        opacity: 1;
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .site-header-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .overview-charts-row {
        grid-template-columns: 1fr;
    }
    
    .uptime-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .site-header-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-tab-content {
        padding: 20px;
    }
    
    .crawl-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .incident-table-header,
    .incident-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .incident-table-header > div:not(:first-child) {
        display: none;
    }
}

/* Keep existing expandable change details styles */
.change-item-wrapper {
    margin-bottom: 8px;
}

.change-expanded-details {
    display: none;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid var(--gray-200);
    border-top: none;
    margin-top: -8px;
}

.change-item-wrapper.expanded .change-expanded-details {
    display: block;
}

.change-item-wrapper.expanded .change-item-card {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.change-detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.change-detail-row:last-child {
    border-bottom: none;
}

.change-detail-label {
    width: 120px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
}

.change-detail-value {
    flex: 1;
    font-size: 13px;
    color: var(--siterooster-dark);
}

.change-comparison {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.change-previous {
    text-decoration: line-through;
    color: var(--status-red);
    opacity: 0.7;
}

.change-current {
    color: var(--status-green);
}

.content-diff-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.diff-snippet {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
    border-left: 3px solid;
}

.diff-snippet.addition {
    background: var(--status-green-bg);
    border-color: var(--status-green);
}

.diff-snippet.removal {
    background: var(--status-red-bg);
    border-color: var(--status-red);
}

.diff-snippet-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* ==========================================
   Keyword Details Modal - Redesigned
   ========================================== */

/* Modal header adjustments for keyword details */
#keywordDetailsModal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

#keywordDetailsModal .modal-header-content {
    flex: 1;
}

/* Keyword title row */
.keyword-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.keyword-title-icon {
    font-size: 24px;
    line-height: 1;
}

.keyword-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--siterooster-dark);
    margin: 0;
}

/* Status and meta row */
.keyword-status-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Status badge */
.keyword-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
}

.keyword-status-badge.status-found {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.keyword-status-badge.status-not-found {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.keyword-status-badge svg {
    width: 14px;
    height: 14px;
}

/* Meta pills */
.keyword-meta-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.keyword-meta-pill {
    padding: 5px 10px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 13px;
    color: var(--gray-500);
}

/* Summary stats strip */
#keywordDetailsModal .keyword-details-summary {
    padding: 16px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.keyword-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.keyword-summary-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 14px;
}

.keyword-summary-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.keyword-summary-icon.icon-pages {
    background: rgba(255, 107, 71, 0.1);
}

.keyword-summary-icon.icon-time {
    background: var(--status-blue-bg);
}

.keyword-summary-content {
    display: flex;
    flex-direction: column;
}

.keyword-summary-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--siterooster-dark);
    line-height: 1.2;
}

.keyword-summary-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Pages list section */
#keywordDetailsModal .keyword-found-pages {
    padding: 20px 24px;
}

.keyword-pages-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.keyword-pages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for pages list */
.keyword-pages-list::-webkit-scrollbar {
    width: 6px;
}

.keyword-pages-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.keyword-pages-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.keyword-pages-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Individual page item */
.keyword-page-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
    gap: 12px;
}

.keyword-page-item:hover {
    background: var(--gray-100);
}

.keyword-page-link {
    color: var(--siterooster-orange);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.keyword-page-link:hover {
    color: var(--siterooster-coral);
    text-decoration: underline;
}

.keyword-page-monitor-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    flex-shrink: 0;
}

.keyword-page-item:hover .keyword-page-monitor-btn {
    opacity: 1;
}

.keyword-page-monitor-btn:hover {
    border-color: var(--siterooster-orange);
    color: var(--siterooster-orange);
}

/* Scroll indicator */
.keyword-pages-scroll-indicator {
    text-align: center;
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

/* Empty state */
.keyword-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.keyword-empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.keyword-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Modal footer adjustment */
#keywordDetailsModal .modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    padding: 16px 24px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .keyword-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .keyword-status-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .keyword-page-monitor-btn {
        opacity: 1;
    }
}

/* ==========================================
   Page History Modal - Redesigned
   ========================================== */

/* Modal header adjustments for page history */
#pageHistoryModal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

#pageHistoryModal .modal-header-content {
    flex: 1;
}

/* Page title row */
.page-history-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.page-history-title-icon {
    font-size: 24px;
    line-height: 1;
}

.page-history-title-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--siterooster-dark);
    margin: 0;
}

/* URL link */
.page-history-url {
    font-size: 14px;
    color: var(--siterooster-orange);
    text-decoration: none;
    word-break: break-all;
}

.page-history-url:hover {
    color: var(--siterooster-coral);
    text-decoration: underline;
}

/* Summary stats strip */
#pageHistoryModal .page-history-summary {
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    box-sizing: border-box;
}

.page-history-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    box-sizing: border-box;
}

.page-history-summary-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.page-history-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.page-history-summary-icon.icon-snapshots {
    background: #f3e8ff;
}

.page-history-summary-icon.icon-changes {
    background: rgba(255, 107, 71, 0.1);
}

.page-history-summary-icon.icon-frequency {
    background: var(--status-green-bg);
}

.page-history-summary-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.page-history-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--siterooster-dark);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-history-summary-label {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Timeline section */
#pageHistoryModal .page-history-timeline {
    padding: 20px 24px;
}

.page-history-timeline-header {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.page-history-timeline-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar for timeline */
.page-history-timeline-list::-webkit-scrollbar {
    width: 6px;
}

.page-history-timeline-list::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.page-history-timeline-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.page-history-timeline-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Timeline entry */
.timeline-entry {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 16px;
}

.timeline-entry:last-child {
    padding-bottom: 0;
}

/* Timeline line */
.timeline-entry:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 28px;
    width: 2px;
    height: calc(100% - 12px);
    background: var(--gray-200);
}

/* Timeline dot */
.timeline-dot {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gray-300);
}

.timeline-dot.dot-latest {
    background: var(--status-green);
}

.timeline-dot.dot-changed {
    background: var(--siterooster-orange);
}

.timeline-dot svg {
    width: 12px;
    height: 12px;
    color: white;
}

.timeline-dot-change-icon {
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

/* Timeline content card */
.timeline-content {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.timeline-content.content-latest {
    background: var(--status-green-bg);
    border-color: #a7f3d0;
}

.timeline-content.content-changed {
    background: rgba(255, 107, 71, 0.08);
    border-color: rgba(255, 107, 71, 0.3);
}

/* Timeline header */
.timeline-content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-time {
    font-size: 15px;
    font-weight: 600;
    color: var(--siterooster-dark);
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-size {
    font-size: 13px;
    color: var(--gray-500);
}

.timeline-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.timeline-badge.badge-latest {
    background: var(--status-green);
    color: white;
}

.timeline-badge.badge-changed {
    background: var(--siterooster-orange);
    color: white;
}

/* Content snippet */
.timeline-snippet {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.timeline-snippet::before {
    content: '"';
}

.timeline-snippet::after {
    content: '"';
}

/* Change summary */
.timeline-change-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--siterooster-orange);
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 107, 71, 0.2);
}

.timeline-change-summary svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* View diff button */
.timeline-view-diff-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--siterooster-orange);
    cursor: pointer;
    transition: color 0.2s ease;
}

.timeline-view-diff-btn:hover {
    color: var(--siterooster-coral);
}

.timeline-view-diff-btn svg {
    width: 14px;
    height: 14px;
}

/* Empty state */
.page-history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.page-history-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.page-history-empty p {
    margin: 0;
    font-size: 14px;
}

/* Modal footer adjustment */
#pageHistoryModal .modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    padding: 16px 24px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .page-history-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-content-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================
   Notification Settings UI
   ========================================== */

/* Header with tier badge */
.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.notifications-header h3 {
    margin: 0;
}

.tier-badge {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 50px;
    background: var(--gray-100);
    color: var(--gray-600);
}

.tier-badge.tier-small {
    background: #dbeafe;
    color: #1d4ed8;
}

.tier-badge.tier-medium {
    background: #f3e8ff;
    color: #7c3aed;
}

.tier-badge.tier-enterprise {
    background: rgba(255, 107, 71, 0.15);
    color: var(--siterooster-orange);
}

/* Upgrade prompt for free tier */
.notification-upgrade-prompt {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 107, 71, 0.08);
    border: 1px solid rgba(255, 107, 71, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.upgrade-prompt-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.upgrade-prompt-content h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
}

.upgrade-prompt-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--gray-600);
}

/* Alert types box */
.notification-alerts-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    padding: 20px;
}

.notification-alert-row {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.notification-alert-row:last-child {
    border-bottom: none;
}

.notification-alerts-box.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.alert-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.alert-icon {
    font-size: 18px;
    line-height: 1;
}

.alert-text {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--siterooster-dark);
    font-size: 14px;
}

.alert-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Channel toggle buttons */
.alert-channels {
    display: flex;
    gap: 8px;
    margin-left: 30px;
}

.channel-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
}

.channel-btn:hover:not(.locked):not(.needs-setup) {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.channel-btn.active {
    background: var(--status-green-bg);
    border-color: var(--status-green);
    color: #166534;
}

.channel-btn.active .channel-check {
    display: inline;
}

.channel-btn .channel-check {
    display: none;
    margin-left: auto;
    font-weight: 700;
}

.channel-btn .channel-lock {
    display: none;
    margin-left: auto;
    font-size: 12px;
}

.channel-btn.locked {
    opacity: 0.5;
    cursor: pointer;
    background: var(--gray-50);
}

.channel-btn.locked:hover {
    opacity: 0.7;
}

.channel-btn.locked .channel-lock {
    display: inline;
}

.channel-btn.needs-setup {
    opacity: 0.5;
    cursor: not-allowed;
}

.channel-btn.needs-setup::after {
    content: 'Setup';
    font-size: 10px;
    color: var(--siterooster-orange);
    margin-left: 4px;
}

.channel-icon {
    font-size: 14px;
}

/* Notification Channels Setup */
.notification-channels-setup {
    margin-top: 24px;
}

.channels-setup-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.channel-setup-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}

.channel-setup-card.locked {
    opacity: 0.6;
    cursor: pointer;
}

.channel-setup-card.locked:hover {
    opacity: 0.8;
    background: var(--gray-100);
}

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

.channel-setup-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.channel-setup-icon.bg-blue {
    background: #dbeafe;
}

.channel-setup-icon.bg-purple {
    background: #f3e8ff;
}

.channel-setup-icon.bg-orange {
    background: rgba(255, 107, 71, 0.15);
}

.channel-setup-info {
    flex: 1;
    min-width: 0;
}

.channel-setup-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--siterooster-dark);
}

.channel-setup-detail {
    font-size: 12px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-status-badge {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 50px;
    background: var(--gray-200);
    color: var(--gray-600);
}

.channel-status-badge.active {
    background: var(--status-green-bg);
    color: #166534;
}

.channel-lock-badge {
    font-size: 14px;
    opacity: 0.6;
}

/* Channel setup forms */
.channel-setup-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.phone-input-group,
.webhook-input-group,
.verification-code-input {
    display: flex;
    gap: 8px;
}

.channel-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.channel-input:focus {
    border-color: var(--siterooster-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 71, 0.1);
}

.channel-input.mono {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
}

.channel-input.code-input {
    max-width: 120px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 4px;
}

.btn-dark {
    background: var(--siterooster-dark);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-dark:hover {
    background: #1f2937;
}

.btn-link {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--gray-700);
}

.btn-link.text-red {
    color: var(--status-red);
}

.btn-link.text-red:hover {
    color: #b91c1c;
}

.channel-help-text {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: var(--gray-400);
}

.text-orange {
    color: var(--siterooster-orange);
    text-decoration: none;
}

.text-orange:hover {
    text-decoration: underline;
}

/* Verification states */
.verification-sent-text {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 10px 0;
}

.verification-group {
    text-align: left;
}

.verified-phone-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.verified-phone-number {
    font-weight: 600;
    color: var(--siterooster-dark);
}

/* SMS Usage Indicator */
.sms-usage-indicator {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.sms-usage-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.sms-usage-fill {
    height: 100%;
    background: var(--status-green);
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.sms-usage-fill.warning {
    background: var(--siterooster-orange);
}

.sms-usage-fill.danger {
    background: var(--status-red);
}

.sms-usage-text {
    font-size: 12px;
    color: var(--gray-500);
}

/* Responsive adjustments for notifications */
@media (max-width: 768px) {
    .alert-channels {
        flex-wrap: wrap;
        margin-left: 0;
    }
    
    .channel-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    
    .notifications-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
/* ==========================================
   Notifications V2 - Full Width with Settings
   ========================================== */

.notifications-section-fullwidth {
    grid-column: 1 / -1; /* Span full width in any grid */
    margin-top: 20px;
}

.notifications-section-fullwidth .notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.notifications-section-fullwidth .notifications-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* Alert Row V2 - Clean separator style */
.notification-alert-row-v2 {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
}

.notification-alert-row-v2:first-child {
    padding-top: 0;
}

.notification-alert-row-v2:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.notification-alert-row-v2 .alert-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.notification-alert-row-v2 .alert-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.notification-alert-row-v2 .alert-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.notification-alert-row-v2 .alert-text {
    flex: 1;
    min-width: 0;
}

.notification-alert-row-v2 .alert-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.notification-alert-row-v2 .alert-desc {
    font-size: 13px;
    color: var(--gray-500);
}

/* Alert Settings Panel */
.notification-alert-row-v2 .alert-settings {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    flex-wrap: wrap;
}

.notification-alert-row-v2 .setting-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.notification-alert-row-v2 .setting-item label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.notification-alert-row-v2 .setting-item select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    font-size: 13px;
    color: var(--gray-700);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.notification-alert-row-v2 .setting-item select:hover {
    border-color: var(--gray-400);
}

.notification-alert-row-v2 .setting-item select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

/* Info text setting item (for redirect) */
.notification-alert-row-v2 .setting-info-text {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    font-size: 13px;
    color: var(--gray-600);
    background: var(--gray-50);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}

.notification-alert-row-v2 .setting-info-text .info-icon {
    font-size: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Channels Setup Section */
.notification-channels-setup {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.notification-channels-setup .channels-setup-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

/* Channels Setup Grid */
.channels-setup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .notification-alert-row-v2 .alert-main {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notification-alert-row-v2 .alert-channels {
        margin-top: 12px;
        width: 100%;
    }
    
    .channels-setup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .notification-alert-row-v2 {
        padding: 16px 0;
    }
    
    .notification-alert-row-v2 .alert-settings {
        flex-direction: column;
        gap: 12px;
    }
    
    .notification-alert-row-v2 .setting-item {
        width: 100%;
    }
    
    .notification-alert-row-v2 .setting-item select {
        width: 100%;
    }
    
    .channels-setup-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Sharing & Visibility Section
   ========================================== */

.sharing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sharing-header h3 {
    margin: 0;
}

.sharing-upgrade-prompt {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #fef3e7 0%, #fef9f3 100%);
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.sharing-upgrade-prompt .upgrade-prompt-icon {
    font-size: 32px;
    line-height: 1;
}

.sharing-upgrade-prompt .upgrade-prompt-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.sharing-upgrade-prompt .upgrade-prompt-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.5;
}

.visibility-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.visibility-option {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.visibility-option:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.visibility-option.selected {
    border-color: var(--siterooster-orange);
    background: #fff8f3;
}

.visibility-option.locked {
    cursor: default;
}

.visibility-option.locked.disabled {
    opacity: 0.6;
    background: var(--gray-50);
}

.visibility-option.locked.disabled:hover {
    border-color: var(--gray-200);
    background: var(--gray-50);
}

.visibility-radio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.visibility-option.locked .visibility-radio {
    cursor: default;
}

.visibility-radio input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    margin-top: 2px;
}

.visibility-radio input[type="radio"]:checked + .radio-custom {
    border-color: var(--siterooster-orange);
}

.visibility-radio input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--siterooster-orange);
    border-radius: 50%;
}

.visibility-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.visibility-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--gray-900);
}

.visibility-desc {
    font-size: 13px;
    color: var(--gray-500);
}

.lock-icon {
    font-size: 12px;
    margin-left: 4px;
}

/* Share Link Box */
.share-link-box {
    margin-top: 20px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.share-link-box label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.share-link-input-group {
    display: flex;
    gap: 8px;
}

.share-link-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', monospace;
    background: white;
    color: var(--gray-700);
}

.share-link-input:focus {
    outline: none;
    border-color: var(--siterooster-orange);
}

/* Visibility options locked state */
.visibility-options-locked .visibility-option.disabled .visibility-label {
    color: var(--gray-500);
}

.visibility-options-locked .visibility-option.disabled .radio-custom {
    border-color: var(--gray-200);
    background: var(--gray-100);
}

/* Responsive */
@media (max-width: 768px) {
    .share-link-input-group {
        flex-direction: column;
    }
    
    .share-link-input-group .btn {
        width: 100%;
    }
    
    .sharing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================
   Highlight Pulse Animation
   Used to draw attention to buttons
   ========================================== */
@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(249, 115, 22, 0);
        transform: scale(1.05);
    }
}

.highlight-pulse {
    animation: highlightPulse 0.8s ease-in-out 3;
    position: relative;
    z-index: 10;
}

/* ==========================================
   Keyword Monitor Checking State
   ========================================== */
@keyframes checkingPulse {
    0%, 100% {
        opacity: 1;
        border-color: #f59e0b;
    }
    50% {
        opacity: 0.7;
        border-color: #fbbf24;
    }
}

@keyframes spinnerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.keyword-card.checking-pulse {
    animation: checkingPulse 1.5s ease-in-out infinite;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.keyword-status.status-checking {
    color: #f59e0b;
    font-weight: 500;
}

.checking-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f59e0b;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

/* ==========================================
   Crawl Running State Animations
   ========================================== */

/* Pulse animation when stat value updates */
.crawl-stat-value.updating {
    animation: statPulse 0.6s ease;
}

@keyframes statPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--siterooster-orange); }
    100% { transform: scale(1); }
}

/* Crawling state - subtle continuous pulse on all stats */
.crawl-stats-row.crawling .crawl-stat {
    animation: crawlingPulse 2s ease-in-out infinite;
}

.crawl-stats-row.crawling .crawl-stat:nth-child(2) {
    animation-delay: 0.5s;
}

.crawl-stats-row.crawling .crawl-stat:nth-child(3) {
    animation-delay: 1s;
}

.crawl-stats-row.crawling .crawl-stat:nth-child(4) {
    animation-delay: 1.5s;
}

@keyframes crawlingPulse {
    0%, 100% { 
        background: var(--gray-50);
        box-shadow: none;
    }
    50% { 
        background: rgba(249, 115, 22, 0.08);
        box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
    }
}

/* Crawl button running state */
.crawl-btn-running {
    position: relative;
    pointer-events: none;
    opacity: 0.9;
}

.crawl-btn-running .spin-icon {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 6px;
}

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

/* =============================================
   Change Details Expansion Styles
   ============================================= */

/* Wrapper for each change item */
.change-item-wrapper {
    border-bottom: 1px solid var(--gray-100);
}

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

.change-item-wrapper.expanded {
    background: var(--gray-50);
}

/* Main change item row */
.change-item-modal {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 14px;
    transition: background-color 0.15s ease;
}

.change-item-modal:hover {
    background: var(--gray-50);
}

.change-item-wrapper.expanded .change-item-modal {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

/* Change icon */
.change-icon-small {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.change-icon-small.change-added {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.change-icon-small.change-modified {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.change-icon-small.change-removed {
    background: var(--status-red-bg);
    color: var(--status-red);
}

/* Change info section */
.change-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.change-url-modal {
    font-size: 14px;
    font-weight: 500;
    color: var(--siterooster-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.change-summary-text {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

.change-time-modal {
    font-size: 12px;
    color: var(--gray-500);
}

/* Change actions */
.change-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-details-small {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    background: white;
    color: var(--gray-600);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-details-small:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    color: var(--gray-700);
}

.change-item-wrapper.expanded .btn-details-small {
    background: var(--siterooster-orange);
    border-color: var(--siterooster-orange);
    color: white;
}

.btn-monitor-small {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--siterooster-orange);
    background: transparent;
    color: var(--siterooster-orange);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-monitor-small:hover {
    background: var(--siterooster-orange);
    color: white;
}

/* Expanded details section */
.change-details-expanded {
    background: white;
    border-top: none;
    overflow: hidden;
}

.change-details-content {
    padding: 16px 20px 20px 62px; /* Align with content after icon */
}

.change-details-loading,
.change-details-error,
.change-details-empty {
    padding: 20px;
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

.change-details-error {
    color: var(--status-red);
}

/* Individual detail items */
.change-detail-item {
    margin-bottom: 16px;
}

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

.change-detail-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.change-detail-value {
    font-size: 14px;
    color: var(--siterooster-dark);
}

/* Word count change indicator */
.word-change {
    font-weight: 600;
    margin-left: 8px;
}

.word-change.word-increase {
    color: var(--status-green);
}

.word-change.word-decrease {
    color: var(--status-red);
}

/* Diff display for title/meta changes */
.change-detail-diff {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.diff-removed {
    background: #fef2f2;
    border-left: 3px solid var(--status-red);
    padding: 8px 12px;
    font-size: 13px;
    color: #991b1b;
    border-radius: 0 6px 6px 0;
    word-break: break-word;
}

.diff-added {
    background: #f0fdf4;
    border-left: 3px solid var(--status-green);
    padding: 8px 12px;
    font-size: 13px;
    color: #166534;
    border-radius: 0 6px 6px 0;
    word-break: break-word;
}

/* Content snippets */
.change-detail-snippets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.snippet-added {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 10px 12px;
    font-size: 13px;
    color: #166534;
    border-radius: 6px;
    font-style: italic;
    line-height: 1.5;
    word-break: break-word;
}

.snippet-removed {
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    font-size: 13px;
    color: #991b1b;
    border-radius: 6px;
    font-style: italic;
    line-height: 1.5;
    text-decoration: line-through;
    word-break: break-word;
}

/* Content preview for new pages */
.change-detail-preview {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 12px;
    font-size: 13px;
    color: var(--gray-600);
    border-radius: 6px;
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
    word-break: break-word;
}

/* All changes summary bar in modal */
.all-changes-summary {
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.change-stat {
    font-size: 14px;
    color: var(--gray-600);
}

.change-stat strong {
    color: var(--siterooster-dark);
    font-weight: 600;
}

.all-changes-list {
    max-height: 450px;
    overflow-y: auto;
}

.all-changes-item-wrapper.hidden {
    display: none;
}

/* ==========================================
   Performance & SEO Health Section
   ========================================== */

.performance-seo-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.perf-seo-header {
    margin-bottom: 16px;
}

.perf-seo-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
}

.perf-seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .perf-seo-grid {
        grid-template-columns: 1fr;
    }
}

.perf-seo-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
}

.perf-seo-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.perf-seo-card-icon {
    font-size: 18px;
}

.perf-seo-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--siterooster-dark);
    flex: 1;
}

.perf-seo-card-header .btn-xs {
    padding: 4px 10px;
    font-size: 11px;
}

/* Performance Stats Grid */
.perf-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .perf-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.perf-stat {
    text-align: center;
    padding: 10px 6px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.perf-stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--siterooster-dark);
    margin-bottom: 2px;
}

.perf-stat-value.status-good {
    color: var(--status-green);
}

.perf-stat-value.status-warning {
    color: var(--status-orange);
}

.perf-stat-value.status-bad {
    color: var(--status-red);
}

.perf-stat-label {
    display: block;
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Performance Lists */
.perf-seo-lists {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.perf-list {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 10px;
}

.perf-list-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.perf-list-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perf-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.perf-list-item-url {
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.perf-list-item-value {
    font-weight: 600;
    color: var(--siterooster-dark);
    white-space: nowrap;
}

.perf-list-item-value.slow {
    color: var(--status-red);
}

.perf-list-item-value.medium {
    color: var(--status-orange);
}

.perf-list-empty {
    font-size: 12px;
    color: var(--gray-400);
    text-align: center;
    padding: 8px;
}

/* SEO Health Summary */
.seo-health-summary {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.seo-health-score {
    flex-shrink: 0;
}

.seo-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--status-green-bg), white);
    border: 3px solid var(--status-green);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seo-score-circle.score-good {
    border-color: var(--status-green);
    background: linear-gradient(135deg, var(--status-green-bg), white);
}

.seo-score-circle.score-warning {
    border-color: var(--status-orange);
    background: linear-gradient(135deg, var(--status-orange-bg), white);
}

.seo-score-circle.score-bad {
    border-color: var(--status-red);
    background: linear-gradient(135deg, var(--status-red-bg), white);
}

.seo-score-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--siterooster-dark);
    line-height: 1;
}

.seo-score-label {
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seo-issues-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.seo-issue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.seo-issue-row:hover {
    background: var(--siterooster-light);
    border-color: var(--siterooster-coral);
}

.seo-issue-label {
    font-size: 12px;
    color: var(--gray-700);
}

.seo-issue-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--siterooster-dark);
    min-width: 24px;
    text-align: right;
}

.seo-issue-count.has-issues {
    color: var(--status-orange);
}

.seo-issue-count.no-issues {
    color: var(--status-green);
}

/* Page Audit Details in Modal */
.page-audit-details {
    margin-top: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.page-audit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .page-audit-grid {
        grid-template-columns: 1fr;
    }
}

.page-audit-group {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--gray-200);
}

.page-audit-group-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-100);
}

.page-audit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 12px;
}

.page-audit-label {
    color: var(--gray-600);
}

.page-audit-value {
    font-weight: 600;
    color: var(--siterooster-dark);
}

.page-audit-value.good {
    color: var(--status-green);
}

.page-audit-value.warning {
    color: var(--status-orange);
}

.page-audit-value.bad {
    color: var(--status-red);
}

/* Performance badge in changes list */
.change-perf-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-600);
}

.change-perf-badge.fast {
    background: var(--status-green-bg);
    color: var(--status-green);
}

.change-perf-badge.medium {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.change-perf-badge.slow {
    background: var(--status-red-bg);
    color: var(--status-red);
}

/* ==========================================
   SEO Issues Modal Styles
   ========================================== */

.seo-issues-modal-content {
    padding: 0;
}

.seo-issues-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.seo-issues-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--siterooster-dark);
    margin: 0;
}

.seo-issues-count {
    font-size: 13px;
    color: var(--gray-500);
}

.seo-issues-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.seo-issues-filters .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid var(--gray-200);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--gray-600);
}

.seo-issues-filters .filter-btn:hover {
    border-color: var(--siterooster-coral);
    color: var(--siterooster-orange);
}

.seo-issues-filters .filter-btn.active {
    background: var(--siterooster-orange);
    border-color: var(--siterooster-orange);
    color: white;
}

.seo-issues-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.seo-issues-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.seo-issues-modal-content .seo-issues-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.seo-issue-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.seo-issue-item-url {
    font-size: 13px;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    flex-shrink: 0;
}

.seo-issue-item-issues {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.seo-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 4px;
    white-space: nowrap;
}

.seo-badge.bad {
    background: var(--status-red-bg);
    color: var(--status-red);
}

.seo-badge.warning {
    background: var(--status-orange-bg);
    color: var(--status-orange);
}

.seo-badge.good {
    background: var(--status-green-bg);
    color: var(--status-green);
}

/* Large modal variant */
.modal.modal-lg .modal-content {
    max-width: 800px;
}
/* ==========================================
   Make sure chart card works in new layout
   ========================================== */
.chart-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.chart-card h3 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
}

.chart-card .chart-wrapper {
    height: 120px;
}

.chart-card .response-chart-container {
    height: 200px;
}
/* ==========================================
   Activity List Styles
   ========================================== */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-dot.success {
    background: var(--status-green);
}

.activity-dot.error {
    background: var(--status-red);
}

.activity-dot.info {
    background: var(--gray-400);
}

.activity-content {
    flex: 1;
}

.activity-message {
    font-size: 14px;
    color: var(--gray-700);
}

.activity-time {
    font-size: 12px;
    color: var(--gray-400);
    white-space: nowrap;
}

/* Ensure old tab content is visible when inside a visible section */
.sr-section .site-tab-content {
    display: block !important;
}


/* ==========================================
   Site Switcher Dropdown
   ========================================== */

/* Make the button clickable */
.sr-site-switcher-btn {
    cursor: pointer;
}

/* Rotate arrow when open */
.sr-site-switcher.open .sr-site-switcher-arrow {
    transform: rotate(180deg);
}

.sr-site-switcher-arrow {
    transition: transform 0.2s ease;
}

/* Dropdown container */
.sr-site-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 300px;
    overflow: hidden;
}

.sr-site-switcher {
    position: relative;
}

.sr-site-switcher.open .sr-site-dropdown {
    display: block;
}

/* Dropdown list */
.sr-site-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 8px;
}

/* Loading state */
.sr-site-dropdown-loading {
    padding: 16px;
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
}

/* Individual site item */
.sr-site-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.sr-site-dropdown-item:hover {
    background: var(--gray-50);
}

.sr-site-dropdown-item.active {
    background: var(--siterooster-cream);
}

.sr-site-dropdown-item .sr-site-favicon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.sr-site-dropdown-item .sr-site-favicon img {
    width: 18px;
    height: 18px;
}

.sr-site-dropdown-item-info {
    flex: 1;
    min-width: 0;
}

.sr-site-dropdown-item-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--siterooster-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sr-site-dropdown-item-url {
    font-size: 11px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Active indicator */
.sr-site-dropdown-item.active::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--siterooster-orange);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Add/View all sites link */
.sr-site-dropdown-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
    color: var(--siterooster-orange);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.sr-site-dropdown-add:hover {
    background: var(--siterooster-cream);
}

.sr-site-dropdown-add svg {
    width: 16px;
    height: 16px;
}

/* ==========================================
   Universal SiteRooster Loader
   Usage: <div class="sr-loader">
            <div class="sr-loader-icon"></div>
            <div class="sr-loader-text">Loading...</div>
          </div>
   Variants: .sr-loader-sm (compact), .sr-loader-inline (inline)
   ========================================== */

.sr-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.sr-loader-sm {
    padding: 32px 16px;
    gap: 12px;
}

.sr-loader-inline {
    flex-direction: row;
    padding: 16px;
    gap: 10px;
}

.sr-loader-icon {
    width: 48px;
    height: 48px;
    background-image: url('https://siterooster.com/wp-content/uploads/2026/01/cropped-siterooster_icon-1.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: sr-loader-pulse 1.8s ease-in-out infinite;
    filter: grayscale(0.2);
}

.sr-loader-sm .sr-loader-icon {
    width: 32px;
    height: 32px;
}

.sr-loader-inline .sr-loader-icon {
    width: 24px;
    height: 24px;
}

@keyframes sr-loader-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.92);
    }
}

.sr-loader-text {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.01em;
}

.sr-loader-sm .sr-loader-text {
    font-size: 12px;
}

.sr-loader-inline .sr-loader-text {
    font-size: 13px;
}