/* KPI Dashboard — Theme: Light Mode, Toasts, Command Palette, Misc Overrides */


/* ================================================================
   WOW OVERHAUL — THEME TOGGLE (Dark/Light)
   ================================================================ */
.theme-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #8B95A5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: translateY(10px) rotate(-30deg);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

/* ================================================================
   WOW OVERHAUL — LIGHT THEME
   ================================================================ */
[data-theme="light"] {
    --bg-primary: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --text: #0F172A;
    --text-primary: #1E293B;
    --text-muted: #64748B;
    --text-dim: #94A3B8;
    --glass-border: 1px solid rgba(0, 0, 0, 0.06);
    --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] body {
    background: var(--bg-primary);
    color: var(--text);
}

[data-theme="light"] #neuralBg {
    opacity: 0.06;
}

[data-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.8);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-logo {
    background: radial-gradient(circle at 50% 45%, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .cortex-wordmark {
    color: rgba(13, 148, 136, 0.9);
    text-shadow: none;
}

[data-theme="light"] .nav-item {
    color: #64748B;
}

[data-theme="light"] .nav-item:hover {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.03) 0%, transparent 100%);
    border-left-color: rgba(0, 0, 0, 0.15);
    color: #0F172A;
}

[data-theme="light"] .nav-item.active {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.1) 0%, transparent 100%);
    border-left-color: #14b8a6;
    color: #0d9488;
}

[data-theme="light"] .nav-item.active svg {
    stroke: #0d9488;
    filter: none;
}

