/* ==========================================
   BASE STYLES & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f0f2f5;
    color: #1e293b;
    min-height: 100vh;
}

/* ==========================================
   APP CONTAINER & LAYOUT
   ========================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================
   SIDEBAR NAVIGATION
   ========================================== */
.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #6c47ff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    list-style: none;
    padding: 12px 8px;
    flex: 1;
}

.nav-item {
    padding: 10px 16px;
    margin: 2px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.3);
    color: white;
    font-weight: 600;
}

.nav-section-label {
    list-style: none;
    padding: 6px 16px 4px;
    margin-top: 16px;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 14px;
    cursor: default;
    user-select: none;
}

/* Nav groups and submenus */
.nav-group {
    list-style: none;
    margin: 4px 0;
}

.nav-group-header {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
    user-select: none;
}

.nav-group-header:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-group-header::after {
    content: '▾';
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
}

.nav-group.nav-group-collapsed .nav-group-header::after {
    transform: rotate(-90deg);
}

.nav-submenu {
    list-style: none;
    padding: 2px 0 2px 8px;
    margin: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    margin-left: 16px;
    overflow: hidden;
    max-height: 400px;
    transition: max-height 0.25s ease;
}

.nav-group.nav-group-collapsed .nav-submenu {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    border-left-color: transparent;
}

.nav-submenu .nav-item {
    padding: 8px 12px 8px 12px;
    margin: 2px 0;
    font-size: 12px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link-chat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.nav-link-chat:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}


.user-button-container {
    flex-shrink: 0;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 24px 32px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================
   TAB CONTENT
   ========================================== */
.tab-content {
    display: none;
}

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

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.tab-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.tab-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.yc25-quick-start {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.yc25-quick-start .btn.active {
    background: #475569;
    color: #f8fafc;
}

#youniumChurn2025 .yc25-sticky-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f8fafc;
    padding-top: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.yc25-one-line {
    display: inline-block;
    vertical-align: bottom;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yc25-one-line-small {
    max-width: 240px;
}

.yc25-one-line-medium {
    max-width: 320px;
}

.yc25-one-line-large {
    max-width: 420px;
}

#yc25ScorecardCandidatesBody tr.yc25-row-expanded td {
    background: #eef2ff;
}

#yc25ScorecardCandidatesBody tr.yc25-candidate-expanded td {
    background: #f8fafc;
    border-top: none;
    padding: 0;
}

.yc25-candidate-expanded-content {
    padding: 12px;
}

.yc25-candidate-expanded-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.yc25-candidate-expanded-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.yc25-candidate-expanded-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

.yc25-candidate-expanded-panel-wide {
    grid-column: 1 / -1;
}

.yc25-candidate-expanded-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 6px;
}

.yc25-candidate-expanded-text {
    white-space: pre-wrap;
    color: #334155;
    line-height: 1.35;
}

.yc25-candidate-expanded-links {
    line-height: 1.5;
    word-break: break-word;
}

.yc25-candidate-expanded-empty {
    color: #64748b;
}

.btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.btn.success {
    background: #22c55e;
    color: white;
}

/* ==========================================
   SUMMARY CARDS
   ========================================== */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #e2e8f0;
    transition: transform 0.15s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.summary-card.card-green {
    border-left-color: #22c55e;
}

.summary-card.card-yellow {
    border-left-color: #eab308;
}

.summary-card.card-orange {
    border-left-color: #f97316;
}

.summary-card.card-red {
    border-left-color: #ef4444;
}

.summary-card.card-blue {
    border-left-color: #3b82f6;
}

.summary-card.card-purple {
    border-left-color: #8b5cf6;
}

.summary-card.card-teal {
    border-left-color: #14b8a6;
}

.summary-card.card-pink {
    border-left-color: #ec4899;
}

.card-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.card-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ==========================================
   SELECTION INFO
   ========================================== */
.selection-info {
    display: flex;
    gap: 24px;
    padding: 12px 16px;
    background: #eef2ff;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #475569;
}

.selection-info strong {
    color: #1e293b;
}

/* ==========================================
   FILTER BAR
   ========================================== */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.quick-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #475569;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-selects {
    display: flex;
    gap: 8px;
    align-items: center;
}

select, .select-filter {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #475569;
    cursor: pointer;
}

select:focus, .select-filter:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ==========================================
   TOGGLE
   ========================================== */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

/* ==========================================
   DATA TABLES
   ========================================== */
.table-container {
    overflow-x: auto;
    margin-bottom: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    background: #f1f5f9;
}

.data-table th.sorted-asc::after {
    content: ' ▲';
    font-size: 10px;
}

.data-table th.sorted-desc::after {
    content: ' ▼';
    font-size: 10px;
}

.column-filter {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 3px 6px;
    font-size: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #334155;
    font-weight: 400;
}

.column-filter:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr.clickable {
    cursor: pointer;
}

.loading-cell {
    text-align: center;
    padding: 32px !important;
    color: #94a3b8;
    font-style: italic;
}

.error-cell {
    color: #ef4444 !important;
}

/* Table cell classes (color-coding for values vs medians) */
.good { color: #16a34a; font-weight: 600; }
.warning { color: #ca8a04; font-weight: 600; }
.bad { color: #dc2626; font-weight: 600; }

/* ==========================================
   STATUS CELL CLASSES (Health Score tab)
   ========================================== */
.status-cell {
    white-space: nowrap;
}

.status-active {
    color: #16a34a;
}

.status-churned {
    color: #dc2626;
}

.status-unknown {
    color: #94a3b8;
}

.status-expired {
    color: #ea580c;
}

/* Subscription renewal urgency */
.renewal-urgent {
    color: #dc2626 !important;
    font-weight: 600;
}

.renewal-soon {
    color: #ea580c !important;
    font-weight: 600;
}

/* Last Contact recency coloring */
.contact-recent {
    color: #16a34a !important;
    font-weight: 500;
}

.contact-quarter {
    color: #65a30d !important;
    font-weight: 500;
}

.contact-6months {
    color: #ea580c !important;
    font-weight: 600;
}

.contact-stale {
    color: #dc2626 !important;
    font-weight: 700;
    background: #fef2f2;
}

.contact-never {
    color: #94a3b8 !important;
    font-style: italic;
}

/* ==========================================
   VALIDATION BADGES (Health Score tab)
   ========================================== */
.validation-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 4px;
    vertical-align: middle;
}

.validation-badge.missing-hubspot {
    background: #fef3c7;
    color: #92400e;
}

.validation-badge.data-issue {
    background: #e0e7ff;
    color: #3730a3;
}

.missing-hubspot-row {
    background: #fffbeb !important;
}

.data-issue-row {
    background: #f0f4ff !important;
}

/* ==========================================
   CHANGE INDICATORS (Health Score tab)
   ========================================== */
.change-indicator {
    font-size: 10px;
    font-weight: 600;
    margin-left: 2px;
}

.change-indicator.positive {
    color: #16a34a;
}

.change-indicator.negative {
    color: #dc2626;
}

.change-indicator.neutral {
    color: #94a3b8;
}

.change-indicator.new {
    color: #2563eb;
}

/* Company cell */
.company-cell {
    min-width: 180px;
}

.company-cell .company-name {
    font-weight: 600;
    color: #1e293b;
}

.company-cell .company-type {
    font-size: 11px;
    color: #94a3b8;
}

.row-expand-hint {
    font-size: 10px;
    color: #94a3b8;
    font-style: italic;
    display: none;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover .row-expand-hint {
    display: inline;
}

.text-cell {
    white-space: nowrap;
}

.number-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rate-cell {
    font-weight: 600;
}

.mrr-cell {
    font-weight: 600;
}

/* ==========================================
   TRAFFIC LIGHT DOTS (Onboarding tab)
   ========================================== */
.tl-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    vertical-align: middle;
    cursor: help;
    border: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tl-dot:hover {
    transform: scale(1.2);
}

.tl-dot.tl-green {
    background: #dcfce7;
    border-color: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}

.tl-dot.tl-green:hover {
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}

.tl-dot.tl-yellow {
    background: #fef9c3;
    border-color: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.3);
}

.tl-dot.tl-yellow:hover {
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.5);
}

.tl-dot.tl-red {
    background: #fef2f2;
    border-color: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.3);
}

.tl-dot.tl-red:hover {
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.tl-dot.tl-gray {
    background: #f1f5f9;
    border-color: #cbd5e1;
    font-size: 12px;
    color: #94a3b8;
}

/* Onboarding row status colors */
.status-on-track {
    border-left: 3px solid #22c55e;
}

.status-needs-attention {
    border-left: 3px solid #eab308;
}

.status-at-risk {
    border-left: 3px solid #f97316;
}

.status-critical {
    border-left: 3px solid #ef4444;
}

/* Health badge for onboarding tab */
.health-badge.status-on-track,
.health-badge.on-track {
    background: #dcfce7;
    color: #16a34a;
}

.health-badge.status-needs-attention,
.health-badge.needs-attention {
    background: #fef9c3;
    color: #ca8a04;
}

.health-badge.status-at-risk {
    background: #fff7ed;
    color: #ea580c;
}

.health-badge.status-critical {
    background: #fef2f2;
    color: #dc2626;
}

.health-score {
    display: inline-block;
    font-size: 11px;
    color: #64748b;
    margin-left: 6px;
    font-weight: 500;
}

.health-counts {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
}

.status-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: help;
}

/* ==========================================
   TREND INDICATORS (Company Activity tab)
   ========================================== */
.trend {
    font-size: 10px;
    font-weight: 600;
    margin-left: 2px;
    white-space: nowrap;
}

.trend.positive {
    color: #16a34a;
}

.trend.negative {
    color: #dc2626;
}

.trend.neutral {
    color: #94a3b8;
}

.trend.new {
    color: #2563eb;
}

/* ==========================================
   WARNING BADGES (Company Activity tab)
   ========================================== */
.warning-badge {
    font-size: 12px;
    cursor: help;
    vertical-align: middle;
}

/* ==========================================
   ISSUE BADGES (Data Validation tab)
   ========================================== */
.issue-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    margin: 1px 2px;
    white-space: nowrap;
}

.issue-badge.mrr {
    background: #fef2f2;
    color: #dc2626;
}

.issue-badge.name {
    background: #fff7ed;
    color: #ea580c;
}

.issue-badge.missing {
    background: #fef9c3;
    color: #ca8a04;
}

.issue-badge.date {
    background: #e0e7ff;
    color: #4338ca;
}

/* ==========================================
   DIFF CLASSES (Data Validation Compare)
   ========================================== */
.diff-positive {
    color: #16a34a;
    font-weight: 600;
}

.diff-negative {
    color: #dc2626;
    font-weight: 600;
}

/* ==========================================
   ACCOUNT LINK STATUS (Data Validation)
   ========================================== */
.link-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.link-status-badge.linked {
    background: #dcfce7;
    color: #16a34a;
}

.link-status-badge.partial {
    background: #fff7ed;
    color: #ea580c;
}

.link-status-badge.missing-younium {
    background: #fef9c3;
    color: #92400e;
}

