    html.dark #pageDashboard,
    html[data-theme="dark"] #pageDashboard {
        --primary-bg: var(--bg);
        --card-bg: var(--surface);
        --text-main: var(--text);
        --text-muted: var(--text-secondary);
        --border-soft: var(--border);
        --success-bg: rgba(16, 185, 129, 0.16);
        --danger-bg: rgba(244, 63, 94, 0.16);
        --warning-bg: rgba(245, 158, 11, 0.16);
        --info-bg: rgba(59, 130, 246, 0.16);
    }

    html.dark #pageDashboard .an-panel,
    html.dark #pageDashboard .lb-stat-card,
    html[data-theme="dark"] #pageDashboard .an-panel,
    html[data-theme="dark"] #pageDashboard .lb-stat-card {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
    }

    html.dark #pageDashboard .an-panel-head,
    html[data-theme="dark"] #pageDashboard .an-panel-head {
        border-bottom-color: var(--border) !important;
    }

    html.dark #pageDashboard .pub-table th,
    html.dark #pageDashboard .an-table th,
    html[data-theme="dark"] #pageDashboard .pub-table th,
    html[data-theme="dark"] #pageDashboard .an-table th {
        background: var(--surface-hover) !important;
        color: var(--text-secondary) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark #pageDashboard .pub-table td,
    html.dark #pageDashboard .an-table td,
    html[data-theme="dark"] #pageDashboard .pub-table td,
    html[data-theme="dark"] #pageDashboard .an-table td {
        color: var(--text) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark #pageDashboard .pub-table span.pub-title,
    html.dark #pageDashboard a.pub-title,
    html.dark #pageDashboard .lb-title-link,
    html.dark #pageDashboard .lb-stat-card .lb-stat-value,
    html[data-theme="dark"] #pageDashboard .pub-table span.pub-title,
    html[data-theme="dark"] #pageDashboard a.pub-title,
    html[data-theme="dark"] #pageDashboard .lb-title-link,
    html[data-theme="dark"] #pageDashboard .lb-stat-card .lb-stat-value {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .pub-date,
    html.dark #pageDashboard .pub-keyword,
    html.dark #pageDashboard .lb-stat-card .lb-stat-label,
    html.dark #pageDashboard .lb-url-small,
    html[data-theme="dark"] #pageDashboard .pub-date,
    html[data-theme="dark"] #pageDashboard .pub-keyword,
    html[data-theme="dark"] #pageDashboard .lb-stat-card .lb-stat-label,
    html[data-theme="dark"] #pageDashboard .lb-url-small {
        color: var(--text-secondary) !important;
    }

    html.dark #pageDashboard .lb-keyword-chip,
    html[data-theme="dark"] #pageDashboard .lb-keyword-chip {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #pageDashboard,
    html.dark #pageDashboard .dashboard-container,
    html[data-theme="dark"] #pageDashboard,
    html[data-theme="dark"] #pageDashboard .dashboard-container {
        color: var(--text) !important;
        background-color: var(--bg) !important;
    }

    html.dark #pageDashboard .category-header,
    html.dark #pageDashboard .analytics-list-item,
    html[data-theme="dark"] #pageDashboard .category-header,
    html[data-theme="dark"] #pageDashboard .analytics-list-item {
        border-bottom-color: var(--border) !important;
    }

    html.dark #pageDashboard .circle-bg,
    html[data-theme="dark"] #pageDashboard .circle-bg {
        stroke: var(--border) !important;
    }

    html.dark #pageDashboard .mini-stat,
    html.dark #pageDashboard .soft-badge,
    html[data-theme="dark"] #pageDashboard .mini-stat,
    html[data-theme="dark"] #pageDashboard .soft-badge {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #pageDashboard .issue-tag,
    html[data-theme="dark"] #pageDashboard .issue-tag {
        background: rgba(244, 63, 94, 0.14) !important;
        color: #fb7185 !important;
        border-color: rgba(244, 63, 94, 0.35) !important;
    }

    html.dark #pageDashboard h1,
    html.dark #pageDashboard h2,
    html.dark #pageDashboard h3,
    html.dark #pageDashboard h4,
    html.dark #pageDashboard h5,
    html.dark #pageDashboard h6,
    html.dark #pageDashboard .h1,
    html.dark #pageDashboard .h2,
    html.dark #pageDashboard .h3,
    html.dark #pageDashboard .h4,
    html.dark #pageDashboard .h5,
    html.dark #pageDashboard .h6,
    html.dark #pageDashboard .section-title,
    html.dark #pageDashboard .issue-title,
    html.dark #pageDashboard .content-item-title,
    html.dark #pageDashboard .insight-title,
    html.dark #pageDashboard .breakdown-name,
    html[data-theme="dark"] #pageDashboard h1,
    html[data-theme="dark"] #pageDashboard h2,
    html[data-theme="dark"] #pageDashboard h3,
    html[data-theme="dark"] #pageDashboard h4,
    html[data-theme="dark"] #pageDashboard h5,
    html[data-theme="dark"] #pageDashboard h6,
    html[data-theme="dark"] #pageDashboard .h1,
    html[data-theme="dark"] #pageDashboard .h2,
    html[data-theme="dark"] #pageDashboard .h3,
    html[data-theme="dark"] #pageDashboard .h4,
    html[data-theme="dark"] #pageDashboard .h5,
    html[data-theme="dark"] #pageDashboard .h6,
    html[data-theme="dark"] #pageDashboard .section-title,
    html[data-theme="dark"] #pageDashboard .issue-title,
    html[data-theme="dark"] #pageDashboard .content-item-title,
    html[data-theme="dark"] #pageDashboard .insight-title,
    html[data-theme="dark"] #pageDashboard .breakdown-name {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .reviews-promo-card,
    html.dark #pageDashboard .reviews-promo-card h3,
    html.dark #pageDashboard .reviews-promo-card p,
    html.dark #pageDashboard .reviews-promo-card .reviews-promo-rating,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card h3,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card p,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .reviews-promo-rating {
        color: #1a1205 !important;
    }

    html.dark #pageDashboard .reviews-promo-card p,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card p {
        opacity: 1 !important;
    }

    html.dark #pageDashboard p,
    html.dark #pageDashboard .small,
    html.dark #pageDashboard .text-muted,
    html.dark #pageDashboard .issue-description,
    html.dark #pageDashboard .insight-message,
    html.dark #pageDashboard .content-item-meta,
    html.dark #pageDashboard .stat-label,
    html.dark #pageDashboard .traffic-stat .label,
    html.dark #pageDashboard .legend-item,
    html.dark #pageDashboard .advanced-insight-text,
    html[data-theme="dark"] #pageDashboard p,
    html[data-theme="dark"] #pageDashboard .small,
    html[data-theme="dark"] #pageDashboard .text-muted,
    html[data-theme="dark"] #pageDashboard .issue-description,
    html[data-theme="dark"] #pageDashboard .insight-message,
    html[data-theme="dark"] #pageDashboard .content-item-meta,
    html[data-theme="dark"] #pageDashboard .stat-label,
    html[data-theme="dark"] #pageDashboard .traffic-stat .label,
    html[data-theme="dark"] #pageDashboard .legend-item,
    html[data-theme="dark"] #pageDashboard .advanced-insight-text {
        color: var(--text-secondary) !important;
    }

    html.dark #pageDashboard .data-table td small,
    html.dark #pageDashboard .data-table .page-url,
    html[data-theme="dark"] #pageDashboard .data-table td small,
    html[data-theme="dark"] #pageDashboard .data-table .page-url {
        color: var(--text-secondary) !important;
    }

    html.dark .text-muted,
    html.dark .text-muted.small,
    html.dark small.text-muted,
    html[data-theme="dark"] .text-muted,
    html[data-theme="dark"] .text-muted.small,
    html[data-theme="dark"] small.text-muted {
        color: var(--text-secondary) !important;
    }

    html.dark #pageDashboard .summary-card,
    html.dark #pageDashboard .metric-card,
    html.dark #pageDashboard .analytics-card,
    html.dark #pageDashboard .content-card,
    html.dark #pageDashboard .issue-item,
    html.dark #pageDashboard .action-card,
    html.dark #pageDashboard .glass-card,
    html.dark #pageDashboard .rabbit-clean-panel,
    html.dark #pageDashboard .dashboard-card,
    html.dark #pageDashboard .card,
    html.dark #pageDashboard .category-card,
    html.dark #pageDashboard .list-card,
    html[data-theme="dark"] #pageDashboard .summary-card,
    html[data-theme="dark"] #pageDashboard .metric-card,
    html[data-theme="dark"] #pageDashboard .analytics-card,
    html[data-theme="dark"] #pageDashboard .content-card,
    html[data-theme="dark"] #pageDashboard .issue-item,
    html[data-theme="dark"] #pageDashboard .action-card,
    html[data-theme="dark"] #pageDashboard .glass-card,
    html[data-theme="dark"] #pageDashboard .rabbit-clean-panel,
    html[data-theme="dark"] #pageDashboard .dashboard-card,
    html[data-theme="dark"] #pageDashboard .card,
    html[data-theme="dark"] #pageDashboard .category-card,
    html[data-theme="dark"] #pageDashboard .list-card {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text);
        box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28) !important;
    }

    html.dark #pageDashboard .category-card:hover,
    html.dark #pageDashboard .list-card:hover,
    html[data-theme="dark"] #pageDashboard .category-card:hover,
    html[data-theme="dark"] #pageDashboard .list-card:hover {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35) !important;
    }

    html.dark #pageDashboard .stat-box .stat-value,
    html.dark #pageDashboard .traffic-stat .value,
    html.dark #pageDashboard .content-stat-value,
    html.dark #pageDashboard .breakdown-value,
    html[data-theme="dark"] #pageDashboard .stat-box .stat-value,
    html[data-theme="dark"] #pageDashboard .traffic-stat .value,
    html[data-theme="dark"] #pageDashboard .content-stat-value,
    html[data-theme="dark"] #pageDashboard .breakdown-value {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .status-badge.needs-work,
    html.dark #pageDashboard .status-badge.needs-work #statusLabel,
    html[data-theme="dark"] #pageDashboard .status-badge.needs-work,
    html[data-theme="dark"] #pageDashboard .status-badge.needs-work #statusLabel {
        background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35) !important;
    }

    html.dark #pageDashboard .status-badge.good,
    html.dark #pageDashboard .status-badge.good #statusLabel,
    html[data-theme="dark"] #pageDashboard .status-badge.good,
    html[data-theme="dark"] #pageDashboard .status-badge.good #statusLabel {
        background: rgba(16, 185, 129, 0.16) !important;
        color: #34d399 !important;
        border-color: rgba(16, 185, 129, 0.35) !important;
    }

    html.dark #pageDashboard .issue-item.issue-bad .issue-icon,
    html[data-theme="dark"] #pageDashboard .issue-item.issue-bad .issue-icon {
        background-color: rgba(239, 68, 68, 0.16) !important;
        color: #f87171 !important;
    }

    html.dark #pageDashboard .issue-item.issue-good .issue-icon,
    html[data-theme="dark"] #pageDashboard .issue-item.issue-good .issue-icon {
        background-color: rgba(16, 185, 129, 0.16) !important;
        color: #34d399 !important;
    }

    html.dark #pageDashboard .table,
    html.dark #pageDashboard .table td,
    html.dark #pageDashboard .table th,
    html[data-theme="dark"] #pageDashboard .table,
    html[data-theme="dark"] #pageDashboard .table td,
    html[data-theme="dark"] #pageDashboard .table th {
        color: var(--text);
        border-color: var(--border);
        background-color: transparent;
    }

    html.dark #pageDashboard .table-hover tbody tr:hover,
    html[data-theme="dark"] #pageDashboard .table-hover tbody tr:hover {
        background: var(--surface-hover) !important;
        color: var(--text);
    }

    html.dark #pageDashboard [style*="background: #f8f9fa"],
    html.dark #pageDashboard [style*="background:#f8f9fa"],
    html[data-theme="dark"] #pageDashboard [style*="background: #f8f9fa"],
    html[data-theme="dark"] #pageDashboard [style*="background:#f8f9fa"] {
        background: var(--surface-hover) !important;
    }

    html.dark #pageOptimization .main-content,
    html[data-theme="dark"] #pageOptimization .main-content {
        background: var(--bg) !important;
        color: var(--text) !important;
    }

    html.dark #pageOptimization .main-content::-webkit-scrollbar-track,
    html[data-theme="dark"] #pageOptimization .main-content::-webkit-scrollbar-track {
        background: var(--surface) !important;
    }

    html.dark #pageOptimization .score-card,
    html.dark #pageOptimization .opt-feature-card,
    html[data-theme="dark"] #pageOptimization .score-card,
    html[data-theme="dark"] #pageOptimization .opt-feature-card {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #pageOptimization .opt-audit-loading-title,
    html.dark #pageOptimization .opt-fix-loading-title,
    html[data-theme="dark"] #pageOptimization .opt-audit-loading-title,
    html[data-theme="dark"] #pageOptimization .opt-fix-loading-title {
        color: var(--text) !important;
    }

    html.dark #pageOptimization .opt-audit-loading-hint,
    html.dark #pageOptimization .opt-fix-loading-sub,
    html[data-theme="dark"] #pageOptimization .opt-audit-loading-hint,
    html[data-theme="dark"] #pageOptimization .opt-fix-loading-sub {
        color: var(--text-secondary) !important;
    }

    html.dark #pageOptimization .opt-audit-progress-track,
    html[data-theme="dark"] #pageOptimization .opt-audit-progress-track {
        background: var(--border) !important;
    }

    html.dark #pageOptimization .optimizer-settings-menu,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-menu {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
    }

    html.dark #pageOptimization .optimizer-settings-quota,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-quota {
        background: var(--surface-hover) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark #pageOptimization .optimizer-settings-quota-label,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-quota-label {
        color: var(--text-muted) !important;
    }

    html.dark #pageOptimization .optimizer-settings-quota-text,
    html.dark #pageOptimization .optimizer-settings-add-pages-item,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-quota-text,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-add-pages-item {
        color: var(--text) !important;
    }

    html.dark #pageOptimization .optimizer-settings-add-pages-item:hover,
    html.dark #pageOptimization .optimizer-settings-add-pages-item:focus,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-add-pages-item:hover,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-add-pages-item:focus {
        background: var(--surface-hover) !important;
        color: var(--text) !important;
    }

    html.dark #pageOptimization .optimizer-settings-quota-bar,
    html[data-theme="dark"] #pageOptimization .optimizer-settings-quota-bar {
        background: var(--border) !important;
    }

    html.dark .dropdown-item,
    html[data-theme="dark"] .dropdown-item {
        color: var(--text);
    }

    html.dark .dropdown-item:hover,
    html.dark .dropdown-item:focus,
    html[data-theme="dark"] .dropdown-item:hover,
    html[data-theme="dark"] .dropdown-item:focus {
        background: var(--surface-hover);
        color: var(--text);
    }

    html.dark .dropdown-divider,
    html[data-theme="dark"] .dropdown-divider {
        border-color: var(--border);
    }

    html.dark .select2-container--bootstrap-5 .select2-selection,
    html[data-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #settingModalContent .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
    html.dark #settingModalContent .select2-container--default .select2-selection--single .select2-selection__rendered,
    html[data-theme="dark"] #settingModalContent .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
    html[data-theme="dark"] #settingModalContent .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: var(--text) !important;
    }

    html.dark .select2-container--bootstrap-5 .select2-dropdown,
    html[data-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark .select2-container--bootstrap-5 .select2-results__option,
    html[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option,
    html.dark .select2-container--default .select2-results__option,
    html[data-theme="dark"] .select2-container--default .select2-results__option {
        color: var(--text) !important;
    }

    html.dark .select2-container--bootstrap-5 .select2-results__option--selected,
    html[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--selected,
    html.dark .select2-container--default .select2-results__option--selected,
    html[data-theme="dark"] .select2-container--default .select2-results__option--selected {
        background: rgba(59, 130, 246, 0.2) !important;
        color: #93c5fd !important;
    }

    html.dark .select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable,
    html[data-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable,
    html.dark .select2-container--default .select2-results__option--highlighted,
    html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted {
        background: #3b82f6 !important;
        color: #fff !important;
    }

    html.dark .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field,
    html[data-theme="dark"] .select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field,
    html.dark .select2-container--default .select2-search--dropdown .select2-search__field,
    html[data-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark .bg-light,
    html[data-theme="dark"] .bg-light {
        background: var(--surface-hover) !important;
        color: var(--text) !important;
    }

    html.dark .text-dark,
    html[data-theme="dark"] .text-dark {
        color: var(--text) !important;
    }

    html.dark .border,
    html.dark .border-top,
    html.dark .border-bottom,
    html[data-theme="dark"] .border,
    html[data-theme="dark"] .border-top,
    html[data-theme="dark"] .border-bottom {
        border-color: var(--border) !important;
    }

    /* Yellow/gold brand buttons: dark text on brand fill (beats Bootstrap [data-bs-theme=dark] --bs-btn-color) */
    .btn-primary,
    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .rbd-ga-connect-cta,
    .rbd-ga-connect-cta:hover,
    .rbd-ga-connect-cta:focus,
    .rbd-ga-connect-cta:active,
    .submit-btn,
    .submit-btn:hover,
    #pageDashboard .cta-btn,
    #pageDashboard .cta-btn:hover,
    #pageDashboard .btn-auto-optimize,
    #pageDashboard .btn-auto-optimize:hover,
    #pageDashboard .btn-cta-section,
    #pageDashboard .btn-cta-section:hover,
    .opt-cta-btn,
    .opt-cta-btn:hover,
    #pageWelcome .welcome-cta-button,
    #pageWelcome .welcome-cta-button:hover,
    .rabbit-app-btn--primary,
    .rabbit-app-btn--primary:hover,
    #pageOptimization .opt-premium-btn,
    #rabbitWelcomeTourModal .btn-rat-tour-start,
    #rabbitWelcomeTourModal .btn-rat-tour-start:hover,
    .rabbit-app-tour-tooltip .introjs-nextbutton,
    .rabbit-app-tour-tooltip .introjs-donebutton,
    .btn.btn-primary.pageBtn,
    .btn.btn-primary.btn-gradient,
    div#modalMessage .btn.btn-primary.pageBtn,
    div#modalBlogConfirm .btn.btn-primary.pageBtn,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold,
    html.dark #pageDashboard .summary-card .btn.btn-primary.btn-auto-optimize,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.btn-auto-optimize,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.btn-auto-optimize {
        color: #1a1205 !important;
        background-color: var(--brand, #FEC200) !important;
        border-color: var(--brand, #FEC200) !important;
        --bs-btn-color: #1a1205 !important;
        --bs-btn-hover-color: #1a1205 !important;
        --bs-btn-active-color: #1a1205 !important;
        --bs-btn-bg: var(--brand, #FEC200) !important;
        --bs-btn-border-color: var(--brand, #FEC200) !important;
    }

    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn:hover,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn:focus,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn:active,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:hover,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:focus,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:active,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn:hover,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn:focus,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn:active,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:hover,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:focus,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:active,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn:hover,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn:focus,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn:active,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:hover,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:focus,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold:active {
        color: #1a1205 !important;
        background-color: var(--brand-dark, #E0AB00) !important;
        border-color: var(--brand-dark, #E0AB00) !important;
        --bs-btn-color: #1a1205 !important;
        --bs-btn-hover-color: #1a1205 !important;
        --bs-btn-active-color: #1a1205 !important;
        --bs-btn-bg: var(--brand-dark, #E0AB00) !important;
        --bs-btn-border-color: var(--brand-dark, #E0AB00) !important;
    }

    .btn-primary i,
    .rbd-ga-connect-cta i,
    .rbd-ga-connect-cta span,
    .rbd-ga-connect-cta .rbd-ga-btn-label,
    .submit-btn i,
    #pageDashboard .cta-btn i,
    #pageDashboard .btn-auto-optimize i,
    .opt-cta-btn i,
    .rabbit-app-btn--primary i,
    #pageOptimization .opt-premium-btn i,
    .btn.btn-primary.pageBtn i,
    #pageDashboard .btn.btn-primary.cta-btn span,
    #pageDashboard .btn.btn-primary.cta-btn.fw-bold span,
    #pageDashboard .btn.btn-primary.btn-auto-optimize span,
    #pageDashboard .btn.btn-primary span,
    #pageDashboard .btn.btn-primary .rbd-ga-btn-label,
    #pageDashboard .btn.rbd-ga-connect-cta span,
    #pageDashboard .btn.rbd-ga-connect-cta .rbd-ga-btn-label,
    #pageDashboard #rbdGaConnectBtn,
    #pageDashboard #rbdGaConnectBtn span,
    #pageDashboard #rbdGaConnectBtn .rbd-ga-btn-label,
    #pageDashboard .btn-cta-section i,
    #pageDashboard .btn-cta-section span,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn i,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold i,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn span,
    html.dark #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold span,
    html.dark #pageDashboard .summary-card .btn.btn-primary.btn-auto-optimize span,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn i,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold i,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn span,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold span,
    html[data-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.btn-auto-optimize span,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn i,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold i,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn span,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.cta-btn.fw-bold span,
    html[data-bs-theme="dark"] #pageDashboard .summary-card .btn.btn-primary.btn-auto-optimize span {
        color: #1a1205 !important;
    }

    /* Green link-building CTA keeps white text on green fill in dark mode */
    #pageDashboard .btn-cta-section.green,
    #pageDashboard .btn-cta-section.green:hover,
    #pageDashboard .btn-cta-section.green:focus,
    #pageDashboard .btn-cta-section.green:active {
        background-color: var(--green, #10B981) !important;
        border-color: var(--green, #10B981) !important;
        color: #fff !important;
        --bs-btn-color: #fff !important;
        --bs-btn-hover-color: #fff !important;
        --bs-btn-active-color: #fff !important;
        --bs-btn-bg: var(--green, #10B981) !important;
        --bs-btn-border-color: var(--green, #10B981) !important;
    }

    #pageDashboard .btn-cta-section.green:hover,
    #pageDashboard .btn-cta-section.green:focus,
    #pageDashboard .btn-cta-section.green:active {
        background-color: #059669 !important;
        border-color: #059669 !important;
        --bs-btn-bg: #059669 !important;
        --bs-btn-border-color: #059669 !important;
    }

    #pageDashboard .btn-cta-section.green i,
    #pageDashboard .btn-cta-section.green span {
        color: #fff !important;
    }

    /* Dashboard analytics — chips, bars, tabs */
    html.dark #pageDashboard .an-kpi-card,
    html[data-theme="dark"] #pageDashboard .an-kpi-card {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
    }

    html.dark #pageDashboard .an-kpi-value,
    html[data-theme="dark"] #pageDashboard .an-kpi-value {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .an-pill.flat,
    html[data-theme="dark"] #pageDashboard .an-pill.flat {
        background: rgba(148, 163, 184, 0.16) !important;
        color: #94a3b8 !important;
        border-color: rgba(148, 163, 184, 0.22) !important;
    }

    html.dark #pageDashboard .an-pill.up,
    html[data-theme="dark"] #pageDashboard .an-pill.up {
        background: rgba(16, 185, 129, 0.18) !important;
        color: #34d399 !important;
        border-color: rgba(52, 211, 153, 0.35) !important;
    }

    html.dark #pageDashboard .an-pill.down,
    html[data-theme="dark"] #pageDashboard .an-pill.down {
        background: rgba(244, 63, 94, 0.16) !important;
        color: #fb7185 !important;
        border-color: rgba(251, 113, 133, 0.32) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-chart-empty,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-chart-empty {
        background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96)) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-mini-bar,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-mini-bar {
        background: var(--surface-hover) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-list-meta,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-list-meta {
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-icon,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-icon {
        background: rgba(15, 23, 42, 0.55) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight--positive,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight--positive {
        background: rgba(16, 185, 129, 0.12) !important;
        border-color: rgba(52, 211, 153, 0.22) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight--warning,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight--warning {
        background: rgba(245, 158, 11, 0.12) !important;
        border-color: rgba(251, 191, 36, 0.24) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight--critical,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight--critical {
        background: rgba(239, 68, 68, 0.12) !important;
        border-color: rgba(248, 113, 113, 0.24) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight--info,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight--info {
        background: rgba(59, 130, 246, 0.12) !important;
        border-color: rgba(96, 165, 250, 0.22) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-property-menu,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-property-menu {
        background: var(--surface) !important;
        border: 1px solid var(--border) !important;
    }

    html.dark #pageDashboard .an-metric-count,
    html[data-theme="dark"] #pageDashboard .an-metric-count {
        background: var(--surface-hover) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #pageDashboard .an-bar-bg,
    html[data-theme="dark"] #pageDashboard .an-bar-bg {
        background: var(--surface-hover) !important;
    }

    html.dark #pageDashboard .an-metric-name,
    html.dark #pageDashboard .an-page-title,
    html[data-theme="dark"] #pageDashboard .an-metric-name,
    html[data-theme="dark"] #pageDashboard .an-page-title {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .an-tab:not(.active),
    html[data-theme="dark"] #pageDashboard .an-tab:not(.active) {
        color: var(--text-secondary) !important;
    }

    html.dark #pageDashboard .an-tab.active,
    html[data-theme="dark"] #pageDashboard .an-tab.active {
        color: #1a1205 !important;
    }

    html.dark #pageDashboard .day-stat-date,
    html[data-theme="dark"] #pageDashboard .day-stat-date {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .mini-stat-value,
    html[data-theme="dark"] #pageDashboard .mini-stat-value {
        color: var(--text) !important;
    }

    /* Reviews promo — gold card keeps dark-on-gold contrast in dark mode */
    html.dark #pageDashboard .reviews-promo-card .reviews-promo-rating,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .reviews-promo-rating {
        background: rgba(26, 18, 5, 0.14) !important;
        border-color: rgba(26, 18, 5, 0.22) !important;
        color: #1a1205 !important;
    }

    html.dark #pageDashboard .reviews-promo-card .reviews-promo-rating span,
    html.dark #pageDashboard .reviews-promo-card .reviews-promo-rating .reviews-promo-stars,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .reviews-promo-rating span,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .reviews-promo-rating .reviews-promo-stars {
        color: #78350f !important;
    }

    html.dark #pageDashboard .reviews-promo-card .btn-reviews-upgrade,
    html.dark #pageDashboard .reviews-promo-card .btn-reviews-upgrade:hover,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .btn-reviews-upgrade,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .btn-reviews-upgrade:hover {
        background: #ffffff !important;
        color: #1a1205 !important;
    }

    html.dark #pageDashboard .reviews-promo-card .btn-reviews-upgrade i,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card .btn-reviews-upgrade i {
        color: #1a1205 !important;
    }

    html.dark #pageDashboard .reviews-promo-card strong,
    html[data-theme="dark"] #pageDashboard .reviews-promo-card strong {
        color: #1a1205 !important;
    }

    /* Sample analytics banner — keep amber card + brown text in dark mode */
    html.dark #pageDashboard .demo-banner-loud,
    html[data-theme="dark"] #pageDashboard .demo-banner-loud {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
        border-color: #f59e0b !important;
        box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2) !important;
    }

    html.dark #pageDashboard .demo-banner-loud__body strong,
    html[data-theme="dark"] #pageDashboard .demo-banner-loud__body strong {
        color: #92400e !important;
    }

    html.dark #pageDashboard .demo-banner-loud__body p,
    html.dark #pageDashboard .demo-banner-loud .text-muted,
    html[data-theme="dark"] #pageDashboard .demo-banner-loud__body p,
    html[data-theme="dark"] #pageDashboard .demo-banner-loud .text-muted {
        color: #78350f !important;
        opacity: 1 !important;
    }

    html.dark #pageDashboard .demo-banner-loud .rbd-alert-block--divider,
    html[data-theme="dark"] #pageDashboard .demo-banner-loud .rbd-alert-block--divider {
        border-top-color: rgba(146, 64, 14, 0.22) !important;
    }

    /* Non-yellow primary buttons keep light text */
    .app-blog-booster-link.btn-primary {
        color: #ffffff !important;
        --bs-btn-color: #ffffff;
        --bs-btn-hover-color: #ffffff;
    }

    /* User menu — reviews row gold badge (opaque gold so dark text stays readable on dark menu) */
    html.dark #userDropdown .rabbit-user-menu-rating-badge,
    html[data-theme="dark"] #userDropdown .rabbit-user-menu-rating-badge {
        background: rgba(254, 194, 0, 0.82) !important;
        border-color: rgba(254, 194, 0, 0.95) !important;
        color: #1a1205 !important;
    }

    html.dark #userDropdown .rabbit-user-menu-rating-badge .bi-star-fill,
    html[data-theme="dark"] #userDropdown .rabbit-user-menu-rating-badge .bi-star-fill {
        color: #92400e !important;
    }

    html.dark #userDropdown .rabbit-user-menu-item--reviews:hover .rabbit-user-menu-rating-badge,
    html[data-theme="dark"] #userDropdown .rabbit-user-menu-item--reviews:hover .rabbit-user-menu-rating-badge {
        background: rgba(254, 194, 0, 0.95) !important;
        border-color: #fec200 !important;
    }

    /* Customer reviews modal */
    html.dark #reviewsList .rbd-reviews-modal,
    html[data-theme="dark"] #reviewsList .rbd-reviews-modal {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
    }

    html.dark #reviewsList .rbd-reviews-modal__card,
    html[data-theme="dark"] #reviewsList .rbd-reviews-modal__card {
        background: var(--bg) !important;
        border-color: var(--border) !important;
    }

    html.dark #reviewsList .rbd-reviews-modal__rating-pill,
    html[data-theme="dark"] #reviewsList .rbd-reviews-modal__rating-pill {
        background: rgba(254, 194, 0, 0.82) !important;
        border-color: rgba(254, 194, 0, 0.95) !important;
        color: #1a1205 !important;
    }

    html.dark #reviewsList .rbd-reviews-modal__nav,
    html[data-theme="dark"] #reviewsList .rbd-reviews-modal__nav {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #reviewsList .rbd-reviews-slide__avatar,
    html[data-theme="dark"] #reviewsList .rbd-reviews-slide__avatar {
        background: var(--surface) !important;
        border-color: var(--border) !important;
    }

    html.dark #reviewsList .rbd-reviews-modal__stars,
    html.dark #reviewsList .rbd-reviews-slide__stars,
    html[data-theme="dark"] #reviewsList .rbd-reviews-modal__stars,
    html[data-theme="dark"] #reviewsList .rbd-reviews-slide__stars {
        color: #fec200 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    }

    /* Summernote guest-blog Insert Link modal — dark theme */
    html.dark .note-modal .note-modal-content,
    html[data-theme="dark"] .note-modal .note-modal-content,
    html[data-bs-theme="dark"] .note-modal .note-modal-content,
    html.dark #modifyArticleSection .note-modal .note-modal-content,
    html[data-theme="dark"] #modifyArticleSection .note-modal .note-modal-content,
    html[data-bs-theme="dark"] #modifyArticleSection .note-modal .note-modal-content {
        background: var(--surface) !important;
        color: var(--text) !important;
        border-color: var(--border) !important;
    }

    html.dark #modifyArticleSection .note-modal .note-modal-body .note-form-control,
    html[data-theme="dark"] #modifyArticleSection .note-modal .note-modal-body .note-form-control,
    html[data-bs-theme="dark"] #modifyArticleSection .note-modal .note-modal-body .note-form-control,
    html.dark #modifyArticleSection .note-modal .note-modal-body .note-input,
    html[data-theme="dark"] #modifyArticleSection .note-modal .note-modal-body .note-input,
    html[data-bs-theme="dark"] #modifyArticleSection .note-modal .note-modal-body .note-input,
    html.dark .note-modal .note-modal-body .note-form-control,
    html[data-theme="dark"] .note-modal .note-modal-body .note-form-control,
    html[data-bs-theme="dark"] .note-modal .note-modal-body .note-form-control {
        background-color: var(--surface-hover) !important;
        color: var(--text) !important;
        border-color: var(--border) !important;
        -webkit-text-fill-color: var(--text) !important;
    }

    /* Page analytics sidebar — portaled to body, needs its own dark theme */
    html.dark .rbd-page-an-sidebar,
    html[data-theme="dark"] .rbd-page-an-sidebar,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45) !important;
    }

    html.dark .rbd-page-an-sidebar-top,
    html[data-theme="dark"] .rbd-page-an-sidebar-top,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-top {
        background: var(--surface-hover) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark .rbd-page-an-sidebar-title,
    html[data-theme="dark"] .rbd-page-an-sidebar-title,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-title {
        color: var(--text) !important;
    }

    html.dark .rbd-page-an-sidebar-url,
    html[data-theme="dark"] .rbd-page-an-sidebar-url,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-url {
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-sidebar-close,
    html[data-theme="dark"] .rbd-page-an-sidebar-close,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-close {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-sidebar-close:hover,
    html[data-theme="dark"] .rbd-page-an-sidebar-close:hover,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-close:hover {
        background: rgba(254, 194, 0, 0.14) !important;
        border-color: var(--brand, #fec200) !important;
        color: var(--text) !important;
    }

    html.dark .rbd-page-an-sidebar-body,
    html[data-theme="dark"] .rbd-page-an-sidebar-body,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body {
        background: var(--surface) !important;
        color: var(--text) !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-panel,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-panel,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-panel {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
        box-shadow: none !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-panel-head,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-panel-head,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-panel-head {
        border-bottom-color: var(--border) !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-panel-title,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-panel-title,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-panel-title {
        color: var(--text) !important;
    }

    html.dark .rbd-page-an-mini-stat,
    html[data-theme="dark"] .rbd-page-an-mini-stat,
    html[data-bs-theme="dark"] .rbd-page-an-mini-stat {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
    }

    html.dark .rbd-page-an-mini-stat-label,
    html[data-theme="dark"] .rbd-page-an-mini-stat-label,
    html[data-bs-theme="dark"] .rbd-page-an-mini-stat-label {
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-mini-stat-value,
    html[data-theme="dark"] .rbd-page-an-mini-stat-value,
    html[data-bs-theme="dark"] .rbd-page-an-mini-stat-value {
        color: var(--text) !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-metric-name,
    html.dark .rbd-page-an-sidebar-body .fw-semibold,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-metric-name,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .fw-semibold,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-metric-name,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .fw-semibold {
        color: var(--text) !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-metric-count,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-metric-count,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-metric-count {
        background: var(--surface) !important;
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-bar-bg,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-bar-bg,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-bar-bg {
        background: var(--surface) !important;
    }

    html.dark .rbd-page-an-sidebar-body .badge.bg-light,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .badge.bg-light,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .badge.bg-light {
        background: var(--surface) !important;
        color: var(--text) !important;
        border-color: var(--border) !important;
    }

    html.dark .rbd-page-an-sidebar-body .badge.bg-light.text-muted,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .badge.bg-light.text-muted,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .badge.bg-light.text-muted {
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-sidebar-body .empty-state,
    html.dark .rbd-page-an-sidebar-body .text-muted,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .empty-state,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .text-muted,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .empty-state,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .text-muted {
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-sidebar-body .rbd-audit-loading,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .rbd-audit-loading,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .rbd-audit-loading {
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-page-an-sidebar-body .analytics-list-item,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .analytics-list-item,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .analytics-list-item {
        border-bottom-color: var(--border) !important;
    }

    html.dark .rbd-page-an-sidebar-body .an-bar-fill,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .an-bar-fill,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .an-bar-fill {
        background: var(--brand, #fec200) !important;
    }

    html.dark .rbd-page-an-sidebar-body .rbd-page-an-chart-wrap,
    html[data-theme="dark"] .rbd-page-an-sidebar-body .rbd-page-an-chart-wrap,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body .rbd-page-an-chart-wrap {
        background: transparent !important;
    }

    html.dark .rbd-page-an-sidebar-body::-webkit-scrollbar-thumb,
    html[data-theme="dark"] .rbd-page-an-sidebar-body::-webkit-scrollbar-thumb,
    html[data-bs-theme="dark"] .rbd-page-an-sidebar-body::-webkit-scrollbar-thumb {
        background: var(--border) !important;
    }

    /* PDF report sidebar — extended dark mode (export UI, accordions, agency panel) */
    html.dark #pdfReportSidebar .rabbit-form-sidebar-subtitle,
    html.dark #pdfReportSidebar .pdf-report-card-desc,
    html.dark #pdfReportSidebar .pdf-report-field-hint,
    html.dark #pdfReportSidebar .pdf-report-field-label,
    html.dark #pdfReportSidebar .pdf-report-subgroup-label,
    html.dark #pdfReportSidebar .pdf-report-selection-summary,
    html.dark #pdfReportSidebar .pdf-report-history-list,
    html.dark #pdfReportSidebar .pdf-report-logo-empty,
    html.dark #pdfReportSidebar .pdf-report-section-selector-empty,
    html.dark #pdfReportSidebar .pdf-report-plan-notice,
    html[data-theme="dark"] #pdfReportSidebar .rabbit-form-sidebar-subtitle,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-card-desc,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-field-hint,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-field-label,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-subgroup-label,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-selection-summary,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-history-list,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-logo-empty,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-section-selector-empty,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-plan-notice,
    html[data-bs-theme="dark"] #pdfReportSidebar .rabbit-form-sidebar-subtitle,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-card-desc,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-field-hint,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-field-label,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-subgroup-label,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-selection-summary,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-history-list,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-logo-empty,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-section-selector-empty,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-plan-notice {
        color: var(--text-secondary) !important;
    }

    html.dark #pdfReportSidebar .text-muted,
    html[data-theme="dark"] #pdfReportSidebar .text-muted,
    html[data-bs-theme="dark"] #pdfReportSidebar .text-muted {
        color: var(--text-muted) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-logo-preview,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-logo-preview,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-logo-preview {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-export-extras,
    html.dark #pdfReportSidebar .pdf-report-selection-summary,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-export-extras,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-selection-summary,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-export-extras,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-selection-summary {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-email-summary,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-email-summary,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-email-summary {
        background: var(--surface-hover) !important;
        border: 1px solid var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-accordion .accordion-button,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-accordion .accordion-button,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-accordion .accordion-button {
        background: var(--surface) !important;
        color: var(--text) !important;
        border-color: var(--border) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-accordion .accordion-button:not(.collapsed),
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-accordion .accordion-button:not(.collapsed),
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-accordion .accordion-button:not(.collapsed) {
        background: var(--surface-hover) !important;
        color: var(--text) !important;
        box-shadow: inset 0 -1px 0 var(--border) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-accordion .accordion-body,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-accordion .accordion-body,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-accordion .accordion-body {
        background: var(--surface) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-accordion-item,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-accordion-item,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-accordion-item {
        background: var(--surface) !important;
        border-color: var(--border) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-footer-actions .btn-light,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-footer-actions .btn-light,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-footer-actions .btn-light {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-footer-actions .btn-link.text-secondary,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-footer-actions .btn-link.text-secondary,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-footer-actions .btn-link.text-secondary {
        color: var(--text-secondary) !important;
    }

    html.dark #pdfReportSidebar .pdf-report-quality-warnings,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-quality-warnings,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-quality-warnings {
        color: #fbbf24 !important;
    }

    html.dark #pdfReportSidebar .badge.bg-secondary-subtle,
    html[data-theme="dark"] #pdfReportSidebar .badge.bg-secondary-subtle,
    html[data-bs-theme="dark"] #pdfReportSidebar .badge.bg-secondary-subtle {
        background: var(--surface-hover) !important;
        color: var(--text-secondary) !important;
        border: 1px solid var(--border) !important;
    }

    html.dark .pdf-report-sidebar-backdrop,
    html[data-theme="dark"] .pdf-report-sidebar-backdrop,
    html[data-bs-theme="dark"] .pdf-report-sidebar-backdrop {
        background: rgba(0, 0, 0, 0.72) !important;
    }

    /* GA traffic details sidebar */
    html.dark #rbdGaTrafficDetailsSidebar.rabbit-form-sidebar,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar.rabbit-form-sidebar,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar.rabbit-form-sidebar {
        background: var(--surface) !important;
        border-left-color: var(--border) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-header,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-header,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-header {
        background: linear-gradient(180deg, var(--surface) 0%, rgba(17, 24, 39, 0.92) 100%) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-body,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-body,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-body {
        background: rgba(15, 23, 42, 0.35) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-title,
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-traffic-details-subtitle,
    html.dark #rbdGaTrafficDetailsSidebar .text-muted,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-title,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-traffic-details-subtitle,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .text-muted,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rabbit-form-sidebar-title,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-traffic-details-subtitle,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .text-muted {
        color: var(--text-secondary) !important;
    }

    html.dark .rbd-ga-traffic-details-backdrop,
    html[data-theme="dark"] .rbd-ga-traffic-details-backdrop,
    html[data-bs-theme="dark"] .rbd-ga-traffic-details-backdrop {
        background: rgba(0, 0, 0, 0.72) !important;
    }

    /* GA connect card + dashboard chrome */
    html.dark #rbdGoogleAnalyticsConnectCard,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard {
        background: var(--surface) !important;
        border: 1px solid var(--border) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
        color: var(--text) !important;
    }

    /* Brand yellow CTA: keep dark label text (Bootstrap dark theme forces white --bs-btn-color). */
    html.dark #rbdGoogleAnalyticsConnectCard .btn.btn-primary,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.btn-primary:hover,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.btn-primary:focus,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.btn-primary:active,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.btn-primary .rbd-ga-btn-label,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.btn-primary span,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:hover,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:focus,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:active,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta .rbd-ga-btn-label,
    html.dark #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta span,
    html.dark #rbdGaConnectBtn,
    html.dark #rbdGaConnectBtn .rbd-ga-btn-label,
    html.dark #rbdGaConnectBtn span,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary:hover,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary:focus,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary:active,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary .rbd-ga-btn-label,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary span,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:hover,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:focus,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:active,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta .rbd-ga-btn-label,
    html[data-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta span,
    html[data-theme="dark"] #rbdGaConnectBtn,
    html[data-theme="dark"] #rbdGaConnectBtn .rbd-ga-btn-label,
    html[data-theme="dark"] #rbdGaConnectBtn span,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary:hover,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary:focus,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary:active,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary .rbd-ga-btn-label,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.btn-primary span,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:hover,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:focus,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta:active,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta .rbd-ga-btn-label,
    html[data-bs-theme="dark"] #rbdGoogleAnalyticsConnectCard .btn.rbd-ga-connect-cta span,
    html[data-bs-theme="dark"] #rbdGaConnectBtn,
    html[data-bs-theme="dark"] #rbdGaConnectBtn .rbd-ga-btn-label,
    html[data-bs-theme="dark"] #rbdGaConnectBtn span {
        color: #1a1205 !important;
        -webkit-text-fill-color: #1a1205 !important;
        background-color: #fec200 !important;
        border-color: #fec200 !important;
        --bs-btn-color: #1a1205 !important;
        --bs-btn-hover-color: #1a1205 !important;
        --bs-btn-active-color: #1a1205 !important;
        --bs-btn-bg: #fec200 !important;
        --bs-btn-border-color: #fec200 !important;
        --bs-btn-hover-bg: #e0ab00 !important;
        --bs-btn-hover-border-color: #e0ab00 !important;
        --bs-btn-active-bg: #e0ab00 !important;
        --bs-btn-active-border-color: #e0ab00 !important;
    }

    html.dark #rbdGaConnectBtn:hover,
    html.dark #rbdGaConnectBtn:focus,
    html.dark #rbdGaConnectBtn:active,
    html[data-theme="dark"] #rbdGaConnectBtn:hover,
    html[data-theme="dark"] #rbdGaConnectBtn:focus,
    html[data-theme="dark"] #rbdGaConnectBtn:active,
    html[data-bs-theme="dark"] #rbdGaConnectBtn:hover,
    html[data-bs-theme="dark"] #rbdGaConnectBtn:focus,
    html[data-bs-theme="dark"] #rbdGaConnectBtn:active {
        background-color: #e0ab00 !important;
        border-color: #e0ab00 !important;
        color: #1a1205 !important;
        -webkit-text-fill-color: #1a1205 !important;
    }

    /* Outline test/PDF actions on dark dashboard */
    html.dark #pageDashboard .pdf-report-test-builder-btn.btn-outline-primary,
    html[data-theme="dark"] #pageDashboard .pdf-report-test-builder-btn.btn-outline-primary,
    html[data-bs-theme="dark"] #pageDashboard .pdf-report-test-builder-btn.btn-outline-primary {
        color: #f8fafc !important;
        border-color: rgba(248, 250, 252, 0.45) !important;
        background: transparent !important;
        --bs-btn-color: #f8fafc !important;
        --bs-btn-border-color: rgba(248, 250, 252, 0.45) !important;
        --bs-btn-hover-color: #0f172a !important;
        --bs-btn-hover-bg: var(--brand, #FEC200) !important;
        --bs-btn-hover-border-color: var(--brand, #FEC200) !important;
    }

    html.dark #pageDashboard .pdf-report-test-builder-btn.btn-outline-primary:hover,
    html[data-theme="dark"] #pageDashboard .pdf-report-test-builder-btn.btn-outline-primary:hover,
    html[data-bs-theme="dark"] #pageDashboard .pdf-report-test-builder-btn.btn-outline-primary:hover {
        color: #0f172a !important;
        background: var(--brand, #FEC200) !important;
        border-color: var(--brand, #FEC200) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-date-range-menu,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-menu,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-menu {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-date-range-menu-head,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-menu-head,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-menu-head {
        background: linear-gradient(180deg, var(--surface) 0%, var(--surface-hover) 100%) !important;
        color: var(--text) !important;
        border-bottom: 1px solid var(--border) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-date-range-preset,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-preset,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-preset {
        color: var(--text) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-date-range-preset.active,
    html.dark #rbdGaSeoTrafficSection .rbd-ga-date-range-preset:active,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-preset.active,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-preset:active,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-preset.active,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-preset:active {
        background: rgba(254, 194, 0, 0.16) !important;
        color: var(--text) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-body,
    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-title,
    html.dark #rbdGaSeoTrafficSection .rbd-ga-page-title,
    html.dark #rbdGaSeoTrafficSection .an-panel-title,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-body,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-title,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-page-title,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .an-panel-title,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-body,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-title,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-page-title,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .an-panel-title {
        color: var(--text) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-link,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-link,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-link {
        color: var(--blue, #60a5fa) !important;
    }

    html.dark #rbdGaSeoTrafficSection .table,
    html.dark #rbdGaSeoTrafficSection .table td,
    html.dark #rbdGaSeoTrafficSection .table th,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .table,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .table td,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .table th,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .table,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .table td,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .table th {
        color: var(--text) !important;
        border-color: var(--border) !important;
    }

    html.dark #rbdGaSeoTrafficSection .badge.bg-light.text-muted,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .badge.bg-light.text-muted,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .badge.bg-light.text-muted {
        background: var(--surface-hover) !important;
        color: var(--text-secondary) !important;
        border-color: var(--border) !important;
    }

    html.dark #rbdGaSeoTrafficSection #rbdGaDashboardRefreshNotice,
    html[data-theme="dark"] #rbdGaSeoTrafficSection #rbdGaDashboardRefreshNotice,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection #rbdGaDashboardRefreshNotice {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-skeleton,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-skeleton,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-skeleton,
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-skeleton,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-skeleton,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-skeleton {
        background: linear-gradient(
            90deg,
            var(--surface-hover) 25%,
            rgba(148, 163, 184, 0.28) 37%,
            var(--surface-hover) 63%
        ) !important;
        background-size: 400% 100% !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-section,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-section,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-section {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-heading,
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-desc,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-heading,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-desc,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-heading,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-desc {
        color: var(--text-secondary) !important;
    }

    /* i18n debug overlays */
    html.dark [data-i18n-missing="1"],
    html[data-theme="dark"] [data-i18n-missing="1"],
    html[data-bs-theme="dark"] [data-i18n-missing="1"] {
        outline-color: #fb7185 !important;
        background: rgba(251, 113, 133, 0.12) !important;
    }

    html.dark [data-i18n-hardcoded="1"],
    html[data-theme="dark"] [data-i18n-hardcoded="1"],
    html[data-bs-theme="dark"] [data-i18n-hardcoded="1"] {
        outline-color: #fbbf24 !important;
    }

    /* PDF design preview + template dropdown */
    html.dark #pdfReportSidebar .pdf-report-design-preview,
    html[data-theme="dark"] #pdfReportSidebar .pdf-report-design-preview,
    html[data-bs-theme="dark"] #pdfReportSidebar .pdf-report-design-preview {
        background: var(--surface) !important;
        border-color: var(--border) !important;
    }

    html.dark #pdfReportSidebar .select2-container--bootstrap-5 .select2-selection,
    html[data-theme="dark"] #pdfReportSidebar .select2-container--bootstrap-5 .select2-selection,
    html[data-bs-theme="dark"] #pdfReportSidebar .select2-container--bootstrap-5 .select2-selection,
    html.dark #pdfReportSidebar .select2-container--default .select2-selection--single,
    html[data-theme="dark"] #pdfReportSidebar .select2-container--default .select2-selection--single,
    html[data-bs-theme="dark"] #pdfReportSidebar .select2-container--default .select2-selection--single {
        background-color: var(--surface) !important;
        border-color: var(--border) !important;
        color: var(--text) !important;
    }

    html.dark #pdfReportSidebar .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
    html[data-theme="dark"] #pdfReportSidebar .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
    html[data-bs-theme="dark"] #pdfReportSidebar .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
    html.dark #pdfReportSidebar .select2-container--default .select2-selection--single .select2-selection__rendered,
    html[data-theme="dark"] #pdfReportSidebar .select2-container--default .select2-selection--single .select2-selection__rendered,
    html[data-bs-theme="dark"] #pdfReportSidebar .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: var(--text) !important;
    }

    /* Dashboard hero + advanced insights */
    html.dark #pageDashboard .hero-summary-card,
    html[data-theme="dark"] #pageDashboard .hero-summary-card,
    html[data-bs-theme="dark"] #pageDashboard .hero-summary-card {
        background: var(--surface) !important;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28) !important;
    }

    html.dark #pageDashboard .hero-score-gauge .gauge-bg,
    html[data-theme="dark"] #pageDashboard .hero-score-gauge .gauge-bg,
    html[data-bs-theme="dark"] #pageDashboard .hero-score-gauge .gauge-bg {
        stroke: var(--border) !important;
    }

    html.dark #pageDashboard .hero-score-gauge .gauge-text,
    html[data-theme="dark"] #pageDashboard .hero-score-gauge .gauge-text,
    html[data-bs-theme="dark"] #pageDashboard .hero-score-gauge .gauge-text {
        fill: var(--text) !important;
    }

    html.dark #pageDashboard .advanced-insight,
    html[data-theme="dark"] #pageDashboard .advanced-insight,
    html[data-bs-theme="dark"] #pageDashboard .advanced-insight {
        background: var(--surface-hover) !important;
    }

    html.dark #pageDashboard .advanced-insight-title,
    html[data-theme="dark"] #pageDashboard .advanced-insight-title,
    html[data-bs-theme="dark"] #pageDashboard .advanced-insight-title {
        color: var(--text) !important;
    }

    html.dark #pageDashboard .advanced-insight-value,
    html[data-theme="dark"] #pageDashboard .advanced-insight-value,
    html[data-bs-theme="dark"] #pageDashboard .advanced-insight-value {
        color: var(--text-secondary) !important;
    }

    /* GA date range + links */
    html.dark #rbdGaSeoTrafficSection .rbd-ga-date-range-btn,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-btn,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-date-range-btn {
        background: var(--surface) !important;
        color: var(--text) !important;
        border-color: var(--border) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-traffic-see-more,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-traffic-see-more,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-traffic-see-more {
        color: var(--blue) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rabbit-app-kpi-tip:hover,
    html.dark #rbdGaSeoTrafficSection .rabbit-app-kpi-tip:focus,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rabbit-app-kpi-tip:hover,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rabbit-app-kpi-tip:focus,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rabbit-app-kpi-tip:hover,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rabbit-app-kpi-tip:focus {
        color: var(--blue) !important;
    }

    /* GA traffic details sidebar (chart empty, legend, KPI cards) */
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-legend,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-legend,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-legend {
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-chart-empty,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-chart-empty,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-chart-empty {
        background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96)) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-kpi-grid .an-kpi-card,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-kpi-grid .an-kpi-card,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-kpi-grid .an-kpi-card {
        background: var(--surface) !important;
        border-color: var(--border) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-kpi-grid .an-kpi-value,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-kpi-grid .an-kpi-value,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-kpi-grid .an-kpi-value {
        color: var(--text) !important;
    }

    /* Rate-us modal */
    html.dark #signupSuccessModal.rabbit-rate-us-modal .modal-content,
    html[data-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .modal-content,
    html[data-bs-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .modal-content {
        background: var(--surface) !important;
        border-color: var(--border) !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45) !important;
    }

    html.dark #signupSuccessModal.rabbit-rate-us-modal .rateUsSubject,
    html[data-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .rateUsSubject,
    html[data-bs-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .rateUsSubject {
        color: #a29bfe !important;
    }

    html.dark #signupSuccessModal.rabbit-rate-us-modal .modal-body > p,
    html[data-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .modal-body > p,
    html[data-bs-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .modal-body > p {
        color: var(--text) !important;
    }

    html.dark #signupSuccessModal.rabbit-rate-us-modal .modal-body > img,
    html[data-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .modal-body > img,
    html[data-bs-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .modal-body > img {
        background: var(--surface-hover) !important;
    }

    html.dark #signupSuccessModal.rabbit-rate-us-modal .btn-light,
    html[data-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .btn-light,
    html[data-bs-theme="dark"] #signupSuccessModal.rabbit-rate-us-modal .btn-light {
        background: var(--surface-hover) !important;
        color: var(--text-secondary) !important;
        border-color: var(--border) !important;
    }

    /* GA traffic details sidebar — tables, empty states, insight copy */
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-table thead th,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-table thead th,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-table thead th {
        background: var(--surface-hover) !important;
        color: var(--text-secondary) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-table tbody td,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-table tbody td,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-table tbody td {
        color: var(--text) !important;
        border-bottom-color: var(--border) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-page-title,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-page-title,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-page-title {
        color: var(--text) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-page-path,
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-list-meta,
    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-subheading,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-page-path,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-list-meta,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-subheading,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-page-path,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-list-meta,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-subheading {
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-empty,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-empty,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-empty {
        background: var(--surface-hover) !important;
        border-color: var(--border) !important;
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaTrafficDetailsSidebar .rbd-ga-details-skeleton,
    html[data-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-skeleton,
    html[data-bs-theme="dark"] #rbdGaTrafficDetailsSidebar .rbd-ga-details-skeleton {
        background: linear-gradient(90deg, var(--surface-hover) 25%, rgba(148, 163, 184, 0.12) 37%, var(--surface-hover) 63%) !important;
        background-size: 400% 100% !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-skeleton,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-skeleton,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-skeleton {
        background: linear-gradient(90deg, var(--surface-hover) 25%, rgba(148, 163, 184, 0.12) 37%, var(--surface-hover) 63%) !important;
        background-size: 400% 100% !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-page-title,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-page-title,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-page-title {
        color: var(--text) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-path,
    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-summary,
    html.dark #rbdGaSeoTrafficSection .rbd-ga-insight-recommendation,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-path,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-summary,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-recommendation,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-path,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-summary,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-insight-recommendation {
        color: var(--text-secondary) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-ai-insight-title,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-ai-insight-title,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-ai-insight-title {
        color: var(--text) !important;
    }

    html.dark #rbdGaSeoTrafficSection .rbd-ga-ai-insight-text,
    html.dark #rbdGaSeoTrafficSection .rbd-ga-ai-insight-recommendation,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-ai-insight-text,
    html[data-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-ai-insight-recommendation,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-ai-insight-text,
    html[data-bs-theme="dark"] #rbdGaSeoTrafficSection .rbd-ga-ai-insight-recommendation {
        color: var(--text-secondary) !important;
    }