[data-theme="light"] .top-header {
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .page-title {
    background: linear-gradient(135deg, #0F172A, #0d9488);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .kpi-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-top-color: rgba(0, 0, 0, 0.04);
    border-left-color: rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .kpi-card:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .kpi-card::after {
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

[data-theme="light"] .kpi-value {
    color: #0F172A;
}

[data-theme="light"] .kpi-label {
    color: #64748B;
}

[data-theme="light"] .chart-card,
[data-theme="light"] .table-card,
[data-theme="light"] .metric-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .data-table thead th {
    background: rgba(241, 245, 249, 0.8);
    color: #64748B;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .data-table tbody td {
    color: #334155;
}

[data-theme="light"] .data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.04) 0%, transparent 100%);
}

[data-theme="light"] .section-title {
    color: var(--text);
}

[data-theme="light"] .section-header::after {
    background: linear-gradient(90deg, #14b8a6, rgba(20, 184, 166, 0.1), transparent);
}

[data-theme="light"] .scraper-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .node-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .sidebar-user {
    background: rgba(241, 245, 249, 0.6);
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .user-name {
    color: #1E293B;
}

[data-theme="light"] .user-role,
[data-theme="light"] .metric-label,
[data-theme="light"] .health-label {
    color: #64748B;
}

[data-theme="light"] .ring-value {
    color: #0F172A;
}

[data-theme="light"] .ring-bg {
    stroke: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .btn-action {
    background: rgba(20, 184, 166, 0.06);
    border-color: rgba(20, 184, 166, 0.25);
    color: #0d9488;
}

[data-theme="light"] .btn-notification,
[data-theme="light"] .btn-actions-menu {
    border-color: rgba(0, 0, 0, 0.1);
    color: #64748B;
}

[data-theme="light"] .chip {
    color: #64748B;
}

[data-theme="light"] .chip.active {
    background: rgba(20, 184, 166, 0.1);
    border-color: rgba(20, 184, 166, 0.25);
    color: #0d9488;
    text-shadow: none;
}

[data-theme="light"] .notif-dropdown {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notif-header {
    color: #1E293B;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .notif-item strong {
    color: #1E293B;
}

[data-theme="light"] .notif-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .dashboard-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
    color: #64748B;
}

[data-theme="light"] .banner-subtitle {
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.5), #0d9488, rgba(103, 232, 249, 0.7), #0d9488, rgba(13, 148, 136, 0.5));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

[data-theme="light"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: translateY(-10px) rotate(30deg);
}

[data-theme="light"] .theme-toggle {
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

[data-theme="light"] .pulse-stat-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .pulse-stat-label {
    color: #64748B;
}

[data-theme="light"] .cmd-palette {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .cmd-search-input {
    color: #0F172A;
}

[data-theme="light"] .cmd-result-item {
    color: #334155;
}

[data-theme="light"] .cmd-result-item:hover,
[data-theme="light"] .cmd-result-item.active {
    background: rgba(20, 184, 166, 0.06);
    color: #0d9488;
}

/* Smooth transition for theme switching */
html {
    transition: background 0.4s ease;
}

html[data-theme] body,
html[data-theme] .sidebar,
html[data-theme] .top-header,
html[data-theme] .kpi-card,
html[data-theme] .chart-card,
html[data-theme] .table-card,
html[data-theme] .metric-card,
html[data-theme] .scraper-card,
html[data-theme] .node-card,
html[data-theme] .pulse-stat-card {
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
}


/* ================================================================
   WOW OVERHAUL — TOAST NOTIFICATIONS
   ================================================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    background: rgba(13, 17, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 1px rgba(255, 255, 255, 0.1);
    color: #E2E8F0;
    font-size: 13px;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toastIn 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.toast.toast-exiting {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #5A6478;
    cursor: pointer;
    padding: 2px;
    font-size: 16px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #FFFFFF;
}

/* Toast progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 0 0 12px 12px;
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.toast.toast-success {
    border-left: 3px solid #10b981;
}

.toast.toast-success .toast-progress {
    background: #10b981;
}

.toast.toast-error {
    border-left: 3px solid #ef4444;
}

.toast.toast-error .toast-progress {
    background: #ef4444;
}

.toast.toast-info {
    border-left: 3px solid #3b82f6;
}

.toast.toast-info .toast-progress {
    background: #3b82f6;
}

.toast.toast-warning {
    border-left: 3px solid #f59e0b;
}

.toast.toast-warning .toast-progress {
    background: #f59e0b;
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: #334155;
}

/* ================================================================
   WOW OVERHAUL — DATE CHIP STYLES
   ================================================================ */
.date-range-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.date-chip {
    background: transparent;
    border: 1px solid transparent;
    color: #8B95A5;
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.date-chip:hover {
    color: #00E5FF;
    background: rgba(0, 229, 255, 0.04);
}

.date-chip.active {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.25);
    color: #00E5FF;
}

.date-range-label {
    font-size: 13px;
    color: #5A6478;
    white-space: nowrap;
    margin-left: 4px;
}

/* ================================================================
   BILLING HEALTH — Exception List & Action Buttons
   ================================================================ */
.exception-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
}

.exception-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.exception-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.exception-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.exception-dot.warning {
    background-color: var(--amber);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.exception-dot.error {
    background-color: var(--red);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.exception-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.exception-time {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-right: 8px;
}

/* Detection Method Badge — hover tooltip */
.detect-badge {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--teal);
    background: rgba(20, 184, 166, 0.08);
    border: 1px solid rgba(20, 184, 166, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: help;
    position: relative;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.detect-badge:hover {
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.4);
    text-shadow: 0 0 8px rgba(20, 184, 166, 0.5);
}

.detect-badge::after {
    content: attr(data-detect);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: 340px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.5;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(20, 184, 166, 0.1);
}

.detect-badge::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(20, 184, 166, 0.3);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 101;
}

.detect-badge:hover::after,
.detect-badge:hover::before {
    opacity: 1;
    visibility: visible;
}

.btn-exc-action {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.btn-exc-action:hover:not(.resolved):not(:disabled) {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(20, 184, 166, 0.08);
    box-shadow: 0 0 12px rgba(20, 184, 166, 0.15);
    transform: translateY(-1px);
}

.btn-exc-action.resolved {
    border-color: rgba(20, 184, 166, 0.4);
    color: var(--teal);
    cursor: default;
    pointer-events: none;
}

/* ================================================================
   COMMAND PALETTE — Ctrl+K Search & Navigate Overlay
   ================================================================ */
.cmd-palette-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
}

.cmd-palette-overlay.open {
    display: flex;
    animation: cmdOverlayIn 0.18s ease;
}

@keyframes cmdOverlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.cmd-palette {
    width: 560px;
    max-width: 92vw;
    background: rgba(13, 17, 26, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7),
        0 0 1px rgba(255, 255, 255, 0.15),
        0 0 60px rgba(0, 229, 255, 0.06);
    overflow: hidden;
    animation: cmdSlideIn 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes cmdSlideIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Search bar */
.cmd-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cmd-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.cmd-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #F8F9FA;
    caret-color: var(--cyan);
}

.cmd-search-input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

/* Results area */
.cmd-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 0;
}

.cmd-results::-webkit-scrollbar {
    width: 4px;
}

.cmd-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cmd-result-group {
    padding: 0 6px;
}

.cmd-result-group-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 14px 6px;
}

.cmd-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 0 6px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cmd-result-item:hover,
.cmd-result-item.active {
    background: rgba(0, 229, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.15);
}

.cmd-result-item.active {
    background: rgba(0, 229, 255, 0.12);
}

.cmd-result-icon {
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    flex-shrink: 0;
}

.cmd-result-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #E2E8F0;
}

.cmd-result-hint {
    font-size: 13px;
    color: var(--text-dim);
    white-space: nowrap;
}

.cmd-no-results {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}

/* Footer hints */
.cmd-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: var(--text-dim);
}

.cmd-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-family: 'Inter', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1;
}

/* Header search hint button */
.header-cmd-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.header-cmd-hint:hover {
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--cyan);
    background: rgba(0, 229, 255, 0.06);
}


    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lapsed-summary-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* PDF export button accent */