.link-status-badge.missing-hubspot {
    background: #fef2f2;
    color: #dc2626;
}

/* Account link table row styles */
.row-ok {
    /* Default - no special styling */
}

.row-missing {
    background: #fffbeb !important;
}

.row-partial {
    background: #fff7ed08 !important;
}

/* MRR mismatch highlight */
.mrr-mismatch {
    color: #dc2626;
    font-weight: 600;
    background: #fef2f2;
}

/* ==========================================
   ACCOUNT LINK TABLE - Grouped Columns
   ========================================== */
.account-link-table {
    border-collapse: collapse;
}

/* Group header row */
.account-link-table .header-group-row th {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 10px 12px 4px;
    border-bottom: none;
}

.account-link-table .header-detail-row th {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px 8px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
}

/* HubSpot group header */
.th-group-hubspot {
    background: #fff4e6 !important;
    color: #c2410c !important;
    border-left: 2px solid #fb923c !important;
    border-right: 1px solid #fed7aa !important;
}

/* Younium group header */
.th-group-younium {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-left: 2px solid #60a5fa !important;
    border-right: 1px solid #bfdbfe !important;
}

/* HubSpot detail columns */
.th-hubspot {
    background: #fffbf5 !important;
    color: #92400e !important;
    border-left: 1px solid #fed7aa;
}

.th-hubspot:first-of-type {
    border-left: 2px solid #fb923c !important;
}

/* Younium detail columns */
.th-younium {
    background: #f8fbff !important;
    color: #1e40af !important;
    border-left: 1px solid #bfdbfe;
}

.th-younium:first-of-type {
    border-left: 2px solid #60a5fa !important;
}

/* Status & Issues columns (neutral) */
.th-status,
.th-issues {
    background: #f8fafc !important;
    color: #334155 !important;
}

/* Data cell tinting for source groups */
.account-link-table td.col-hubspot {
    background: rgba(255, 244, 230, 0.25);
    border-left: 1px solid #fef3c7;
}

.account-link-table tr td.col-hubspot:first-of-type {
    border-left: 2px solid #fb923c;
}

.account-link-table td.col-younium {
    background: rgba(239, 246, 255, 0.25);
    border-left: 1px solid #dbeafe;
}

.account-link-table tr td.col-younium:first-of-type {
    border-left: 2px solid #60a5fa;
}

/* Preserve row highlight colors over tint */
.account-link-table .row-missing td.col-hubspot {
    background: rgba(255, 251, 235, 0.7);
}
.account-link-table .row-missing td.col-younium {
    background: rgba(255, 251, 235, 0.7);
}

/* Status small (inline status indicators) */
.status-small {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.status-small.status-active {
    background: #dcfce7;
    color: #16a34a;
}

.status-small.status-inactive {
    background: #f1f5f9;
    color: #64748b;
}

/* Text muted helper */
.text-muted {
    color: #94a3b8;
    font-style: italic;
}

/* ==========================================
   MISSING INDICATOR (Data Validation Missing)
   ========================================== */
.missing-indicator {
    color: #dc2626;
    font-weight: 600;
    background: #fef2f2;
}

/* ==========================================
   DAYS OVERDUE (Data Validation Expired)
   ========================================== */
.days-overdue {
    font-weight: 600;
    color: #ea580c;
}

.days-overdue.critical {
    color: #dc2626;
    background: #fef2f2;
}

/* ==========================================
   COMPANY LINK (Activity table)
   ========================================== */
.company-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.company-link:hover {
    text-decoration: underline;
    color: #4338ca;
}

/* ==========================================
   CAMPAIGN STATUS BADGES (Modal)
   ========================================== */
.campaign-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.campaign-status-badge.published {
    background: #dcfce7;
    color: #16a34a;
}

.campaign-status-badge.completed {
    background: #dbeafe;
    color: #2563eb;
}

.campaign-status-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.campaign-status-badge.draft {
    background: #f1f5f9;
    color: #64748b;
}

.campaign-status-badge.archived {
    background: #fef9c3;
    color: #ca8a04;
}

.campaign-status-badge.cancelled {
    background: #fef2f2;
    color: #dc2626;
}

/* ==========================================
   DATA SOURCE BADGES (Data Validation)
   ========================================== */
.data-source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
}

.data-source-badge.source-fresh {
    background: #dcfce7;
    color: #16a34a;
}

.data-source-badge.source-cached {
    background: #e0e7ff;
    color: #4338ca;
}

/* Timestamp display */
.timestamp-indicator {
    font-size: 14px;
}

.timestamp-text {
    color: #475569;
}

.timestamp-sections {
    color: #94a3b8;
    font-size: 12px;
}

/* ==========================================
   RISK CLASSES (for table cells, MRR/Portfolio)
   ========================================== */
td.risk-high,
span.risk-high {
    color: #dc2626;
    font-weight: 600;
}

td.risk-medium,
span.risk-medium {
    color: #ea580c;
    font-weight: 600;
}

td.risk-low,
span.risk-low {
    color: #16a34a;
    font-weight: 600;
}

.risk-factors {
    font-size: 11px;
    color: #64748b;
    max-width: 250px;
}

/* Last login cell */
.last-login {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

/* Lurkit ID Copy */
.lurkit-id-cell {
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
}

.lurkit-id-cell.copied::after {
    content: ' ✓';
    color: #22c55e;
}

/* System ID styles (HubSpot ID / Younium ID) */
.system-id-link {
    font-family: monospace;
    font-size: 11px;
    color: #4f46e5;
    text-decoration: none;
    white-space: nowrap;
}

.system-id-link:hover {
    text-decoration: underline;
    color: #4338ca;
}

.system-id-cell {
    cursor: pointer;
    font-family: monospace;
    font-size: 11px;
    color: #475569;
    white-space: nowrap;
}

.system-id-cell:hover {
    color: #1e293b;
}

.system-id-cell.copied::after {
    content: ' ✓';
    color: #22c55e;
}

/* ==========================================
   RISK BADGES
   ========================================== */
.risk-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.risk-badge.risk-high {
    background: #fef2f2;
    color: #dc2626;
}

.risk-badge.risk-medium {
    background: #fff7ed;
    color: #ea580c;
}

.risk-badge.risk-low {
    background: #fefce8;
    color: #ca8a04;
}

.risk-row.risk-high {
    border-left: 3px solid #ef4444;
}

.risk-row.risk-medium {
    border-left: 3px solid #f97316;
}

/* ==========================================
   HEALTH SCORE BADGES
   ========================================== */
.health-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.health-badge.healthy {
    background: #dcfce7;
    color: #16a34a;
}

.health-badge.at-risk {
    background: #fef9c3;
    color: #ca8a04;
}

.health-badge.critical {
    background: #fef2f2;
    color: #dc2626;
}

/* ==========================================
   STATUS BADGES
   ========================================== */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.fresh {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.stale {
    background: #fef9c3;
    color: #ca8a04;
}

.status-badge.refreshing {
    background: #dbeafe;
    color: #2563eb;
}

.status-badge.no-cache {
    background: #f1f5f9;
    color: #64748b;
}

/* ==========================================
   TIER BADGES
   ========================================== */
.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.tier-badge.tier-enterprise {
    background: #ede9fe;
    color: #7c3aed;
}

.tier-badge.tier-pro {
    background: #dbeafe;
    color: #2563eb;
}

.tier-badge.tier-starter {
    background: #f0fdf4;
    color: #16a34a;
}

.tier-badge.tier-unknown {
    background: #f1f5f9;
    color: #64748b;
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 13px;
    color: #64748b;
    margin-right: 16px;
}

.pagination-buttons {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #475569;
}

.pagination-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* ==========================================
   CHARTS
   ========================================== */
.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chart-container h4 {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 16px;
}

/* ==========================================
   MODALS
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 6px;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    padding: 24px;
}

/* Campaigns table in modal */
.campaigns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.campaigns-table th, .campaigns-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.campaigns-table thead {
    background: #f8fafc;
}

.campaigns-table th {
    font-weight: 600;
    color: #475569;
}

/* ==========================================
   LOADING & ERROR STATES
   ========================================== */
.hidden {
    display: none !important;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.error-banner {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ==========================================
   DATA INFO BAR
   ========================================== */
.data-info {
    padding: 10px 16px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.data-info-label {
    font-weight: 600;
}

.data-info-value {
    color: #1e293b;
}

.data-info-age {
    color: #94a3b8;
}

.data-info-count {
    color: #64748b;
}

.data-info-stale {
    color: #eab308;
    font-weight: 600;
}

.data-info-refreshing {
    color: #2563eb;
    font-weight: 600;
}

.data-info-cached {
    color: #6366f1;
}

.data-info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.data-info-item.fresh {
    color: #16a34a;
}

.data-info-item.error {
    color: #dc2626;
}

/* ==========================================
   CACHE STATUS BANNER
   ========================================== */
.cache-status-banner {
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.cache-status-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #475569;
    flex-wrap: wrap;
}

/* ==========================================
   GENERATION PROGRESS
   ========================================== */
.generation-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.progress-text {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.progress-details {
    font-size: 12px;
    color: #94a3b8;
}

.progress-bar-container {
    width: 300px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ==========================================
   INSIGHTS PANEL
   ========================================== */
.insights-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.insights-panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1e293b;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.insight-item {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.insight-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.insight-label {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.insight-tips {
    margin-top: 16px;
}

.insight-tips h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.insight-tips ul {
    padding-left: 20px;
}

.insight-tips li {
    font-size: 13px;
    color: #475569;
    margin: 6px 0;
    line-height: 1.5;
}

/* ==========================================
   SUB-TABS (Data Validation)
   ========================================== */
.sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    width: fit-content;
}

.sub-tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s ease;
}

.sub-tab-btn:hover {
    color: #1e293b;
}

.sub-tab-btn.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.sub-tab-content {
    display: none;
}

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

.sub-tab-actions {
    margin-bottom: 12px;
}

/* ==========================================
   INDICATOR BARS (Onboarding Summary)
   ========================================== */
.indicator-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.indicator-label {
    min-width: 140px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
}

.indicator-bar {
    flex: 1;
    display: flex;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
    background: #f1f5f9;
}

.bar-segment {
    height: 100%;
    transition: width 0.3s ease;
    min-width: 1px;
}

.bar-green {
    background: #22c55e;
}

.bar-yellow {
    background: #eab308;
}

.bar-red {
    background: #ef4444;
}

.indicator-counts {
    display: flex;
    gap: 8px;
    min-width: 140px;
    font-size: 11px;
    font-weight: 600;
}

.pct-green {
    color: #16a34a;
}

.pct-yellow {
    color: #ca8a04;
}

.pct-red {
    color: #dc2626;
}

/* ==========================================
   ONBOARDING LEGEND
   ========================================== */
.onboarding-legend {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.onboarding-legend h4 {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
}

.legend-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-text {
    font-size: 12px;
    color: #475569;
}

.legend-text strong {
    color: #1e293b;
}

/* ==========================================
   PERIOD METRICS GRID (Scorecard)
   ========================================== */
.period-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.period-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.period-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eef2ff;
}

.period-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.period-metric span {
    color: #64748b;
}

.period-metric strong {
    color: #1e293b;
}

.period-metric.highlight {
    background: #f8fafc;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 4px -8px;
}

.change {
    font-size: 11px;
    font-weight: 600;
}

.change.positive {
    color: #22c55e;
}

.change.negative {
    color: #ef4444;
}

/* ==========================================
   GENERATED AT
   ========================================== */
.generated-at {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    padding: 16px 0;
}

/* ==========================================
   PENDING TABLE
   ========================================== */
.pending-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 12px;
}

.pending-table th, .pending-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.pending-table thead {
    background: #f8fafc;
}

.pending-table th {
    font-weight: 600;
    color: #475569;
}

/* ==========================================
   MRR BAR
   ========================================== */
.mrr-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.mrr-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
}

/* ==========================================
   COLLAPSIBLE SECTIONS
   ========================================== */
.collapsible-toggle {
    cursor: pointer;
    user-select: none;
}

.collapsed {
    display: none;
}

/* ==========================================
   SCROLLBAR STYLING
   ========================================== */
.sidebar::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-track {
    background: #f8fafc;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ==========================================
   OPPORTUNITY FINDER STYLES
   ========================================== */

/* Opportunity type badges */
.opp-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.opp-badge-newQuests {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.opp-badge-activeNotContacted {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.opp-badge-increasingActivity {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.opp-badge-highMRRLowUsage {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

.opp-badge-renewalSoon {
    background: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}

.opp-badge-draftCampaigns {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
}

.opp-badge-creatorGrowth {
    background: rgba(20, 184, 166, 0.15);
    color: #0d9488;
}

.opp-badge-lowAcceptance {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.opp-badge-noSubmissions {
    background: rgba(236, 72, 153, 0.15);
    color: #db2777;
}

.opp-badge-lowKeyClaim {
    background: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
}

/* Priority score badges */
.opp-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.opp-priority-high {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.opp-priority-medium {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

.opp-priority-low {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

/* Signal and action cells */
.opp-signal-cell {
    font-size: 12px;
    color: #475569;
    max-width: 280px;
}

.opp-action-cell {
    font-size: 12px;
    color: #334155;
    font-style: italic;
    max-width: 280px;
}

/* ==========================================
   PORTFOLIO TOOLTIPS & DRILL-DOWNS
   ========================================== */

/* Section descriptions */
.section-description {
    color: #64748b;
    font-size: 13px;
    margin: -8px 0 16px 0;
    line-height: 1.5;
}

/* Info icon on cards */
.info-icon {
    font-size: 12px;
    cursor: help;
    position: relative;
    display: inline-block;
}

.info-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: 260px;
    z-index: 1000;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-transform: none;
    letter-spacing: normal;
}

.info-icon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
    z-index: 1001;
}

/* Table header info icon */
.th-info {
    font-size: 11px;
    cursor: help;
    opacity: 0.6;
}

/* Card unit label */
.card-unit {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Clickable cards */
.card-clickable {
    cursor: pointer;
    position: relative;
}

.card-clickable::after {
    content: '›';
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 18px;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.card-clickable:hover {
    border-left-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.card-clickable:hover::after {
    transform: translateX(3px);
    color: #6366f1;
}

/* Clickable table rows */
.data-table tbody tr.row-clickable {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.data-table tbody tr.row-clickable:hover {
    background-color: #eef2ff;
}

/* Drill-down modal */
.drilldown-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.drilldown-modal.hidden {
    display: none;
}

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

.drilldown-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.25s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.drilldown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.drilldown-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1e293b;
}

.drilldown-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.drilldown-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.drilldown-description {
    padding: 12px 24px 0;
    color: #64748b;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

.drilldown-summary {
    padding: 12px 24px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.drilldown-summary .drilldown-stat {
    display: flex;
    flex-direction: column;
}

.drilldown-summary .drilldown-stat-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.drilldown-summary .drilldown-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.drilldown-table-container {
    flex: 1;
    overflow: auto;
    padding: 0 24px 24px;
}

.drilldown-table-container .data-table {
    font-size: 13px;
}

/* Younium deep link */
.younium-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #eef2ff;
    transition: background 0.15s;
}

.younium-link:hover {
    background: #c7d2fe;
    text-decoration: none;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 16px 20px;
    }
    
    .chart-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-header h1,
    .nav-item,
    .nav-group-header {
        font-size: 0;
    }

    .nav-item::first-letter {
        font-size: 18px;
    }

    .nav-group-header::first-letter {
        font-size: 18px;
    }

    .nav-group-header::after {
        font-size: 14px;
    }
    
    .main-content {
        margin-left: 60px;
        padding: 12px 16px;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================
   SELECTION KPI BAR
   ========================================== */
.selection-kpi {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: #4338ca;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Churn Reason Breakdown Bars */
.reason-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reason-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reason-label {
    min-width: 160px;
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    text-align: right;
}

.reason-bar-container {
    flex: 1;
    height: 20px;
    background: #1e293b;
    border-radius: 4px;
    overflow: hidden;
}

.reason-bar {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.3s ease;
}

.reason-count {
    min-width: 80px;
    font-size: 13px;
    color: #94a3b8;
}

/* ==========================================
   NEWS FEED
   ========================================== */

/* Feed Header */
.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.feed-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.feed-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.feed-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

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

.feed-timestamp {
    font-size: 0.75rem;
    color: #94a3b8;
}

.feed-refresh-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feed-refresh-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.feed-refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Beta Warning Banner */
.feed-beta-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #92400e;
    line-height: 1.5;
}

.feed-beta-badge {
    flex-shrink: 0;
    background: #f59e0b;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-top: 1px;
}

.feed-beta-text {
    color: #78350f;
}

.feed-beta-text strong {
    color: #92400e;
}

/* Category Filter Chips (Sticky) */
.feed-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
    padding: 12px 0;
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
    border-bottom: 1px solid #e2e8f0;
}

.feed-filter-chip {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.feed-filter-chip:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #334155;
}

.feed-filter-chip.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

/* Feed Container */
.feed-container {
    max-width: 800px;
    overflow-x: hidden;
    width: 100%;
}

.feed-loading,
.feed-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 0.95rem;
}

.feed-loading .spinner {
    margin: 0 auto 16px;
}

/* Feed Section (category group) */
.feed-section {
    margin-bottom: 32px;
}

.feed-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--section-color, #e2e8f0);
    overflow: hidden;
}

.feed-section-icon {
    font-size: 1.1rem;
}

.feed-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #334155;
}

.feed-section-count {
    font-size: 11px;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Feed Items (vertical list) */
.feed-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Feed Card */
.feed-card {
    display: flex;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.feed-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.feed-card-pinned {
    border: 1px solid #c7d2fe;
    background: linear-gradient(135deg, #fefefe, #faf8ff);
}

.feed-card-pinned:hover {
    border-color: #a5b4fc;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

/* Left accent bar */
.feed-card-accent {
    width: 4px;
    flex-shrink: 0;
    background: var(--card-accent, #e2e8f0);
}

/* Card body */
.feed-card-body {
    flex: 1;
    padding: 16px 20px;
    min-width: 0;
}

.feed-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.feed-card-icon {
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}

.feed-card-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.feed-card-category {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feed-card-time {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
    flex-shrink: 0;
}

.feed-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.feed-card-desc {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 8px 0;
}

.feed-card-desc strong {
    color: #1e293b;
    font-weight: 600;
}

.feed-card-metric {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    background: color-mix(in srgb, var(--metric-color, #10b981) 8%, white);
    color: var(--metric-color, #10b981);
    border: 1px solid color-mix(in srgb, var(--metric-color, #10b981) 20%, white);
}

/* Expandable Details */
.feed-card-details {
    margin-top: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.feed-details-toggle {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 0;
    font-weight: 500;
    transition: color 0.15s ease;
}

.feed-details-toggle:hover {
    color: #4338ca;
}

.feed-details-body {
    display: none;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.feed-card-details.expanded .feed-details-body {
    display: block;
}

.feed-card-details.expanded .feed-details-toggle {
    color: #94a3b8;
}

/* Detail Tables */
.feed-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.feed-detail-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 5px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.feed-detail-table tbody td {
    padding: 5px 8px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.feed-detail-table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-new { background: #dcfce7; color: #166534; }
.badge-expansion { background: #dbeafe; color: #1e40af; }
.badge-reactivation { background: #fef3c7; color: #92400e; }
.badge-contraction { background: #fee2e2; color: #991b1b; }
.badge-churn { background: #fecaca; color: #7f1d1d; }
.badge-low { background: #dcfce7; color: #166534; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-high { background: #fee2e2; color: #991b1b; }
.badge-critical { background: #fecaca; color: #7f1d1d; }

.feed-detail-json {
    font-size: 11px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    color: #334155;
}

/* ========== Time Group Headers ========== */
.feed-time-group {
    margin-bottom: 12px;
    overflow: hidden;
}

.feed-time-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 0;
    overflow: hidden;
}

.feed-time-icon {
    font-size: 1.2rem;
}

.feed-time-label {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tg-color, #334155);
}

.feed-time-count {
    font-size: 11px;
    font-weight: 600;
    background: color-mix(in srgb, var(--tg-color, #64748b) 10%, white);
    color: var(--tg-color, #64748b);
    padding: 3px 10px;
    border-radius: 10px;
}

.feed-time-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--tg-color, #e2e8f0), transparent);
    border-radius: 1px;
}

/* ========== Trend Indicators ========== */
.feed-card-trend {
    font-size: 14px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1;
}

.feed-card-trend.trend-up {
    color: #16a34a;
    background: #dcfce7;
}

.feed-card-trend.trend-down {
    color: #dc2626;
    background: #fee2e2;
}

/* ========== Special Card Variants ========== */

/* Weekly comparison cards */
.feed-card-weekly {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: #bae6fd;
}

.feed-card-weekly:hover {
    border-color: #7dd3fc;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.1);
}

/* Shoutout cards */
.feed-card-shoutout {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
    border-color: #fbcfe8;
}

.feed-card-shoutout:hover {
    border-color: #f9a8d4;
    box-shadow: 0 4px 16px rgba(244, 114, 182, 0.1);
}

/* Streak cards */
.feed-card-streak {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border-color: #a5f3fc;
}

.feed-card-streak:hover {
    border-color: #67e8f9;
    box-shadow: 0 4px 16px rgba(34, 211, 238, 0.1);
}

/* Daily digest cards */
.feed-card-digest {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border-color: #ddd6fe;
}

.feed-card-digest:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 16px rgba(167, 139, 250, 0.1);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .feed-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .feed-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .feed-container {
        max-width: 100%;
    }

    .feed-time-header {
        flex-wrap: wrap;
    }

    .feed-card-body {
        padding: 12px 14px;
    }

    .feed-card-title {
        font-size: 0.88rem;
    }

    .feed-card-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .feed-header-left {
        flex-direction: column;
        gap: 4px;
    }

    .feed-title {
        font-size: 1.2rem;
    }

    .feed-card-metric {
        font-size: 0.72rem;
        padding: 3px 8px;
    }
}

/* ========== VIP / Top 20 Cards ========== */
.feed-detail-kv {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}

.feed-detail-kv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 12px;
}

.feed-detail-kv-row:nth-child(odd) {
    background: #f1f5f9;
}

.feed-detail-kv-label {
    font-weight: 600;
    color: #475569;
    min-width: 80px;
}

.feed-detail-kv-value {
    color: #1e293b;
    text-align: right;
    font-weight: 500;
}

/* ==========================================
   EXECUTIVE SUMMARY - Portfolio Tab
   ========================================== */

.executive-summary-section {
    margin-bottom: 32px;
}

.executive-summary-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1e293b;
}

/* Risk Banner */
.exec-risk-banner {
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.exec-risk-banner.exec-risk-risk-low {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #86efac;
}

.exec-risk-banner.exec-risk-risk-medium {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
}

.exec-risk-banner.exec-risk-risk-high {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border-color: #fca5a5;
}

.exec-risk-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.exec-risk-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.exec-risk-text {
    flex: 1;
}

.exec-risk-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.exec-risk-subtitle {
    font-size: 0.9rem;
    color: #64748b;
}

.exec-risk-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    background: #e2e8f0;
    color: #475569;
}

.exec-risk-badge.risk-low {
    background: #dcfce7;
    color: #166534;
}

.exec-risk-badge.risk-medium {
    background: #fef3c7;
    color: #92400e;
}

.exec-risk-badge.risk-high {
    background: #fecaca;
    color: #991b1b;
}

/* Concentration Grid */
.exec-concentration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.exec-conc-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.exec-conc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.exec-conc-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.exec-conc-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.exec-conc-detail {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Charts Row */
.exec-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.exec-chart-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
}

.exec-chart-container h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.exec-chart-subtitle {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.exec-chart-full {
    margin-bottom: 24px;
}

/* Insight Box */
.exec-insight-box {
    display: flex;
    gap: 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 8px;
}

.exec-insight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.exec-insight-text {
    font-size: 0.9rem;
    color: #1e40af;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 900px) {
    .exec-concentration-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .exec-charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .exec-concentration-grid {
        grid-template-columns: 1fr;
    }
    .exec-risk-content {
        flex-wrap: wrap;
    }
}

/* ==========================================
   SEGMENTATION: SaaS vs Project
   ========================================== */

.segmentation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.segment-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    transition: box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}

.segment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.segment-saas {
    border-color: #22c55e;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.segment-project {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.segment-unclassified {
    border-color: #94a3b8;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.segment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.segment-icon {
    font-size: 1.25rem;
}

.segment-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    flex: 1;
}

.segment-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-saas {
    background: #dcfce7;
    color: #166534;
}

.badge-project {
    background: #fef3c7;
    color: #92400e;
}

.badge-unclassified {
    background: #f1f5f9;
    color: #475569;
}

.segment-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.segment-metric {
    display: flex;
    flex-direction: column;
}

.segment-metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
}

.segment-metric-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.segment-product-split {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: #64748b;
}

.segment-product-split .product-bar {
    display: flex;
    gap: 0.25rem;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.4rem;
    margin-bottom: 0.3rem;
}

.product-bar-managed {
    background: #8b5cf6;
}

.product-bar-selfserve {
    background: #3b82f6;
}

.product-bar-unknown {
    background: #cbd5e1;
}

.segment-product-split .product-legend {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.7rem;
}

.product-legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Cross-tab matrix styling */
#segCrossTabTable td.cell-value {
    text-align: center;
    vertical-align: middle;
}

#segCrossTabTable .cross-count {
    font-weight: 700;
    font-size: 0.95rem;
}

#segCrossTabTable .cross-mrr {
    font-size: 0.8rem;
    color: #64748b;
}

#segCrossTabTable .row-label {
    font-weight: 600;
}

#segCrossTabTable .row-total {
    background: #f8fafc;
    font-weight: 700;
}

/* Responsive segmentation grid */
@media (max-width: 900px) {
    .segmentation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .segmentation-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================================
   CAMPAIGN LEDGER STYLES
   ============================================================================ */

/* Sub-navigation */
.cl-subnav {
    display: flex;
    gap: 0.25em;
    margin-bottom: 1.5em;
    border-bottom: 1px solid #2a3441;
    padding-bottom: 0.5em;
}

.cl-subnav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #8a8f98;
    padding: 0.5em 1em;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.cl-subnav-btn:hover {
    color: #e1e4e8;
    background: rgba(255,255,255,0.05);
}

.cl-subnav-btn.active {
    color: #3498db;
    border-color: #3498db;
    border-bottom-color: transparent;
    background: rgba(52, 152, 219, 0.1);
}

/* Search & filter bar */
.cl-search-bar {
    display: flex;
    gap: 0.75em;
    margin-bottom: 1em;
}

.cl-search-input {
    flex: 1;
    background: #1a1f2b;
    border: 1px solid #2a3441;
    color: #e1e4e8;
    padding: 0.6em 1em;
    border-radius: 6px;
    font-size: 0.9em;
}

.cl-search-input:focus {
    border-color: #3498db;
    outline: none;
}

.cl-select {
    background: #1a1f2b;
    border: 1px solid #2a3441;
    color: #e1e4e8;
    padding: 0.6em 1em;
    border-radius: 6px;
    font-size: 0.9em;
    min-width: 150px;
}

.cl-select:focus {
    border-color: #3498db;
    outline: none;
}

.cl-select-modal {
    width: 100%;
    background: #1a1f2b;
    border: 1px solid #2a3441;
    color: #e1e4e8;
    padding: 0.6em 1em;
    border-radius: 6px;
    font-size: 0.9em;
}

/* View containers */
.cl-view {
    /* default visible */
}

.cl-view.hidden {
    display: none !important;
}

/* Badges */
.cl-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-green {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.badge-yellow {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}

.badge-red {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.badge-blue {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.badge-purple {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

/* Text colors */
.text-green { color: #2ecc71; }
.text-red { color: #e74c3c; }
.text-yellow { color: #f1c40f; }
.text-blue { color: #3498db; }

/* Inline edit inputs in deal table */
.cl-inline-input {
    background: #1a1f2b;
    border: 1px solid #2a3441;
    color: #e1e4e8;
    padding: 0.3em 0.5em;
    border-radius: 4px;
    font-size: 0.85em;
    width: 90px;
    text-align: right;
}

.cl-inline-input:focus {
    border-color: #3498db;
    outline: none;
    background: #151a24;
}

/* Small buttons */
.btn-sm {
    padding: 0.25em 0.6em;
    font-size: 0.8em;
    border-radius: 4px;
    border: 1px solid #2a3441;
    cursor: pointer;
    background: #1a1f2b;
    color: #e1e4e8;
    transition: all 0.15s;
}

.btn-sm:hover {
    background: #2a3441;
}

.btn-sm.btn-primary {
    background: #3498db;
    border-color: #3498db;
    color: #fff;
}

.btn-sm.btn-primary:hover {
    background: #2980b9;
}

.btn-sm.btn-secondary {
    background: #2a3441;
    border-color: #3a4451;
}

.btn-sm.btn-secondary:hover {
    background: #3a4451;
}

/* Action buttons group */
.cl-action-btns {
    display: flex;
    gap: 0.3em;
    flex-wrap: wrap;
}

/* Detail view header */
.cl-detail-back {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1.5em;
}

/* Account actions row */
.cl-account-actions {
    display: flex;
    gap: 0.75em;
    margin-bottom: 1.5em;
    flex-wrap: wrap;
}

/* Transaction filters */
.cl-txn-filters {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1em;
}

/* Pagination */
.cl-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
    padding: 0.75em 0;
}

.cl-page-info {
    color: #8a8f98;
    font-size: 0.9em;
}

/* Modal overlay */
.cl-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.cl-modal-overlay.hidden {
    display: none;
}

.cl-modal {
    background: #1e2530;
    border: 1px solid #2a3441;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25em 1.5em;
    border-bottom: 1px solid #2a3441;
}

.cl-modal-header h3 {
    margin: 0;
    color: #e1e4e8;
}

.cl-modal-close {
    background: none;
    border: none;
    color: #8a8f98;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cl-modal-close:hover {
    color: #e74c3c;
}

.cl-modal-body {
    padding: 1.5em;
}

.cl-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75em;
    padding: 1em 1.5em;
    border-top: 1px solid #2a3441;
}

/* Younium churn combo heat rows */
.yc25-intensity-low td {
    background: rgba(251, 191, 36, 0.08);
}

.yc25-intensity-medium td {
    background: rgba(249, 115, 22, 0.12);
}

.yc25-intensity-high td {
    background: rgba(239, 68, 68, 0.16);
}

/* Form elements */
.cl-form-group {
    margin-bottom: 1em;
}

.cl-form-group label {
    display: block;
    color: #8a8f98;
    font-size: 0.9em;
    margin-bottom: 0.3em;
}

.cl-input {
    width: 100%;
    background: #151a24;
    border: 1px solid #2a3441;
    color: #e1e4e8;
    padding: 0.6em 1em;
    border-radius: 6px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.cl-input:focus {
    border-color: #3498db;
    outline: none;
}

.cl-error {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 0.5em;
    min-height: 1.2em;
}

/* Invoice picker */
.cl-invoice-results {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #2a3441;
    border-radius: 6px;
    margin-top: 0.5em;
}

.cl-invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6em 0.8em;
    border-bottom: 1px solid #1a1f2b;
    cursor: pointer;
    transition: background 0.15s;
    gap: 0.5em;
    font-size: 0.85em;
}

.cl-invoice-item:hover {
    background: rgba(52, 152, 219, 0.1);
}

.cl-invoice-item.selected {
    background: rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
}

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

/* Data info bar */
.data-info.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.data-info.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* Account row hover */
.cl-account-row:hover {
    background: rgba(52, 152, 219, 0.08) !important;
}

/* ===================== Comments ===================== */
.cl-comments-add {
    display: flex;
    gap: 0.75em;
    align-items: flex-start;
    margin-bottom: 1.25em;
}

.cl-textarea {
    flex: 1;
    background: #1a1d23;
    border: 1px solid #2d2f36;
    border-radius: 8px;
    color: #e4e6eb;
    padding: 0.6em 0.8em;
    font-size: 0.92em;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
}
.cl-textarea:focus {
    border-color: #3498db;
    outline: none;
}

.cl-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.6em;
}

.cl-comment {
    background: #1a1d23;
    border: 1px solid #2d2f36;
    border-radius: 8px;
    padding: 0.75em 1em;
}
.cl-comment.cl-reply {
    margin-left: 1.5em;
    border-left: 3px solid #3498db;
}

.cl-comment-header {
    display: flex;
    gap: 0.75em;
    align-items: center;
    margin-bottom: 0.4em;
    font-size: 0.85em;
}

.cl-comment-author {
    font-weight: 600;
    color: #3498db;
}

.cl-comment-date {
    color: #6c6f78;
}

.cl-edited {
    color: #8a8f98;
    font-style: italic;
    font-size: 0.85em;
}

.cl-comment-body {
    color: #c8cad0;
    line-height: 1.5;
    font-size: 0.92em;
}

.cl-comment-actions {
    display: flex;
    gap: 0.75em;
    margin-top: 0.4em;
}

.cl-comment-actions .btn-link {
    background: none;
    border: none;
    color: #8a8f98;
    cursor: pointer;
    font-size: 0.82em;
    padding: 0;
}
.cl-comment-actions .btn-link:hover {
    color: #3498db;
}
.cl-comment-actions .btn-link.text-red:hover {
    color: #e74c3c;
}

.cl-replies {
    margin-top: 0.6em;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

/* ===================== Audit Trail ===================== */
.cl-audit-list {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.cl-audit-entry {
    display: flex;
    gap: 0.75em;
    padding: 0.65em 0.75em;
    background: #1a1d23;
    border: 1px solid #2d2f36;
    border-radius: 8px;
    align-items: flex-start;
}

.cl-audit-icon {
    font-size: 1.1em;
    min-width: 1.5em;
    text-align: center;
    padding-top: 2px;
}

.cl-audit-content {
    flex: 1;
    min-width: 0;
}

.cl-audit-header {
    display: flex;
    gap: 0.5em;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.9em;
}

.cl-audit-action {
    font-weight: 600;
    color: #e4e6eb;
}

.cl-audit-meta {
    color: #6c6f78;
    font-size: 0.85em;
    margin-left: auto;
}

.cl-audit-changes {
    margin-top: 0.35em;
    font-size: 0.85em;
    color: #8a8f98;
    line-height: 1.6;
}

.cl-change-field {
    color: #a0a4ac;
    font-weight: 500;
}

.cl-change-old {
    color: #e74c3c;
    text-decoration: line-through;
}

.cl-change-new {
    color: #2ecc71;
}

.badge-outline {
    border: 1px solid #3d3f46;
    background: transparent;
    color: #8a8f98;
    font-size: 0.8em;
    padding: 0.1em 0.5em;
    border-radius: 4px;
}

.cl-empty {
    color: #6c6f78;
    text-align: center;
    padding: 1.5em;
    font-size: 0.9em;
}

/* Quick Filter Pills */
.quick-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.filter-pill:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.filter-pill.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.3);
}

/* Clickable summary cards as quick filters */
.validation-quick-filters .quick-filter-card {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.validation-quick-filters .quick-filter-card::after {
    content: 'Click to filter';
    position: absolute;
    bottom: 4px;
    right: 8px;
    font-size: 9px;
    color: transparent;
    transition: color 0.2s;
}

.validation-quick-filters .quick-filter-card:hover::after {
    color: #9ca3af;
}

.validation-quick-filters .quick-filter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.validation-quick-filters .quick-filter-card.active-filter {
    box-shadow: 0 0 0 2px #1e40af, 0 4px 12px rgba(30, 64, 175, 0.2);
    transform: translateY(-2px);
}

/* Cache Status Bar */
.cache-status-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    font-size: 11px;
    color: #0369a1;
    white-space: nowrap;
}

.cache-status-bar.cache-stale {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.cache-status-bar.cache-fresh {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.cache-status-bar.cache-syncing {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.cache-status-text {
    font-weight: 500;
}

.cache-status-detail {
    color: inherit;
    opacity: 0.7;
}

/* Refresh button loading state */
#refreshValidationBtn.refreshing {
    pointer-events: none;
    opacity: 0.7;
}

#refreshValidationBtn .refresh-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin-validation {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   SYSTEM HIGHLIGHTS CARDS GRID
   ============================================================================ */

.highlights-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

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

/* ============================================================================
   CREATOR PROGRAM DEEP DIVE
   ============================================================================ */

.deep-dive-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.deep-dive-program-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.deep-dive-program-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.deep-dive-program-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.deep-dive-program-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.deep-dive-program-card-body {
    margin-bottom: 0.75rem;
}

.deep-dive-lift-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.deep-dive-lift-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
}

.deep-dive-lift-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.deep-dive-lift-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.deep-dive-lift-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(59,130,246,0.15);
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

/* ==========================================
   PROSPECTOR STYLES
   ========================================== */

.prospector-browser {
    width: 100%;
}

.prospector-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.prospector-page-info {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary, #94a3b8);
    min-width: 140px;
    text-align: center;
}

.prospector-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}

.prospector-card-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted, #64748b);
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 12px;
}

.prospector-card-empty p {
    font-size: 1rem;
}

/* Action bar: nav + buttons + hints in one row */
.prosp-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.prosp-action-bar-left,
.prosp-action-bar-center,
.prosp-action-bar-right {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.prosp-action-bar-right {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
}

.prosp-kbd-hint {
    font-size: 0.7rem;
    color: var(--text-muted, #475569);
}

.prosp-kbd-hint kbd {
    font-size: 0.62rem;
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
    border-radius: 6px;
}

/* Scout mode: full-viewport multi-column layout */
.prosp-scout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem;
    max-height: calc(100vh - 280px);
    min-height: 400px;
}

.prosp-scout-col {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 12px;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.prosp-scout-col::-webkit-scrollbar {
    width: 5px;
}

.prosp-scout-col::-webkit-scrollbar-track {
    background: transparent;
}

.prosp-scout-col::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.prosp-scout-col::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Area headers with inline action buttons */
.prosp-area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border, rgba(255,255,255,0.1));
}

.prosp-area-header h4 {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.prosp-area-btn {
    font-size: 0.72rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    white-space: nowrap;
}

.prosp-col-label {
    display: none;
}

/* Cold Outreach CTA — full-width, prominent section below card */
.prosp-outreach-cta {
    margin-top: 0.75rem;
}

.prosp-outreach-cta-inner {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(59, 130, 246, 0.06));
    border: 2px solid rgba(139, 92, 246, 0.35);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
}

.prosp-outreach-cta-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.prosp-outreach-cta-header h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #e0e7ff;
    margin: 0;
}

.prosp-outreach-cta-sub {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}

.prosp-outreach-cta-controls {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.prosp-outreach-cta-controls .filter-select {
    max-width: 400px;
}

.prosp-outreach-cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.prosp-outreach-cta-generate {
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
}

.prosp-outreach-cta-activate {
    font-size: 0.95rem;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
}

.prosp-outreach-cta .prosp-outreach-cards {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

/* Prospector Card Header (cover + info, compact for scout mode) */
.prosp-card-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.prosp-card-cover {
    flex-shrink: 0;
    width: 90px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-darker, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prosp-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prosp-no-cover {
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
}

.prosp-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.prosp-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.prosp-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0;
}

.prosp-card-badges {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.prosp-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
}

/* Tags (genres, platforms) */
.prosp-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.prosp-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.prosp-tag-platform {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.prosp-companies {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

/* Sections inside the card */
.prosp-section {
    border-top: 1px solid var(--border, #334155);
    padding-top: 0.65rem;
    margin-top: 0.65rem;
}

.prosp-section:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.prosp-section h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 0.4rem 0;
}

.prosp-section p {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-secondary, #94a3b8);
    margin: 0;
}

.prosp-muted {
    color: var(--text-muted, #64748b) !important;
    font-style: italic;
}

.prosp-research-text {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary, #94a3b8);
}

.prosp-citations {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.prosp-citations a {
    color: var(--accent, #3b82f6);
    font-size: 0.75rem;
    text-decoration: none;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(59, 130, 246, 0.1);
}

.prosp-citations a:hover {
    background: rgba(59, 130, 246, 0.25);
}

/* Metrics grid */
.prosp-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
}

.prosp-metric {
    background: var(--bg-darker, #0f172a);
    border-radius: 6px;
    padding: 0.45rem 0.5rem;
    text-align: center;
}

.prosp-metric-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
}

.prosp-metric-label {
    display: block;
    font-size: 0.62rem;
    color: var(--text-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.1rem;
}

/* Badges */
.prosp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prosp-badge-new {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.prosp-badge-targeted {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.prosp-badge-skipped {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.prosp-badge-pushed {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.prosp-badge-enriched {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
}

.prosp-badge-not-enriched {
    background: rgba(148, 163, 184, 0.1);
    color: #64748b;
}

.prosp-badge-hubspot {
    background: rgba(255, 122, 69, 0.15);
    color: #ff7a45;
}

.prosp-badge-indie {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.prosp-badge-enterprise {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.prosp-badge-unclassified {
    background: rgba(148, 163, 184, 0.08);
    color: #475569;
    font-style: italic;
}

/* HubSpot button accent */
.btn-hubspot {
    background: #ff7a45;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-hubspot:hover {
    background: #e5683a;
}

.btn-hubspot:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-success {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-success:hover {
    background: #16a34a;
}

@media (max-width: 700px) {
    .prosp-card-header {
        flex-direction: column;
    }
    .prosp-card-cover {
        width: 100%;
        height: 220px;
    }
    .prosp-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .prospector-actions {
        flex-direction: column;
    }
}

/* ==========================================
   PORTFOLIO VIEW TOGGLE
   ========================================== */
.portfolio-view-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.view-toggle-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: all 0.2s;
    white-space: nowrap;
}

.view-toggle-btn:hover {
    color: #334155;
    background: rgba(255,255,255,0.5);
}

.view-toggle-btn.active {
    background: #fff;
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.portfolio-filter-banner {
    margin-bottom: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff, #f0f4ff);
    border: 1px solid #bfdbfe;
    overflow: hidden;
}

.portfolio-filter-banner.hidden {
    display: none;
}

.filter-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.filter-banner-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.filter-banner-text {
    flex: 1;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

.filter-banner-text strong {
    color: #1e40af;
}

.filter-banner-reset {
    padding: 5px 12px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    background: #fff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-banner-reset:hover {
    background: #2563eb;
    color: #fff;
}

/* Prospector prefetch status */
.prosp-prefetch-status {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    min-height: 1.2em;
    margin-bottom: 0.5rem;
}

.prosp-badge-seen {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
}

.prosp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

/* Studio highlight cards */
.prosp-studio-section {
    border-left: 3px solid var(--accent, #6366f1);
}

.prosp-studio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.prosp-studio-card {
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.prosp-studio-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.prosp-studio-dev {
    border-left: 3px solid #22c55e;
}

.prosp-studio-pub {
    border-left: 3px solid #f59e0b;
}

.prosp-studio-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.prosp-studio-headline {
    margin-bottom: 0.5rem;
}

.prosp-studio-summary {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary, #cbd5e1);
    padding: 0.5rem 0.65rem;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
    border-left: 3px solid #6366f1;
}

.prosp-size-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 8px;
    border-radius: 4px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.prosp-size-indie {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
}

.prosp-size-enterprise {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.prosp-studio-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
}

.prosp-studio-meta {
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 0.25rem;
}

.prosp-studio-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary, #fff);
}

.prosp-studio-role {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted, #94a3b8);
}

.prosp-studio-desc {
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.45;
    margin: 0.25rem 0;
}

.prosp-studio-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent, #6366f1);
    text-decoration: none;
}

.prosp-studio-link:hover {
    text-decoration: underline;
}

/* Deep dive section */
.prosp-deep-dive-section {
    border-left: 3px solid #a855f7;
}

.prosp-deep-dive-company {
    background: rgba(168, 85, 247, 0.05);
    border: 1px solid rgba(168, 85, 247, 0.15);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
}

.prosp-deep-dive-company:last-of-type {
    margin-bottom: 0;
}

.prosp-dd-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.prosp-dd-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary, #fff);
}

.prosp-action-bar kbd,
.prosp-kbd-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-muted, #94a3b8);
    line-height: 1.4;
    vertical-align: middle;
    min-width: 18px;
    text-align: center;
}

/* Deep dive button */
.btn-deep-dive {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.btn-deep-dive:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.5);
}

.btn-indie {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.btn-indie:hover, .btn-indie-active {
    background: rgba(52, 211, 153, 0.3);
    border-color: rgba(52, 211, 153, 0.5);
}

.btn-enterprise {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.btn-enterprise:hover, .btn-enterprise-active {
    background: rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.prosp-action-sep {
    display: inline-block;
    width: 1px;
    height: 18px;
    background: var(--border-color, rgba(255,255,255,0.1));
    margin: 0 0.15rem;
}

.prosp-stat-indie .prosp-stat-num { color: #34d399; }
.prosp-stat-enterprise .prosp-stat-num { color: #818cf8; }

/* Streaming Insight Button */
.btn-stream-insight {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}
.btn-stream-insight:hover, .btn-stream-insight-active {
    background: rgba(14, 165, 233, 0.3);
    border-color: rgba(14, 165, 233, 0.5);
}

/* Streaming Insight Package */
.prosp-stream-insight {
    border-left: 3px solid #38bdf8;
}

.prosp-insight-badge {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 0.6rem;
}

.prosp-insight-cta {
    background: rgba(14, 165, 233, 0.08);
    border: 1px dashed rgba(14, 165, 233, 0.3);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #7dd3fc;
    margin-bottom: 0.5rem;
    text-align: center;
    cursor: default;
}

.prosp-insight-mom h5,
.prosp-insight-streamers h5,
.prosp-insight-competing h5 {
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
    color: var(--text-primary, #e2e8f0);
}

.prosp-insight-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.prosp-insight-table th {
    text-align: left;
    padding: 0.2rem 0.4rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prosp-insight-table td {
    padding: 0.2rem 0.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-secondary, #cbd5e1);
}

.prosp-insight-rank {
    color: var(--text-muted, #94a3b8);
    font-weight: 600;
    width: 1.5rem;
}

.prosp-insight-name {
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prosp-trend-up { color: #34d399; font-weight: 700; }
.prosp-trend-down { color: #f87171; font-weight: 700; }
.prosp-trend-flat { color: #94a3b8; }

/* Help Panel */
.prosp-help-btn {
    min-width: auto !important;
    padding: 0.2rem 0.5rem !important;
    font-size: 0.8rem !important;
}

/* Activity Toast */
.prosp-activity-toast {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.15));
    border: 1px solid rgba(129,140,248,0.3);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    animation: prosp-toast-in 0.3s ease-out;
    overflow: hidden;
}
.prosp-activity-toast.toast-success {
    background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(16,185,129,0.15));
    border-color: rgba(34,197,94,0.3);
}
.prosp-activity-toast.toast-error {
    background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(220,38,38,0.15));
    border-color: rgba(239,68,68,0.3);
}
.prosp-activity-emoji {
    font-size: 1.3rem;
    animation: prosp-emoji-bounce 0.6s ease infinite alternate;
    flex-shrink: 0;
}
.prosp-activity-text {
    font-size: 0.85rem;
    color: var(--text-color, #e2e8f0);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@keyframes prosp-toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes prosp-emoji-bounce {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

.prosp-help-panel {
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.prosp-help-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.prosp-help-group h5 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.prosp-help-row {
    font-size: 0.75rem;
    color: var(--text-secondary, #cbd5e1);
    padding: 0.15rem 0;
    line-height: 1.5;
}

.prosp-help-row kbd {
    display: inline-block;
    min-width: 1.4rem;
    text-align: center;
    padding: 1px 5px;
    font-size: 0.68rem;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-weight: 600;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3px;
    color: var(--text-primary, #e2e8f0);
    margin-right: 0.3rem;
}

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

/* Refresh Progress Bar */
.prosp-refresh-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.prosp-refresh-bar {
    flex: 0 0 180px;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.prosp-refresh-fill {
    height: 100%;
    background: #6366f1;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.prosp-refresh-fill-done { background: #34d399; }
.prosp-refresh-fill-error { background: #f87171; }

.prosp-refresh-text {
    font-size: 0.78rem;
    color: var(--text-secondary, #cbd5e1);
}

.prosp-refresh-error { color: #f87171; }

/* Quick-Add Game */
.prosp-quickadd {
    position: relative;
    display: inline-block;
}

.prosp-quickadd-input {
    width: 220px;
    font-size: 0.82rem;
}

.prosp-quickadd-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 340px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.12));
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 200;
}

.prosp-qa-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.1s;
}

.prosp-qa-item:hover {
    background: rgba(99, 102, 241, 0.12);
}

.prosp-qa-thumb {
    width: 28px;
    height: 38px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.prosp-qa-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.prosp-qa-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prosp-qa-meta {
    font-size: 0.7rem;
    color: var(--text-muted, #94a3b8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prosp-qa-direct {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.prosp-qa-empty {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted, #94a3b8);
}

/* Scout mode responsive — 2x2 grid stacks to 1 column on narrow viewports */
@media (max-width: 900px) {
    .prosp-scout-grid {
        grid-template-columns: 1fr;
        max-height: none;
        min-height: 0;
    }
    .prosp-scout-col {
        max-height: 60vh;
    }
    .prosp-outreach-cta-inner {
        padding: 1rem;
    }
    .prosp-outreach-cta-header {
        flex-direction: column;
        gap: 0.3rem;
    }
    .prosp-outreach-cta-actions {
        flex-direction: column;
    }
    .prosp-outreach-cta-generate,
    .prosp-outreach-cta-activate {
        width: 100%;
        text-align: center;
    }
}

/* Prospector: tighter header */
#prospector .tab-header {
    margin-bottom: 0.5rem;
    gap: 8px;
}

#prospector .tab-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

/* Prospector toolbar */
.prosp-toolbar {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.prosp-inline-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.prosp-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted, #94a3b8);
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.prosp-stat-num {
    font-weight: 800;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.78rem;
}

.prosp-stat-blue .prosp-stat-num { color: #60a5fa; }
.prosp-stat-green .prosp-stat-num { color: #4ade80; }
.prosp-stat-purple .prosp-stat-num { color: #a78bfa; }
.prosp-stat-muted .prosp-stat-num { color: #64748b; }

/* View toggle buttons */
.prosp-view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}

.prosp-view-btn {
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted, #94a3b8);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.prosp-view-btn:hover {
    color: var(--text-primary, #fff);
    background: rgba(255,255,255,0.05);
}

.prosp-view-btn.active {
    background: var(--accent, #6366f1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* Scouting table */
.prosp-table-view {
    width: 100%;
}

.prosp-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.prosp-table-controls-bottom {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

.prosp-table-page-size {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
}

.prosp-table-page-size select {
    padding: 0.3rem 0.6rem;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(255,255,255,0.08));
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 0.82rem;
}

.prosp-table-info {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.prosp-table-wrapper {
    overflow-x: auto;
    background: #0b1220;
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.prosp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
    background: #0b1220;
}

.prosp-table thead {
    background: #111827;
    position: sticky;
    top: 0;
    z-index: 2;
}

.prosp-table th {
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    border-bottom: 1px solid #334155;
    white-space: nowrap;
    user-select: none;
}

.prosp-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 1.5rem;
}

.prosp-table th.sortable:hover {
    color: var(--text-primary, #fff);
}

.prosp-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    opacity: 0.35;
}

.prosp-table th.sortable.sorted::after {
    opacity: 1;
    color: var(--accent, #6366f1);
}

.prosp-table th.sortable.sorted.asc::after {
    content: '↑';
}

.prosp-table th.sortable.sorted.desc::after {
    content: '↓';
}

.prosp-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    vertical-align: middle;
    color: #e2e8f0;
}

.prosp-table-row {
    cursor: pointer;
    transition: background 0.12s, box-shadow 0.12s;
}

.prosp-table tbody .prosp-table-row:nth-child(odd) {
    background: rgba(15, 23, 42, 0.82);
}

.prosp-table tbody .prosp-table-row:nth-child(even) {
    background: rgba(17, 24, 39, 0.94);
}

.prosp-table-row:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.prosp-table-game-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    min-width: 200px;
}

.prosp-table-game-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    color: #f8fafc;
}

.prosp-table-thumb {
    width: 28px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.prosp-table-studio-cell {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #cbd5e1;
    font-size: 0.8rem;
}

.prosp-table-nowrap {
    white-space: nowrap;
    font-size: 0.8rem;
}

.prosp-table-tags {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    max-width: 200px;
}

.prosp-table-actions {
    display: flex;
    gap: 0.25rem;
}

.prosp-row-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #475569;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.78rem;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
}

.prosp-row-action:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: #94a3b8;
}

.prosp-table-muted {
    color: #94a3b8;
    font-size: 0.78rem;
}

.prosp-table-empty {
    text-align: center;
    padding: 2rem !important;
    color: var(--text-muted, #64748b);
}

/* Pagination */
.prosp-table-pagination {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.prosp-page-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #475569;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.9);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0 0.4rem;
}

.prosp-page-btn:hover:not(:disabled) {
    background: rgba(51, 65, 85, 0.95);
    color: #f8fafc;
    border-color: #94a3b8;
}

.prosp-page-btn.active {
    background: var(--accent, #6366f1);
    color: #fff;
    border-color: var(--accent, #6366f1);
}

.prosp-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.prosp-page-ellipsis {
    color: #94a3b8;
    padding: 0 0.2rem;
    font-size: 0.8rem;
}

.prosp-table .prosp-tag {
    background: rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}

.prosp-table .prosp-tag.prosp-tag-platform {
    background: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

/* ============================================================================
   GAME WRAPPED TAB
   ============================================================================ */

.gw-search-bar {
    position: relative;
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.gw-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.gw-search-input:focus {
    border-color: var(--accent);
}

.gw-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.gw-search-results.active {
    display: block;
}

.gw-search-item {
    padding: 0.65rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.gw-search-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

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

.gw-search-item-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.gw-search-item-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.gw-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.gw-preload-filter {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 0.82rem;
}

/* Program table */
.gw-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
}

.gw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.gw-table thead th {
    text-align: left;
    padding: 0.7rem 0.9rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--card-bg);
}

.gw-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.gw-table tbody tr:last-child { border-bottom: none; }

.gw-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

.gw-table td {
    padding: 0.65rem 0.9rem;
    vertical-align: middle;
}

.gw-tbl-num {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    width: 36px;
    text-align: center;
}

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

.gw-tbl-game-link {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

.gw-tbl-game-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.gw-tbl-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gw-tbl-actions {
    white-space: nowrap;
}

.gw-link-group, .gw-copy-group {
    display: inline-flex;
    gap: 4px;
    vertical-align: middle;
}

.gw-link-group { margin-right: 8px; }

.gw-link-btn {
    width: 30px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
}

.gw-link-btn:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.1);
}

.gw-copy-btn {
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0 8px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.gw-copy-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.gw-copy-btn.copied {
    border-color: var(--success, #22c55e);
    color: var(--success, #22c55e);
    background: rgba(34, 197, 94, 0.08);
}

.gw-report-modal {
    max-width: 640px;
}

.gw-report-definition {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.02);
    margin-bottom: 0.8rem;
}

.gw-report-def-title {
    font-weight: 700;
    color: var(--text-primary);
}

.gw-report-def-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.gw-report-def-body {
    margin-top: 0.55rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.35;
}

.gw-report-def-list {
    margin: 0.55rem 0 0 1.1rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.35;
}

.gw-report-def-footnote {
    margin-top: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.gw-report-preload-note {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.gw-preload-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.gw-preload-status.ready { background: rgba(34,197,94,0.14); color: #16a34a; }
.gw-preload-status.processing { background: rgba(59,130,246,0.14); color: #2563eb; }
.gw-preload-status.queued { background: rgba(245,158,11,0.14); color: #d97706; }
.gw-preload-status.failed { background: rgba(239,68,68,0.14); color: #dc2626; }
.gw-preload-status.stuck { background: rgba(239,68,68,0.2); color: #b91c1c; }

.gw-pin-btn.active {
    border-color: #f59e0b;
    color: #f59e0b;
    background: rgba(245,158,11,0.08);
}

.gw-create-wrap {
    margin: 0 0 1.1rem 0;
    padding: 1.1rem;
    border: 1px solid color-mix(in srgb, var(--border-color) 72%, #818cf8 28%);
    border-radius: 16px;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(99,102,241,0.14) 0%, rgba(99,102,241,0.02) 42%, transparent 75%),
        linear-gradient(180deg, rgba(255,255,255,0.03) 0%, var(--bg-secondary) 40%);
    box-shadow: 0 14px 32px rgba(10, 14, 28, 0.28);
}

.gw-create-wrap-head h3 {
    margin: 0 0 .25rem 0;
    font-size: 1.1rem;
}

.gw-create-wrap-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: .85rem;
}

.gw-journey-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: .45rem;
    margin: .85rem 0 1rem 0;
}

.gw-journey-step {
    border: 1px solid color-mix(in srgb, var(--border-color) 80%, #6366f1 20%);
    border-radius: 999px;
    padding: .4rem .68rem;
    text-align: center;
    font-size: .73rem;
    color: var(--text-muted);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
    font-weight: 700;
}

.gw-journey-step.active {
    border-color: rgba(99,102,241,.6);
    color: #c7d2fe;
    background: rgba(99,102,241,.17);
}

.gw-journey-step.done {
    border-color: rgba(34,197,94,.48);
    color: #86efac;
    background: rgba(34,197,94,.14);
}

/* Stronger contrast for early journey steps */
.gw-journey-step[data-gw-step="source"].active {
    border-color: #22c55e;
    background: linear-gradient(180deg, rgba(34,197,94,0.34), rgba(22,163,74,0.24));
    color: #ecfdf3;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.25), 0 6px 14px rgba(22,163,74,0.25);
}

.gw-journey-step[data-gw-step="source"].done {
    border-color: #16a34a;
    background: linear-gradient(180deg, rgba(22,163,74,0.42), rgba(21,128,61,0.32));
    color: #f0fdf4;
    box-shadow: 0 0 0 1px rgba(22,163,74,0.28), 0 6px 14px rgba(21,128,61,0.22);
}

.gw-journey-step[data-gw-step="scope"].active {
    border-color: #6366f1;
    background: linear-gradient(180deg, rgba(99,102,241,0.36), rgba(79,70,229,0.26));
    color: #eef2ff;
    box-shadow: 0 0 0 1px rgba(99,102,241,0.26), 0 6px 14px rgba(79,70,229,0.25);
}

.gw-journey-step[data-gw-step="scope"].done {
    border-color: #4f46e5;
    background: linear-gradient(180deg, rgba(79,70,229,0.46), rgba(67,56,202,0.34));
    color: #f5f7ff;
    box-shadow: 0 0 0 1px rgba(79,70,229,0.28), 0 6px 14px rgba(67,56,202,0.24);
}

.gw-create-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: .65rem;
}

.gw-create-card {
    border: 1px solid color-mix(in srgb, var(--border-color) 82%, #818cf8 18%);
    border-radius: 14px;
    padding: .85rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), var(--card-bg));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 18px rgba(0,0,0,0.12);
}

.gw-create-card-title {
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 .55rem 0;
}

.gw-create-label {
    display: block;
    font-size: .76rem;
    color: var(--text-muted);
    margin: .42rem 0 .2rem 0;
    font-weight: 600;
}

.gw-create-input {
    padding: .5rem .6rem;
}

.gw-form-field {
    margin-bottom: .12rem;
}

.gw-create-control {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--border-color) 72%, #818cf8 28%);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01)),
        var(--card-bg);
    color: var(--text-primary);
    transition: border-color .18s ease, box-shadow .18s ease, transform .08s ease;
}

.gw-create-control:focus {
    outline: none;
    border-color: rgba(99,102,241,.72);
    box-shadow: 0 0 0 3px rgba(99,102,241,.16);
}

.gw-create-wizard {
    position: relative;
}

.gw-create-step-panel {
    display: none;
}

.gw-create-step-panel.active {
    display: block;
}

.gw-create-step-panel .gw-create-card {
    margin-bottom: 1rem;
}

.gw-create-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.gw-create-nav .btn {
    min-height: 38px;
    border-radius: 10px;
}

.gw-journey-step {
    cursor: pointer;
}

.gw-journey-step:hover {
    opacity: 0.9;
}

.gw-create-scope-card {
    grid-column: 1 / -1;
}

.gw-create-searchbar {
    margin: 0;
    max-width: 100%;
}

.gw-create-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: .35rem;
    max-height: 180px;
    overflow: auto;
    border: 1px solid color-mix(in srgb, var(--border-color) 78%, #818cf8 22%);
    border-radius: 8px;
    padding: .5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), var(--bg-primary));
}

.gw-create-selected-games {
    margin-top: .35rem;
    color: var(--text-muted);
    font-size: .82rem;
}

.gw-create-muted {
    color: var(--text-muted);
    font-size: .82rem;
}

.gw-create-hint {
    color: var(--text-muted);
    font-size: .82rem;
    margin: 0 0 .75rem 0;
    line-height: 1.4;
}

.gw-create-checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-primary);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.gw-create-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #22c55e;
    cursor: pointer;
}

.gw-create-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}

.gw-create-actions .btn {
    min-height: 38px;
    border-radius: 10px;
    font-weight: 700;
}

.gw-create-status {
    color: var(--text-muted);
    font-size: .82rem;
    min-height: 1.1rem;
}

.gw-create-links-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: .8rem 0 .45rem 0;
}

.gw-create-links-head {
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.gw-list-separator {
    margin: 1.15rem 0 .75rem 0;
    padding: .7rem .8rem;
    border: 1px dashed color-mix(in srgb, var(--border-color) 72%, #818cf8 28%);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
}

.gw-list-separator h3 {
    margin: 0 0 .2rem 0;
    font-size: .95rem;
}

.gw-list-separator p {
    margin: 0;
    font-size: .8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .gw-copy-group { display: none; }
    .gw-tbl-sub { max-width: 180px; }
    .gw-journey-steps { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .gw-create-grid { grid-template-columns: 1fr; }
    .gw-create-picker { grid-template-columns: 1fr; }
}

/* Mode tabs */
.gw-mode-tabs {
    display: flex;
    gap: 0.35rem;
    margin: 1rem 0 1.25rem;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}

.gw-mode-tab {
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gw-mode-tab:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.gw-mode-tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* Detail content cards */
.gw-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.gw-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.gw-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.gw-stat-val.green { color: var(--success, #22c55e); }
.gw-stat-val.orange { color: #f59e0b; }
.gw-stat-val.pink { color: #ec4899; }
.gw-stat-val.accent { color: var(--accent); }

.gw-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.gw-stat-change {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.gw-stat-change.up { color: var(--success, #22c55e); }
.gw-stat-change.down { color: var(--danger, #ef4444); }
.gw-stat-change.neutral { color: var(--text-muted); }

.gw-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1.25rem 0 0.75rem;
}

.gw-streamer-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 0.5rem;
}

.gw-streamer-rank {
    font-weight: 800;
    color: var(--accent);
    min-width: 28px;
    font-size: 1rem;
}

.gw-streamer-info { flex: 1; }

.gw-streamer-name { font-weight: 600; font-size: 0.9rem; }

.gw-streamer-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gw-streamer-peak {
    font-weight: 800;
    color: var(--accent);
    font-size: 0.95rem;
    text-align: right;
}

.gw-badge-new {
    display: inline-block;
    background: var(--success, #22c55e);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    text-transform: uppercase;
    vertical-align: middle;
}

.gw-bench-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.gw-bench-col {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}

.gw-bench-col h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.gw-bench-col.in-program h4 { color: var(--success, #22c55e); }
.gw-bench-col.outside h4 { color: #f59e0b; }

.gw-bench-row { margin-bottom: 0.6rem; }

.gw-bench-val {
    font-size: 1.25rem;
    font-weight: 800;
}

.gw-bench-label {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gw-game-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 0.5rem;
}

.gw-game-rank {
    font-weight: 800;
    color: var(--text-muted);
    min-width: 24px;
}

.gw-game-title { flex: 1; font-weight: 600; font-size: 0.9rem; }

.gw-game-stat {
    text-align: right;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
}

.gw-game-sublabel {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.gw-emv-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.gw-emv-amount {
    font-size: 1.5rem;
    font-weight: 800;
}

.gw-ring-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.gw-ring-item { text-align: center; }
.gw-ring-item svg { width: 90px; height: 90px; }
.gw-ring-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

@media (max-width: 640px) {
    .gw-bench-grid { grid-template-columns: 1fr; }
    .gw-mode-tabs { flex-wrap: wrap; }
}

/* ============================================================
   Game Wrapped — Presentation / Snap-scroll Slide Mode
   ============================================================ */
.gw-slides {
    scroll-snap-type: y mandatory;
    overflow-y: auto;
    height: calc(100vh - 120px);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.gw-slide {
    scroll-snap-align: start;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.gw-slide-inner {
    max-width: 720px;
    width: 100%;
}

.gw-slide-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gw-slide-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gw-slide-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.gw-slide-commentary {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.gw-slide-hero-number {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.gw-slide-hero-number.green { color: var(--success, #22c55e); }
.gw-slide-hero-number.accent { color: var(--accent); }
.gw-slide-hero-number.orange { color: #f59e0b; }
.gw-slide-hero-number.pink { color: #ec4899; }

.gw-slide .gw-stats-row { margin-top: 1.5rem; }
.gw-slide .gw-streamer-row { text-align: left; }
.gw-slide .gw-game-row { text-align: left; }
.gw-slide .gw-bench-grid { text-align: left; }
.gw-slide .gw-ring-row { justify-content: center; }

.gw-slide-period {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    margin-bottom: 1rem;
}

.gw-slide-scroll-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.6;
    animation: gw-bounce 2s ease infinite;
}

@keyframes gw-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px); }
}

.gw-slide-emv-big {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0.5rem 0;
}

.gw-slide-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    border-radius: 2px;
    margin: 1rem auto;
}

@media (max-width: 640px) {
    .gw-slide { padding: 1.5rem 1rem; }
    .gw-slide-title { font-size: 1.5rem; }
    .gw-slide-hero-number { font-size: 2.5rem; }
    .gw-slide-emv-big { font-size: 1.8rem; }
}

/* ==========================================
   CREATOR PROGRAM HEALTH
   ========================================== */

.ccp-growth-positive {
    color: #22c55e;
    font-weight: 600;
}

.ccp-growth-negative {
    color: #ef4444;
    font-weight: 600;
}

.act-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 2px;
}

.act-badge.act-quest {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.act-badge.act-campaign {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.act-badge.act-ccp {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.ccp-stream-btn {
    padding: 2px 8px !important;
    font-size: 0.8rem !important;
    cursor: pointer;
}

.ccp-streaming-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 8px;
}

.ccp-streaming-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ccp-streaming-header h3 {
    margin: 0;
}

.ccp-streaming-charts {
    margin-bottom: 1rem;
}

.ccp-chart-container {
    width: 100%;
    max-width: 1200px;
    min-height: 400px;
    position: relative;
}

#ccpHealthTable th {
    cursor: pointer;
    user-select: none;
}

#ccpHealthTable th:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* CCP Program Detail Modal */
.ccp-detail-modal-content {
    overflow-y: auto;
}
.ccp-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.ccp-detail-header h3 {
    margin: 0;
    font-size: 1.25rem;
}
.ccp-detail-summary,
.ccp-detail-streaming,
.ccp-detail-participants {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.ccp-detail-summary h4,
.ccp-detail-streaming h4,
.ccp-detail-participants h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #64748b;
}
.ccp-detail-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.ccp-detail-overview-item {
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
}
.ccp-detail-overview-item strong {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
}
.ccp-detail-streaming-body {
    margin-bottom: 0.75rem;
    min-height: 2rem;
}
.ccp-detail-streaming-body.loading {
    color: #94a3b8;
}

/* CCP Case fullscreen view */
.ccp-case-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}
.ccp-case-fullscreen.hidden {
    display: none;
}
.ccp-case-fullscreen-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.ccp-case-fullscreen-header h2 {
    margin: 0;
    font-size: 1.25rem;
}
.ccp-case-fullscreen-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ========== Andreaz Clippy ========== */
.az-clipper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: none;
}
.az-clipper > * { pointer-events: auto; }

.az-bubble {
    position: relative;
    background: #1e293b;
    border: 1px solid rgba(129,140,248,0.4);
    border-radius: 12px 12px 4px 12px;
    padding: 0.55rem 0.85rem;
    max-width: 280px;
    min-width: 120px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    animation: az-bubble-in 0.35s ease-out;
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.4;
}
.az-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 28px;
    width: 12px;
    height: 12px;
    background: #1e293b;
    border-right: 1px solid rgba(129,140,248,0.4);
    border-bottom: 1px solid rgba(129,140,248,0.4);
    transform: rotate(45deg);
}
.az-bubble-close {
    position: absolute;
    top: 2px;
    right: 6px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.az-bubble-close:hover { color: #f87171; }
@keyframes az-bubble-in {
    from { opacity: 0; transform: translateY(8px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.az-body {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.az-body:hover { transform: scale(1.08); }
.az-body:active { transform: scale(0.95); }

.az-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #818cf8;
    box-shadow: 0 0 15px rgba(99,102,241,0.4);
    object-fit: cover;
    transition: border-color 0.3s;
}
.az-clipper.excited .az-avatar {
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34,197,94,0.5);
    animation: az-shake 0.4s ease;
}
.az-clipper.angry .az-avatar {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239,68,68,0.5);
}
@keyframes az-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

.az-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f172a;
    transition: all 0.3s ease;
}
.az-badge.green { background: #22c55e; }
.az-badge.gold { background: #eab308; }

.az-challenge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(129,140,248,0.3);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    backdrop-filter: blur(8px);
}
.az-timer-ring { position: relative; width: 40px; height: 40px; }
.az-timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.az-timer-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 3;
}
.az-timer-fill {
    fill: none;
    stroke: #818cf8;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 1s linear;
}
.az-timer-fill.danger { stroke: #ef4444; }
.az-timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #e2e8f0;
}
.az-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
}
.az-score-current { color: #818cf8; transition: all 0.2s; }
.az-score-current.pop { transform: scale(1.4); color: #22c55e; }
.az-score-sep { color: #64748b; margin: 0 2px; }
.az-score-target { color: #94a3b8; }
.az-streak {
    font-size: 0.7rem;
    color: #eab308;
    font-weight: 600;
    min-width: 20px;
}

/* ========== Prospector Section Loading Skeletons ========== */
.prosp-loading-section {
    position: relative;
    min-height: 80px;
    padding: 0.8rem;
    border-radius: 10px;
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(129,140,248,0.15);
    animation: prosp-load-fade-in 0.3s ease;
}
@keyframes prosp-load-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.prosp-loading-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #e2e8f0;
}
.prosp-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(129,140,248,0.2);
    border-top-color: #818cf8;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
.prosp-loading-phase {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 1.2rem;
}
.prosp-loading-phase-emoji {
    font-size: 1rem;
    animation: prosp-emoji-bounce 1.2s ease infinite;
}
@keyframes prosp-emoji-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.prosp-skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.prosp-skeleton-line {
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(129,140,248,0.08) 25%, rgba(129,140,248,0.18) 50%, rgba(129,140,248,0.08) 75%);
    background-size: 200% 100%;
    animation: prosp-shimmer 1.5s ease infinite;
}
.prosp-skeleton-line:nth-child(1) { width: 90%; }
.prosp-skeleton-line:nth-child(2) { width: 75%; }
.prosp-skeleton-line:nth-child(3) { width: 60%; }
.prosp-skeleton-line:nth-child(4) { width: 80%; }
@keyframes prosp-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.prosp-loading-bar {
    height: 3px;
    border-radius: 2px;
    background: rgba(129,140,248,0.15);
    overflow: hidden;
    margin-top: 0.5rem;
}
.prosp-loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #818cf8, #22c55e);
    border-radius: 2px;
    transition: width 0.8s ease;
    animation: prosp-bar-indeterminate 2s ease infinite;
}
@keyframes prosp-bar-indeterminate {
    0% { width: 0%; margin-left: 0; }
    50% { width: 40%; margin-left: 30%; }
    100% { width: 0%; margin-left: 100%; }
}

/* ========== Revenue Hunt Splash ========== */
.rh-splash {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #030712;
    overflow: hidden;
}
.rh-matrix-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.rh-splash-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    animation: rhFadeIn 1.5s ease-out;
}
@keyframes rhFadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.rh-ascii-logo {
    font-family: 'Courier New', monospace;
    color: #22c55e;
    font-size: 0.55rem;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(34,197,94,0.6), 0 0 40px rgba(34,197,94,0.2);
    margin-bottom: 1rem;
    white-space: pre;
    user-select: none;
}
.rh-subtitle {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #4ade80;
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px rgba(74,222,128,0.5);
}
.rh-welcome {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 1rem;
}
.rh-divider {
    width: 180px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
    margin: 1rem auto;
}
.rh-pick {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.rh-chars {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.rh-char {
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    width: 140px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: #e2e8f0;
}
.rh-char:hover, .rh-char.selected {
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34,197,94,0.3);
    transform: translateY(-3px);
    background: rgba(34,197,94,0.1);
}
.rh-char.selected { border-width: 2px; }
.rh-char-emoji { font-size: 2rem; }
.rh-char-name { font-weight: 600; font-size: 0.85rem; }
.rh-char-desc { font-size: 0.65rem; color: #94a3b8; }
.rh-enter {
    font-family: 'Courier New', monospace;
    color: #4ade80;
    font-size: 0.9rem;
    animation: rhBlink 1s ease infinite;
}
.rh-enter kbd {
    background: rgba(34,197,94,0.2);
    border: 1px solid #22c55e;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-family: inherit;
}
@keyframes rhBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ========== Genre Filter Panel ========== */
.prosp-genre-panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: #1e293b;
    border: 1px solid rgba(129,140,248,0.3);
    border-radius: 10px;
    padding: 0.8rem;
    min-width: 320px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.prosp-genre-mode {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    color: #94a3b8;
}
.prosp-genre-mode label { cursor: pointer; }
.prosp-genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
}
.prosp-genre-chip {
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,0.3);
    background: rgba(15,23,42,0.6);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s ease;
}
.prosp-genre-chip:hover { border-color: #818cf8; color: #e2e8f0; }
.prosp-genre-chip.selected { background: #818cf8; color: #fff; border-color: #818cf8; }
.prosp-genre-chip.selected.exclude-mode { background: #ef4444; border-color: #ef4444; }
.prosp-genre-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}
.prosp-genre-badge {
    display: inline-block;
    background: #818cf8;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    line-height: 16px;
    text-align: center;
    margin-left: 4px;
    vertical-align: middle;
}

/* ========== Preset Controls ========== */
.prosp-preset-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ========== Stream Info Badge ========== */
.prosp-stream-info {
    font-size: 0.7rem;
    color: #64748b;
    vertical-align: middle;
}

/* ========== Prospector Outreach ========== */
.prosp-outreach-section {
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.prosp-outreach-controls {
    display: grid;
    gap: 0.5rem;
}

.prosp-outreach-custom {
    width: 100%;
    min-height: 72px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
    resize: vertical;
}

.prosp-outreach-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.prosp-outreach-cards {
    margin-top: 0.7rem;
    display: grid;
    gap: 0.55rem;
}

.prosp-outreach-mail-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 0.6rem 0.65rem;
}

.prosp-outreach-mail-head {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a5b4fc;
    margin-bottom: 0.2rem;
}

.prosp-outreach-mail-subject {
    font-size: 0.83rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.35rem;
}

.prosp-outreach-mail-angle {
    font-size: 0.72rem;
    color: #c4b5fd;
    margin-bottom: 0.35rem;
}

.prosp-outreach-mail-body {
    font-size: 0.74rem;
    color: #d1d5db;
    line-height: 1.45;
}

.prosp-outreach-mail-cta {
    margin-top: 0.45rem;
    font-size: 0.72rem;
    color: #86efac;
}