.btn-export-pdf {
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-export-pdf:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

/* Responsive — lapsed summary */
@media (max-width: 768px) {
    .lapsed-summary-strip {
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px 16px;
    }

    .lapsed-summary-item {
        flex: 0 0 calc(50% - 8px);
    }

    .lapsed-summary-divider {
        display: none;
    }

    .lapsed-sum-value {
        font-size: 18px;
    }
}

/* ── Source Info Tooltip ── */
.source-tooltip {
    position: relative;
    cursor: help;
    font-size: 14px;
    margin-left: 6px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.source-tooltip:hover,
.source-tooltip:focus {
    opacity: 1;
}

.source-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(20, 184, 166, 0.4);
    border-radius: 10px;
    padding: 14px 18px;
    min-width: 260px;
    font-size: 13px;
    line-height: 1.7;
    color: #94a3b8;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0.25s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    text-align: left;
    font-weight: 400;
}

.source-tooltip-text strong {
    color: #14b8a6;
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}

.source-tooltip:hover .source-tooltip-text,
.source-tooltip:focus .source-tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ================================================================
   GLOBAL READABILITY & STRUCTURAL ADDITIONS
   ================================================================ */

/* Subsection title spacing */
.subsection-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Key Findings Strip — Ad Pulse */
.key-findings-strip {
    background: rgba(20, 24, 40, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.findings-header {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.findings-body {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.7;
}

.findings-body .green-text {
    color: var(--green);
    font-weight: 600;
}

/* Billing Activity Expanded Card */
.billing-activity-expanded {
    align-items: flex-start !important;
    text-align: left !important;
}

.billing-activity-expanded .billing-activity-feed {
    width: 100%;
}

.billing-activity-expanded .activity-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.billing-activity-expanded .activity-entry:last-child {
    border-bottom: none;
}

.billing-activity-expanded .activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.billing-activity-expanded .activity-dot.success {
    background: var(--green);
}

.billing-activity-expanded .activity-dot.warning {
    background: var(--amber);
}

.billing-activity-expanded .activity-dot.info {
    background: var(--blue);
}

.billing-activity-expanded .activity-dot.error {
    background: var(--red);
}

.billing-activity-expanded .activity-desc {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.billing-activity-expanded .activity-ago {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    min-width: 70px;
    text-align: right;
}

/* Scraper Card Tooltip */
.scraper-card {
    position: relative;
}

.scraper-card::after {
    content: 'Click for details';
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 13px;
    color: var(--teal-dim);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 500;
}

.scraper-card:hover::after {
    opacity: 1;
}

/* Global dim text override — catch any remaining faint elements */
.scraper-last-run,
.scraper-sources {
    font-size: 13px !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.scraper-count {
    font-weight: 600 !important;
    color: var(--teal) !important;
}

.activity-ago {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
}

/* Billing activity feed title — spacing under header */
.activity-feed-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
