* { margin: 0; padding: 0; box-sizing: border-box; }

/* Enable text selection globally for copy/paste */
body, .app, .main-content, .content-area, p, span, div, td, th, li, label {
  -webkit-user-select: text;
  user-select: text;
}

.app { display: flex; height: 100vh; background: #FFFFFF; color: #0F172A; font-family: 'Inter', system-ui, -apple-system, sans-serif; }

/* Sidebar */
.sidebar { width: 280px; background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%); border-right: 1px solid #E2E8F0; display: flex; flex-direction: column; flex-shrink: 0; position: relative; }
.sidebar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), transparent); }
.sidebar-header { padding: 24px 20px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #E2E8F0; background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, transparent 100%); }
.sidebar-header h1 { font-size: 22px; font-weight: 800; background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.5px; }

/* Navigation */
.nav { flex: 1; padding: 20px 14px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; cursor: pointer; color: #1E293B; margin-bottom: 6px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; border: 1px solid transparent; }
.nav-item::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 0; background: linear-gradient(180deg, #7C3AED, #5B21B6); border-radius: 0 4px 4px 0; transition: height 0.3s ease; }
.nav-item:hover { background: rgba(124, 58, 237, 0.08); color: #7C3AED; border-color: rgba(124, 58, 237, 0.15); }
.nav-item:hover::before { height: 60%; }
.nav-item.active { background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(124, 58, 237, 0.08) 100%); color: #7C3AED; border-color: rgba(124, 58, 237, 0.3); box-shadow: 0 0 20px rgba(124, 58, 237, 0.1); }
.nav-item.active::before { height: 70%; box-shadow: 0 0 10px rgba(124, 58, 237, 0.3); }
.nav-item.active .nav-icon { color: #7C3AED; filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.3)); }
.nav-label { font-weight: 600; flex: 1; font-size: 14px; letter-spacing: 0.2px; }
.nav-badge { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; box-shadow: 0 0 8px rgba(124, 58, 237, 0.25); }
.nav-item.active .nav-badge { background: linear-gradient(135deg, #5B21B6 0%, #4C1D95 100%); color: #fff; }

/* Nav section header (Other accordion) */
.nav-section-header { display: flex; align-items: center; gap: 10px; padding: 10px 18px; margin-top: 8px; margin-bottom: 4px; cursor: pointer; color: #64748B; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; border-radius: 8px; transition: all 0.2s ease; user-select: none; }
.nav-section-header:hover { color: #7C3AED; background: rgba(124, 58, 237, 0.04); }
.nav-section-header.open { color: #7C3AED; }
.nav-section-chevron { transition: transform 0.2s ease; flex-shrink: 0; }
.nav-section-chevron.rotated { transform: rotate(90deg); }
.nav-section-label { flex: 1; }
.nav-item.nav-item-nested { padding-left: 32px; padding-top: 10px; padding-bottom: 10px; }
.nav-item.nav-item-nested .nav-label { font-size: 13px; }

/* Main content area */
.main { flex: 1; background: #FFFFFF; overflow: auto; display: flex; flex-direction: column; }

/* App Header Banner - thin strip at top */
.app-header-banner { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); padding: 10px 32px; position: relative; box-shadow: 0 2px 10px rgba(124, 58, 237, 0.2); flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; }
.app-header-banner .banner-content { display: flex; align-items: center; gap: 12px; }
.app-header-banner .banner-content h1 { font-size: 16px; font-weight: 700; color: #FFFFFF; letter-spacing: -0.2px; margin: 0; }
.app-header-banner .banner-content p { font-size: 12px; color: rgba(255, 255, 255, 0.75); font-weight: 500; margin: 0; border-left: 1px solid rgba(255,255,255,0.3); padding-left: 12px; }
.banner-actions { display: flex; gap: 8px; align-items: center; }
.banner-actions .btn { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3); padding: 6px 14px; font-size: 13px; }
.banner-actions .btn:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.5); }
.banner-actions .btn svg { color: #fff; }

/* Tabs-only row (no title) */
.header-tabs-row { background: #fff; padding: 10px 32px; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; }

/* Header */
.header { background: #FFFFFF; padding: 20px 32px; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; position: relative; }
.header h1 { display: flex; align-items: center; gap: 14px; font-size: 24px; font-weight: 800; color: #1E293B; letter-spacing: -0.5px; }
.header h1 svg, .header h1 span[title] { color: #7C3AED; }

/* Tabs */
.header-tabs { display: flex; gap: 8px; background: #F1F5F9; padding: 5px; border-radius: 12px; border: 1px solid #E2E8F0; }
.tab-btn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: transparent; border: 1px solid transparent; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; color: #1E293B; transition: all 0.2s ease; position: relative; }
.tab-btn:hover { color: #7C3AED; background: rgba(124, 58, 237, 0.05); }
.tab-btn.active { background: #FFFFFF; color: #7C3AED; border-color: #1E293B; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.tab-btn svg { width: 18px; height: 18px; }
/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 10px; font-weight: 600; font-size: 13px; cursor: pointer; border: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; letter-spacing: 0.3px; }
.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s ease; }
.btn:hover::before { opacity: 1; }
.btn-primary { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); color: #fff; box-shadow: 0 4px 15px rgba(124, 58, 237, 0.25), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(124, 58, 237, 0.35), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary { background: rgba(124, 58, 237, 0.08); color: #7C3AED; border: 1px solid rgba(124, 58, 237, 0.2); }
.btn-secondary:hover { background: rgba(124, 58, 237, 0.15); border-color: rgba(124, 58, 237, 0.4); }
.btn-sm { padding: 7px 14px; font-size: 12px; font-weight: 600; }
.btn-danger { background: linear-gradient(135deg, #E57373 0%, #D32F2F 100%); color: #fff; box-shadow: 0 4px 15px rgba(211, 47, 47, 0.25); }
.btn-danger:hover { box-shadow: 0 6px 25px rgba(211, 47, 47, 0.35); }
.btn-icon { background: rgba(124, 58, 237, 0.08); border: none; padding: 8px; cursor: pointer; color: #1E293B; border-radius: 8px; transition: all 0.2s ease; }
.btn-icon:hover { background: rgba(124, 58, 237, 0.15); color: #7C3AED; }
.btn-icon.delete:hover { background: rgba(211, 47, 47, 0.1); color: #D32F2F; }
.btn-full { width: 100%; justify-content: center; }
.btn-ghost { background: transparent; border: 1px solid #E2E8F0; color: #1E293B; }
.btn-ghost:hover { background: #F1F5F9; border-color: #CBD5E1; }

/* Cards */
.card { background: #FFFFFF; border-radius: 20px; padding: 24px; border: 1px solid #E2E8F0; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.2), transparent); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* Dashboard Layout */
.dashboard-container { padding: 24px 32px; overflow-y: auto; flex: 1; }

/* Compact Header */
.dashboard-header-slim { display: flex; align-items: center; margin-bottom: 16px; }
.dashboard-header-slim h1 { font-size: 22px; font-weight: 700; color: #0F172A; letter-spacing: -0.3px; }

/* Top Row: 3-column grid */
.dashboard-top-row { display: grid; grid-template-columns: 1fr 1fr 220px; gap: 16px; margin-bottom: 20px; }

/* Shared Dashboard Card */
.dashboard-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 14px 16px; }
.dashboard-card .card-header { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #0F172A; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #E2E8F0; }
.dashboard-card .card-header svg { color: #7C3AED; flex-shrink: 0; }

/* Overview Card */
.dashboard-card.overview .overview-list { display: flex; flex-direction: column; gap: 6px; }
.dashboard-card.overview .overview-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #F8FAFC; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.dashboard-card.overview .overview-item:hover { background: #EEF2FF; border-color: rgba(124, 58, 237, 0.2); }
.dashboard-card.overview .overview-item svg { color: #64748B; flex-shrink: 0; }
.dashboard-card.overview .item-count { font-size: 15px; font-weight: 700; color: #0F172A; min-width: 28px; }
.dashboard-card.overview .item-label { font-size: 13px; color: #475569; flex: 1; }
.dashboard-card.overview .item-detail { font-size: 11px; color: #94A3B8; }

/* Actions Card */
.dashboard-card.actions { background: linear-gradient(135deg, #FAFBFC 0%, #F8FAFC 100%); }
.dashboard-card.actions .actions-list { display: flex; flex-direction: column; gap: 8px; }
.dashboard-card.actions .action-btn { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; font-weight: 500; color: #334155; cursor: pointer; transition: all 0.2s ease; text-align: left; }
.dashboard-card.actions .action-btn:hover { border-color: #7C3AED; color: #7C3AED; }
.dashboard-card.actions .action-btn.primary { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); color: #fff; border: none; }
.dashboard-card.actions .action-btn.primary:hover { box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3); }
.dashboard-card.actions .action-btn svg { flex-shrink: 0; }

/* Recent Card */
.dashboard-card.recent .recent-list { display: flex; flex-direction: column; gap: 6px; }
.dashboard-card.recent .recent-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #F8FAFC; border-radius: 6px; font-size: 12px; color: #475569; cursor: pointer; transition: all 0.15s ease; }
.dashboard-card.recent .recent-item:hover { background: #EEF2FF; color: #7C3AED; }
.dashboard-card.recent .recent-item svg { color: #7C3AED; flex-shrink: 0; }
.dashboard-card.recent .recent-empty { font-size: 12px; color: #94A3B8; text-align: center; padding: 12px 0; }

/* Team Updates Widget */
.dashboard-card.team-updates { min-height: 280px; }
.dashboard-card.team-updates .widget-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dashboard-card.team-updates .header-icon { color: #7C3AED; font-size: 16px; }
.dashboard-card.team-updates .header-title { font-weight: 600; color: #0F172A; font-size: 13px; }
.dashboard-card.team-updates .view-all-btn { margin-left: auto; display: flex; align-items: center; gap: 4px; background: none; border: none; color: #7C3AED; cursor: pointer; font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 4px; transition: background 0.15s ease; }
.dashboard-card.team-updates .view-all-btn:hover { background: rgba(124, 58, 237, 0.1); }
.dashboard-card.team-updates .updates-list { display: flex; flex-direction: column; gap: 2px; }
.dashboard-card.team-updates .update-card { display: flex; gap: 10px; padding: 10px 8px; border-radius: 8px; cursor: pointer; transition: background 0.15s ease; }
.dashboard-card.team-updates .update-card:hover { background: #F8FAFC; }
.dashboard-card.team-updates .color-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dashboard-card.team-updates .update-header { font-size: 13px; color: #64748B; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.dashboard-card.team-updates .user-name { font-weight: 600; color: #1E293B; }
.dashboard-card.team-updates .timestamp { margin-left: auto; font-size: 11px; color: #94A3B8; }
.dashboard-card.team-updates .update-title { font-size: 13px; color: #334155; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-card.team-updates .update-note { font-size: 12px; color: #64748B; font-style: italic; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-card.team-updates .pinned-badge { font-size: 10px; color: #7C3AED; margin-top: 4px; display: flex; align-items: center; gap: 2px; }
.dashboard-card.team-updates .empty-state { text-align: center; padding: 24px 16px; color: #64748B; }
.dashboard-card.team-updates .empty-icon { font-size: 32px; margin-bottom: 8px; opacity: 0.5; }
.dashboard-card.team-updates .empty-title { font-size: 14px; font-weight: 500; color: #475569; margin-bottom: 4px; }
.dashboard-card.team-updates .empty-text { font-size: 12px; color: #94A3B8; }

/* Team Update Preview Popup */
.team-update-preview { position: fixed; width: 320px; background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15); border: 1px solid #E2E8F0; padding: 16px; z-index: 1000; }
.team-update-preview .preview-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.team-update-preview .preview-icon { font-size: 18px; }
.team-update-preview .preview-title { font-weight: 600; color: #1E293B; font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-update-preview .preview-items { background: #F8FAFC; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.team-update-preview .preview-items-label { font-size: 12px; font-weight: 500; color: #64748B; margin-bottom: 6px; }
.team-update-preview .preview-item { font-size: 13px; color: #334155; padding: 2px 0; }
.team-update-preview .preview-more { font-size: 12px; color: #7C3AED; margin-top: 4px; }
.team-update-preview .preview-note { background: #FFFBEB; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.team-update-preview .preview-note-label { font-size: 12px; color: #92400E; margin-bottom: 4px; }
.team-update-preview .preview-note-text { font-size: 13px; color: #78350F; font-style: italic; }
.team-update-preview .preview-stats { display: flex; gap: 16px; font-size: 12px; color: #64748B; margin-bottom: 12px; }
.team-update-preview .preview-actions { display: flex; gap: 8px; }
.team-update-preview .preview-btn { flex: 1; padding: 8px; border-radius: 6px; border: 1px solid #E2E8F0; background: #fff; font-size: 13px; cursor: pointer; transition: all 0.15s ease; }
.team-update-preview .preview-btn:hover { background: #F8FAFC; }

/* Team Updates Full Page */
.team-updates-page { height: 100%; display: flex; flex-direction: column; background: #F8FAFC; }
.team-updates-page .page-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: #fff; border-bottom: 1px solid #E2E8F0; }
.team-updates-page .page-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; color: #0F172A; margin: 0; }
.team-updates-page .page-title-icon { font-size: 22px; }
.team-updates-page .filter-tabs { display: flex; gap: 4px; background: #F1F5F9; padding: 4px; border-radius: 8px; }
.team-updates-page .filter-tab { padding: 8px 16px; border: none; border-radius: 6px; background: transparent; font-size: 13px; font-weight: 500; color: #64748B; cursor: pointer; transition: all 0.15s ease; }
.team-updates-page .filter-tab.active { background: #fff; color: #7C3AED; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.team-updates-page .page-content { flex: 1; overflow-y: auto; padding: 20px 24px; }
.team-updates-page .date-group { margin-bottom: 24px; }
.team-updates-page .date-header { font-size: 12px; font-weight: 600; color: #94A3B8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.team-updates-page .page-card { background: #fff; border-radius: 12px; border: 1px solid #E2E8F0; padding: 16px; margin-bottom: 12px; cursor: pointer; transition: all 0.15s ease; }
.team-updates-page .page-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: #CBD5E1; }

/* CI Pulse Card */
.dashboard-card.ci-pulse { grid-column: 1 / -1; background: linear-gradient(135deg, #FAFBFC 0%, #F0F4FF 100%); margin-top: 16px; }
.pulse-badge { margin-left: 8px; padding: 3px 10px; background: #EEF2FF; color: #7C3AED; border-radius: 12px; font-size: 11px; font-weight: 600; }
.pulse-badge.alert { background: #FEE2E2; color: #DC2626; }

/* Pulse Summary Stats */
.pulse-summary { display: flex; gap: 12px; margin-bottom: 14px; padding: 12px; background: #fff; border-radius: 10px; border: 1px solid #E2E8F0; }
.pulse-stat { flex: 1; text-align: center; padding: 8px 4px; border-radius: 8px; cursor: pointer; transition: all 0.15s ease; }
.pulse-stat:hover { background: #EEF2FF; }
.pulse-stat.alert .pulse-stat-value { color: #DC2626; }
.pulse-stat-value { font-size: 22px; font-weight: 700; color: #0F172A; }
.pulse-stat-label { font-size: 10px; color: #64748B; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.3px; }

/* Pulse Section Headers */
.pulse-section-header { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #64748B; margin: 12px 0 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.pulse-section-header.alert { color: #DC2626; }
.pulse-section-header svg { opacity: 0.7; }

/* Pulse Items List */
.pulse-items-list { display: flex; flex-direction: column; gap: 6px; }
.pulse-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; cursor: pointer; transition: all 0.15s ease; }
.pulse-item:hover { border-color: #7C3AED; background: #FAFBFF; }
.pulse-item.pipeline { border-left: 3px solid #7C3AED; }
.pulse-item.alert { border-left: 3px solid #DC2626; }
.pulse-item-main { display: flex; flex-direction: column; gap: 2px; }
.pulse-item-name { font-size: 13px; font-weight: 500; color: #0F172A; }
.pulse-item-company { font-size: 11px; color: #64748B; }
.pulse-item-detail { font-size: 11px; color: #94A3B8; }
.pulse-item-meta { display: flex; align-items: center; gap: 6px; }
.phase-badge { font-size: 10px; padding: 3px 8px; background: #EEF2FF; color: #7C3AED; border-radius: 6px; font-weight: 600; text-transform: capitalize; }
.alert-badge { font-size: 10px; padding: 3px 8px; background: #FEE2E2; color: #DC2626; border-radius: 6px; font-weight: 600; }

.pulse-empty-hint { padding: 16px; text-align: center; color: #94A3B8; font-size: 12px; }
.pulse-empty-hint p { margin: 0; }

/* Pulse Changes List */
.pulse-changes-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.pulse-change-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; border-left: 3px solid #E2E8F0; }
.pulse-change-item.pipeline { border-left-color: #7C3AED; }
.pulse-change-item.filing { border-left-color: #F59E0B; }
.pulse-change-item.competitor { border-left-color: #3B82F6; }
.change-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: #F8FAFC; border-radius: 6px; color: #64748B; flex-shrink: 0; }
.change-content { flex: 1; min-width: 0; }
.change-headline { font-size: 13px; font-weight: 500; color: #0F172A; margin-bottom: 4px; }
.change-meta { display: flex; align-items: center; gap: 8px; }
.change-competitor { font-size: 11px; color: #64748B; }
.change-actions { display: flex; gap: 6px; }

/* Pulse Footer */
.pulse-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid #E2E8F0; }
.pulse-footer-actions { display: flex; gap: 8px; }
.pulse-timestamp { font-size: 11px; color: #94A3B8; }

/* Weekly Brief Card */
.dashboard-card.weekly-brief { grid-column: 1 / -1; margin-top: 12px; }
.brief-week-badge { margin-left: auto; font-size: 11px; color: #64748B; font-weight: 400; }
.brief-empty { padding: 24px; text-align: center; color: #94A3B8; }
.brief-empty p { margin-bottom: 12px; font-size: 13px; }
.brief-summary { padding: 12px 14px; background: #F8FAFC; border-radius: 8px; margin-bottom: 12px; font-size: 13px; line-height: 1.6; color: #334155; }
.brief-sections { display: flex; flex-direction: column; gap: 12px; max-height: 280px; overflow-y: auto; }
.brief-section .section-title { font-size: 11px; font-weight: 600; color: #64748B; margin: 0 0 6px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.section-bullets { list-style: none; margin: 0; padding: 0; }
.bullet-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 10px; margin-bottom: 4px; background: #fff; border: 1px solid #E2E8F0; border-radius: 6px; gap: 10px; }
.bullet-item.verified { background: #F0FDF4; border-color: #86EFAC; }
.bullet-content { flex: 1; }
.bullet-text { font-size: 12px; color: #334155; line-height: 1.5; }
.bullet-citation { font-size: 10px; color: #7C3AED; margin-left: 4px; }
.bullet-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.evidence-strength { font-size: 9px; padding: 2px 6px; border-radius: 4px; font-weight: 600; text-transform: uppercase; }
.evidence-strength.strong { background: #DCFCE7; color: #166534; }
.evidence-strength.moderate { background: #FEF3C7; color: #92400E; }
.evidence-strength.weak { background: #FEE2E2; color: #991B1B; }
.evidence-strength.correlative { background: #E0E7FF; color: #4338CA; }
.evidence-strength.speculative { background: #F1F5F9; color: #64748B; }
.verify-btn { color: #94A3B8; padding: 2px; }
.verify-btn:hover { color: #10B981; }
.brief-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #E2E8F0; flex-wrap: wrap; }

/* Momentum Metrics Strip */
.momentum-strip { grid-column: 1 / -1; padding: 16px; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; margin-top: 12px; }
.metrics-row { display: flex; gap: 24px; justify-content: center; padding-bottom: 12px; border-bottom: 1px solid #E2E8F0; }
.metric-item { text-align: center; padding: 0 24px; border-right: 1px solid #E2E8F0; }
.metric-item:last-child { border-right: none; }
.metric-item.highlight .metric-value { color: #7C3AED; }
.metric-value { font-size: 26px; font-weight: 700; color: #0F172A; }
.metric-label { font-size: 11px; color: #64748B; margin-top: 2px; }
.activity-timeline { margin-top: 12px; }
.timeline-header { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #64748B; margin-bottom: 10px; }
.timeline-items { display: flex; flex-direction: column; gap: 6px; max-height: 120px; overflow-y: auto; padding-left: 16px; border-left: 2px solid #E2E8F0; }
.timeline-item { display: flex; align-items: flex-start; gap: 10px; position: relative; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; position: absolute; left: -21px; top: 4px; }
.timeline-dot[data-category="document"] { background: #3B82F6; }
.timeline-dot[data-category="competitive"] { background: #7C3AED; }
.timeline-dot[data-category="brief"] { background: #10B981; }
.timeline-dot[data-category="snapshot"] { background: #F59E0B; }
.timeline-content { flex: 1; }
.timeline-action { font-size: 12px; color: #334155; }
.timeline-meta { font-size: 10px; color: #94A3B8; margin-top: 1px; }

/* Confidence Badge */
.confidence-badge { font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.confidence-badge.high { background: #DCFCE7; color: #166534; }
.confidence-badge.medium { background: #FEF3C7; color: #92400E; }
.confidence-badge.low { background: #FEE2E2; color: #991B1B; }

/* Dashboard Tips */
.dashboard-tips { display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.03) 100%); border: 1px solid rgba(124, 58, 237, 0.15); border-radius: 10px; }
.tip-icon { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tip-content { font-size: 13px; color: #475569; line-height: 1.5; }
.tip-content strong { color: #7C3AED; }

/* Research Papers Section */
.research-papers-section { margin-top: 24px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 16px; overflow: hidden; }
.papers-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%); border-bottom: 1px solid #E2E8F0; }
.papers-header-left { display: flex; align-items: center; gap: 12px; }
.papers-header h3 { font-size: 16px; font-weight: 700; color: #0F172A; display: flex; align-items: center; gap: 10px; }
.papers-count-badge { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.papers-time-toggle { display: flex; background: rgba(241, 245, 249, 0.8); border-radius: 8px; padding: 3px; }
.papers-time-toggle button { padding: 6px 14px; border: none; background: transparent; font-size: 12px; font-weight: 600; color: #64748B; cursor: pointer; border-radius: 6px; transition: all 0.2s ease; }
.papers-time-toggle button.active { background: #FFFFFF; color: #3B82F6; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.papers-tabs-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #E2E8F0; background: #FAFBFC; }
.papers-tabs { display: flex; gap: 8px; }
.papers-tab { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 600; color: #64748B; cursor: pointer; transition: all 0.2s ease; }
.papers-tab:hover { color: #3B82F6; background: rgba(59, 130, 246, 0.05); }
.papers-tab.active { background: #FFFFFF; color: #3B82F6; border-color: #E2E8F0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.papers-tab .tab-count { font-size: 10px; background: rgba(59, 130, 246, 0.1); color: #3B82F6; padding: 2px 6px; border-radius: 10px; margin-left: 4px; }
.papers-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.papers-filter-select { padding: 6px 12px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 6px; font-size: 12px; color: #0F172A; cursor: pointer; min-width: 140px; }
.papers-filter-select:focus { outline: none; border-color: #3B82F6; }
.papers-filter-checkbox { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; cursor: pointer; }
.papers-filter-checkbox input { accent-color: #3B82F6; }
.papers-list { max-height: 600px; overflow-y: auto; }
.paper-card { display: flex; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid #E2E8F0; transition: background 0.2s ease; }

/* Paper Selection / Bulk Import */
.paper-select-checkbox { display: flex; align-items: center; flex-shrink: 0; margin-right: 10px; cursor: pointer; }
.paper-select-checkbox input { width: 16px; height: 16px; accent-color: #3B82F6; cursor: pointer; }
.paper-card-selected { background: rgba(59, 130, 246, 0.04); border-left: 3px solid #3B82F6; }
.paper-card-selected:hover { background: rgba(59, 130, 246, 0.06); }
.paper-card:hover { background: rgba(59, 130, 246, 0.02); }
.paper-card:last-child { border-bottom: none; }
.paper-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.paper-title { font-size: 14px; font-weight: 600; color: #0F172A; line-height: 1.4; flex: 1; cursor: pointer; transition: color 0.2s ease; }
.paper-title:hover { color: #3B82F6; }
.paper-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #64748B; margin-bottom: 8px; }
.paper-journal { font-weight: 500; color: #475569; }
.paper-date { color: #94A3B8; }
.paper-fulltext-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: rgba(16, 185, 129, 0.1); color: #059669; }
.paper-abstract { font-size: 13px; color: #64748B; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.paper-footer { display: flex; align-items: center; justify-content: space-between; }
.paper-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.paper-tag { font-size: 10px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: rgba(124, 58, 237, 0.08); color: #7C3AED; }
.paper-tag.species { background: rgba(59, 130, 246, 0.08); color: #3B82F6; }
.paper-tag.source { background: rgba(245, 158, 11, 0.08); color: #D97706; }
.paper-actions { display: flex; gap: 8px; }
.paper-action-btn { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid #E2E8F0; border-radius: 6px; background: #FFFFFF; font-size: 11px; font-weight: 600; color: #475569; cursor: pointer; transition: all 0.2s ease; }
.paper-action-btn:hover { border-color: #3B82F6; color: #3B82F6; }
.paper-action-btn.primary { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); border-color: transparent; color: #FFFFFF; }
.paper-action-btn.primary:hover { box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); transform: translateY(-1px); }
.paper-dismiss-btn { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; min-width: 28px; border: none; border-radius: 6px; background: transparent; color: #94A3B8; cursor: pointer; transition: all 0.2s ease; flex-shrink: 0; }
.paper-dismiss-btn:hover { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.paper-dismiss-btn.paper-restore-btn:hover { background: rgba(16, 185, 129, 0.1); color: #059669; }
.paper-card-hidden { opacity: 0.5; background: repeating-linear-gradient(135deg, transparent, transparent 10px, rgba(148, 163, 184, 0.04) 10px, rgba(148, 163, 184, 0.04) 20px); }
.paper-card-hidden:hover { opacity: 0.8; }
.papers-hidden-banner { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; background: rgba(245, 158, 11, 0.06); border-bottom: 1px solid #E2E8F0; font-size: 12px; font-weight: 600; color: #D97706; }
.papers-hidden-banner span { display: flex; align-items: center; gap: 6px; }
.papers-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; color: #64748B; }
.papers-empty svg { margin-bottom: 12px; opacity: 0.5; }
.papers-empty p { font-size: 14px; }

/* PubMed Search */
.pubmed-search-container { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; padding: 0 4px; }
.pubmed-search-input-wrapper { flex: 1; position: relative; }
.pubmed-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; opacity: 0.5; padding: 4px; }
.pubmed-search-clear:hover { opacity: 1; }

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

/* Clinical Trials Cards */
.trial-card { display: flex; flex-direction: column; padding: 16px 20px; border-bottom: 1px solid #E2E8F0; transition: background 0.2s ease; }
.trial-card:hover { background: rgba(16, 185, 129, 0.02); }
.trial-card:last-child { border-bottom: none; }
.trial-title { font-size: 14px; font-weight: 600; color: #0F172A; line-height: 1.4; cursor: pointer; transition: color 0.2s ease; margin-bottom: 8px; }
.trial-title:hover { color: #059669; }
.trial-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #64748B; margin-bottom: 8px; flex-wrap: wrap; }
.trial-status { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.trial-status.recruiting { background: rgba(16, 185, 129, 0.15); color: #059669; }
.trial-status.active { background: rgba(59, 130, 246, 0.15); color: #2563EB; }
.trial-status.completed { background: rgba(148, 163, 184, 0.2); color: #64748B; }
.trial-status.not-recruiting { background: rgba(245, 158, 11, 0.15); color: #D97706; }
.trial-status.other { background: rgba(148, 163, 184, 0.15); color: #64748B; }
.trial-phase { font-size: 11px; font-weight: 600; color: #7C3AED; }
.trial-nct { font-size: 11px; color: #94A3B8; font-family: monospace; }
.trial-summary { font-size: 13px; color: #64748B; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trial-details { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: #475569; margin-bottom: 12px; }
.trial-detail { display: flex; align-items: center; gap: 4px; }
.trial-detail svg { color: #94A3B8; }
.trial-conditions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.trial-condition { font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 4px; background: rgba(124, 58, 237, 0.08); color: #7C3AED; }
.trial-interventions { font-size: 12px; color: #475569; margin-bottom: 12px; }
.trial-intervention { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }
.trial-intervention-type { font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 3px; background: rgba(59, 130, 246, 0.1); color: #3B82F6; text-transform: uppercase; }
.trial-footer { display: flex; align-items: center; justify-content: space-between; }
.trial-actions { display: flex; gap: 8px; }

/* Clinical Trials Dedicated View */
.trials-container { flex: 1; overflow-y: auto; min-height: 0; padding-bottom: 20px; }
.trials-stats-row { display: flex; gap: 16px; margin: 16px 20px; }
.trials-stat { flex: 1; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px; text-align: center; }
.trials-stat-value { display: block; font-size: 28px; font-weight: 800; color: #0F172A; }
.trials-stat-label { font-size: 12px; color: #64748B; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

.trials-filters-bar { display: flex; gap: 16px; margin: 0 20px 16px; padding: 14px 18px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; align-items: flex-end; }
.trials-filter-group { display: flex; flex-direction: column; gap: 4px; }
.trials-filter-label { font-size: 11px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; }
.trials-filter-select { padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; color: #334155; background: #F8FAFC; cursor: pointer; min-width: 180px; }
.trials-filter-select:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }

.trials-list { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.trials-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #64748B; text-align: center; }
.trials-empty h3 { margin: 12px 0 4px; font-size: 16px; color: #334155; }
.trials-empty p { font-size: 13px; }

/* Trial cards in dedicated view - upgraded style */
.trials-list .trial-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 18px 22px; cursor: pointer; transition: all 0.2s ease; border-bottom: none; }
.trials-list .trial-card:hover { border-color: rgba(124, 58, 237, 0.3); box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08); transform: translateY(-1px); }
.trial-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.trial-card-top .trial-title { flex: 1; margin-bottom: 0; }
.trial-status-badge { font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; white-space: nowrap; flex-shrink: 0; }
.trial-status-badge.recruiting { background: rgba(16, 185, 129, 0.15); color: #059669; }
.trial-status-badge.active { background: rgba(59, 130, 246, 0.15); color: #2563EB; }
.trial-status-badge.completed { background: rgba(148, 163, 184, 0.2); color: #64748B; }
.trial-status-badge.not-recruiting { background: rgba(245, 158, 11, 0.15); color: #D97706; }
.trial-status-badge.other { background: rgba(148, 163, 184, 0.15); color: #64748B; }
.trial-type-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: rgba(59, 130, 246, 0.08); color: #3B82F6; font-weight: 500; }
.trial-date { font-size: 11px; color: #94A3B8; }

/* Trial Detail Panel */
.trial-detail-panel { margin: 0 20px 16px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 24px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.trial-detail-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.trial-detail-header h2 { font-size: 18px; font-weight: 700; color: #0F172A; line-height: 1.4; flex: 1; margin: 0; }
.trial-detail-close { background: none; border: 1px solid #E2E8F0; border-radius: 8px; padding: 6px; cursor: pointer; color: #64748B; transition: all 0.2s ease; }
.trial-detail-close:hover { background: #F1F5F9; color: #0F172A; }
.trial-detail-official { font-size: 13px; color: #64748B; font-style: italic; margin-bottom: 16px; }
.trial-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #F1F5F9; }
.trial-detail-item { display: flex; flex-direction: column; gap: 2px; }
.trial-detail-key { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #94A3B8; }
.trial-detail-val { font-size: 13px; font-weight: 500; color: #334155; }
.trial-detail-section { margin-bottom: 16px; }
.trial-detail-section h4 { font-size: 13px; font-weight: 600; color: #0F172A; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.trial-detail-section p { font-size: 13px; color: #475569; line-height: 1.6; margin: 0; }
.trial-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.trial-detail-location { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 10px; border-radius: 6px; background: #F1F5F9; color: #475569; }
.trial-detail-intervention { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; color: #334155; }
.trial-detail-actions { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #F1F5F9; }

/* Competitive Intelligence */
.ci-container { flex: 1; overflow-y: auto; min-height: 0; }
.ci-type-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; white-space: nowrap; }
.ci-priority-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ci-pipeline-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.ci-pipeline-controls span { font-size: 13px; font-weight: 600; color: #475569; }
.ci-pipeline-lanes { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 20px; min-height: 400px; }
.ci-pipeline-lane { min-width: 220px; flex: 1; background: #F8FAFC; border-radius: 12px; border: 1px solid #E2E8F0; padding: 16px; display: flex; flex-direction: column; }
.ci-lane-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #E2E8F0; }
.ci-lane-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ci-lane-label { font-size: 13px; font-weight: 700; color: #0F172A; flex: 1; }
.ci-lane-count { font-size: 11px; font-weight: 600; background: #E2E8F0; color: #475569; padding: 2px 8px; border-radius: 10px; }
.ci-lane-cards { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
.ci-pipeline-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; padding: 12px; cursor: pointer; transition: all 0.2s ease; }
.ci-pipeline-card:hover { border-color: rgba(124, 58, 237, 0.3); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08); transform: translateY(-1px); }
.ci-pipe-drug { display: block; font-weight: 700; font-size: 13px; color: #0F172A; margin-bottom: 4px; }
.ci-pipe-company { display: block; font-size: 11px; color: #7C3AED; font-weight: 600; margin-bottom: 4px; }
.ci-pipe-modality { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 10px; background: rgba(124, 58, 237, 0.1); color: #7C3AED; font-weight: 600; margin-right: 4px; }
.ci-pipe-indication { display: block; font-size: 11px; color: #64748B; margin-top: 6px; line-height: 1.4; }
.ci-drug-table { width: 100%; border-collapse: collapse; }
.ci-drug-table th { padding: 10px 12px; text-align: left; font-size: 11px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #E2E8F0; }
.ci-drug-table td { padding: 10px 12px; border-bottom: 1px solid #F1F5F9; font-size: 13px; vertical-align: middle; }
.ci-drug-table tr:hover { background: #F8FAFC; }
.ci-phase-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; color: #fff; }
.ci-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ci-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
.ci-tag-remove { cursor: pointer; opacity: 0.5; font-size: 14px; line-height: 1; }
.ci-tag-remove:hover { opacity: 1; color: #EF4444; }
.ci-trials-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #F1F5F9; }
.ci-trial-mini { padding: 10px; background: #F8FAFC; border-radius: 8px; border: 1px solid #E2E8F0; margin-bottom: 8px; }
.ci-trial-mini-title { font-size: 13px; font-weight: 600; color: #0F172A; line-height: 1.4; }
.ci-trial-mini-meta { font-size: 11px; color: #64748B; margin-top: 4px; display: flex; gap: 12px; }
.ci-analysis-result { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; margin: 16px 20px; white-space: pre-wrap; font-size: 13px; line-height: 1.7; color: #334155; max-height: 500px; overflow-y: auto; }
.ci-add-drug-form { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; padding: 16px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ci-add-drug-form .form-row { display: flex; gap: 10px; align-items: center; }
.ci-add-drug-form input, .ci-add-drug-form select { padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; flex: 1; }
.ci-add-drug-form input:focus, .ci-add-drug-form select:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }
.ci-filter-bar { display: flex; gap: 10px; padding: 12px 0; align-items: center; flex-wrap: wrap; }
.ci-filter-bar input, .ci-filter-bar select { padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; background: #F8FAFC; }
.ci-filter-bar input { min-width: 180px; }
.ci-filter-bar input:focus, .ci-filter-bar select:focus { outline: none; border-color: #7C3AED; }
.ci-detail-section { margin-bottom: 20px; }
.ci-detail-section h4 { font-size: 13px; font-weight: 700; color: #0F172A; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.ci-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.ci-info-item { display: flex; flex-direction: column; gap: 2px; }
.ci-info-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #94A3B8; }
.ci-info-value { font-size: 13px; font-weight: 500; color: #334155; }
.ci-drug-row { transition: background 0.15s ease; }
.ci-drug-row:hover { background: rgba(124, 58, 237, 0.04) !important; }
.ci-drug-row.expanded { background: rgba(124, 58, 237, 0.06) !important; border-bottom-color: transparent; }
.ci-drug-detail-row td { background: transparent; }
.ci-drug-detail-panel { background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(59, 130, 246, 0.03) 100%); border: 1px solid rgba(124, 58, 237, 0.15); border-radius: 12px; padding: 20px; margin: 4px 8px 16px 8px; }
.ci-drug-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ci-drug-detail-grid .full-width { grid-column: 1 / -1; }
.ci-drug-detail-field { display: flex; flex-direction: column; gap: 6px; }
.ci-drug-detail-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #7C3AED; }
.ci-drug-detail-field textarea { width: 100%; min-height: 70px; padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; line-height: 1.5; resize: vertical; font-family: inherit; color: #334155; background: #FFFFFF; transition: border-color 0.2s, box-shadow 0.2s; }
.ci-drug-detail-field textarea:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }
.ci-drug-detail-field input[type="text"] { width: 100%; padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; color: #334155; background: #FFFFFF; transition: border-color 0.2s, box-shadow 0.2s; }
.ci-drug-detail-field input[type="text"]:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }

/* Enhanced CI — Company Cards */
.ci-company-card { display: flex; align-items: stretch; cursor: pointer; transition: all 0.2s ease; border-bottom: 1px solid #F1F5F9; background: transparent; }
.ci-company-card:hover { background: #F8FAFC; }
.ci-company-card.active { background: rgba(124, 58, 237, 0.06); }
.ci-card-accent { width: 4px; flex-shrink: 0; border-radius: 0 2px 2px 0; transition: width 0.2s; }
.ci-company-card.active .ci-card-accent { width: 5px; }
.ci-card-body { display: flex; align-items: center; gap: 8px; padding: 12px 14px; flex: 1; min-width: 0; }
.ci-company-avatar { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.ci-ticker-badge { font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; font-size: 10px; font-weight: 700; color: #7C3AED; background: rgba(124, 58, 237, 0.08); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.ci-phase-bar { display: flex; height: 4px; border-radius: 2px; overflow: hidden; margin-top: 6px; gap: 1px; }
.ci-phase-segment { min-width: 4px; border-radius: 1px; transition: flex 0.3s; }
.ci-card-score { font-weight: 800; font-size: 11px; color: #7C3AED; }

/* Enhanced CI — Metrics Dashboard */
.ci-metrics-dashboard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.ci-metric-card { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.ci-metric-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #94A3B8; }
.ci-metric-value { font-size: 18px; font-weight: 800; color: #0F172A; }
.ci-metric-input { border: 1px solid transparent; background: transparent; text-align: center; font-size: 14px; font-weight: 700; color: #0F172A; padding: 2px 4px; border-radius: 6px; width: 100%; }
.ci-metric-input:hover { border-color: #E2E8F0; }
.ci-metric-input:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1); }
.ci-metric-input::placeholder { color: #CBD5E1; font-weight: 500; }

/* Enhanced CI — Pipeline Stats */
.ci-pipeline-stats { display: flex; gap: 16px; margin-bottom: 20px; padding: 16px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(59, 130, 246, 0.03) 100%); border-radius: 12px; border: 1px solid rgba(124, 58, 237, 0.1); }
.ci-pipe-stat { flex: 1; text-align: center; }
.ci-pipe-stat-val { display: block; font-size: 24px; font-weight: 800; color: #0F172A; }
.ci-pipe-stat-label { display: block; font-size: 11px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Enhanced CI — Therapeutic Area Badge (Pipeline) */
.ci-pipe-ta-badge { display: inline-block; font-size: 9px; font-weight: 600; padding: 2px 7px; border-radius: 8px; white-space: nowrap; }

/* Enhanced CI — Catalysts Timeline */
.ci-catalysts-timeline { display: flex; flex-direction: column; gap: 24px; }
.ci-catalyst-group { }
.ci-catalyst-quarter-header { font-size: 13px; font-weight: 700; color: #7C3AED; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid rgba(124, 58, 237, 0.15); }
.ci-catalyst-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; padding: 14px 16px; margin-bottom: 8px; border-left: 4px solid #F59E0B; transition: all 0.2s ease; }
.ci-catalyst-card:hover { border-color: rgba(124, 58, 237, 0.2); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.ci-catalyst-type-badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.ci-catalyst-title { font-size: 14px; font-weight: 600; color: #0F172A; line-height: 1.4; }
.ci-catalyst-meta { font-size: 11px; color: #64748B; margin-top: 4px; display: flex; gap: 4px; flex-wrap: wrap; }

/* CI Redesign — Watchlist Grid + Live Feed + Intel Feed */
.ci-competitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.ci-grid-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 14px; padding: 18px; transition: all 0.2s ease; }
.ci-grid-card:hover { border-color: rgba(124, 58, 237, 0.4); box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08); transform: translateY(-2px); }
.ci-grid-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.ci-grid-card-stats { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; margin-bottom: 14px; }
.ci-grid-stat { display: flex; flex-direction: column; align-items: center; flex: 1; }
.ci-grid-stat-val { font-size: 16px; font-weight: 700; color: #0F172A; }
.ci-grid-stat-label { font-size: 10px; color: #64748B; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
.ci-grid-card-actions { display: flex; gap: 6px; align-items: center; }
.ci-grid-card-actions .btn { font-size: 11px; padding: 6px 10px; border-radius: 8px; }

.ci-live-feed { background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%); border: 1px solid #E2E8F0; border-radius: 14px; padding: 16px 18px; }
.ci-live-card { min-width: 220px; max-width: 280px; flex: 0 0 auto; display: flex; gap: 10px; padding: 12px 14px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; transition: all 0.2s; }
.ci-live-card:hover { border-color: rgba(124, 58, 237, 0.3); background: #F8FAFC; }
.ci-live-card-type { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.ci-live-card-headline { font-size: 12px; color: #334155; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.ci-detail-fullwidth { width: 100%; }
.ci-back-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px; border: 1px solid #E2E8F0; background: #FFFFFF; color: #64748B; font-size: 12px; font-weight: 600; cursor: pointer; margin-bottom: 16px; transition: all 0.2s; }
.ci-back-btn:hover { border-color: #7C3AED; color: #A78BFA; background: #F5F3FF; }

.ci-add-company-bar { display: flex; gap: 10px; align-items: center; }

.ci-intel-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.ci-filter-pill { transition: all 0.2s ease; }
.ci-filter-pill:hover { opacity: 0.85; }
.ci-filter-pill.active { box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3); }

.ci-feed-items { display: flex; flex-direction: column; gap: 8px; }
.ci-feed-card { display: flex; gap: 12px; padding: 14px 16px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; transition: all 0.2s; align-items: flex-start; }
.ci-feed-card:hover { border-color: rgba(124, 58, 237, 0.3); }

.ci-filing-mini { padding: 12px 16px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; transition: all 0.2s; }
.ci-filing-mini:hover { border-color: rgba(124, 58, 237, 0.3); }

.ci-alert-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 10px; background: #EF4444; color: #fff; font-size: 10px; font-weight: 700; padding: 0 5px; }

/* Drug Labels — International / Global Approvals */
.dl-approval-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dl-approval-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; transition: all 0.15s; }
.dl-approval-badge.approved { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.dl-approval-badge.not-approved { background: #F8FAFC; color: #94A3B8; border: 1px solid #E2E8F0; text-decoration: line-through; }
.dl-approval-badge.unverified { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.dl-approval-badge .dl-badge-flag { font-size: 13px; line-height: 1; }
.dl-approval-badge .dl-badge-check { font-size: 10px; }
.dl-approval-badge .dl-badge-year { font-size: 10px; opacity: 0.8; }

/* International Summary Grid */
.dl-intl-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.dl-region-card { border-radius: 10px; padding: 14px; border: 1px solid #E2E8F0; background: #FFFFFF; transition: all 0.2s; }
.dl-region-card:hover { border-color: #CBD5E1; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.dl-region-card.approved { border-left: 3px solid #10B981; }
.dl-region-card.not-approved { border-left: 3px solid #CBD5E1; opacity: 0.7; }
.dl-region-card.unverified { border-left: 3px solid #F59E0B; }
.dl-region-flag { font-size: 22px; line-height: 1; margin-bottom: 6px; }
.dl-region-name { font-size: 12px; font-weight: 700; color: #0F172A; margin-bottom: 2px; }
.dl-region-agency { font-size: 10px; color: #64748B; margin-bottom: 8px; }
.dl-region-status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.dl-region-status.approved { background: #ECFDF5; color: #065F46; }
.dl-region-status.not-approved { background: #F1F5F9; color: #94A3B8; }
.dl-region-status.unverified { background: #FFFBEB; color: #92400E; }
.dl-region-detail { font-size: 11px; color: #475569; line-height: 1.6; }
.dl-region-detail span { display: block; }
.dl-region-detail .dl-detail-label { font-weight: 600; color: #64748B; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.dl-region-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #3B82F6; text-decoration: none; margin-top: 6px; font-weight: 500; }
.dl-region-link:hover { text-decoration: underline; }

/* Region Detail Expandable Cards */
.dl-region-expand { border-radius: 10px; border: 1px solid #E2E8F0; background: #FFFFFF; margin-bottom: 10px; overflow: hidden; }
.dl-region-expand-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; cursor: pointer; background: #FAFBFC; border-bottom: 1px solid #F1F5F9; transition: background 0.15s; }
.dl-region-expand-header:hover { background: #F1F5F9; }
.dl-region-expand-body { padding: 14px 16px; }

/* Unverified disclaimer banner */
.dl-unverified-banner { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; background: #FFFBEB; border: 1px solid #FDE68A; font-size: 12px; color: #92400E; margin-bottom: 14px; line-height: 1.5; }

/* Analysis — Strategic Insights */
.insight-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.insight-btn { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 10px; font-weight: 600; font-size: 13px; cursor: pointer; border: 1px solid #E2E8F0; background: #FFFFFF; color: #334155; transition: all 0.2s; flex: 1; min-width: 160px; justify-content: center; }
.insight-btn:hover { border-color: #7C3AED; color: #7C3AED; background: rgba(124, 58, 237, 0.04); }
.insight-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.insight-btn.generating { border-color: #7C3AED; background: rgba(124, 58, 237, 0.08); color: #7C3AED; }
.insight-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.insight-card h3 { font-size: 15px; font-weight: 700; color: #0F172A; margin-bottom: 8px; }
.insight-card p { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 12px; }
.insight-card ul { list-style: none; padding: 0; }
.insight-card li { padding: 8px 12px; margin-bottom: 6px; background: #F8FAFC; border-radius: 8px; border: 1px solid #F1F5F9; font-size: 13px; color: #334155; line-height: 1.5; }
.insight-tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; margin-right: 6px; }
.insight-tag.high { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.insight-tag.medium { background: rgba(245, 158, 11, 0.1); color: #D97706; }
.insight-tag.low { background: rgba(107, 114, 128, 0.1); color: #6B7280; }
.insight-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #7C3AED; margin-bottom: 10px; margin-top: 20px; }

/* Analysis — Correlation Matrix Heatmap */
.corr-matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.corr-matrix th { padding: 8px 6px; text-align: center; font-weight: 600; color: #64748B; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.corr-matrix td { padding: 6px; text-align: center; font-weight: 600; font-size: 11px; cursor: pointer; border: 1px solid rgba(255,255,255,0.5); transition: transform 0.1s; }
.corr-matrix td:hover { transform: scale(1.1); z-index: 1; box-shadow: 0 0 8px rgba(0,0,0,0.2); }
.corr-matrix .row-header { text-align: right; padding-right: 10px; font-weight: 600; color: #334155; font-size: 11px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.corr-matrix .row-header:hover { transform: none; box-shadow: none; }

/* Analysis — Descriptive Stats */
.desc-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.desc-stat-card { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px 12px; text-align: center; }
.desc-stat-card .stat-name { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #94A3B8; font-weight: 600; }
.desc-stat-card .stat-val { font-size: 16px; font-weight: 700; color: #0F172A; margin-top: 2px; }

/* Analysis — Landscape Heatmap */
.pipeline-heatmap { width: 100%; border-collapse: collapse; }
.pipeline-heatmap th { padding: 10px 8px; text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748B; border-bottom: 2px solid #E2E8F0; }
.pipeline-heatmap td { padding: 8px; text-align: center; border: 1px solid #F1F5F9; vertical-align: top; min-width: 80px; }
.pipeline-heatmap .row-label { text-align: left; font-weight: 600; color: #334155; font-size: 12px; padding-left: 12px; min-width: 120px; }
.heatmap-drug-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; margin: 2px; background: rgba(124, 58, 237, 0.1); color: #7C3AED; white-space: nowrap; }
.heatmap-count { font-size: 16px; font-weight: 800; color: #0F172A; display: block; margin-bottom: 4px; }

/* Analysis — Landscape cards grid */
.landscape-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; }
.landscape-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 14px; padding: 20px; }
.landscape-card.full-width { grid-column: 1 / -1; }
.landscape-card h3 { font-size: 14px; font-weight: 700; color: #0F172A; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.landscape-card h3 svg { color: #7C3AED; }

/* Stat cards */
.stat-card { display: flex; align-items: center; gap: 18px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.stat-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 8px 40px rgba(124, 58, 237, 0.1); border-color: rgba(124, 58, 237, 0.2); }
.stat-icon { width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center; position: relative; }
.stat-icon::after { content: ''; position: absolute; inset: -2px; border-radius: 18px; background: inherit; opacity: 0.25; filter: blur(8px); z-index: -1; }
.stat-icon.purple { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); color: #fff; box-shadow: 0 0 15px rgba(124, 58, 237, 0.3); }
.stat-icon.lime { background: linear-gradient(135deg, #10B981 0%, #059669 100%); color: #fff; box-shadow: 0 0 15px rgba(16, 185, 129, 0.3); }
.stat-icon.blue { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%); color: #fff; box-shadow: 0 0 15px rgba(59, 130, 246, 0.3); }
.stat-icon.amber { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); color: #fff; box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
.stat-icon.pink { background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%); color: #fff; box-shadow: 0 0 15px rgba(236, 72, 153, 0.3); }
.stat-value { display: block; font-size: 32px; font-weight: 800; color: #0F172A; letter-spacing: -1px; }
.stat-label { color: #1E293B; font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
/* Section headers */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: #0F172A; text-transform: uppercase; letter-spacing: 0.5px; }
.section-title svg { color: #7C3AED; }
.section-badge { background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(124, 58, 237, 0.08) 100%); color: #7C3AED; padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid rgba(124, 58, 237, 0.2); }

/* Item rows */
.item-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; margin-bottom: 10px; cursor: pointer; transition: all 0.2s ease; }
.item-row:hover { background: rgba(124, 58, 237, 0.05); border-color: rgba(124, 58, 237, 0.2); transform: translateX(4px); }
.item-icon { color: #7C3AED; flex-shrink: 0; }
.item-info { flex: 1; min-width: 0; }
.item-name { display: block; font-weight: 600; font-size: 14px; color: #0F172A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { font-size: 12px; color: #1E293B; margin-top: 2px; }
.empty { text-align: center; color: #1E293B; padding: 50px 20px; }
.empty-icon { margin-bottom: 16px; color: #CBD5E1; }

/* Split view panels */
.split { display: flex; height: calc(100vh - 85px); }
.list-panel { width: 360px; background: #F8FAFC; border-right: 1px solid #E2E8F0; overflow: hidden; padding: 20px; flex-shrink: 0; display: flex; flex-direction: column; }
.list-panel-content { flex: 1; overflow-y: auto; padding-bottom: 40px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.detail-panel { flex: 1; overflow-y: auto; padding: 28px; background: #FFFFFF; }

/* Compare View */
.compare-container { display: flex; flex-direction: column; height: calc(100vh - 85px); background: #F8FAFC; }
.compare-toolbar { display: flex; align-items: center; gap: 16px; padding: 14px 24px; background: #fff; border-bottom: 1px solid #E2E8F0; }
.compare-toolbar-section { display: flex; align-items: center; gap: 8px; }
.compare-toolbar-label { font-size: 12px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; }
.compare-toolbar-divider { width: 1px; height: 24px; background: #E2E8F0; margin: 0 8px; }
.compare-grid { flex: 1; display: grid; gap: 1px; background: #E2E8F0; overflow: hidden; }
.compare-grid.layout-1x1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.compare-grid.layout-1x2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.compare-grid.layout-2x1 { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
.compare-grid.layout-2x2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.compare-grid.layout-1-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; }
.compare-grid.layout-1-2 .compare-panel:first-child { grid-column: 1 / -1; }
.compare-grid.layout-2-1 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 2fr; }
.compare-grid.layout-2-1 .compare-panel:last-child { grid-column: 1 / -1; }
.compare-grid.layout-2x3 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.compare-panel { display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.compare-panel-header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #F8FAFC; border-bottom: 1px solid #E2E8F0; min-height: 48px; }
.compare-panel-title { flex: 1; font-size: 13px; font-weight: 600; color: #1E293B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-panel-dropdown { flex: 1; display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fff; border: 1px solid #E2E8F0; border-radius: 6px; cursor: pointer; transition: all 0.15s ease; }
.compare-panel-dropdown:hover { border-color: #7C3AED; }
.compare-panel-controls { display: flex; align-items: center; gap: 4px; }
.compare-panel-content { flex: 1; overflow: auto; }
.compare-panel-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #94A3B8; cursor: pointer; transition: all 0.15s ease; }
.compare-panel-empty:hover { background: rgba(124, 58, 237, 0.03); color: #7C3AED; }
.compare-panel-empty-icon { width: 64px; height: 64px; border: 2px dashed #CBD5E1; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; transition: all 0.15s ease; }
.compare-panel-empty:hover .compare-panel-empty-icon { border-color: #7C3AED; color: #7C3AED; }
.compare-layout-btn { padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 500; color: #64748B; transition: all 0.15s ease; }
.compare-layout-btn:hover { border-color: #7C3AED; }
.compare-layout-btn.active { background: #7C3AED; border-color: #7C3AED; color: #fff; }
.compare-sync-toggle { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid #E2E8F0; border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; color: #64748B; transition: all 0.15s ease; }
.compare-sync-toggle:hover { border-color: #7C3AED; }
.compare-sync-toggle.active { background: rgba(124, 58, 237, 0.1); border-color: #7C3AED; color: #7C3AED; }
.compare-action-btn { padding: 8px 16px; border: 1px solid #E2E8F0; border-radius: 8px; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: #64748B; transition: all 0.15s ease; display: flex; align-items: center; gap: 6px; }
.compare-action-btn:hover { border-color: #7C3AED; }
.compare-action-btn.primary { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); border: none; color: #fff; }
.compare-zoom-control { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #fff; border: 1px solid #E2E8F0; border-radius: 6px; }
.compare-zoom-label { font-size: 11px; color: #64748B; min-width: 32px; text-align: center; }
.compare-zoom-slider { width: 60px; accent-color: #7C3AED; }
.compare-control-btn { padding: 6px 8px; border: none; background: transparent; border-radius: 6px; cursor: pointer; font-size: 14px; color: #64748B; transition: all 0.15s ease; }
.compare-control-btn:hover { background: #F1F5F9; color: #7C3AED; }

/* List items */
.list-item { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; cursor: pointer; margin-bottom: 10px; border: 1px solid transparent; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; background: #FFFFFF; }
.list-item::before { content: ''; position: absolute; inset: 0; border-radius: 14px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, transparent 100%); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.list-item > * { position: relative; z-index: 1; }
.list-item:hover { background: #FFFFFF; border-color: rgba(124, 58, 237, 0.2); box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08); }
.list-item:hover::before { opacity: 1; }
.list-item.active { background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(124, 58, 237, 0.06) 100%); border-color: rgba(124, 58, 237, 0.3); color: #7C3AED; box-shadow: 0 0 20px rgba(124, 58, 237, 0.1); }
.list-item.active .item-meta { color: #7C3AED; }
.list-item.active .item-name { color: #5B21B6; }
.list-item.supplement { margin-left: 20px; border-left: 2px solid rgba(124, 58, 237, 0.3); }

/* Detail headers */
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 16px; }
.detail-header h2 { font-size: 26px; font-weight: 800; color: #0F172A; letter-spacing: -0.5px; }
.detail-actions { display: flex; gap: 12px; }
.detail-meta { display: flex; gap: 24px; color: #1E293B; font-size: 13px; margin-bottom: 28px; flex-wrap: wrap; }
.detail-meta span { display: flex; align-items: center; gap: 6px; }
.detail-meta svg { color: #7C3AED; }

/* Badges */
.badge { padding: 5px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-purple { background: rgba(124, 58, 237, 0.1); color: #7C3AED; border: 1px solid rgba(124, 58, 237, 0.2); }
.badge-lime { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-blue { background: rgba(59, 130, 246, 0.1); color: #2563EB; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-gray { background: rgba(100, 116, 139, 0.1); color: #1E293B; border: 1px solid rgba(100, 116, 139, 0.2); }

/* Tags */
.tag { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; margin: 4px 4px 4px 0; transition: all 0.2s ease; }
.tag-purple { background: rgba(124, 58, 237, 0.1); color: #7C3AED; border: 1px solid rgba(124, 58, 237, 0.2); }
.tag-lime { background: rgba(16, 185, 129, 0.1); color: #059669; border: 1px solid rgba(16, 185, 129, 0.2); }
.tag-blue { background: rgba(59, 130, 246, 0.1); color: #2563EB; border: 1px solid rgba(59, 130, 246, 0.2); }

/* Form elements */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: #1E293B; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-select, .form-input { width: 100%; padding: 12px 16px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; font-size: 14px; color: #0F172A; transition: all 0.2s ease; }
.form-select:focus, .form-input:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }
.form-select option { background: #FFFFFF; color: #0F172A; }
.form-input::placeholder { color: #475569; }

/* Tables */
.table-container { overflow-x: auto; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { background: #F8FAFC; padding: 14px 16px; text-align: left; font-weight: 700; border-bottom: 1px solid #E2E8F0; white-space: nowrap; color: #0F172A; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid #F1F5F9; color: #0F172A; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(124, 58, 237, 0.03); }
.null-val { color: #475569; font-style: italic; }

/* Column cards */
.columns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.col-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 14px; padding: 18px; transition: all 0.2s ease; }
.col-card:hover { border-color: rgba(226, 232, 240, 0.3); box-shadow: 0 0 15px rgba(226, 232, 240, 0.08); }
.col-name { font-weight: 700; font-size: 14px; color: #0F172A; }
.col-type { font-size: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(148, 163, 184, 0.1); margin-left: 8px; color: #475569; font-weight: 600; text-transform: uppercase; }
.col-type.numeric { background: rgba(226, 232, 240, 0.15); color: #0F172A; }
.col-type.categorical { background: rgba(109, 186, 176, 0.15); color: #6DBAB0; }
.col-stats { font-size: 12px; margin-top: 12px; color: #475569; }
.col-stat-row { display: flex; justify-content: space-between; margin-bottom: 6px; padding: 4px 0; border-bottom: 1px solid rgba(226, 232, 240, 0.08); }
.col-stat-row span:first-child { color: #1E293B; }
.col-stat-row span:last-child { color: #1E293B; font-weight: 600; }
.col-mapping { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(226, 232, 240, 0.15); font-size: 11px; color: #6DBAB0; font-weight: 600; }

/* Extracted tables section */
.extracted-section { background: linear-gradient(135deg, rgba(109, 186, 176, 0.1) 0%, rgba(109, 186, 176, 0.05) 100%); border: 1px solid rgba(109, 186, 176, 0.2); border-radius: 20px; padding: 24px; margin-bottom: 28px; }
.extracted-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.extracted-card { background: rgba(248, 250, 252, 0.9); border-radius: 16px; padding: 20px; border: 1px solid rgba(226, 232, 240, 0.15); transition: all 0.2s ease; }
.extracted-card:hover { border-color: rgba(226, 232, 240, 0.3); transform: translateY(-2px); }
.extracted-card.imported { opacity: 0.5; }
.extracted-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.extracted-name { font-weight: 700; font-size: 15px; color: #0F172A; }
.extracted-desc { font-size: 13px; color: #475569; margin-bottom: 12px; line-height: 1.5; }
.extracted-meta { font-size: 12px; color: #1E293B; display: flex; gap: 16px; margin-bottom: 16px; }
.extracted-preview { background: rgba(241, 245, 249, 0.8); border-radius: 10px; overflow: hidden; margin-bottom: 16px; border: 1px solid rgba(226, 232, 240, 0.1); }
.extracted-preview table { width: 100%; font-size: 11px; border-collapse: collapse; }
.extracted-preview th { background: rgba(226, 232, 240, 0.1); padding: 8px 10px; text-align: left; font-weight: 700; color: #0F172A; }
.extracted-preview td { padding: 6px 10px; border-bottom: 1px solid rgba(226, 232, 240, 0.08); color: #1E293B; }
.imported-badge { display: flex; align-items: center; gap: 6px; color: #6DBAB0; font-size: 12px; font-weight: 700; }

/* Analysis sections */
.analysis-section { background: rgba(248, 250, 252, 0.6); border: 1px solid rgba(226, 232, 240, 0.15); border-radius: 20px; padding: 28px; margin-bottom: 28px; }
.analysis-section h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 24px; color: #0F172A; font-weight: 700; }
.result-block { margin-bottom: 24px; }
.result-block h4 { font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.result-block p { line-height: 1.7; color: #1E293B; }
.result-block ul { padding-left: 20px; }
.result-block li { margin-bottom: 8px; line-height: 1.6; color: #1E293B; }

/* Analysis cards */
.analysis-results { margin-top: 28px; }
.analysis-card { background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.95) 100%); border: 1px solid rgba(226, 232, 240, 0.15); border-radius: 16px; padding: 24px; margin-bottom: 20px; position: relative; overflow: visible; }
.analysis-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.3), transparent); }
.analysis-card.highlight { background: linear-gradient(135deg, rgba(226, 232, 240, 0.15) 0%, rgba(109, 186, 176, 0.1) 100%); border-color: rgba(226, 232, 240, 0.4); box-shadow: 0 0 25px rgba(226, 232, 240, 0.08); }
.analysis-card h3 { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; color: #0F172A; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid rgba(226, 232, 240, 0.15); text-transform: uppercase; letter-spacing: 0.3px; }
.analysis-card h3 svg, .analysis-card h3 span[title] { color: #0F172A; filter: drop-shadow(0 0 4px rgba(241, 245, 249, 0.25)); }
.analysis-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.analysis-field { display: flex; flex-direction: column; gap: 6px; }
.analysis-field.full { grid-column: 1 / -1; }
.analysis-field label { font-size: 11px; font-weight: 700; color: #1E293B; text-transform: uppercase; letter-spacing: 0.5px; }
.analysis-field span { font-size: 14px; color: #1E293B; }
.analysis-field p { font-size: 14px; color: #1E293B; line-height: 1.6; }
.analysis-list { margin: 0; padding-left: 20px; }
.analysis-list li { font-size: 14px; color: #1E293B; margin-bottom: 8px; line-height: 1.6; }
.analysis-list.highlight li { color: #0F172A; font-weight: 600; }

/* Tags in analysis */
.tag { display: inline-block; padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.tag.purple { background: rgba(226, 232, 240, 0.2); color: #0F172A; border: 1px solid rgba(226, 232, 240, 0.3); }
.tag.lime { background: rgba(109, 186, 176, 0.2); color: #6DBAB0; border: 1px solid rgba(109, 186, 176, 0.3); }
.tag.blue { background: rgba(91, 163, 207, 0.2); color: #7EB8DA; border: 1px solid rgba(91, 163, 207, 0.3); }
.tag.pink { background: rgba(196, 138, 166, 0.2); color: #D4A5BD; border: 1px solid rgba(196, 138, 166, 0.3); }
.tag.amber { background: rgba(212, 168, 75, 0.2); color: #E6C87D; border: 1px solid rgba(212, 168, 75, 0.3); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* Full analysis viewer */
.full-analysis-toggle { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; background: linear-gradient(135deg, rgba(226, 232, 240, 0.08) 0%, rgba(109, 186, 176, 0.05) 100%); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 14px; cursor: pointer; margin-bottom: 20px; transition: all 0.3s ease; }
.full-analysis-toggle:hover { background: linear-gradient(135deg, rgba(226, 232, 240, 0.12) 0%, rgba(109, 186, 176, 0.08) 100%); border-color: rgba(226, 232, 240, 0.3); }
.full-analysis-toggle h4 { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: #1E293B; margin: 0; }
.full-analysis-toggle h4 svg, .full-analysis-toggle h4 span[title] { color: #0F172A; }
.full-analysis-toggle .toggle-icon { transition: transform 0.3s ease; color: #0F172A; }
.full-analysis-toggle.open .toggle-icon { transform: rotate(180deg); }
.full-analysis-viewer { background: rgba(241, 245, 249, 0.95); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 16px; padding: 24px; margin-bottom: 20px; max-height: 600px; overflow-y: auto; }
.full-analysis-viewer .analysis-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(226, 232, 240, 0.15); }
.full-analysis-viewer .analysis-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.analysis-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; cursor: pointer; }
.analysis-section-header h5 { font-size: 12px; font-weight: 700; color: #0F172A; text-transform: uppercase; letter-spacing: 0.5px; margin: 0; flex: 1; }
.analysis-section-header .section-toggle { color: #1E293B; transition: transform 0.2s; }
.analysis-section-header.collapsed .section-toggle { transform: rotate(-90deg); }
.analysis-section-content { padding-left: 4px; }
.analysis-row { display: flex; padding: 10px 0; border-bottom: 1px solid rgba(226, 232, 240, 0.08); }
.analysis-row:last-child { border-bottom: none; }
.analysis-row-key { flex: 0 0 180px; font-size: 12px; font-weight: 600; color: #1E293B; text-transform: capitalize; }
.analysis-row-value { flex: 1; font-size: 13px; color: #1E293B; line-height: 1.6; }
.analysis-row-value.empty { color: #A3A3A3; font-style: italic; }
.analysis-row-value ul { margin: 0; padding-left: 16px; }
.analysis-row-value li { margin-bottom: 4px; }
.analysis-row-value .nested-obj { background: rgba(248, 250, 252, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 8px; padding: 12px; margin-top: 4px; }
.analysis-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: rgba(226, 232, 240, 0.2); color: #0F172A; border-radius: 4px; font-size: 11px; font-weight: 600; }
.analysis-badge.count { background: rgba(109, 186, 176, 0.2); color: #6DBAB0; }

/* Document search, filter, and dashboard styles */
.doc-toolbar { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px; margin: -20px -20px 8px -20px; background: rgba(248, 250, 252, 0.6); border-bottom: 1px solid rgba(226, 232, 240, 0.15); flex-shrink: 0; }
.doc-stats-strip { display: flex; gap: 4px; align-items: center; padding-bottom: 2px; }
.doc-stat-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #64748B; white-space: nowrap; letter-spacing: 0.01em; }
.doc-stat-chip strong { font-weight: 700; color: #7C3AED; font-size: 12px; }
.doc-stat-chip.dot { width: 3px; height: 3px; background: #CBD5E1; border-radius: 50%; padding: 0; gap: 0; }
.doc-search-row { display: flex; gap: 8px; align-items: center; }
.doc-search-input { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(241, 245, 249, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 8px; color: #1E293B; }
.doc-search-input:focus-within { border-color: rgba(226, 232, 240, 0.5); }
.doc-search-input input { flex: 1; background: transparent; border: none; color: #0F172A; font-size: 13px; outline: none; min-width: 0; }
.doc-search-input input::placeholder { color: #1E293B; }
.doc-search-clear { background: none; border: none; color: #1E293B; cursor: pointer; padding: 2px; display: flex; align-items: center; justify-content: center; }
.doc-search-clear:hover { color: #E57373; }
.doc-filter-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.doc-filter-select { padding: 5px 8px; background: rgba(241, 245, 249, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 6px; color: #1E293B; font-size: 11px; cursor: pointer; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-filter-select:focus { outline: none; border-color: rgba(226, 232, 240, 0.4); }
.doc-filter-label { font-size: 11px; color: #1E293B; text-transform: uppercase; letter-spacing: 0.5px; }

/* Legacy — kept for backward compat if referenced elsewhere */
.doc-stats-dashboard { display: none; }
.doc-stat-areas { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(226, 232, 240, 0.1); }
.doc-stat-areas-label { font-size: 11px; color: #1E293B; text-transform: uppercase; letter-spacing: 0.5px; }
.doc-stat-area-chip { padding: 4px 10px; background: rgba(109, 186, 176, 0.15); border: 1px solid rgba(109, 186, 176, 0.25); border-radius: 12px; font-size: 11px; color: #6DBAB0; }
.doc-stats-breakdown { display: flex; gap: 24px; flex-wrap: wrap; }
.doc-breakdown-section { flex: 1; min-width: 200px; }
.doc-breakdown-section h4 { font-size: 12px; color: #475569; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.doc-breakdown-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(226, 232, 240, 0.08); font-size: 13px; }
.doc-breakdown-item span:first-child { color: #1E293B; text-transform: capitalize; }
.doc-breakdown-item span:last-child { color: #0F172A; font-weight: 600; }

/* Collections */
.collections-section { padding-top: 12px; border-top: 1px solid rgba(226, 232, 240, 0.15); }
.collections-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.collections-label { font-size: 11px; color: #1E293B; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }
.collection-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.collection-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; background: rgba(226, 232, 240, 0.1); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 16px; font-size: 12px; color: #0F172A; cursor: pointer; transition: all 0.2s ease; }
.collection-chip:hover { background: rgba(226, 232, 240, 0.2); border-color: rgba(226, 232, 240, 0.4); }
.collection-chip.active { background: rgba(226, 232, 240, 0.25); border-color: #1E293B; color: #fff; }
.collection-chip .chip-count { background: rgba(0,0,0,0.2); padding: 1px 6px; border-radius: 10px; font-size: 10px; }
.collection-chip-delete { opacity: 0; padding: 2px; margin-left: 2px; cursor: pointer; color: #E57373; background: none; border: none; display: flex; align-items: center; }
.collection-chip:hover .collection-chip-delete { opacity: 1; }
.new-collection-input { display: flex; gap: 6px; margin-bottom: 10px; }
.new-collection-input input { flex: 1; padding: 6px 10px; background: rgba(241, 245, 249, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 6px; color: #0F172A; font-size: 12px; }
.new-collection-input input:focus { outline: none; border-color: rgba(226, 232, 240, 0.5); }

/* Document preview modal */
.doc-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); }
.doc-preview-modal { background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%); border-radius: 16px; width: 90vw; max-width: 1000px; height: 85vh; display: flex; flex-direction: column; border: 1px solid rgba(226, 232, 240, 0.3); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.doc-preview-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(226, 232, 240, 0.2); }
.doc-preview-header h3 { margin: 0; font-size: 16px; color: #0F172A; display: flex; align-items: center; gap: 10px; }
.doc-preview-content { flex: 1; overflow: auto; padding: 20px; }
.doc-preview-content iframe { width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; }
.doc-preview-text { white-space: pre-wrap; word-wrap: break-word; font-size: 13px; line-height: 1.6; color: #1E293B; background: rgba(241, 245, 249, 0.6); padding: 20px; border-radius: 8px; max-height: 100%; overflow: auto; margin: 0; font-family: 'Monaco', 'Menlo', monospace; }
.doc-preview-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #1E293B; gap: 12px; }

/* Re-analyze options */
.reanalyze-dropdown { position: absolute; top: 100%; right: 0; margin-top: 8px; background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%); border: 1px solid rgba(226, 232, 240, 0.3); border-radius: 12px; padding: 8px; min-width: 280px; z-index: 100; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.reanalyze-option { display: flex; flex-direction: column; padding: 12px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; }
.reanalyze-option:hover { background: rgba(226, 232, 240, 0.15); }
.reanalyze-option.selected { background: rgba(226, 232, 240, 0.2); border: 1px solid rgba(226, 232, 240, 0.4); }
.reanalyze-option-name { font-size: 14px; font-weight: 600; color: #0F172A; margin-bottom: 2px; }
.reanalyze-option-desc { font-size: 12px; color: #475569; }
.reanalyze-option.already-run { background: rgba(109, 186, 176, 0.05); border-left: 3px solid #6DBAB0; }

/* ═══ Focused Re-Analyses ═══ */
.focused-analyses-section { border-top: 2px solid rgba(109, 186, 176, 0.3); padding-top: 24px; margin-top: 32px; }
.focused-analyses-header { display: flex; align-items: center; justify-content: space-between; }
.focused-analysis-pills { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.focused-analysis-pill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 16px; border-radius: 10px; border: 1px solid #E2E8F0; background: #F8FAFC; cursor: pointer; transition: all 0.2s ease; font-family: inherit; }
.focused-analysis-pill:hover { border-color: rgba(109, 186, 176, 0.5); background: rgba(109, 186, 176, 0.05); }
.focused-analysis-pill.active { border-color: #6DBAB0; background: rgba(109, 186, 176, 0.1); box-shadow: 0 0 0 2px rgba(109, 186, 176, 0.15); }
.focused-pill-name { font-size: 13px; font-weight: 600; color: #0F172A; }
.focused-pill-date { font-size: 11px; color: #64748B; }
.focused-analysis-content { margin-top: 12px; padding: 16px; background: rgba(109, 186, 176, 0.03); border: 1px solid rgba(109, 186, 176, 0.15); border-radius: 12px; }
.focused-analysis-content-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid rgba(226, 232, 240, 0.5); }

/* Note preview textarea (editable in-place) */
.note-preview-textarea {
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 20px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  color: #1E293B;
  background: #FAFAFA;
  border: none;
  outline: none;
  resize: none;
  white-space: pre-wrap;
}
.note-preview-textarea:focus {
  background: #fff;
}

/* Citation display */
.citation-card { background: rgba(241, 245, 249, 0.6); border: 1px solid rgba(226, 232, 240, 0.15); border-radius: 12px; padding: 20px; margin-top: 20px; }
.citation-card h3 { font-size: 15px; color: #0F172A; margin: 0 0 16px 0; display: flex; align-items: center; gap: 8px; }
.citation-content { display: flex; flex-direction: column; gap: 12px; }
.citation-text { display: flex; flex-direction: column; gap: 8px; }
.citation-label { font-size: 11px; color: #1E293B; text-transform: uppercase; letter-spacing: 0.5px; }
.citation-text p { font-size: 13px; color: #1E293B; line-height: 1.6; padding: 12px; background: rgba(248, 250, 252, 0.5); border-radius: 8px; font-family: 'Georgia', serif; margin: 0; }
.citation-links { display: flex; gap: 8px; margin-top: 4px; }
.citation-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(109, 186, 176, 0.15); border: 1px solid rgba(109, 186, 176, 0.3); border-radius: 6px; color: #6DBAB0; font-size: 12px; text-decoration: none; transition: all 0.2s ease; }
.citation-link:hover { background: rgba(109, 186, 176, 0.25); }
.badge-teal { background: rgba(109, 186, 176, 0.2); color: #6DBAB0; }

/* Collection assignment in detail view */
.doc-collection-assign { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(226, 232, 240, 0.15); color: #1E293B; }
.doc-collection-assign select { padding: 6px 10px; background: rgba(241, 245, 249, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 6px; color: #1E293B; font-size: 12px; cursor: pointer; }
.doc-collection-assign select:focus { outline: none; border-color: rgba(226, 232, 240, 0.5); }

/* Supplemental files styles */
.list-item.supplement { background: rgba(248, 250, 252, 0.5); border-left: 3px solid #E2E8F0; margin-left: 12px; padding-left: 8px; }
.supp-count { color: #0F172A; font-weight: 500; }
.supplements-section { background: rgba(248, 250, 252, 0.6); border-radius: 12px; padding: 20px; margin: 20px 0; border: 1px solid rgba(226, 232, 240, 0.2); }
.supplements-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.supplements-header h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin: 0; color: #0F172A; }
.supplements-list { display: flex; flex-direction: column; gap: 8px; }
.supplement-item { display: flex; justify-content: space-between; align-items: center; background: rgba(241, 245, 249, 0.8); padding: 12px 16px; border-radius: 8px; border: 1px solid rgba(226, 232, 240, 0.15); }
.supplement-info { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; }
.supplement-info:hover { color: #0F172A; }
.supplement-name { display: block; font-weight: 500; color: #1E293B; }
.supplement-meta { display: block; font-size: 12px; color: #1E293B; }
.link-supplements-panel { background: rgba(241, 245, 249, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.linkable-doc { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 6px; cursor: pointer; color: #1E293B; }
.linkable-doc:hover { background: rgba(226, 232, 240, 0.15); }
.linkable-doc .doc-type { margin-left: auto; font-size: 11px; color: #1E293B; }
.parent-link-section { background: rgba(226, 232, 240, 0.1); border-radius: 12px; padding: 20px; margin: 20px 0; border: 1px solid rgba(226, 232, 240, 0.3); }
.parent-link-section h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin: 0 0 12px 0; color: #0F172A; }
.parent-doc-card { display: flex; align-items: center; gap: 12px; background: rgba(241, 245, 249, 0.8); padding: 12px 16px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(226, 232, 240, 0.2); color: #1E293B; }
.parent-doc-card:hover { border-color: #1E293B; }
.parent-name { display: block; font-weight: 500; }
.parent-meta { display: block; font-size: 12px; color: #1E293B; }
.btn-ghost { background: transparent; border: none; color: #1E293B; }
.btn-ghost:hover { color: #E57373; background: rgba(211, 47, 47, 0.15); }

/* Global Undo Panel */
.undo-panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px); }
.undo-panel { background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%); border-radius: 16px; width: 90vw; max-width: 600px; max-height: 80vh; display: flex; flex-direction: column; border: 1px solid rgba(226, 232, 240, 0.3); box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.undo-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid rgba(226, 232, 240, 0.2); }
.undo-panel-header h3 { margin: 0; font-size: 18px; color: #0F172A; display: flex; align-items: center; gap: 10px; }
.undo-panel-header .undo-count { background: rgba(226, 232, 240, 0.2); padding: 4px 10px; border-radius: 12px; font-size: 12px; color: #0F172A; }
.undo-panel-content { flex: 1; overflow-y: auto; padding: 16px; }
.undo-panel-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; color: #1E293B; gap: 12px; }
.undo-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(241, 245, 249, 0.6); border: 1px solid rgba(226, 232, 240, 0.15); border-radius: 10px; margin-bottom: 8px; transition: all 0.2s ease; }
.undo-item:hover { border-color: rgba(226, 232, 240, 0.4); background: rgba(248, 250, 252, 0.8); }
.undo-item-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.undo-item-icon.document { background: rgba(226, 232, 240, 0.2); color: #0F172A; }
.undo-item-icon.dataset { background: rgba(132, 204, 22, 0.2); color: #84CC16; }
.undo-item-icon.analysis { background: rgba(251, 191, 36, 0.2); color: #FBBF24; }
.undo-item-icon.disease { background: rgba(236, 72, 153, 0.2); color: #EC4899; }
.undo-item-icon.technology { background: rgba(59, 130, 246, 0.2); color: #3B82F6; }
.undo-item-icon.litreview, .undo-item-icon.gapanalysis { background: rgba(109, 186, 176, 0.2); color: #6DBAB0; }
.undo-item-icon.link, .undo-item-icon.collection { background: rgba(241, 245, 249, 0.2); color: #0F172A; }
.undo-item-info { flex: 1; min-width: 0; }
.undo-item-label { font-size: 14px; font-weight: 500; color: #0F172A; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.undo-item-meta { font-size: 12px; color: #1E293B; display: flex; gap: 8px; margin-top: 2px; }
.undo-item-type { text-transform: capitalize; }
.undo-item-actions { display: flex; gap: 8px; }
.undo-panel-footer { padding: 16px 24px; border-top: 1px solid rgba(226, 232, 240, 0.2); display: flex; justify-content: space-between; align-items: center; }
.undo-panel-footer .hint { font-size: 12px; color: #1E293B; display: flex; align-items: center; gap: 6px; }
.undo-panel-footer .hint kbd { background: rgba(241, 245, 249, 0.8); padding: 2px 6px; border-radius: 4px; font-size: 11px; border: 1px solid rgba(226, 232, 240, 0.2); }
.undo-btn-floating { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #6DBAB0 0%, #5AA89E 100%); border: none; color: #0F172A; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 20px rgba(109, 186, 176, 0.4); transition: all 0.2s ease; z-index: 100; }
.undo-btn-floating:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(109, 186, 176, 0.5); }
.undo-btn-floating .undo-badge { position: absolute; top: -4px; right: -4px; background: #E57373; color: white; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 10px; min-width: 18px; text-align: center; }

/* Synthesis styles */
.synthesis-layout { display: flex; height: calc(100vh - 85px); }
.synthesis-sidebar { width: 320px; background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.98) 100%); border-right: 1px solid rgba(226, 232, 240, 0.2); padding: 20px; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; }
.synthesis-content { flex: 1; overflow-y: auto; padding: 24px; background: linear-gradient(135deg, rgba(241, 245, 249, 0.5) 0%, rgba(248, 250, 252, 0.3) 100%); }
.doc-selector { max-height: 400px; overflow-y: auto; border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 8px; }
.doc-select-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid rgba(226, 232, 240, 0.1); cursor: pointer; color: #1E293B; }
.doc-select-item:hover { background: rgba(226, 232, 240, 0.1); }
.doc-select-item.selected { background: rgba(226, 232, 240, 0.2); }
.doc-select-item:last-child { border-bottom: none; }
.empty-synthesis { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; color: #475569; padding: 40px; }
.empty-synthesis h3 { font-size: 20px; margin-bottom: 12px; color: #1E293B; }
.empty-synthesis ul { list-style: disc; padding-left: 20px; }
.empty-synthesis li { margin-bottom: 8px; }
.lit-review-output, .gaps-output { background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.95) 100%); border-radius: 16px; padding: 32px; border: 1px solid rgba(226, 232, 240, 0.15); }
.review-header, .gaps-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid rgba(226, 232, 240, 0.2); }
.review-header h2, .gaps-header h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; color: #0F172A; }
.review-section { margin-bottom: 32px; }
.review-section h3 { font-size: 18px; font-weight: 600; color: #0F172A; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid rgba(226, 232, 240, 0.2); }
.review-section p { line-height: 1.8; color: #1E293B; white-space: pre-wrap; }
.references-list { padding-left: 24px; }
.references-list li { margin-bottom: 8px; line-height: 1.5; color: #475569; font-size: 14px; }
.gaps-summary { display: flex; align-items: flex-start; gap: 16px; background: linear-gradient(135deg, rgba(226, 232, 240, 0.15), rgba(109, 186, 176, 0.1)); padding: 20px; border-radius: 12px; margin-bottom: 32px; border: 1px solid rgba(226, 232, 240, 0.2); }
.gaps-summary p { flex: 1; font-size: 16px; line-height: 1.6; margin: 0; color: #1E293B; }
.opportunities-section { margin-bottom: 32px; }
.opportunities-section h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; margin-bottom: 16px; color: #0F172A; }
.opportunities-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.opportunity-card { background: linear-gradient(135deg, rgba(109, 186, 176, 0.15), rgba(109, 186, 176, 0.08)); border: 1px solid rgba(109, 186, 176, 0.3); border-radius: 12px; padding: 20px; }
.opportunity-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: #8FCFC7; }
.opportunity-card p { font-size: 14px; color: #6DBAB0; line-height: 1.5; margin-bottom: 8px; }
.opportunity-card .suggested-approach { font-size: 13px; color: #5AA89E; }
.gaps-list-section h3 { font-size: 18px; font-weight: 600; margin-bottom: 16px; color: #1E293B; }
.gaps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 16px; }
.gap-card { background: rgba(248, 250, 252, 0.8); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 12px; padding: 20px; border-left: 4px solid #E2E8F0; }
.gap-card.priority-high { border-left-color: #E57373; }
.gap-card.priority-medium { border-left-color: #E6C87D; }
.gap-card.priority-low { border-left-color: #6DBAB0; }
.gap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.gap-category { font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: rgba(226, 232, 240, 0.2); color: #0F172A; }
.gap-badges { display: flex; gap: 6px; }
.priority-badge, .difficulty-badge { font-size: 10px; font-weight: 600; padding: 3px 6px; border-radius: 4px; }
.priority-badge.high { background: rgba(211, 47, 47, 0.2); color: #E57373; }
.priority-badge.medium { background: rgba(212, 168, 75, 0.2); color: #E6C87D; }
.priority-badge.low { background: rgba(109, 186, 176, 0.2); color: #6DBAB0; }
.difficulty-badge.high { background: rgba(148, 163, 184, 0.2); color: #475569; }
.difficulty-badge.medium { background: rgba(148, 163, 184, 0.15); color: #78909C; }
.difficulty-badge.low { background: rgba(148, 163, 184, 0.1); color: #1E293B; }
.gap-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: #1E293B; }
.gap-card p { font-size: 14px; color: #475569; line-height: 1.5; margin-bottom: 8px; }
.gap-evidence, .gap-opportunity { font-size: 13px; color: #1E293B; }
.overall-assessment { background: rgba(248, 250, 252, 0.6); border-radius: 12px; padding: 24px; margin-top: 32px; border: 1px solid rgba(226, 232, 240, 0.15); }
.overall-assessment h3 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: #1E293B; }
.overall-assessment p { line-height: 1.7; color: #475569; }

/* Saved reports styles */
.saved-reports-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(226, 232, 240, 0.2); }
.saved-reports-section h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #a1a1aa; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.saved-count { background: linear-gradient(135deg, #E2E8F0, #F1F5F9); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.saved-reports-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; padding-right: 4px; }
.saved-reports-list::-webkit-scrollbar { width: 4px; }
.saved-reports-list::-webkit-scrollbar-thumb { background: rgba(226, 232, 240, 0.3); border-radius: 2px; }
.saved-report-item { display: flex; align-items: center; gap: 10px; padding: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(226, 232, 240, 0.2); border-radius: 10px; cursor: pointer; transition: all 0.2s ease; }
.saved-report-item:hover { background: rgba(226, 232, 240, 0.1); border-color: rgba(226, 232, 240, 0.4); transform: translateX(4px); }
.saved-report-item.active { background: rgba(226, 232, 240, 0.15); border-color: #1E293B; box-shadow: 0 0 12px rgba(226, 232, 240, 0.15); }
.saved-report-item .report-icon { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #E2E8F0, #F1F5F9); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.saved-report-item .report-info { flex: 1; min-width: 0; }
.saved-report-item .report-date { font-size: 12px; font-weight: 600; color: #e4e4e7; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-report-item .report-sources { font-size: 11px; color: #71717a; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-report-item .delete-btn { opacity: 0; padding: 6px; background: rgba(211, 47, 47, 0.1); border: none; border-radius: 6px; color: #E57373; cursor: pointer; transition: all 0.2s; }
.saved-report-item:hover .delete-btn { opacity: 1; }
.saved-report-item .delete-btn:hover { background: rgba(211, 47, 47, 0.2); }
.no-saved-reports { text-align: center; padding: 16px; color: #71717a; font-size: 13px; background: rgba(255, 255, 255, 0.02); border-radius: 8px; border: 1px dashed rgba(226, 232, 240, 0.2); }
.create-new-section { padding-top: 4px; }
.create-new-section h4 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #a1a1aa; margin-bottom: 12px; }

/* Technology scouting styles */
.tech-search-results { display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow-y: auto; padding-right: 8px; }
.tech-search-results::-webkit-scrollbar { width: 6px; }
.tech-search-results::-webkit-scrollbar-thumb { background: rgba(226, 232, 240, 0.3); border-radius: 3px; }
.tech-search-results::-webkit-scrollbar-thumb:hover { background: rgba(226, 232, 240, 0.5); }
.tech-search-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px; background: rgba(248, 250, 252, 0.8); border-radius: 12px; border: 1px solid rgba(226, 232, 240, 0.2); }
.tech-search-info { flex: 1; }
.tech-search-info h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: #0F172A; }
.tech-search-info .tech-source { font-size: 13px; color: #0F172A; font-weight: 500; margin-bottom: 8px; }
.tech-search-info .tech-desc { font-size: 14px; color: #475569; line-height: 1.5; margin-bottom: 8px; }
.tech-search-info .tech-relevance { font-size: 13px; color: #1E293B; margin-bottom: 8px; }
.tech-search-info .tech-link { font-size: 13px; color: #7EB8DA; text-decoration: none; }
.tech-search-info .tech-link:hover { text-decoration: underline; }
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; color: #fff; text-transform: uppercase; }
.status-badge.large { font-size: 13px; padding: 6px 14px; margin-left: 12px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tech-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.tech-detail-card { background: rgba(248, 250, 252, 0.6); border-radius: 12px; padding: 20px; border: 1px solid rgba(226, 232, 240, 0.15); }
.tech-detail-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: #1E293B; }
.indication-links { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.indication-link-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(241, 245, 249, 0.8); border-radius: 8px; border: 1px solid rgba(226, 232, 240, 0.15); cursor: pointer; color: #1E293B; }
.indication-link-item:hover { border-color: #1E293B; }
.indication-link-item.linked { background: rgba(226, 232, 240, 0.15); border-color: #1E293B; }
.indication-link-item span { flex: 1; font-size: 14px; }
.indication-link-item .indication-score { font-size: 12px; color: #0F172A; font-weight: 500; }
.criteria-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.criterion-card { background: rgba(248, 250, 252, 0.6); border-radius: 12px; padding: 16px; border: 1px solid rgba(226, 232, 240, 0.15); }
.criterion-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.criterion-name { font-weight: 600; font-size: 14px; color: #1E293B; }
.criterion-score { font-size: 20px; font-weight: 700; color: #1E293B; }
.criterion-score.high { color: #6DBAB0; }
.criterion-score.med { color: #E6C87D; }
.criterion-desc { font-size: 12px; color: #1E293B; margin-bottom: 12px; }
.rating-buttons { display: flex; gap: 6px; }
.rating-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid rgba(226, 232, 240, 0.2); background: rgba(241, 245, 249, 0.8); font-weight: 600; cursor: pointer; transition: all 0.2s; color: #475569; }
.rating-btn:hover { border-color: #1E293B; background: rgba(226, 232, 240, 0.15); }
.rating-btn.active { background: #E2E8F0; color: #fff; border-color: #1E293B; }
.matrix-table { width: 100%; border-collapse: collapse; }
.matrix-table th, .matrix-table td { padding: 12px; text-align: left; border-bottom: 1px solid #e5e5e5; }
.matrix-table th { background: #f9fafb; font-size: 12px; font-weight: 600; color: #525252; white-space: nowrap; }
.matrix-table tr:hover { background: #f9fafb; }

@media (max-width: 768px) { .analysis-grid { grid-template-columns: 1fr; } .tech-details-grid { grid-template-columns: 1fr; } }
.warehouse-content { padding: 24px; }
.link-builder { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.link-side { flex: 1; }
.link-connector { display: flex; align-items: center; justify-content: center; padding-top: 32px; color: #1E293B; }
.link-card { background: #f5f5f5; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.link-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.link-name { flex: 1; font-weight: 600; }
.link-details { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.link-endpoint { flex: 1; background: #fff; border-radius: 8px; padding: 10px; }
.link-endpoint .ds-name { display: block; font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.link-endpoint .col-name { font-size: 12px; color: #1E293B; font-family: monospace; }
.link-arrow { color: #a3a3a3; }
.link-actions { display: flex; gap: 8px; }
.merge-preview { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.merge-source { display: flex; align-items: center; gap: 8px; padding: 12px; background: #f5f5f5; border-radius: 8px; font-weight: 500; }
.merge-types { display: flex; gap: 8px; margin-bottom: 8px; }
.merge-type-btn { flex: 1; padding: 10px; background: #f5f5f5; border: 1px solid #e5e5e5; border-radius: 8px; font-size: 13px; cursor: pointer; }
.merge-type-btn:hover { background: #e5e5e5; }
.merge-type-btn.active { background: #E2E8F0; color: #fff; border-color: #1E293B; }
.merge-desc { font-size: 12px; color: #737373; }
.merged-card { background: #F5F3FF; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.merged-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: #1E293B; font-weight: 600; }
.merged-meta { display: flex; gap: 16px; font-size: 13px; color: #525252; margin-bottom: 12px; }
.schema-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.schema-card { background: #fff; border-radius: 12px; padding: 16px; border: 1px solid #e5e5e5; }
.schema-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.schema-header span:first-of-type { flex: 1; font-weight: 600; }
.schema-meta { font-size: 13px; color: #737373; margin-bottom: 12px; }
.schema-cols { display: flex; flex-direction: column; gap: 6px; }
.schema-col { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #f5f5f5; border-radius: 6px; font-size: 12px; }
.schema-col-name { flex: 1; font-family: monospace; }
.schema-col-type { font-size: 10px; padding: 2px 6px; border-radius: 4px; background: #e5e5e5; }
.schema-col-type.numeric { background: #F5F3FF; color: #1E293B; }
.schema-col-type.categorical { background: #F7FEE7; color: #65A30D; }
.schema-col-map { color: #65A30D; font-size: 11px; }
.schema-more { font-size: 12px; color: #737373; padding: 6px 10px; }
/* === Ingestion Wizard Styles === */
.ingestion-wizard { padding: 24px; overflow-y: auto; height: calc(100vh - 130px); }
.ingestion-stepper { display: flex; align-items: center; justify-content: center; margin-bottom: 24px; padding: 16px 0; }
.ingestion-step-item { display: flex; align-items: center; cursor: pointer; }
.ingestion-step-item.completed .ingestion-step-circle { background: #10b981; color: #fff; border-color: #10b981; }
.ingestion-step-item.active .ingestion-step-circle { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.ingestion-step-circle { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #9ca3af; background: #fff; transition: all 0.2s; flex-shrink: 0; }
.ingestion-step-label { font-size: 13px; font-weight: 500; color: #6b7280; margin-left: 6px; margin-right: 6px; }
.ingestion-step-item.active .ingestion-step-label { color: #3b82f6; font-weight: 600; }
.ingestion-step-item.completed .ingestion-step-label { color: #10b981; }
.ingestion-step-line { width: 40px; height: 2px; background: #e5e7eb; margin: 0 4px; }
.ingestion-step-item.completed + .ingestion-step-item .ingestion-step-line,
.ingestion-step-item.completed .ingestion-step-line { background: #10b981; }

.ingestion-profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.profile-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; transition: box-shadow 0.2s; }
.profile-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.domain-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.domain-badge-sm { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }

.mapping-editor { display: flex; gap: 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; min-height: 400px; background: #fff; }
.mapping-sidebar { width: 220px; border-right: 1px solid #e5e7eb; padding: 12px; background: #f9fafb; overflow-y: auto; flex-shrink: 0; }
.mapping-ds-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; transition: background 0.15s; }
.mapping-ds-item:hover { background: #f3f4f6; }
.mapping-ds-item.active { background: #eff6ff; border: 1px solid #bfdbfe; }
.mapping-main { flex: 1; padding: 16px; overflow-y: auto; }
.mapping-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.mapping-col-info { display: flex; align-items: center; gap: 8px; min-width: 200px; flex-shrink: 0; }
.mapping-col-name { font-weight: 500; font-size: 13px; }
.mapping-col-type { font-size: 11px; color: #9ca3af; background: #f3f4f6; padding: 1px 6px; border-radius: 4px; }
.mapping-col-sample { font-size: 11px; color: #9ca3af; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mapping-arrow { color: #d1d5db; font-size: 16px; flex-shrink: 0; }
.mapping-select { flex: 1; min-width: 180px; }

.warehouse-preview { max-height: 300px; overflow: auto; border: 1px solid #e5e7eb; border-radius: 8px; margin-top: 12px; }
.warehouse-preview table { width: 100%; border-collapse: collapse; font-size: 12px; }
.warehouse-preview th { background: #f9fafb; padding: 6px 10px; text-align: left; font-weight: 600; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; }
.warehouse-preview td { padding: 4px 10px; border-bottom: 1px solid #f3f4f6; }

.analysis-layout { display: flex; height: calc(100vh - 130px); }
.analysis-config { width: 280px; background: #fff; border-right: 1px solid #e5e5e5; padding: 16px; overflow-y: auto; flex-shrink: 0; }
.analysis-config h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.config-desc { color: #737373; font-size: 14px; margin-bottom: 20px; }
.cross-config { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.cross-side { flex: 1; }
.cross-vs { padding-top: 32px; font-weight: 600; color: #737373; }
.saved-section { margin-top: 32px; padding-top: 20px; border-top: 1px solid #e5e5e5; }
.saved-section h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: #525252; }
.saved-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; margin-bottom: 6px; }
.saved-item:hover { background: #f5f5f5; }
.saved-item.active { background: #E2E8F0; color: #fff; }
.saved-item span { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results-panel { flex: 1; padding: 24px; overflow-y: auto; }
.results-card { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.results-header h3 { font-size: 20px; font-weight: 700; }
.cross-badge { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #F5F3FF; color: #1E293B; border-radius: 20px; font-size: 13px; font-weight: 500; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-box { background: #f5f5f5; border-radius: 10px; padding: 16px; text-align: center; }
.stat-box .label { display: block; font-size: 12px; color: #737373; margin-bottom: 4px; }
.stat-box .value { font-size: 20px; font-weight: 700; }
.stat-box .value.sig { color: #1E293B; }
.chart-box { background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.interp { background: #f5f5f5; border-radius: 10px; padding: 20px; }
.interp h4 { font-size: 13px; font-weight: 700; margin-bottom: 12px; color: #0F172A; text-transform: uppercase; letter-spacing: 0.5px; }
.interp p { line-height: 1.7; color: #475569; }
.empty-results { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: #1E293B; text-align: center; gap: 20px; }
.empty-results .hint { font-size: 14px; color: #475569; }

/* Data Analysis Tab - Primary/Secondary Structure */
.data-tab-primary {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.data-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #475569;
  transition: all 0.2s ease;
}

.data-tab-btn.primary {
  flex: 2;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.03) 100%);
  border-color: rgba(124, 58, 237, 0.2);
}

.data-tab-btn.primary:hover {
  border-color: rgba(124, 58, 237, 0.4);
}

.data-tab-btn.primary.active {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.data-tab-btn.secondary {
  flex: 1;
}

.data-tab-btn.secondary:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.data-tab-btn.secondary.active {
  background: #FFFFFF;
  border-color: #7C3AED;
  color: #7C3AED;
}

/* Statistics Sub-Tabs */
.stats-sub-tabs {
  display: flex;
  gap: 4px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.stats-sub-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.stats-sub-btn:hover {
  color: #7C3AED;
}

.stats-sub-btn.active {
  background: #FFFFFF;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Chart Type Gallery */
.chart-type-gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.chart-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 10px;
  color: #64748B;
}

.chart-type-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  color: #7C3AED;
}

.chart-type-card.active {
  background: rgba(124, 58, 237, 0.08);
  border-color: #7C3AED;
  color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Chart Editor Layout - flex container for side-by-side layout */
.chart-editor-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.chart-editor-layout .chart-box {
  flex: 1;
  min-width: 0; /* Prevent flex item from overflowing */
  transition: flex 0.2s ease;
}

.chart-editor-layout.editing .chart-box {
  flex: 1 1 calc(100% - 340px); /* Leave room for editor */
}

/* Chart Editor Panel */
.chart-editor-panel {
  flex: 0 0 320px;
  width: 320px;
  max-height: 600px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid #E2E8F0;
  overflow-y: auto;
  position: sticky;
  top: 16px;
}

.chart-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.chart-editor-header h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  color: #1E293B;
}

.editor-section {
  border-bottom: 1px solid #F1F5F9;
}

.editor-section summary {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  color: #475569;
  list-style: none;
}

.editor-section summary::-webkit-details-marker {
  display: none;
}

.editor-section summary::before {
  content: '▸';
  margin-right: 8px;
  display: inline-block;
  transition: transform 0.2s;
}

.editor-section[open] summary::before {
  transform: rotate(90deg);
}

.editor-section summary:hover {
  color: #7C3AED;
}

.editor-section[open] summary {
  color: #7C3AED;
}

.editor-fields {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-fields label {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  margin-bottom: -8px;
}

.editor-fields input[type="text"],
.editor-fields input[type="number"],
.editor-fields select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  color: #1E293B;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.editor-fields input[type="text"]:focus,
.editor-fields input[type="number"]:focus,
.editor-fields select:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.editor-fields input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 2px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  cursor: pointer;
  background: #fff;
}

.editor-fields input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.editor-fields input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.editor-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #7C3AED;
  cursor: pointer;
}

.editor-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #E2E8F0;
  position: sticky;
  bottom: 0;
  background: #fff;
}

.editor-actions .btn {
  flex: 1;
}

/* Individual Points Color List */
.individual-points-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 8px;
  background: #F8FAFC;
}

.point-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
}

.point-color-row:hover {
  background: #E2E8F0;
}

.point-label {
  font-size: 12px;
  color: #475569;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}

.point-color-row input[type="color"] {
  width: 32px;
  height: 24px;
  padding: 0;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  cursor: pointer;
}

/* Range slider styling */
.editor-fields input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #E2E8F0;
  border-radius: 3px;
  outline: none;
}

.editor-fields input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #7C3AED;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.editor-fields input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #7C3AED;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Legend Names Customization List */
.legend-names-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px;
  background: #F8FAFC;
  max-height: 200px;
  overflow-y: auto;
}

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

.legend-original {
  font-size: 12px;
  color: #64748B;
  min-width: 80px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-arrow {
  color: #94A3B8;
  font-size: 14px;
}

.legend-name-row input[type="text"] {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-size: 12px;
  color: #1E293B;
  background: #fff;
}

.legend-name-row input[type="text"]:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.legend-name-row input[type="text"]::placeholder {
  color: #CBD5E1;
  font-style: italic;
}

/* AI Chat */
.chat-panel { flex: 1; display: flex; flex-direction: column; height: calc(100vh - 130px); }
.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.chat-message { padding: 16px 20px; border-radius: 14px; max-width: 85%; animation: chatFadeIn 0.3s ease; }
.chat-message.user { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-message.assistant { background: #F8FAFC; border: 1px solid #E2E8F0; align-self: flex-start; border-bottom-left-radius: 4px; color: #0F172A; }
.chat-message.assistant.error { background: #FEF2F2; border-color: #FECACA; }
.chat-message-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; }
.chat-message.user .chat-message-header { color: rgba(255,255,255,0.7); }
.chat-message.assistant .chat-message-header { color: #64748B; }
.chat-message-role { font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.chat-message-time { font-size: 10px; }
.chat-message-copy { border: none; background: transparent; color: inherit; cursor: pointer; padding: 2px 4px; border-radius: 4px; opacity: 0.5; transition: opacity 0.2s; }
.chat-message-copy:hover { opacity: 1; }
.chat-message-content { line-height: 1.7; font-size: 14px; word-wrap: break-word; white-space: pre-wrap; }

.chat-input-area { padding: 16px 24px; border-top: 1px solid #E2E8F0; background: #FFFFFF; flex-shrink: 0; }
.chat-input-wrapper { display: flex; gap: 12px; align-items: flex-end; }
.chat-input { flex: 1; padding: 12px 16px; border: 1px solid #E2E8F0; border-radius: 12px; font-size: 14px; font-family: inherit; resize: none; color: #0F172A; background: #F8FAFC; transition: border-color 0.2s, box-shadow 0.2s; line-height: 1.5; }
.chat-input:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); background: #FFFFFF; }
.chat-input::placeholder { color: #94A3B8; }
.chat-input:disabled { opacity: 0.6; cursor: not-allowed; }
.chat-send-btn { padding: 12px 16px; border-radius: 12px; flex-shrink: 0; height: fit-content; }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.chat-suggestion { padding: 8px 16px; background: rgba(124, 58, 237, 0.08); border: 1px solid rgba(124, 58, 237, 0.2); border-radius: 20px; font-size: 12px; font-weight: 500; color: #7C3AED; cursor: pointer; transition: all 0.2s ease; }
.chat-suggestion:hover { background: rgba(124, 58, 237, 0.15); border-color: rgba(124, 58, 237, 0.4); transform: translateY(-1px); }

.chat-ds-option { transition: background 0.15s ease; }
.chat-ds-option:hover { background: #F1F5F9; }

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

/* Settings with dark theme */
.settings-content { max-width: 750px; margin: 0 auto; padding: 36px; }
.setting-item { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-bottom: 1px solid rgba(226, 232, 240, 0.1); }
.setting-item:last-child { border-bottom: none; }
.setting-name { display: block; font-weight: 600; color: #0F172A; }
.setting-desc { font-size: 13px; color: #1E293B; margin-top: 4px; }

/* Toggle switch */
.toggle { width: 52px; height: 28px; background: rgba(148, 163, 184, 0.2); border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 14px; cursor: pointer; position: relative; transition: all 0.3s ease; }
.toggle.on { background: linear-gradient(135deg, #84CC16 0%, #65A30D 100%); border-color: #84CC16; box-shadow: 0 0 15px rgba(132, 204, 22, 0.3); }
.toggle-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 4px rgba(0,0,0,0.2); pointer-events: none; }
.toggle.on .toggle-knob { left: 27px; }

/* About box */
.about-box { text-align: center; padding: 24px; }
.about-box h4 { margin: 20px 0 10px; font-size: 20px; color: #0F172A; font-weight: 800; }
.about-box p { color: #475569; line-height: 1.7; }
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0; }
.feature { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(226, 232, 240, 0.15); color: #0F172A; border: 1px solid rgba(226, 232, 240, 0.3); border-radius: 25px; font-size: 13px; font-weight: 600; }
.version { margin-top: 16px; font-size: 13px; color: #1E293B; }

/* Toast notifications */
.toast { position: fixed; bottom: 28px; right: 28px; padding: 16px 28px; background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%); color: #0F172A; border-radius: 14px; display: flex; align-items: center; gap: 12px; z-index: 1000; animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); border: 1px solid rgba(109, 186, 176, 0.3); box-shadow: 0 0 20px rgba(109, 186, 176, 0.15), 0 10px 40px rgba(0,0,0,0.4); backdrop-filter: blur(20px); }
.toast svg { color: #6DBAB0; flex-shrink: 0; }
.toast-message { flex: 1; }
.toast.error { border-color: rgba(211, 47, 47, 0.4); box-shadow: 0 0 20px rgba(211, 47, 47, 0.15), 0 10px 40px rgba(0,0,0,0.4); }
.toast.error svg { color: #E57373; }
.toast-undo-btn { background: rgba(109, 186, 176, 0.2); border: 1px solid rgba(109, 186, 176, 0.4); color: #6DBAB0; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; margin-left: 8px; }
.toast-undo-btn:hover { background: rgba(109, 186, 176, 0.3); border-color: #6DBAB0; transform: scale(1.05); }
@keyframes slideUp { from { transform: translateY(30px) scale(0.95); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* Loading screen */
.loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #334155 0%, #2D2D44 100%); gap: 24px; }
.spinner { width: 48px; height: 48px; border: 3px solid rgba(226, 232, 240, 0.2); border-top-color: #1E293B; border-radius: 50%; animation: spin 1s linear infinite; box-shadow: 0 0 15px rgba(226, 232, 240, 0.25); }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* Warning boxes */
.no-link-warn { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px; background: rgba(212, 168, 75, 0.1); border: 1px solid rgba(212, 168, 75, 0.3); border-radius: 16px; text-align: center; }
.no-link-warn p { color: #E6C87D; }

/* Tooltips */
.custom-tooltip { background: rgba(248, 250, 252, 0.98); border: 1px solid rgba(226, 232, 240, 0.3); border-radius: 12px; padding: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.4); backdrop-filter: blur(20px); }
.tooltip-id { font-size: 10px; color: #1E293B; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.tooltip-label { font-weight: 700; margin-bottom: 8px; color: #0F172A; }

/* Rating buttons */
.rating-btn { flex: 1; padding: 12px 0; border-radius: 10px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.rating-btn.active { border: 2px solid #E2E8F0; background: rgba(226, 232, 240, 0.2); font-weight: 700; color: #0F172A; }
.rating-btn:not(.active) { border: 1px solid rgba(148, 163, 184, 0.2); background: rgba(241, 245, 249, 0.5); color: #475569; }
.rating-btn:hover:not(.active) { background: rgba(226, 232, 240, 0.1); border-color: rgba(226, 232, 240, 0.3); }

/* Model Selector */
.model-selector-container { padding: 16px 18px; border-top: 1px solid rgba(226, 232, 240, 0.15); margin-top: auto; background: linear-gradient(180deg, transparent 0%, rgba(226, 232, 240, 0.05) 100%); }
.model-selector-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; cursor: pointer; background: linear-gradient(135deg, rgba(226, 232, 240, 0.15) 0%, rgba(226, 232, 240, 0.08) 100%); border: 1px solid rgba(226, 232, 240, 0.25); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.model-selector-btn:hover { background: linear-gradient(135deg, rgba(226, 232, 240, 0.2) 0%, rgba(226, 232, 240, 0.12) 100%); border-color: rgba(226, 232, 240, 0.4); box-shadow: 0 0 15px rgba(226, 232, 240, 0.12); }
.model-selector-btn .model-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #E2E8F0 0%, #7A6FAF 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 800; flex-shrink: 0; box-shadow: 0 0 12px rgba(226, 232, 240, 0.3); }
.model-selector-btn .model-info { flex: 1; text-align: left; min-width: 0; }
.model-selector-btn .model-name { display: block; font-size: 13px; font-weight: 700; color: #1E293B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-selector-btn .model-desc { display: block; font-size: 11px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.model-selector-btn .model-chevron { color: #0F172A; transition: transform 0.3s ease; }
.model-selector-btn.open .model-chevron { transform: rotate(180deg); }

.model-dropdown { position: absolute; bottom: 100%; left: 0; right: 0; margin-bottom: 10px; background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%); border-radius: 16px; box-shadow: 0 -8px 40px rgba(0,0,0,0.5), 0 0 25px rgba(226, 232, 240, 0.08); border: 1px solid rgba(226, 232, 240, 0.25); overflow: hidden; z-index: 100; backdrop-filter: blur(20px); }
.model-dropdown-header { padding: 16px 20px; background: linear-gradient(135deg, rgba(226, 232, 240, 0.25) 0%, rgba(226, 232, 240, 0.12) 100%); border-bottom: 1px solid rgba(226, 232, 240, 0.2); }
.model-dropdown-header h4 { font-size: 14px; font-weight: 700; margin: 0; color: #0F172A; }
.model-dropdown-header p { font-size: 11px; color: #0F172A; margin: 4px 0 0 0; }
.model-option { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; cursor: pointer; transition: all 0.2s ease; border-bottom: 1px solid rgba(226, 232, 240, 0.1); }
.model-option:last-child { border-bottom: none; }
.model-option:hover { background: rgba(226, 232, 240, 0.1); }
.model-option.selected { background: rgba(226, 232, 240, 0.15); }
.model-option .option-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #475569; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; transition: all 0.2s ease; }
.model-option.selected .option-radio { border-color: #1E293B; background: #E2E8F0; box-shadow: 0 0 8px rgba(226, 232, 240, 0.4); }
.model-option.selected .option-radio::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.model-option .option-content { flex: 1; }
.model-option .option-name { font-size: 14px; font-weight: 700; color: #0F172A; display: flex; align-items: center; gap: 10px; }
.model-option .option-badge { font-size: 9px; padding: 3px 8px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.model-option .option-badge.recommended { background: rgba(132, 204, 22, 0.2); color: #84CC16; border: 1px solid rgba(132, 204, 22, 0.3); }
.model-option .option-badge.premium { background: rgba(245, 158, 11, 0.2); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }
.model-option .option-badge.economy { background: rgba(59, 130, 246, 0.2); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.3); }
.model-option .option-badge.legacy { background: rgba(148, 163, 184, 0.15); color: #475569; border: 1px solid rgba(148, 163, 184, 0.2); }
.model-option .option-desc { font-size: 12px; color: #475569; margin-top: 4px; }
.model-option .option-meta { display: flex; gap: 16px; margin-top: 8px; }
.model-option .option-tag { font-size: 11px; color: #1E293B; display: flex; align-items: center; gap: 4px; }

/* Activity Log */
.activity-log { padding: 24px; overflow-y: auto; height: calc(100vh - 80px); }
.activity-filter-bar { display: flex; gap: 10px; margin-bottom: 20px; }
.activity-date-group { font-size: 12px; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 0 6px; border-bottom: 1px solid #f3f4f6; margin-bottom: 4px; }
.activity-entry { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; transition: background 0.15s; }
.activity-entry:hover { background: #f9fafb; }
.activity-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-info { flex: 1; min-width: 0; }
.activity-label { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-action { font-size: 12px; color: #9ca3af; }
.activity-time { font-size: 12px; color: #9ca3af; flex-shrink: 0; }

/* ===== INVESTIGATORS TAB ===== */

/* Status dot */
.inv-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Status badge */
.inv-status-badge { padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }

/* Engagement badge */
.inv-engagement-badge { display: inline-block; padding: 2px 6px; border-radius: 5px; font-size: 9px; font-weight: 600; background: rgba(124, 58, 237, 0.1); color: #7C3AED; border: 1px solid rgba(124, 58, 237, 0.2); }

/* Detail sub-tabs */
.inv-detail-tabs { display: flex; gap: 4px; background: #F1F5F9; padding: 4px; border-radius: 10px; margin-bottom: 0; border: 1px solid #E2E8F0; }
.inv-detail-tab { padding: 7px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; background: transparent; color: #64748B; transition: all 0.2s; }
.inv-detail-tab:hover { color: #7C3AED; background: rgba(124, 58, 237, 0.05); }
.inv-detail-tab.active { background: #FFFFFF; color: #7C3AED; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }

/* Form grid */
.inv-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.inv-field-label { display: block; font-size: 11px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.inv-field-input { width: 100%; padding: 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; background: #F8FAFC; color: #0F172A; transition: border-color 0.2s; font-family: inherit; }
.inv-field-input:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }

/* External link buttons */
.inv-link-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #7C3AED; background: rgba(124, 58, 237, 0.08); text-decoration: none; transition: all 0.15s; }
.inv-link-btn:hover { background: rgba(124, 58, 237, 0.15); }

/* Tag sections */
.inv-tag-section { margin-bottom: 20px; }
.inv-tag-section h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #0F172A; }
.inv-tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.inv-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; background: rgba(124, 58, 237, 0.08); color: #7C3AED; border: 1px solid rgba(124, 58, 237, 0.15); }
.inv-tag .remove { cursor: pointer; opacity: 0.6; display: inline-flex; }
.inv-tag .remove:hover { opacity: 1; }

/* Indication/Technology/Engagement chip */
.inv-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; font-size: 11px; cursor: pointer; border: 1px solid #E2E8F0; transition: all 0.15s; background: #FFFFFF; color: #475569; }
.inv-chip:hover { border-color: rgba(124, 58, 237, 0.3); }
.inv-chip.linked { background: rgba(124, 58, 237, 0.08); border-color: rgba(124, 58, 237, 0.3); color: #7C3AED; font-weight: 600; }

/* Publication item */
.inv-pub-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; border: 1px solid transparent; margin-bottom: 4px; }
.inv-pub-item:hover { background: #F8FAFC; }
.inv-pub-item.linked { background: rgba(124, 58, 237, 0.04); border-color: rgba(124, 58, 237, 0.12); }

/* Interaction timeline */
.inv-timeline { position: relative; padding-left: 24px; }
.inv-timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: #E2E8F0; }
.inv-timeline-item { position: relative; margin-bottom: 16px; padding: 14px 16px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; }
.inv-timeline-item::before { content: ''; position: absolute; left: -21px; top: 18px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #7C3AED; background: #FFFFFF; }
.inv-timeline-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.inv-timeline-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: #7C3AED; }
.inv-timeline-date { font-size: 11px; color: #64748B; }
.inv-timeline-summary { font-size: 13px; color: #0F172A; line-height: 1.5; }
.inv-timeline-notes { font-size: 12px; color: #475569; margin-top: 8px; padding-top: 8px; border-top: 1px solid #E2E8F0; white-space: pre-wrap; }
.inv-timeline-attendees { font-size: 11px; color: #64748B; margin-top: 4px; font-style: italic; }

/* Follow-up items */
.inv-followup { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
.inv-followup.completed { text-decoration: line-through; opacity: 0.5; }
.inv-followup input[type="checkbox"] { accent-color: #7C3AED; cursor: pointer; }

/* Add follow-up */
.inv-add-followup { display: flex; gap: 6px; margin-top: 6px; }
.inv-add-followup input { flex: 1; padding: 5px 8px; border: 1px solid #E2E8F0; border-radius: 6px; font-size: 11px; font-family: inherit; }
.inv-add-followup input:focus { outline: none; border-color: #7C3AED; }

/* Briefing panel */
.inv-briefing { padding: 0; }
.inv-briefing-content { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; color: #0F172A; }
.inv-briefing-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 11px; color: #64748B; }

/* Interaction form */
.inv-interaction-form { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px; margin-bottom: 16px; }

/* Pipeline kanban */
.inv-pipeline-container { display: flex; gap: 16px; padding: 16px; overflow-x: auto; height: calc(100vh - 180px); }
.inv-pipeline-column { flex: 0 0 220px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.inv-pipeline-col-header { padding: 12px 14px; font-size: 13px; font-weight: 700; border-bottom: 1px solid #E2E8F0; display: flex; justify-content: space-between; align-items: center; color: #0F172A; }
.inv-pipeline-col-count { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(100, 116, 139, 0.1); color: #64748B; }
.inv-pipeline-col-body { flex: 1; overflow-y: auto; padding: 8px; }
.inv-pipeline-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; }
.inv-pipeline-card:hover { border-color: rgba(124, 58, 237, 0.3); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.inv-pipeline-card .card-name { font-weight: 600; font-size: 13px; color: #0F172A; }
.inv-pipeline-card .card-institution { font-size: 11px; color: #64748B; margin-top: 2px; }
.inv-pipeline-card .card-engagements { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }

/* AI Investigator Search */
.inv-ai-section { border-top: 1px solid #E2E8F0; padding-top: 8px; }
.inv-ai-toggle { display: flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer; font-size: 12px; font-weight: 700; color: #7C3AED; padding: 4px 0; text-transform: uppercase; letter-spacing: 0.3px; }
.inv-ai-toggle:hover { color: #5B21B6; }
.inv-ai-search-bar { display: flex; gap: 6px; align-items: center; }
.inv-ai-results { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 45vh; overflow-y: auto; padding-right: 4px; }
.inv-ai-results::-webkit-scrollbar { width: 4px; }
.inv-ai-results::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.2); border-radius: 2px; }
.inv-ai-result-card { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; padding: 10px 12px; transition: all 0.15s; }
.inv-ai-result-card:hover { border-color: rgba(124, 58, 237, 0.3); }
.inv-ai-result-card.selected { background: rgba(124, 58, 237, 0.04); border-color: rgba(124, 58, 237, 0.3); }
.inv-ai-result-top { display: flex; align-items: flex-start; gap: 8px; }
.inv-ai-expertise { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.inv-ai-merge-btn { width: 100%; justify-content: center; margin-top: 4px; }
.inv-ai-preview { background: #F5F3FF; border: 1px solid rgba(124, 58, 237, 0.25); border-radius: 10px; padding: 14px; margin-top: 10px; }
.inv-ai-preview-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* ========== Patient Registry ========== */
/* Pipeline Steps */
.reg-pipeline-steps { display: flex; gap: 2px; margin: 8px 0; }
.reg-pipeline-step { flex: 1; height: 6px; border-radius: 3px; background: #E2E8F0; transition: background 0.3s; }
.reg-pipeline-step.active { background: #7C3AED; animation: pulse 1.5s infinite; }
.reg-pipeline-step.done { background: #10B981; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Provenance Field */
.reg-field { padding: 8px 10px; border: 1px solid #E2E8F0; border-radius: 8px; margin-bottom: 6px; transition: border-color 0.15s; }
.reg-field:hover { border-color: #CBD5E1; }
.reg-field.status-ai { border-left: 3px solid #F59E0B; }
.reg-field.status-accepted { border-left: 3px solid #10B981; }
.reg-field.status-edited { border-left: 3px solid #3B82F6; }
.reg-field.status-rejected { border-left: 3px solid #EF4444; opacity: 0.6; }
.reg-field-label { font-size: 11px; color: #64748B; text-transform: uppercase; letter-spacing: 0.3px; }
.reg-field-value { font-size: 14px; font-weight: 600; margin: 2px 0; color: #1E293B; }
.reg-field-raw { font-size: 11px; color: #94A3B8; font-style: italic; margin-top: 2px; }
.reg-field-snippet { font-size: 11px; color: #64748B; background: #F8FAFC; padding: 4px 8px; border-radius: 4px; margin-top: 4px; border-left: 2px solid #CBD5E1; }
.reg-field-actions { display: flex; gap: 4px; margin-top: 6px; }
.reg-field-actions .btn { font-size: 11px; padding: 2px 6px; display: inline-flex; align-items: center; gap: 3px; }

/* Confidence Badge */
.reg-confidence { font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; }
.reg-confidence.high { background: #D1FAE5; color: #065F46; }
.reg-confidence.medium { background: #FEF3C7; color: #92400E; }
.reg-confidence.low { background: #FEE2E2; color: #991B1B; }

/* QC Progress */
.reg-qc-progress { display: flex; align-items: center; gap: 8px; padding: 10px; background: #F5F3FF; border-radius: 10px; margin-bottom: 12px; }
.reg-qc-bar { flex: 1; height: 8px; background: #E2E8F0; border-radius: 4px; overflow: hidden; }
.reg-qc-fill { height: 100%; background: linear-gradient(90deg, #7C3AED, #A78BFA); border-radius: 4px; transition: width 0.3s; }

/* Patient Card */
.reg-patient-card { padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 10px; cursor: pointer; transition: all 0.15s; }
.reg-patient-card:hover { border-color: #7C3AED; background: rgba(124, 58, 237, 0.02); }
.reg-patient-card.active { background: rgba(124, 58, 237, 0.04); border-color: #7C3AED; }
.reg-patient-card .gene-badge { background: #DBEAFE; color: #1E40AF; font-size: 11px; padding: 1px 6px; border-radius: 8px; font-weight: 500; }

/* Paper Status */
.reg-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; display: inline-block; }
.reg-status.pending { background: #F1F5F9; color: #64748B; }
.reg-status.segmenting, .reg-status.extracting, .reg-status.normalizing { background: #FEF3C7; color: #92400E; }
.reg-status.qc { background: #E0E7FF; color: #3730A3; }
.reg-status.complete, .reg-status.approved { background: #D1FAE5; color: #065F46; }
.reg-status.error, .reg-status.rejected { background: #FEE2E2; color: #991B1B; }

/* Export */
.reg-export-options { display: flex; flex-direction: column; gap: 16px; max-width: 500px; padding: 16px; }
.reg-export-option label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

/* Modal overlay (shared, but ensure it exists) */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.95); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal { background: white; border-radius: 14px; box-shadow: 0 25px 50px rgba(0,0,0,0.15); overflow: hidden; }
.modal-content { background: white; border-radius: 14px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); overflow: hidden; }
.modal-content .modal-header { padding: 20px 24px; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; }
.modal-content .modal-header h3 { font-size: 16px; font-weight: 600; color: #0F172A; display: flex; align-items: center; gap: 10px; margin: 0; }
.modal-content .modal-body { padding: 20px 24px; }
.modal-content .modal-footer { padding: 16px 24px; border-top: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

/* ===== Clinical Development ===== */

/* Section Cards */
.cd-section-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; padding: 14px 16px; transition: border-color 0.15s; }
.cd-section-card:hover { border-color: #CBD5E1; }
.cd-section-card h4 { font-size: 13px; font-weight: 700; color: #1E293B; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }

/* Arm Cards */
.cd-arm-card { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px 14px; display: flex; align-items: flex-start; gap: 10px; }
.cd-arm-card:hover { border-color: #7C3AED; }

/* Timeline Visualization */
.cd-timeline { display: flex; gap: 2px; border-radius: 8px; overflow: hidden; height: 36px; }
.cd-timeline-bar { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; min-width: 40px; cursor: default; transition: flex 0.3s; }

/* Section Navigation (Protocol tab) */
.cd-section-nav-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 500; color: #475569; transition: all 0.15s; }
.cd-section-nav-item:hover { background: rgba(124, 58, 237, 0.06); color: #7C3AED; }
.cd-section-nav-item.active { background: rgba(124, 58, 237, 0.1); color: #7C3AED; font-weight: 600; }

/* ===== Schedule of Assessments Grid ===== */
.soa-grid-wrapper { overflow: auto; max-height: calc(100vh - 320px); border: 1px solid #E2E8F0; border-radius: 10px; }
.soa-grid { width: 100%; border-collapse: collapse; font-size: 12px; }
.soa-grid th, .soa-grid td { border: 1px solid #E2E8F0; padding: 6px 8px; text-align: center; }
.soa-grid thead th { background: #F8FAFC; font-weight: 700; color: #1E293B; position: sticky; top: 0; z-index: 2; }
.soa-sticky-col { position: sticky; left: 0; z-index: 1; background: #FFFFFF; text-align: left !important; font-weight: 600; min-width: 200px; }
.soa-grid thead .soa-sticky-col { z-index: 3; background: #F8FAFC; }
.soa-header-cell { font-size: 11px; min-width: 70px; white-space: nowrap; }
.soa-header-cell div { font-size: 10px; color: #64748B; font-weight: 400; }
.soa-category-row td { font-weight: 700; font-size: 12px; text-align: left; border-bottom: 2px solid #E2E8F0; }
.soa-cell { cursor: pointer; transition: background 0.1s; user-select: none; }
.soa-cell:hover { background: rgba(124, 58, 237, 0.08); }

/* ===== Enrollment Forecaster ===== */

/* Progress bar in list cards */
.ef-progress-bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}

.ef-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #5B21B6);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Stat cards */
.ef-stat-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.15s;
}

.ef-stat-card:hover {
  border-color: #7C3AED;
}

/* Slider styling */
.ef-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  outline: none;
}

.ef-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #7C3AED;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s;
}

.ef-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.ef-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #7C3AED;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

/* Site performance indicators */
.ef-site-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.ef-site-status.exceeding {
  background: #D1FAE5;
  color: #059669;
}

.ef-site-status.on-track {
  background: #FEF3C7;
  color: #D97706;
}

.ef-site-status.behind {
  background: #FEE2E2;
  color: #DC2626;
}

/* AI insight cards */
.ef-insight-card {
  padding: 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  border-left: 3px solid;
  margin-bottom: 8px;
}

.ef-insight-card.suggestion {
  border-left-color: #3B82F6;
}

.ef-insight-card.risk {
  border-left-color: #EF4444;
}

.ef-insight-card.recommendation {
  border-left-color: #10B981;
}

/* What-if buttons */
.ef-whatif-btn {
  padding: 6px 12px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #7C3AED;
  cursor: pointer;
  transition: all 0.15s;
}

.ef-whatif-btn:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.4);
}

/* Wizard step indicator */
.ef-wizard-step {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.ef-wizard-step.active {
  background: #EEF2FF;
}

.ef-wizard-step-title {
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
}

.ef-wizard-step.active .ef-wizard-step-title {
  font-weight: 700;
  color: #7C3AED;
}

/* Scenario comparison table */
.ef-comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 12px;
}

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

.ef-comparison-table th {
  font-weight: 700;
  color: #1E293B;
  background: #F8FAFC;
}

/* ===== Epidemiology Module ===== */

/* Study Cards */
.epi-study-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: all 0.15s; }
.epi-study-card:hover { border-color: #14B8A6; box-shadow: 0 2px 8px rgba(13,148,136,0.08); }
.epi-study-card.selected { border-color: #0D9488; background: #F0FDFA; box-shadow: 0 0 0 2px rgba(13,148,136,0.15); }
.epi-study-name { font-size: 13px; font-weight: 700; color: #1E293B; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.epi-study-indication { font-size: 11px; color: #0D9488; font-weight: 600; background: #CCFBF1; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.epi-study-stats { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: #64748B; }

/* Source Cards */
.epi-source-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; transition: border-color 0.15s; }
.epi-source-card:hover { border-color: #CBD5E1; }
.epi-source-type-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.epi-source-type-icon.document { background: #EFF6FF; color: #3B82F6; }
.epi-source-type-icon.dataset { background: #F0FDF4; color: #22C55E; }
.epi-source-type-icon.trial { background: #FEF3C7; color: #F59E0B; }
.epi-source-type-icon.registry { background: #F3E8FF; color: #A855F7; }
.epi-source-type-icon.competitor { background: #FEE2E2; color: #EF4444; }

/* Measure Display */
.epi-measure-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #F1F5F9; transition: background 0.1s; }
.epi-measure-row:hover { background: #F8FAFC; }
.epi-measure-type { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px; color: white; white-space: nowrap; }
.epi-measure-value { font-size: 14px; font-weight: 700; color: #1E293B; font-variant-numeric: tabular-nums; }
.epi-measure-unit { font-size: 11px; color: #64748B; }
.epi-measure-region { font-size: 11px; color: #475569; background: #F1F5F9; padding: 2px 8px; border-radius: 8px; }
.epi-measure-ci { font-size: 10px; color: #94A3B8; font-variant-numeric: tabular-nums; }

/* Quality Grading */
.epi-quality-domain { border: 1px solid #E2E8F0; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.epi-quality-domain-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #F8FAFC; cursor: pointer; font-size: 13px; font-weight: 600; color: #1E293B; }
.epi-quality-domain-header:hover { background: #F1F5F9; }
.epi-quality-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 28px; border-top: 1px solid #F1F5F9; font-size: 12px; }
.epi-quality-stars { display: flex; gap: 2px; }
.epi-quality-star { width: 18px; height: 18px; cursor: pointer; transition: transform 0.1s; }
.epi-quality-star:hover { transform: scale(1.2); }
.epi-quality-star.filled { color: #F59E0B; }
.epi-quality-star.empty { color: #E2E8F0; }
.epi-quality-score-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.epi-quality-score-badge.high { background: #D1FAE5; color: #059669; }
.epi-quality-score-badge.moderate { background: #DBEAFE; color: #2563EB; }
.epi-quality-score-badge.low { background: #FEF3C7; color: #D97706; }
.epi-quality-score-badge.very_low { background: #FEE2E2; color: #DC2626; }

/* GRADE Factors */
.epi-grade-factor { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; color: #475569; }
.epi-grade-factor-label { min-width: 140px; font-weight: 500; }
.epi-grade-factor-btns { display: flex; gap: 2px; }
.epi-grade-factor-btn { width: 28px; height: 24px; border: 1px solid #E2E8F0; background: #fff; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.1s; display: flex; align-items: center; justify-content: center; }
.epi-grade-factor-btn:first-child { border-radius: 4px 0 0 4px; }
.epi-grade-factor-btn:last-child { border-radius: 0 4px 4px 0; }
.epi-grade-factor-btn.active { background: #0D9488; color: white; border-color: #0D9488; }
.epi-grade-factor-btn:hover:not(.active) { background: #F0FDFA; }

/* Map */
.epi-map-container { width: 100%; height: 400px; border-radius: 10px; overflow: hidden; border: 1px solid #E2E8F0; position: relative; }
.epi-map-overlay { position: absolute; top: 10px; right: 10px; z-index: 800; background: white; border-radius: 8px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); font-size: 12px; }

/* Geo Table */
.epi-geo-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.epi-geo-table th { background: #F8FAFC; font-weight: 700; color: #1E293B; padding: 10px 12px; text-align: left; border-bottom: 2px solid #E2E8F0; position: sticky; top: 0; z-index: 1; }
.epi-geo-table td { padding: 8px 12px; border-bottom: 1px solid #F1F5F9; color: #334155; }
.epi-geo-table tr:hover td { background: #F0FDFA; }
.epi-site-score { display: flex; align-items: center; gap: 6px; }
.epi-site-bar { height: 6px; border-radius: 3px; background: #E2E8F0; width: 60px; overflow: hidden; }
.epi-site-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* Natural History */
.epi-stages-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.epi-stages-table th { background: #F8FAFC; font-weight: 700; color: #1E293B; padding: 8px 12px; text-align: left; border-bottom: 2px solid #E2E8F0; }
.epi-stages-table td { padding: 6px 12px; border-bottom: 1px solid #F1F5F9; }
.epi-stages-table input { border: 1px solid #E2E8F0; border-radius: 4px; padding: 4px 8px; font-size: 12px; width: 100%; }
.epi-stages-table input:focus { border-color: #0D9488; outline: none; box-shadow: 0 0 0 2px rgba(13,148,136,0.1); }
.epi-transition-arrow { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 0; color: #475569; }
.epi-transition-arrow .arrow { color: #0D9488; font-weight: 700; }
.epi-sim-controls { display: flex; gap: 12px; align-items: center; padding: 12px 0; flex-wrap: wrap; }
.epi-sim-controls input { border: 1px solid #E2E8F0; border-radius: 6px; padding: 6px 10px; font-size: 12px; width: 100px; }
.epi-sim-controls input:focus { border-color: #0D9488; outline: none; }
.epi-chart-container { border: 1px solid #E2E8F0; border-radius: 10px; padding: 16px; background: #FFFFFF; margin-top: 12px; }

/* Extraction Progress */
.epi-extract-progress { margin-top: 8px; }
.epi-extract-bar { height: 4px; background: #E2E8F0; border-radius: 2px; overflow: hidden; }
.epi-extract-fill { height: 100%; background: linear-gradient(90deg, #14B8A6, #0D9488); border-radius: 2px; transition: width 0.3s; }

/* Source Picker Modal */
.epi-picker-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.epi-picker-modal { background: white; border-radius: 14px; box-shadow: 0 25px 50px rgba(0,0,0,0.15); width: 600px; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; }
.epi-picker-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #E2E8F0; }
.epi-picker-header h3 { font-size: 16px; font-weight: 700; color: #1E293B; }
.epi-picker-tabs { display: flex; gap: 0; border-bottom: 1px solid #E2E8F0; }
.epi-picker-tabs button { padding: 10px 16px; font-size: 12px; font-weight: 600; color: #64748B; background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.15s; }
.epi-picker-tabs button:hover { color: #0D9488; background: #F0FDFA; }
.epi-picker-tabs button.active { color: #0D9488; border-bottom-color: #0D9488; }
.epi-picker-body { flex: 1; overflow-y: auto; padding: 12px 20px; }
.epi-picker-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #E2E8F0; border-radius: 8px; margin-bottom: 6px; cursor: pointer; transition: all 0.15s; font-size: 13px; color: #334155; }
.epi-picker-item:hover { border-color: #14B8A6; background: #F0FDFA; }
.epi-picker-item.connected { opacity: 0.5; cursor: default; }

/* Evidence Level Badge */
.epi-evidence-level { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.epi-evidence-level.level-1 { background: #F3E8FF; color: #7C3AED; }
.epi-evidence-level.level-2 { background: #DBEAFE; color: #3B82F6; }
.epi-evidence-level.level-3 { background: #D1FAE5; color: #059669; }
.epi-evidence-level.level-4 { background: #FEF3C7; color: #D97706; }
.epi-evidence-level.level-5 { background: #FEE2E2; color: #DC2626; }
.epi-evidence-level.level-6 { background: #F1F5F9; color: #64748B; }

/* ============================================================
   Patient Journey Styles
   ============================================================ */

/* Section Container */
.pj-section { margin-top: 32px; border-top: 1px solid #e5e5e5; padding-top: 24px; }
.pj-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

/* Tabs */
.pj-tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.pj-tab { padding: 6px 14px; border-radius: 6px; border: none; background: #f5f5f5; cursor: pointer; font-size: 13px; font-weight: 500; color: #525252; transition: all 0.15s; }
.pj-tab.active { background: #7C3AED; color: white; }
.pj-tab:hover:not(.active) { background: #e5e5e5; }

/* Timeline */
.pj-timeline { position: relative; padding-left: 28px; }
.pj-timeline::before { content: ''; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: #e5e5e5; }
.pj-stage-card { position: relative; margin-bottom: 16px; padding: 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e5e5; transition: border-color 0.15s; }
.pj-stage-card:hover { border-color: #c4b5fd; }
.pj-stage-card.expanded { border-color: #7C3AED; background: #faf5ff; }
.pj-stage-dot { position: absolute; left: -24px; top: 20px; width: 12px; height: 12px; border-radius: 50%; background: #7C3AED; border: 2px solid white; box-shadow: 0 0 0 2px #7C3AED; }
.pj-stage-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.pj-stage-name { font-weight: 600; font-size: 14px; }
.pj-stage-time { font-size: 12px; color: #7C3AED; background: #f5f3ff; padding: 2px 8px; border-radius: 4px; }
.pj-stage-details { margin-top: 16px; display: grid; gap: 12px; }
.pj-stage-field { }
.pj-stage-field-label { font-size: 11px; font-weight: 600; color: #737373; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }

/* Tags */
.pj-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pj-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; background: #e5e7eb; border-radius: 4px; font-size: 12px; color: #374151; }
.pj-tag-remove { cursor: pointer; opacity: 0.5; font-weight: 700; }
.pj-tag-remove:hover { opacity: 1; }
.pj-tag-input { border: 1px dashed #d1d5db; background: transparent; border-radius: 4px; padding: 2px 8px; font-size: 12px; width: 100px; outline: none; }
.pj-tag-input:focus { border-color: #7C3AED; }

/* Drop-off Indicator */
.pj-dropoff { display: flex; align-items: center; gap: 8px; }
.pj-dropoff-bar { flex: 1; height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; max-width: 200px; }
.pj-dropoff-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.pj-dropoff-value { font-size: 13px; font-weight: 600; min-width: 30px; }

/* Decision Points & Intervention Windows */
.pj-dp-card, .pj-iw-card { padding: 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e5e5; margin-bottom: 12px; }
.pj-dp-card { border-left: 3px solid #F59E0B; }
.pj-iw-card { border-left: 3px solid #10B981; }
.pj-linked-stage { font-size: 11px; color: #7C3AED; background: #f5f3ff; padding: 2px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }

/* Summary Cards */
.pj-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.pj-summary-card { padding: 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e5e5; }
.pj-summary-label { font-size: 11px; font-weight: 600; color: #737373; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.pj-summary-value { font-size: 20px; font-weight: 700; color: #0f172a; }
.pj-summary-unit { font-size: 12px; color: #737373; font-weight: 400; }

/* Add Between Stages */
.pj-add-between { text-align: center; margin: -8px 0; position: relative; z-index: 1; }
.pj-add-between button { font-size: 11px; padding: 2px 10px; border-radius: 10px; border: 1px dashed #d1d5db; background: white; cursor: pointer; color: #737373; transition: all 0.15s; display: inline-flex; align-items: center; gap: 4px; }
.pj-add-between button:hover { border-color: #7C3AED; color: #7C3AED; }

/* Empty State */
.pj-empty { text-align: center; padding: 40px 20px; }
.pj-empty-icon { color: #d4d4d4; margin-bottom: 12px; }

/* Main Indications Tabs */
.ind-main-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid #e5e5e5; }
.ind-main-tab { padding: 12px 20px; border: none; background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: #737373; position: relative; transition: color 0.15s; display: flex; align-items: center; }
.ind-main-tab:hover { color: #525252; }
.ind-main-tab.active { color: #7C3AED; }
.ind-main-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #7C3AED; }

/* Journey Visualization */
.pj-vis-section { margin-top: 24px; }
.pj-vis-timeline { display: flex; align-items: flex-start; gap: 8px; overflow-x: auto; padding: 20px 0 40px 0; }
.pj-vis-stage { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.pj-vis-stage-box { padding: 12px 16px; background: linear-gradient(135deg, #7C3AED 0%, #9F67FF 100%); color: white; border-radius: 8px; font-size: 12px; font-weight: 600; text-align: center; box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3); min-width: 100px; }
.pj-vis-arrow { color: #c4b5fd; font-size: 20px; margin-top: 12px; flex-shrink: 0; }
.pj-vis-stage-meta { margin-top: 8px; font-size: 11px; color: #737373; text-align: center; }
.pj-vis-dp-marker { margin-top: 12px; padding: 4px 8px; background: #FEF3C7; border: 1px solid #F59E0B; border-radius: 4px; font-size: 10px; color: #92400E; max-width: 100px; text-align: center; }
.pj-vis-iw-marker { margin-top: 8px; padding: 4px 8px; background: #D1FAE5; border: 1px solid #10B981; border-radius: 4px; font-size: 10px; color: #065F46; max-width: 100px; text-align: center; }

/* Cascade Chart */
.pj-vis-cascade { margin-top: 32px; }
.pj-vis-cascade-title { font-size: 14px; font-weight: 600; color: #0f172a; margin-bottom: 16px; }

/* Key Insights */
.pj-vis-insights { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 32px; }
.pj-vis-insight-card { padding: 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e5e5; }
.pj-vis-insight-label { font-size: 11px; font-weight: 600; color: #737373; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.pj-vis-insight-value { font-size: 18px; font-weight: 700; color: #7C3AED; }
.pj-vis-insight-sub { font-size: 11px; color: #737373; margin-top: 2px; }

/* ============================================================
   Biomarker/Clinical Tools Styles
   ============================================================ */

/* Detail Tabs */
.bm-detail-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid #e5e5e5; }
.bm-detail-tab { padding: 10px 16px; border: none; background: transparent; cursor: pointer; font-size: 13px; font-weight: 500; color: #737373; position: relative; transition: color 0.15s; }
.bm-detail-tab:hover { color: #525252; }
.bm-detail-tab.active { color: #7C3AED; }
.bm-detail-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #7C3AED; }

/* Info Section */
.bm-info-section { padding-top: 8px; }
.bm-field { margin-bottom: 20px; }
.bm-field-label { display: block; font-size: 12px; font-weight: 600; color: #525252; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }

/* Abnormal Findings Card */
.bm-abnormal-card { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 12px; margin-bottom: 8px; }
.bm-abnormal-card .badge-critical, .badge-red { background: #EF4444; color: white; }
.bm-abnormal-card .badge-severe, .badge-orange { background: #F97316; color: white; }
.bm-abnormal-card .badge-moderate, .badge-yellow { background: #F59E0B; color: white; }
.bm-abnormal-card .badge-mild { background: #e5e7eb; color: #374151; }

/* Tags */
.bm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; background: #e5e7eb; border-radius: 4px; font-size: 12px; color: #374151; margin-right: 4px; margin-bottom: 4px; }
.bm-tag-remove { cursor: pointer; opacity: 0.5; margin-left: 4px; }
.bm-tag-remove:hover { opacity: 1; }
.bm-tag-input { border: 1px dashed #d1d5db; background: transparent; border-radius: 4px; padding: 4px 10px; font-size: 12px; width: 140px; outline: none; }
.bm-tag-input:focus { border-color: #7C3AED; }

/* Diseases Section */
.bm-diseases-section { padding-top: 8px; }
.bm-disease-card { background: #f9fafb; border: 1px solid #e5e5e5; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.bm-disease-card:hover { border-color: #c4b5fd; }

/* Disease Info Grid */
.bm-disease-info { display: grid; gap: 16px; }
.bm-disease-info-row { }
.bm-disease-info-row label { display: block; font-size: 11px; font-weight: 600; color: #7C3AED; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.bm-disease-info-row p { margin: 0; font-size: 14px; color: #374151; line-height: 1.5; }

/* Evaluation Section */
.bm-eval-section { padding-top: 8px; }

/* =========================================
   EVIDENCE CHAT STYLES
   ========================================= */

/* Evidence Chat Layout */
.evidence-chat-layout {
  display: flex;
  height: calc(100vh - 85px);
  overflow: hidden;
}

/* Document Sidebar */
.evidence-doc-sidebar {
  width: 48px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
}

.evidence-doc-sidebar.expanded {
  width: 280px;
}

.evidence-doc-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.sidebar-title {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

/* Evidence Chat Scope Toggle */
.evidence-scope-toggle {
  padding: 12px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.scope-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.scope-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.scope-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: white;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.15s ease;
}

.scope-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.scope-btn.active {
  background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
  border-color: #7C3AED;
  color: white;
}

.scope-info {
  display: block;
  font-size: 11px;
  color: #94A3B8;
  text-align: center;
}

.evidence-doc-summary {
  padding: 16px 12px;
  text-align: center;
  color: #64748B;
  font-size: 13px;
}

.evidence-doc-summary p {
  margin: 6px 0;
}

.evidence-doc-summary .scope-note {
  color: #7C3AED;
  font-weight: 500;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
}

.evidence-doc-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.evidence-doc-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.evidence-doc-count {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.evidence-doc-empty {
  text-align: center;
  padding: 40px 16px;
  color: #9ca3af;
}

.evidence-doc-empty p {
  margin: 4px 0;
  font-size: 13px;
}

.evidence-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.15s ease;
}

.evidence-doc-item:hover {
  background: rgba(124, 58, 237, 0.05);
}

.evidence-doc-item.selected {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.evidence-doc-checkbox {
  margin-top: 2px;
  accent-color: #7C3AED;
}

.evidence-doc-info {
  flex: 1;
  min-width: 0;
}

.evidence-doc-name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evidence-doc-meta {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Chat Area */
.evidence-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.evidence-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.evidence-chat-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.evidence-chat-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.evidence-chat-doc-count {
  font-size: 13px;
  color: #64748b;
  padding: 4px 10px;
  background: #f1f5f9;
  border-radius: 12px;
}

.evidence-chat-header-actions {
  display: flex;
  gap: 8px;
}

/* Chat Messages Area */
.evidence-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8fafc;
}

.evidence-chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px;
}

.evidence-chat-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 8px 0;
}

.evidence-chat-suggestions {
  margin-top: 24px;
  max-width: 400px;
}

.suggestions-label {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.suggestion-chip {
  display: inline-block;
  padding: 8px 14px;
  margin: 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.suggestion-chip:hover {
  background: #f1f5f9;
  border-color: #7C3AED;
  color: #7C3AED;
}

/* Chat Message */
.evidence-chat-message {
  margin-bottom: 16px;
}

.evidence-chat-message.user .evidence-chat-message-content {
  background: #7C3AED;
  color: #fff;
  margin-left: auto;
  max-width: 70%;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
}

.evidence-chat-message.assistant .evidence-chat-message-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  max-width: 85%;
  border-radius: 16px 16px 16px 4px;
  padding: 16px;
}

.user-message-text {
  font-size: 14px;
  line-height: 1.5;
}

.assistant-message-text {
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
  white-space: pre-wrap;
}

/* Evidence Banners */
.evidence-no-data-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #DC2626;
}

.evidence-conflict-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #D97706;
}

.evidence-conflict-banner > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.conflict-details {
  font-size: 12px;
  padding-left: 24px;
  color: #92400e;
}

/* Confidence Row */
.evidence-confidence-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.evidence-confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.evidence-confidence-badge.sm {
  padding: 2px 8px;
  font-size: 10px;
}

/* Citations */
.evidence-citations-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

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

.citations-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 8px;
  font-size: 12px;
  color: #7C3AED;
  cursor: pointer;
  transition: all 0.15s ease;
}

.citation-chip:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(124, 58, 237, 0.3);
}

.citation-number {
  font-weight: 700;
  font-size: 11px;
}

.citation-doc {
  font-weight: 500;
}

.citation-section {
  font-size: 11px;
  color: #8b5cf6;
}

/* Follow-ups */
.evidence-followups {
  margin-top: 12px;
}

.followups-label {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.followup-chip {
  display: inline-block;
  padding: 6px 12px;
  margin-right: 6px;
  margin-bottom: 6px;
  background: #f1f5f9;
  border: none;
  border-radius: 12px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.followup-chip:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Processing State */
.evidence-processing {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 14px;
}

/* Chat Input Area */
.evidence-chat-input-area {
  padding: 16px 20px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.evidence-chat-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #D97706;
}

.evidence-chat-input-row {
  display: flex;
  gap: 12px;
}

.evidence-chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.15s ease;
}

.evidence-chat-input:focus {
  border-color: #7C3AED;
}

.evidence-chat-input:disabled {
  background: #f8fafc;
  color: #9ca3af;
}

.evidence-send-btn {
  padding: 12px 20px;
  border-radius: 12px;
}

.evidence-chat-footer {
  margin-top: 8px;
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
}

/* Evidence Tray */
.evidence-tray {
  width: 380px;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
}

.evidence-tray.collapsed {
  width: 48px;
}

.evidence-tray-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.tray-title {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.evidence-tray-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.evidence-tray-empty {
  text-align: center;
  padding: 40px 16px;
  color: #9ca3af;
}

.evidence-tray-empty p {
  margin: 4px 0;
  font-size: 13px;
}

/* Evidence Card */
.evidence-tray-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.evidence-tray-card:hover {
  border-color: #c4b5fd;
}

.evidence-tray-card.selected {
  border-color: #7C3AED;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.evidence-tray-card.conflict {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.02);
}

.evidence-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.evidence-card-doc {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
}

.evidence-card-section {
  display: block;
  font-size: 11px;
  color: #7C3AED;
  margin-bottom: 8px;
}

.evidence-card-snippet {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.evidence-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.evidence-card-actions {
  display: flex;
  gap: 4px;
}

.evidence-card-conflict {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 11px;
  color: #D97706;
}

/* Button variants */
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
}

.btn-icon.sm {
  width: 24px;
  height: 24px;
}

/* =========================================
   v2: PROJECT CONTEXT BAR STYLES
   ========================================= */

.evidence-context-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}

.context-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.context-label {
  color: #64748b;
  font-weight: 500;
}

.context-value {
  color: #7C3AED;
  font-weight: 600;
}

/* =========================================
   v2: STRUCTURED OUTPUT STYLES
   ========================================= */

.structured-table {
  margin: 12px 0;
  overflow-x: auto;
}

.structured-table-title {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.structured-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.structured-table th {
  background: #f8fafc;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

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

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

.citation-ref {
  font-size: 10px;
  color: #7C3AED;
  margin-left: 2px;
  cursor: pointer;
}

/* Comparison Matrix */
.comparison-matrix {
  margin: 12px 0;
}

.comparison-matrix table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.comparison-matrix th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 12px;
  text-align: center;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
}

.comparison-matrix th:first-child {
  text-align: left;
  background: #f8fafc;
}

.comparison-matrix .dimension-label {
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
}

.comparison-matrix td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

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

.comparison-cell.has-citation {
  position: relative;
}

.comparison-summary {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
}

/* Structured Checklist */
.structured-checklist {
  margin: 12px 0;
}

.structured-checklist h4 {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid #e2e8f0;
}

.checklist-item.status-met {
  border-left-color: #10B981;
  background: rgba(16, 185, 129, 0.03);
}

.checklist-item.status-partial {
  border-left-color: #F59E0B;
  background: rgba(245, 158, 11, 0.03);
}

.checklist-item.status-missing {
  border-left-color: #EF4444;
  background: rgba(239, 68, 68, 0.03);
}

.checklist-item.status-unknown {
  border-left-color: #94a3b8;
  background: rgba(148, 163, 184, 0.03);
}

.checklist-item .status-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.checklist-item .status-icon.met { color: #10B981; }
.checklist-item .status-icon.partial { color: #F59E0B; }
.checklist-item .status-icon.missing { color: #EF4444; }
.checklist-item .status-icon.unknown { color: #94a3b8; }

.checklist-item .requirement {
  font-weight: 500;
  color: #334155;
}

.checklist-item .evidence {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* =========================================
   v2: ACTION CHIPS STYLES
   ========================================= */

.action-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
}

.action-chip:hover {
  border-color: #7C3AED;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.05);
}

.action-chip.action-create-analysis {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.action-chip.action-create-analysis:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10B981;
}

.action-chip.action-add-registry {
  color: #2563EB;
  border-color: rgba(59, 130, 246, 0.3);
}

.action-chip.action-add-registry:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3B82F6;
}

.action-chip.action-flag-gap {
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.3);
}

.action-chip.action-flag-gap:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: #F59E0B;
}

.action-chip.action-export-table {
  color: #64748b;
  border-color: rgba(100, 116, 139, 0.3);
}

.action-chip.action-export-table:hover {
  background: rgba(100, 116, 139, 0.1);
  border-color: #94a3b8;
}

/* =========================================
   v2: COMPARE MODE STYLES
   ========================================= */

.compare-layout {
  padding: 24px;
  height: calc(100vh - 85px);
  overflow-y: auto;
  background: #f8fafc;
}

.compare-container {
  max-width: 1000px;
  margin: 0 auto;
}

.compare-header {
  margin-bottom: 24px;
}

.compare-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
}

.compare-header .text-muted {
  font-size: 14px;
  color: #64748b;
}

.compare-type-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  width: fit-content;
  margin-bottom: 24px;
}

.compare-type-toggle .toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.compare-type-toggle .toggle-btn:hover {
  color: #334155;
}

.compare-type-toggle .toggle-btn.active {
  background: #7C3AED;
  color: #fff;
}

.compare-selectors {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.compare-source-picker {
  flex: 1;
}

.compare-source-picker label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.compare-source-picker .form-select {
  width: 100%;
}

.vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #7C3AED 0%, #3B82F6 100%);
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  margin-top: 18px;
}

.compare-dimensions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dimensions-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.dimension-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
}

.dimension-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #7C3AED;
}

.compare-run-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.compare-results {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.compare-results h3 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 16px;
}

.compare-conflicts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  color: #D97706;
  font-size: 13px;
}

.compare-conflicts .conflict-item {
  padding-left: 20px;
  color: #78716c;
}

.compare-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.compare-empty h3 {
  font-size: 18px;
  color: #334155;
  margin-bottom: 8px;
}

/* Project Context Modal */
.project-context-modal {
  max-width: 500px;
}

.project-context-modal .form-group {
  margin-bottom: 16px;
}

.project-context-modal .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.project-context-modal .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
}

.project-context-modal .form-textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* =========================================
   REGULATORY GAP CHECK STYLES
   ========================================= */

.reggap-layout {
  padding: 24px;
  height: calc(100vh - 85px);
  overflow-y: auto;
  background: #f8fafc;
}

.reggap-container {
  max-width: 900px;
  margin: 0 auto;
}

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

.reggap-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.reggap-header-actions {
  display: flex;
  gap: 8px;
}

/* Step Indicator */
.reggap-steps {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}

.reggap-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.reggap-step.active,
.reggap-step.complete {
  opacity: 1;
}

.step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 600;
  font-size: 14px;
}

.reggap-step.active .step-number {
  background: #7C3AED;
  color: #fff;
}

.reggap-step.complete .step-number {
  background: #10B981;
  color: #fff;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
}

.reggap-step.active .step-label {
  color: #7C3AED;
}

/* Step Content */
.reggap-content {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 32px;
}

.reggap-step-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.reggap-step-content > .text-muted {
  margin-bottom: 24px;
}

/* Indication Input */
.reggap-indication-input {
  margin-bottom: 24px;
}

.reggap-indication-input .form-input {
  font-size: 16px;
  padding: 14px 16px;
}

.reggap-indication-presets {
  margin-bottom: 24px;
}

.presets-label {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

.presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  padding: 8px 14px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  background: #e2e8f0;
}

.preset-chip.selected {
  background: rgba(124, 58, 237, 0.1);
  border-color: #7C3AED;
  color: #7C3AED;
}

/* Module Selection */
.reggap-modules {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.reggap-module-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reggap-module-card:hover {
  border-color: #c4b5fd;
}

.reggap-module-card.selected {
  background: rgba(124, 58, 237, 0.05);
  border-color: #7C3AED;
}

.reggap-module-card input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #7C3AED;
}

.module-info {
  flex: 1;
}

.module-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.module-desc {
  font-size: 13px;
  color: #64748b;
}

/* Step Actions */
.reggap-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

/* Scanning Animation */
.reggap-step-content.scanning {
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.reggap-scanning h3 {
  margin-top: 20px;
}

.scanning-modules {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.scanning-module {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 8px;
  font-size: 13px;
  color: #7C3AED;
  font-weight: 500;
}

/* Results */
.reggap-readiness {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.reggap-readiness-ready {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.reggap-readiness-ready .readiness-icon { color: #10B981; }
.reggap-readiness-ready .readiness-label { color: #059669; }

.reggap-readiness-gaps-minor {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.reggap-readiness-gaps-minor .readiness-icon { color: #3B82F6; }
.reggap-readiness-gaps-minor .readiness-label { color: #2563EB; }

.reggap-readiness-gaps-major {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.reggap-readiness-gaps-major .readiness-icon { color: #F59E0B; }
.reggap-readiness-gaps-major .readiness-label { color: #D97706; }

.reggap-readiness-not-ready {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.reggap-readiness-not-ready .readiness-icon { color: #EF4444; }
.reggap-readiness-not-ready .readiness-label { color: #DC2626; }

.readiness-info {
  flex: 1;
}

.readiness-label {
  display: block;
  font-size: 18px;
  font-weight: 700;
}

.readiness-indication {
  font-size: 14px;
  color: #64748b;
}

.reggap-summary {
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin-bottom: 24px;
}

.reggap-summary p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

/* Module Results */
.reggap-modules-results {
  display: grid;
  gap: 16px;
}

.reggap-module-result {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.reggap-module-result.complete {
  border-color: #10B981;
}

.reggap-module-result.partial {
  border-color: #F59E0B;
}

.reggap-module-result.missing {
  border-color: #EF4444;
}

.module-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  cursor: pointer;
}

.module-result-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #1e293b;
}

.module-result-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.module-result-content {
  padding: 16px;
  border-top: 1px solid #e2e8f0;
}

/* Checklist */
.module-checklist {
  margin-bottom: 16px;
}

.checklist-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.checklist-item.met {
  color: #059669;
}

.checklist-item.met svg {
  color: #10B981;
}

.checklist-item.unmet {
  color: #DC2626;
}

.checklist-item.unmet svg {
  color: #EF4444;
}

.checklist-name {
  flex: 1;
  font-size: 13px;
}

.checklist-citation {
  font-size: 11px;
  color: #64748b;
}

/* Gaps */
.module-gaps {
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.gaps-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #D97706;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.gap-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 8px;
  margin-bottom: 8px;
  border-left: 3px solid #F59E0B;
}

.gap-item.critical {
  background: rgba(239, 68, 68, 0.05);
  border-left-color: #EF4444;
}

.gap-item svg {
  color: #D97706;
  flex-shrink: 0;
  margin-top: 2px;
}

.gap-item.critical svg {
  color: #DC2626;
}

.gap-content {
  flex: 1;
}

.gap-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.gap-recommendation {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

/* Header warning */
.header-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 8px;
  font-size: 12px;
  color: #D97706;
}

/* Saved items list */
.saved-chats-list {
  display: grid;
  gap: 8px;
}

.saved-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.saved-chat-item:hover {
  background: #f1f5f9;
}

.saved-chat-info {
  flex: 1;
  cursor: pointer;
}

.saved-chat-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.saved-chat-meta {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state p {
  margin-top: 12px;
  color: #64748b;
}

/* Form static display */
.form-static {
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
}

.form-static.snippet {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  max-height: 100px;
  overflow-y: auto;
}

.form-info {
  margin-top: 16px;
  padding: 12px;
  background: rgba(124, 58, 237, 0.05);
  border-radius: 8px;
}

.form-info p {
  margin: 0;
}

/* Form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
}

/* Modal sizes */
.modal-content.sm {
  max-width: 480px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COPILOT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Floating Button - positioned above undo button */
.copilot-btn-floating {
  position: fixed;
  bottom: 88px;  /* 24px (undo) + 48px (undo size) + 16px gap */
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  transition: all 0.2s ease;
  z-index: 100;
}
.copilot-btn-floating:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.5);
}
.copilot-btn-floating .copilot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: #10B981;
  border-radius: 50%;
  border: 2px solid white;
}

/* Panel - Slide-over */
.copilot-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  height: 100vh;
  background: linear-gradient(180deg, #FAFAFA 0%, #F5F5F5 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 999;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.copilot-panel.open {
  right: 0;
}

/* Embedded mode - for rendering inside Agent Inbox Chat tab */
.copilot-panel.embedded {
  position: relative;
  top: auto;
  right: auto;
  width: 100%;
  height: 100%;
  box-shadow: none;
  border-left: none;
  z-index: auto;
  flex: 1;
  min-height: 0;
}
.copilot-panel.embedded.open {
  right: auto;
}

/* Panel Header */
.copilot-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
}
.copilot-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
}
.copilot-title svg { color: #7C3AED; }
.copilot-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mode Toggle */
.copilot-mode-toggle {
  display: flex;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 2px;
}
.mode-option {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  color: #64748B;
}
.mode-option.active {
  background: white;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Context Bar */
.copilot-context-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(124, 58, 237, 0.05);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}
.context-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: white;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 16px;
  font-size: 12px;
  color: #5B21B6;
}
.context-chip svg { width: 12px; height: 12px; }
.context-chip-remove {
  cursor: pointer;
  opacity: 0.6;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  color: inherit;
}
.context-chip-remove:hover { opacity: 1; }

/* Panel Body */
.copilot-panel-body {
  flex: 1;
  min-height: 0; /* Critical for flex scroll to work */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

/* Empty State */
.copilot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
}
.copilot-empty h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #1E293B;
}
.copilot-suggestions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.copilot-suggestions .suggestions-label {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 4px;
}
.copilot-suggestions .suggestion-chip {
  padding: 10px 14px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  color: #1E293B;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
.copilot-suggestions .suggestion-chip:hover {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.05);
}

/* Messages */
.copilot-message {
  display: flex;
  gap: 12px;
}
.copilot-message.user {
  flex-direction: row-reverse;
}
.copilot-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.copilot-message.user .copilot-message-avatar {
  background: #E2E8F0;
  color: #475569;
}
.copilot-message.assistant .copilot-message-avatar {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: white;
}
.copilot-message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.copilot-message.user .copilot-message-content {
  background: #7C3AED;
  color: white;
  border-bottom-right-radius: 4px;
}
.copilot-message.assistant .copilot-message-content {
  background: white;
  color: #1E293B;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-bottom-left-radius: 4px;
}
.copilot-message-text {
  white-space: pre-wrap;
}
.copilot-message-external {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  color: #F59E0B;
}
.copilot-message-time {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.4);
  margin-top: 4px;
}
.copilot-message.user .copilot-message-time {
  color: rgba(255, 255, 255, 0.7);
}

/* Processing State */
.copilot-processing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(124, 58, 237, 0.05);
  border-radius: 12px;
  font-size: 14px;
  color: #5B21B6;
}

/* Plan Card */
.copilot-plan-card {
  background: white;
  border: 2px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  /* Note: removed overflow: hidden to allow GuidanceCard content to display */
}
.plan-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(124, 58, 237, 0.05);
  font-weight: 600;
  color: #5B21B6;
  border-radius: 10px 10px 0 0; /* Maintain rounded corners for header */
}
.plan-external-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  font-size: 11px;
  font-weight: 500;
  border-radius: 4px;
}
.plan-warning, .plan-no-match {
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #92400E;
}
.plan-warning svg, .plan-no-match svg {
  color: #F59E0B;
  flex-shrink: 0;
}
.plan-no-match ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 12px;
}
.plan-no-match li {
  margin: 4px 0;
}

/* GuidanceCard - Actionable help when OC can't fulfill a request */
.guidance-card {
  padding: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-radius: 8px;
}
.guidance-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #1E293B;
  margin-bottom: 16px;
}
.guidance-message svg {
  color: #7C3AED;
  flex-shrink: 0;
  margin-top: 2px;
}
.guidance-quick-actions {
  margin-bottom: 14px;
}
.guidance-quick-actions label,
.guidance-needs-context label,
.guidance-available label {
  display: block;
  font-size: 11px;
  color: #64748B;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.quick-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.quick-action-btn:hover {
  background: #7C3AED;
  border-color: #7C3AED;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.quick-action-btn svg {
  width: 14px;
  height: 14px;
}
.guidance-needs-context {
  margin-bottom: 14px;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-chip {
  display: inline-flex;
  flex-direction: column;
  padding: 6px 12px;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 6px;
  font-size: 12px;
  color: #64748B;
}
.skill-chip.needs-context small {
  font-size: 10px;
  color: #94A3B8;
  margin-top: 2px;
}
.available-skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #166534;
  cursor: pointer;
  transition: all 0.15s ease;
}
.available-skill-chip:hover {
  background: #166534;
  border-color: #166534;
  color: white;
  transform: translateY(-1px);
}
.guidance-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INTELLIGENT PLANNER ROUTE CARDS (A/B/C)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ClarificationCard (Route A) - Ask clarifying questions */
.copilot-clarification-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
}
.clarification-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 12px;
}
.clarification-header svg {
  color: #3b82f6;
}
.clarification-question {
  margin-bottom: 12px;
}
.clarification-question p {
  margin: 0 0 12px;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.5;
}
.clarification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.clarification-option-btn {
  background: white;
  border: 1px solid #3b82f6;
  border-radius: 20px;
  padding: 8px 16px;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.clarification-option-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.clarification-actions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* SuggestionCard (Route C) - Respond + Suggest next actions */
.copilot-suggestion-card {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #d8b4fe;
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
}
.suggestion-response {
  margin-bottom: 16px;
}
.suggestion-response p {
  margin: 0;
  color: #581c87;
  line-height: 1.6;
  font-size: 14px;
}
.suggestion-actions {
  margin-bottom: 12px;
}
.suggestion-actions label {
  display: block;
  font-size: 11px;
  color: #7c3aed;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.suggestion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.suggestion-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid #a78bfa;
  border-radius: 8px;
  padding: 10px 14px;
  color: #6d28d9;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.suggestion-action-btn:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.suggestion-action-btn svg {
  width: 14px;
  height: 14px;
}
.suggestion-dismiss {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(124, 58, 237, 0.1);
}

.plan-steps {
  padding: 12px 16px;
  max-height: 200px;
  overflow-y: auto;
}
.plan-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F1F5F9;
}
.plan-step:last-child { border-bottom: none; }
.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #7C3AED;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-desc {
  flex: 1;
  font-size: 14px;
  color: #1E293B;
}
.step-type {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #64748B;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
}
.plan-preview {
  padding: 12px 16px;
  background: #FAFAFA;
  border-top: 1px solid #F1F5F9;
}
.plan-preview h5 {
  font-size: 12px;
  color: #64748B;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #F1F5F9;
}

/* Auto-Resolved Arguments Section (for Copilot argument discovery) */
.plan-auto-resolved {
  margin: 12px 16px;
  padding: 12px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #86efac;
  border-radius: 8px;
}
.auto-resolved-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 12px;
}
.auto-resolved-header .resolved-icon {
  font-size: 16px;
}
.auto-resolved-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auto-resolved-item {
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #d1fae5;
}
.resolved-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.resolved-field .field-name {
  font-weight: 500;
  color: #374151;
}
.confidence-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 500;
}
.confidence-high {
  background: #dcfce7;
  color: #166534;
}
.confidence-medium {
  background: #fef3c7;
  color: #92400e;
}
.confidence-low {
  background: #fee2e2;
  color: #991b1b;
}
.resolved-value {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 13px;
  padding: 6px 8px;
  background: #f9fafb;
  border-radius: 4px;
  margin-bottom: 6px;
  word-break: break-all;
}
.resolved-value a {
  color: #2563eb;
  text-decoration: none;
}
.resolved-value a:hover {
  text-decoration: underline;
}
.resolved-source {
  font-size: 11px;
  color: #6b7280;
}
.resolved-source a {
  color: #6b7280;
}
.resolved-source a:hover {
  color: #374151;
}
.auto-resolved-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px;
  background: #fefce8;
  border-radius: 4px;
  font-size: 12px;
  color: #854d0e;
}
.auto-resolved-notice svg {
  flex-shrink: 0;
}

/* Diff Preview */
.diff-addition {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 4px 0;
  font-size: 13px;
}
.diff-modification {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 4px 0;
  font-size: 13px;
}
.diff-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #64748B;
  font-size: 13px;
}
.diff-link .link-arrow { color: #7C3AED; font-weight: bold; }

/* Receipt */
.copilot-receipt {
  background: white;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  overflow: visible;
  max-height: none;
}
.receipt-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(16, 185, 129, 0.1);
  font-weight: 600;
  color: #059669;
}
.receipt-header .success { color: #10B981; }
.receipt-header .btn-icon { margin-left: auto; }
.receipt-summary {
  padding: 12px 16px;
  border-bottom: 1px solid #F1F5F9;
}
.receipt-summary p { margin: 0; }
.receipt-time {
  font-size: 12px;
  color: #64748B;
  margin-top: 4px !important;
}
.receipt-changes {
  padding: 12px 16px;
}
.receipt-change {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.change-type {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #E0F2FE;
  color: #0369A1;
  font-weight: 600;
  text-transform: uppercase;
}
.change-label { flex: 1; font-size: 14px; }
.receipt-warnings {
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.1);
}
.warning-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #D97706;
}

/* Search Results in Receipt */
.receipt-search-results {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.search-results-section {
  margin-bottom: 12px;
}
.search-results-section:last-child {
  margin-bottom: 0;
}
.search-results-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #7C3AED;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.search-result-item:hover {
  background: #F1F5F9;
  border-color: #E2E8F0;
}
.result-title {
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  line-height: 1.3;
}
.search-result-item:hover .result-title {
  color: #7C3AED;
}
.result-description {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-url {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-results-more {
  font-size: 12px;
  color: #7C3AED;
  text-align: center;
  padding: 6px;
  font-weight: 500;
}

/* Confidence Badges */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.confidence-badge.small {
  padding: 2px 6px;
  font-size: 10px;
}
.confidence-badge.small .confidence-label { display: none; }
.confidence-high {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #22C55E;
}
.confidence-medium {
  background: #FEF9C3;
  color: #854D0E;
  border: 1px solid #EAB308;
}
.confidence-low {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #EF4444;
}
.confidence-icon {
  font-size: 10px;
  font-weight: 700;
}

/* Verification Provenance */
.receipt-provenance {
  border-top: 1px solid #F1F5F9;
}
.provenance-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: #F8FAFC;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  text-align: left;
}
.provenance-toggle:hover {
  background: #F1F5F9;
}
.provenance-toggle .rotated {
  transform: rotate(180deg);
}
.provenance-count {
  margin-left: auto;
  padding: 2px 6px;
  background: #E0E7FF;
  color: #3730A3;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}
.provenance-details {
  padding: 12px 16px;
  background: #FAFBFC;
  border-top: 1px solid #F1F5F9;
}
.provenance-section {
  margin-bottom: 10px;
}
.provenance-section:last-child {
  margin-bottom: 0;
}
.provenance-section label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.provenance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.provenance-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #E0E7FF;
  color: #3730A3;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.provenance-tag.filter {
  background: #FEF3C7;
  color: #92400E;
}
.provenance-counts {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #64748B;
}
.provenance-counts .excluded {
  color: #DC2626;
}
.provenance-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.provenance-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-size: 10px;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.provenance-link:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}
.provenance-more {
  font-size: 10px;
  color: #64748B;
  padding: 4px;
}

/* Verification Results */
.receipt-verification {
  margin: 8px 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
}
.receipt-verification.unverified {
  background: #FEF2F2;
  border-color: #FECACA;
}
.verification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 8px;
}
.receipt-verification.unverified .verification-header {
  color: #991B1B;
}
.verification-missing, .verification-conflicts {
  padding: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  margin-top: 6px;
}
.verification-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  font-size: 11px;
  color: #854D0E;
}
.verification-missing ul {
  width: 100%;
  margin: 4px 0 0 16px;
  padding: 0;
  list-style: disc;
}
.verification-missing li {
  margin-bottom: 2px;
}
.verification-conflicts {
  font-size: 11px;
  color: #DC2626;
  background: #FEF2F2;
}
.conflict-item {
  margin-top: 4px;
  padding-left: 8px;
  border-left: 2px solid #FECACA;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FEEDBACK SECTION - Learning loop UI
   ═══════════════════════════════════════════════════════════════════════════ */

.feedback-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(107, 114, 128, 0.2);
}

.feedback-label {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 8px;
  font-weight: 500;
}

.feedback-buttons {
  display: flex;
  gap: 8px;
}

.feedback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  background: white;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-btn:hover {
  border-color: #3B82F6;
  color: #3B82F6;
  transform: translateY(-1px);
}

.feedback-btn.selected {
  background: #3B82F6;
  border-color: #3B82F6;
  color: white;
}

.feedback-btn.selected.helpful,
.feedback-btn.selected.correct {
  background: #10B981;
  border-color: #10B981;
}

.feedback-btn.selected.not-helpful,
.feedback-btn.selected.wrong {
  background: #EF4444;
  border-color: #EF4444;
}

.feedback-btn.selected.needs-detail {
  background: #F59E0B;
  border-color: #F59E0B;
}

.feedback-comment {
  margin-top: 12px;
}

.feedback-comment textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  resize: none;
  font-family: inherit;
  background: #F9FAFB;
  color: #1F2937;
  transition: all 0.15s ease;
}

.feedback-comment textarea::placeholder {
  color: #9CA3AF;
}

.feedback-comment textarea:focus {
  outline: none;
  border-color: #3B82F6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.feedback-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.feedback-default-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
}

.feedback-default-toggle:hover {
  color: #374151;
}

.feedback-default-toggle input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #3B82F6;
}

.feedback-submit-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.feedback-submit-btn:hover {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.25);
}

.feedback-submitted {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10B981;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 0;
}

.feedback-submitted svg {
  animation: feedbackCheck 0.3s ease-out;
}

@keyframes feedbackCheck {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

/* Panel Footer */
.copilot-panel-footer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: white;
}
.copilot-attach-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background: white;
  color: #64748B;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.copilot-attach-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}
.copilot-attach-btn .rotated {
  transform: rotate(180deg);
}
.copilot-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  min-width: 0;
}
.copilot-panel-footer textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 14px;
  resize: none;
  font-family: inherit;
}
.copilot-panel-footer textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.copilot-panel-footer textarea:disabled {
  background: #F8FAFC;
  cursor: not-allowed;
}
.copilot-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.copilot-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
}
.copilot-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Attach Dropdown */
.copilot-attach-dropdown {
  position: relative;
}
.attach-options {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 220px;
  z-index: 10;
}
.attach-options button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: white;
  font-size: 14px;
  color: #1E293B;
  cursor: pointer;
  text-align: left;
}
.attach-options button:hover {
  background: #F8FAFC;
}
.attach-options button svg {
  color: #7C3AED;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROACTIVE INTELLIGENCE AGENT STYLES (NEW!)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Proactive Alert Message */
.copilot-message.proactive-alert {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
.proactive-alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.proactive-alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}
.proactive-alert-title {
  font-weight: 600;
  color: #1E293B;
  font-size: 14px;
  flex: 1;
}
.proactive-alert-dismiss {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.proactive-alert-dismiss:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1E293B;
}
.proactive-alert-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 12px;
}
.proactive-alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.proactive-alert-action {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.proactive-alert-action.primary {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: white;
}
.proactive-alert-action.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}
.proactive-alert-action.secondary {
  background: white;
  border: 1px solid #E2E8F0;
  color: #475569;
}
.proactive-alert-action.secondary:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

/* Working Progress Message */
.copilot-message.working-progress {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.working-progress-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.working-progress-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #E2E8F0;
  border-top-color: #7C3AED;
  border-radius: 50%;
  animation: copilot-spin 1s linear infinite;
}
@keyframes copilot-spin {
  to { transform: rotate(360deg); }
}
.working-progress-title {
  font-weight: 600;
  color: #1E293B;
  font-size: 14px;
}
.working-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.working-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #64748B;
}
.working-step.active {
  color: #7C3AED;
  font-weight: 500;
}
.working-step.completed {
  color: #10B981;
}
.working-step-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.working-step.pending .working-step-icon {
  border: 2px solid #E2E8F0;
}
.working-step.active .working-step-icon {
  background: rgba(124, 58, 237, 0.1);
  border: 2px solid #7C3AED;
}
.working-step.completed .working-step-icon {
  background: #10B981;
  color: white;
}
.working-progress-bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
}
.working-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED 0%, #8B5CF6 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* DEEP THINK STYLES                                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Deep Think Toggle in Model Selector */
.deep-think-toggle-section {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.15);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(124, 58, 237, 0.02) 100%);
}
.deep-think-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 8px 0;
}
.deep-think-toggle.active { color: #7C3AED; }
.deep-think-toggle-left { display: flex; align-items: center; gap: 12px; }
.deep-think-toggle-info { display: flex; flex-direction: column; }
.deep-think-toggle-name { font-size: 14px; font-weight: 700; color: #0F172A; }
.deep-think-toggle-desc { font-size: 11px; color: #64748B; }
.deep-think-switch {
  width: 40px; height: 22px; border-radius: 11px;
  background: #CBD5E1; transition: all 0.2s; cursor: pointer; position: relative;
}
.deep-think-switch.on { background: #7C3AED; }
.deep-think-switch-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: white;
  position: absolute; top: 2px; left: 2px; transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.deep-think-switch.on .deep-think-switch-thumb { left: 20px; }
.deep-think-strategy { padding: 8px 0 0 30px; }
.deep-think-strategy label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #64748B; cursor: pointer; padding: 4px 0;
}
.deep-think-strategy label.active { color: #7C3AED; font-weight: 600; }
.strategy-radio {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid #94A3B8;
  display: inline-block; flex-shrink: 0;
}
.deep-think-strategy label.active .strategy-radio {
  border-color: #7C3AED; background: #7C3AED; box-shadow: inset 0 0 0 3px white;
}

/* Deep Think Pass Indicators in Working Progress */
.copilot-message.working-progress.deep-think {
  border-left: 3px solid #7C3AED;
  background: rgba(124, 58, 237, 0.03);
}
.deep-think-passes {
  display: flex; gap: 16px; padding: 0 0 10px 0;
  border-bottom: 1px solid rgba(124, 58, 237, 0.12); margin-bottom: 10px;
}
.deep-think-pass {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: #94A3B8;
}
.deep-think-pass.done { color: #10B981; }
.deep-think-pass.active { color: #7C3AED; font-weight: 600; }
.pass-indicator { display: flex; align-items: center; }
.pass-number {
  width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 10px; border: 1.5px solid #CBD5E1; color: #94A3B8;
}
.deep-think-pass.active .pass-number { border-color: #7C3AED; color: #7C3AED; }

/* Deep Think Result View */
.deep-think-result {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(124, 58, 237, 0.01) 100%);
  border-radius: 12px; border: 1px solid rgba(124, 58, 237, 0.2);
  overflow: hidden;
}
.deep-think-result-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  background: rgba(124, 58, 237, 0.08); border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}
.deep-think-label { font-size: 14px; font-weight: 700; color: #7C3AED; }
.deep-think-timing { font-size: 11px; color: #64748B; margin-left: auto; }

.deep-think-goal {
  padding: 10px 16px; font-size: 12px; color: #475569;
  border-bottom: 1px solid rgba(0,0,0,0.05); background: rgba(0,0,0,0.01);
}
.goal-label { font-weight: 600; color: #7C3AED; }

.deep-think-summary {
  padding: 16px; font-size: 14px; line-height: 1.6; color: #1E293B;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Sections */
.deep-think-section { border-top: 1px solid rgba(0,0,0,0.05); }
.section-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  cursor: pointer; font-size: 13px; font-weight: 600; color: #1E293B;
  transition: background 0.15s;
}
.section-header:hover { background: rgba(124, 58, 237, 0.04); }
.section-chevron { transition: transform 0.2s; flex-shrink: 0; }
.section-chevron.rotated { transform: rotate(180deg); }
.section-title { flex: 1; }
.citation-count { font-size: 10px; color: #94A3B8; font-weight: 400; }

.section-content { padding: 0 16px 16px; }
.section-text { font-size: 13px; line-height: 1.6; color: #334155; }

/* Artifacts */
.deep-think-artifact { margin: 12px 0; }
.artifact-title { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.artifact-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.artifact-table th {
  background: rgba(124, 58, 237, 0.06); padding: 8px 10px;
  text-align: left; font-weight: 600; color: #475569;
  border-bottom: 1px solid rgba(124, 58, 237, 0.15);
}
.artifact-table td {
  padding: 6px 10px; border-bottom: 1px solid rgba(0,0,0,0.05); color: #334155;
}
.artifact-table tr:hover td { background: rgba(124, 58, 237, 0.02); }

.artifact-evidence-card {
  padding: 10px 14px; background: rgba(124, 58, 237, 0.04);
  border-radius: 8px; border-left: 3px solid #7C3AED;
}
.evidence-claim { font-size: 13px; font-weight: 500; color: #1E293B; margin-bottom: 4px; }
.evidence-source { font-size: 11px; color: #64748B; margin-bottom: 4px; }

/* Contradictions */
.deep-think-contradictions {
  margin: 0 16px 16px; padding: 12px;
  background: rgba(245, 158, 11, 0.06); border-radius: 8px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.contradictions-header {
  display: flex; align-items: center; gap: 6px; color: #D97706;
  font-weight: 600; font-size: 13px; margin-bottom: 10px;
}
.contradiction-item { margin-bottom: 10px; font-size: 12px; color: #475569; }
.contradiction-item:last-child { margin-bottom: 0; }
.contradiction-claims { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; padding-left: 8px; }
.claim-a, .claim-b { font-size: 12px; }
.claim-a em, .claim-b em { color: #94A3B8; }
.claim-vs { font-size: 10px; color: #D97706; font-weight: 600; padding-left: 4px; }
.resolution-note { font-size: 11px; color: #64748B; margin-top: 4px; padding-left: 8px; font-style: italic; }

/* Confidence Notes */
.deep-think-confidence-notes {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px;
  font-size: 12px; color: #64748B; border-top: 1px solid rgba(0,0,0,0.05);
  background: rgba(0,0,0,0.01);
}

/* Next Actions */
.deep-think-next-actions {
  padding: 12px 16px; border-top: 1px solid rgba(0,0,0,0.05);
}
.next-actions-label { font-size: 12px; font-weight: 600; color: #475569; }
.next-actions-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.next-action-chip {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; cursor: pointer;
  background: rgba(124, 58, 237, 0.08); color: #7C3AED;
  border: 1px solid rgba(124, 58, 237, 0.2); transition: all 0.15s;
}
.next-action-chip:hover { background: rgba(124, 58, 237, 0.16); }

/* Missing Evidence */
.deep-think-missing-evidence {
  padding: 10px 16px; border-top: 1px solid rgba(0,0,0,0.05);
  font-size: 12px; color: #64748B;
}
.missing-label { font-weight: 600; color: #475569; display: block; margin-bottom: 4px; }
.deep-think-missing-evidence ul {
  margin: 0; padding-left: 18px; list-style: disc;
}
.deep-think-missing-evidence li { margin-bottom: 2px; }

/* Execution Plan Toggle */
.deep-think-meta {
  padding: 10px 16px; border-top: 1px solid rgba(0,0,0,0.05);
}
.meta-toggle {
  font-size: 12px; color: #7C3AED; cursor: pointer; background: none;
  border: none; padding: 0; font-weight: 500;
}
.meta-toggle:hover { text-decoration: underline; }
.deep-think-plan-view { margin-top: 10px; }
.plan-step-view {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
  font-size: 12px; color: #475569;
}
.step-num { font-weight: 600; color: #7C3AED; min-width: 18px; }
.step-desc { flex: 1; }
.step-action-tag {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: rgba(124, 58, 237, 0.06); color: #7C3AED;
  font-family: monospace; white-space: nowrap;
}

/* Deep Think Message Styling */
.copilot-message.deep-think-msg .copilot-message-avatar { color: #7C3AED; }

/* ═══════════════════════════════════════════════════════════════════════════ */

/* Data Results Message */
.copilot-message.data-results {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}
.data-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.data-results-title {
  font-weight: 600;
  color: #1E293B;
  font-size: 14px;
}
.data-results-count {
  font-size: 12px;
  color: #64748B;
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 4px;
}
.data-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-results-table th {
  text-align: left;
  padding: 8px 12px;
  background: #F8FAFC;
  color: #475569;
  font-weight: 500;
  border-bottom: 1px solid #E2E8F0;
}
.data-results-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
}
.data-results-table tr:last-child td {
  border-bottom: none;
}
.data-results-table tr:hover td {
  background: #F8FAFC;
}
.data-results-summary {
  margin-top: 12px;
  padding: 12px;
  background: rgba(124, 58, 237, 0.04);
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

/* Smart Suggestions Panel */
.copilot-smart-suggestions {
  padding: 12px 16px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}
.smart-suggestions-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.smart-suggestions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.smart-suggestion-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.smart-suggestion-chip:hover {
  border-color: #7C3AED;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.04);
}
.smart-suggestion-chip svg {
  width: 14px;
  height: 14px;
  color: #7C3AED;
}

/* Command Palette */
.copilot-command-palette-wrapper {
  position: relative;
}
.copilot-command-palette {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 8px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-height: 320px;
  overflow: hidden;
  z-index: 100;
}
.command-palette-search {
  padding: 12px 16px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.command-palette-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #1E293B;
  background: transparent;
}
.command-palette-search input::placeholder {
  color: #94A3B8;
}
.command-palette-list {
  max-height: 260px;
  overflow-y: auto;
}
.command-palette-group {
  padding: 8px 0;
}
.command-palette-group-label {
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.command-palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.command-palette-item:hover,
.command-palette-item.selected {
  background: #F8FAFC;
}
.command-palette-item.selected {
  background: rgba(124, 58, 237, 0.08);
}
.command-palette-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7C3AED;
  flex-shrink: 0;
}
.command-palette-item-content {
  flex: 1;
  min-width: 0;
}
.command-palette-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}
.command-palette-item-name code {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.command-palette-item-desc {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.command-palette-shortcut {
  font-size: 11px;
  color: #94A3B8;
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
}
.command-palette-empty {
  padding: 24px 16px;
  text-align: center;
  color: #64748B;
  font-size: 13px;
}

/* Enhanced Footer */
.copilot-panel-footer.enhanced {
  flex-direction: column;
  gap: 0;
}
.copilot-footer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #E2E8F0;
}
.copilot-footer-attachment {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 6px;
  font-size: 12px;
  color: #7C3AED;
}
.copilot-footer-attachment button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.copilot-footer-input-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: flex-end;
  width: 100%;
  box-sizing: border-box;
}
.copilot-voice-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  background: white;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.copilot-voice-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}
.copilot-voice-btn.recording {
  background: #EF4444;
  border-color: #EF4444;
  color: white;
  animation: pulse-recording 1.5s ease-in-out infinite;
}
@keyframes pulse-recording {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENT INBOX STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Agent Inbox Button (Floating FAB) */
.agent-inbox-btn-floating {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 900;
}

.agent-inbox-btn-floating:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.45);
}

.agent-inbox-btn-floating.running {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35); }
  50% { box-shadow: 0 4px 30px rgba(124, 58, 237, 0.6); }
}

.agent-inbox-btn-floating .inbox-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: #EF4444;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.agent-inbox-btn-floating .running-indicator {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Agent Inbox Panel */
.agent-inbox-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: linear-gradient(180deg, #FAFBFC 0%, #F8FAFC 100%);
  border-left: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}

.agent-inbox-panel.open {
  right: 0;
  z-index: 1001;
}

/* Panel Header */
.agent-inbox-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.agent-inbox-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: #0F172A;
}

.agent-inbox-title svg {
  color: #7C3AED;
}

.agent-inbox-header .btn-icon {
  position: relative;
  z-index: 10;
  cursor: pointer;
  pointer-events: auto;
}

/* Tab Navigation */
.agent-inbox-tabs {
  display: flex;
  gap: 0;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
}

.agent-inbox-tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-inbox-tab:hover {
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.05);
}

.agent-inbox-tab.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
}

.agent-inbox-tab .tab-badge {
  background: rgba(124, 58, 237, 0.15);
  color: #7C3AED;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 700;
}

/* Top Controls Section */
.agent-inbox-controls {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-inbox-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.autopilot-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.autopilot-toggle-wrapper label {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
}

.agent-scope-dropdown,
.agent-mode-dropdown {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #1E293B;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.agent-scope-dropdown:hover,
.agent-mode-dropdown:hover {
  border-color: #7C3AED;
}

.agent-scope-dropdown:focus,
.agent-mode-dropdown:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.agent-run-now-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.agent-run-now-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.agent-run-now-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Panel Body */
.agent-inbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* Section Headers */
.agent-section {
  margin-bottom: 24px;
}

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

.agent-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-section-count {
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
}

/* Running Now Section */
.agent-running-task {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0.03) 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.agent-running-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.agent-running-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #1E293B;
}

.agent-running-step {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 8px;
}

.agent-progress-bar {
  height: 6px;
  background: rgba(124, 58, 237, 0.15);
  border-radius: 3px;
  overflow: hidden;
}

.agent-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED 0%, #A78BFA 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.agent-stop-btn {
  padding: 6px 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.agent-stop-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Task List Items */
.agent-task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.15s ease;
}

.agent-task-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
}

.agent-task-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7C3AED;
  flex-shrink: 0;
}

.agent-task-info {
  flex: 1;
  min-width: 0;
}

.agent-task-title {
  font-weight: 600;
  font-size: 13px;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.agent-task-scope {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 4px;
}

.agent-task-risk {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.agent-task-risk.safe {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.agent-task-risk.draft {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.agent-task-risk.restricted {
  background: rgba(239, 68, 68, 0.15);
  color: #DC2626;
}

.agent-task-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.agent-task-action-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-task-action-btn.run {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

.agent-task-action-btn.run:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.2);
}

.agent-task-action-btn.run:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.agent-task-action-btn.snooze {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
}

.agent-task-action-btn.snooze:hover {
  background: rgba(245, 158, 11, 0.2);
}

.agent-task-action-btn.remove {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.agent-task-action-btn.remove:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ChangeSet / Approval Items */
.agent-changeset-item {
  background: #fff;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}

.agent-changeset-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.agent-changeset-title {
  font-weight: 600;
  font-size: 13px;
  color: #1E293B;
}

.agent-changeset-confidence {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}

.agent-changeset-confidence.high {
  color: #059669;
}

.agent-changeset-confidence.medium {
  color: #D97706;
}

.agent-changeset-confidence.low {
  color: #DC2626;
}

.agent-changeset-preview {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 12px;
}

.agent-changeset-actions {
  display: flex;
  gap: 8px;
}

.agent-changeset-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.agent-changeset-btn.preview {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

.agent-changeset-btn.preview:hover {
  background: rgba(124, 58, 237, 0.2);
}

.agent-changeset-btn.approve {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.agent-changeset-btn.approve:hover {
  background: rgba(16, 185, 129, 0.2);
}

.agent-changeset-btn.edit {
  background: rgba(245, 158, 11, 0.1);
  color: #D97706;
}

.agent-changeset-btn.edit:hover {
  background: rgba(245, 158, 11, 0.2);
}

.agent-changeset-btn.reject {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

.agent-changeset-btn.reject:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Completed Task Items */
.agent-completed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #FAFBFC;
  border-radius: 8px;
  margin-bottom: 6px;
}

.agent-completed-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.agent-completed-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.agent-completed-icon.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #DC2626;
}

.agent-completed-title {
  flex: 1;
  font-size: 12px;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-completed-link {
  font-size: 11px;
  color: #7C3AED;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 600;
  flex-shrink: 0;
}

.agent-completed-link:hover {
  text-decoration: underline;
}

/* Empty State */
.agent-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748B;
}

.agent-empty-state svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.agent-empty-state h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.agent-empty-state p {
  font-size: 12px;
  line-height: 1.5;
}

/* Diff Viewer Modal */
.diff-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.diff-viewer-modal {
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.diff-viewer-header {
  padding: 16px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
}

.diff-viewer-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.diff-viewer-header h3 svg {
  color: #7C3AED;
}

.diff-viewer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  gap: 0;
  min-height: 300px;
}

.diff-viewer-pane {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.diff-viewer-pane.before {
  background: rgba(239, 68, 68, 0.03);
  border-right: 1px solid #E2E8F0;
}

.diff-viewer-pane.after {
  background: rgba(16, 185, 129, 0.03);
}

.diff-viewer-pane-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
}

.diff-viewer-pane.before .diff-viewer-pane-header {
  color: #DC2626;
}

.diff-viewer-pane.after .diff-viewer-pane-header {
  color: #059669;
}

.diff-field {
  margin-bottom: 16px;
}

.diff-field-name {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 4px;
}

.diff-field-value {
  font-size: 13px;
  color: #1E293B;
  padding: 8px 12px;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  white-space: pre-wrap;
  word-break: break-word;
}

.diff-field-value.removed {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
  text-decoration: line-through;
  color: #DC2626;
}

.diff-field-value.added {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #059669;
}

/* Why Panel */
.diff-viewer-why {
  width: 280px;
  border-left: 1px solid #E2E8F0;
  padding: 20px;
  background: #FAFBFC;
  flex-shrink: 0;
}

.diff-viewer-why h4 {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  margin: 0 0 16px 0;
}

.diff-why-section {
  margin-bottom: 20px;
}

.diff-why-section label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  display: block;
  margin-bottom: 8px;
}

.diff-source-item {
  padding: 10px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.diff-source-doc {
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.diff-source-page {
  font-size: 10px;
  color: #64748B;
}

.diff-source-snippet {
  font-size: 11px;
  color: #475569;
  margin-top: 6px;
  padding: 6px;
  background: #F8FAFC;
  border-radius: 4px;
  font-style: italic;
}

.diff-transform-item {
  padding: 8px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}

.diff-transform-item strong {
  display: block;
  color: #1E293B;
  margin-bottom: 2px;
}

.diff-transform-item p {
  margin: 0;
  color: #64748B;
  font-size: 11px;
}

.diff-confidence {
  font-size: 18px;
  font-weight: 700;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  text-align: center;
}

.diff-confidence.high {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

.diff-confidence.medium {
  color: #D97706;
  border-color: rgba(245, 158, 11, 0.3);
}

.diff-confidence.low {
  color: #DC2626;
  border-color: rgba(239, 68, 68, 0.3);
}

/* Diff Viewer Footer */
.diff-viewer-footer {
  padding: 16px 24px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #fff;
}

/* Settings Tab */
.agent-settings {
  padding: 20px;
}

.agent-settings-section {
  margin-bottom: 24px;
}

.agent-settings-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 12px 0;
}

.agent-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F1F5F9;
}

.agent-settings-row:last-child {
  border-bottom: none;
}

.agent-settings-label {
  font-size: 13px;
  color: #1E293B;
}

.agent-settings-desc {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOCUMENT ANALYSIS ENHANCED DISPLAY STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Key results styling */
.key-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-result-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 12px;
  background: #F8FAFC;
  border-radius: 6px;
}

.key-result-item .finding {
  flex: 1;
  margin-right: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #1E293B;
}

/* Evidence strength tags */
.tag.evidence-strong,
.tag.strong { background: #22C55E; color: white; }
.tag.evidence-moderate,
.tag.moderate { background: #EAB308; color: #1F2937; }
.tag.evidence-weak,
.tag.weak { background: #F97316; color: white; }
.tag.evidence-correlative,
.tag.correlative { background: #8B5CF6; color: white; }
.tag.evidence-speculative,
.tag.speculative { background: #6B7280; color: white; }

/* Other data section - visually distinct */
.analysis-card.other-data {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
}

.analysis-card.other-data h3 {
  color: #64748B;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EPIDEMIOLOGY DATA SOURCES ENHANCEMENT
   ═══════════════════════════════════════════════════════════════════════════ */

/* Source quality indicators in picker */
.epi-source-indicator {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
}

.epi-source-indicator.has-analysis {
  background: #E0F2FE;
  color: #0369A1;
}

.epi-source-indicator.has-results {
  background: #FEF3C7;
  color: #92400E;
}

.epi-source-indicator.not-analyzed {
  background: #FEE2E2;
  color: #991B1B;
}

.epi-source-indicator.has-epi-cols {
  background: #DBEAFE;
  color: #1E40AF;
}

/* Measure quality badges */
.epi-quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  cursor: help;
}

.epi-quality-badge.high {
  background: #DCFCE7;
  color: #166534;
}

.epi-quality-badge.medium {
  background: #FEF3C7;
  color: #92400E;
}

.epi-quality-badge.low {
  background: #F1F5F9;
  color: #64748B;
}

/* Top measure highlight */
.epi-measure-row.top-quality {
  background: rgba(16, 185, 129, 0.05);
}

.epi-top-badge {
  display: inline-flex;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 3px;
  background: #10B981;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
}

/* Extraction summary in source list */
.epi-extraction-summary {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.epi-extraction-summary .measure-count {
  font-size: 10px;
  font-weight: 600;
  color: #166534;
}

.epi-extraction-summary .measure-type {
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #DBEAFE;
  color: #1E40AF;
}

/* ============================================================ */
/* UPLOAD MODAL STYLES                                          */
/* ============================================================ */

.upload-modal {
  width: 560px;
  max-width: 95vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.upload-modal .modal-body {
  overflow-y: auto;
  flex: 1;
}

.upload-batch-apply {
  padding: 12px 16px;
  background: #F8FAFC;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-file-list {
  max-height: 400px;
  overflow-y: auto;
}

.upload-file-item {
  padding: 16px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

.upload-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  color: #3B82F6;
  flex-shrink: 0;
}

.upload-file-name {
  flex: 1;
  font-weight: 500;
  color: #0F172A;
  word-break: break-all;
  font-size: 13px;
}

.upload-file-options {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.upload-file-options label {
  display: flex;
  align-items: center;
}

/* ============================================================ */
/* DOCUMENT CATEGORY BADGE STYLES                               */
/* ============================================================ */

.doc-category-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.doc-category-select {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #fff;
  cursor: pointer;
}

.doc-category-select:hover {
  border-color: #CBD5E1;
}

.doc-category-select:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* ============================================================ */
/* CONFERENCE HUB STYLES                                        */
/* ============================================================ */

/* Events Grid */
.conf-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px;
}

.conf-event-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.conf-event-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

.conf-event-card.active {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.02);
}

/* Priority Indicators */
.conf-priority-high {
  border-left: 3px solid #EF4444;
}

.conf-priority-medium {
  border-left: 3px solid #F59E0B;
}

.conf-priority-low {
  border-left: 3px solid #94A3B8;
}

/* Conference Card Header */
.conf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.conf-card-title {
  font-weight: 600;
  color: #0F172A;
  font-size: 15px;
  margin-bottom: 4px;
}

.conf-card-year {
  font-size: 20px;
  font-weight: 700;
  color: #7C3AED;
}

.conf-card-meta {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 12px;
}

.conf-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* Deadline Badges */
.conf-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #FEF2F2;
  color: #DC2626;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.conf-deadline-badge.soon {
  background: #FEF3C7;
  color: #D97706;
}

.conf-deadline-badge.ok {
  background: #F0FDF4;
  color: #16A34A;
}

.conf-deadline-badge.overdue {
  background: #FEE2E2;
  color: #B91C1C;
}

/* Status Pills */
.conf-status-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Split View Layout */
.conf-split-view {
  display: flex;
  height: calc(100vh - 140px);
  overflow: hidden;
}

.conf-list-panel {
  width: 380px;
  min-width: 320px;
  border-right: 1px solid #E2E8F0;
  background: #F8FAFC;
  overflow-y: auto;
}

.conf-detail-panel {
  flex: 1;
  overflow-y: auto;
  background: #fff;
}

.conf-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #94A3B8;
  text-align: center;
  padding: 40px;
}

.conf-empty-state svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.conf-empty-state h3 {
  font-size: 16px;
  color: #64748B;
  margin-bottom: 8px;
}

.conf-empty-state p {
  font-size: 13px;
}

/* Event List Item */
.conf-event-list-item {
  padding: 16px;
  border-bottom: 1px solid #E2E8F0;
  cursor: pointer;
  transition: background 0.15s;
}

.conf-event-list-item:hover {
  background: rgba(124, 58, 237, 0.04);
}

.conf-event-list-item.selected {
  background: rgba(124, 58, 237, 0.08);
  border-left: 3px solid #7C3AED;
}

/* Event Workspace */
.conf-workspace {
  padding: 24px;
}

.conf-workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.conf-workspace-title {
  font-size: 24px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}

.conf-workspace-subtitle {
  font-size: 14px;
  color: #64748B;
}

.conf-workspace-meta {
  display: flex;
  gap: 24px;
  margin-top: 12px;
}

.conf-workspace-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}

.conf-workspace-meta-item svg {
  color: #94A3B8;
}

/* Workspace Tabs */
.conf-workspace-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
}

.conf-workspace-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.conf-workspace-tab:hover {
  color: #0F172A;
}

.conf-workspace-tab.active {
  background: #fff;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Deadlines Panel */
.conf-deadlines-panel {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.conf-deadlines-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.conf-deadline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #E2E8F0;
}

.conf-deadline-row:last-child {
  border-bottom: none;
}

.conf-deadline-label {
  font-size: 13px;
  color: #475569;
}

.conf-deadline-date {
  font-size: 13px;
  font-weight: 500;
  color: #0F172A;
}

/* Submissions Section */
.conf-submissions-section {
  margin-top: 24px;
}

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

.conf-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
}

.conf-submission-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.conf-submission-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.06);
}

.conf-submission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.conf-submission-title {
  font-weight: 600;
  color: #0F172A;
  font-size: 14px;
  flex: 1;
  margin-right: 12px;
}

.conf-submission-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748B;
  background: #F1F5F9;
  padding: 4px 8px;
  border-radius: 6px;
}

.conf-submission-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #64748B;
}

/* Checklist */
.conf-checklist {
  margin-top: 12px;
}

.conf-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #475569;
}

.conf-checklist-item.done {
  color: #94A3B8;
  text-decoration: line-through;
}

.conf-checklist-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #CBD5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.conf-checklist-checkbox:hover {
  border-color: #7C3AED;
}

.conf-checklist-checkbox.checked {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #fff;
}

/* Progress Bar */
.conf-progress-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 12px;
}

.conf-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #A78BFA);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Review Queue */
.conf-review-list {
  padding: 16px;
}

.conf-review-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.conf-review-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.conf-review-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.conf-review-info {
  flex: 1;
}

.conf-review-title {
  font-weight: 500;
  color: #0F172A;
  font-size: 14px;
  margin-bottom: 2px;
}

.conf-review-meta {
  font-size: 12px;
  color: #64748B;
}

.conf-review-due {
  font-size: 12px;
  font-weight: 500;
}

/* Email Draft */
.conf-email-preview {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.conf-email-header {
  padding: 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.conf-email-subject {
  font-weight: 600;
  color: #0F172A;
  font-size: 15px;
}

.conf-email-recipients {
  font-size: 12px;
  color: #64748B;
  margin-top: 4px;
}

.conf-email-body {
  padding: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
}

.conf-email-actions {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.conf-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(124, 58, 237, 0.08);
  color: #7C3AED;
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
}

.conf-copy-btn:hover {
  background: rgba(124, 58, 237, 0.12);
}

.conf-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #475569;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.conf-export-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.conf-sent-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #475569;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-left: auto;
  transition: all 0.15s;
}

.conf-sent-toggle.sent {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: #16A34A;
}

/* Asset Versioning */
.conf-asset-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.conf-asset-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.conf-asset-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

.conf-asset-info {
  flex: 1;
}

.conf-asset-name {
  font-weight: 600;
  color: #0F172A;
  font-size: 14px;
}

.conf-asset-meta {
  font-size: 12px;
  color: #64748B;
}

.conf-asset-versions {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
}

.conf-versions-title {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.conf-version-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #F8FAFC;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
}

.conf-version-item.current {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.conf-version-badge {
  font-size: 11px;
  font-weight: 600;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Key Messages */
.conf-key-messages {
  margin-top: 12px;
}

.conf-key-messages-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 8px;
}

.conf-key-message-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: #334155;
}

.conf-key-message-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7C3AED;
  margin-top: 6px;
  flex-shrink: 0;
}

/* Template Editor */
.conf-template-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

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

.conf-template-name {
  font-weight: 600;
  color: #0F172A;
  font-size: 16px;
}

.conf-template-field {
  margin-bottom: 16px;
}

.conf-template-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 6px;
  display: block;
}

.conf-template-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #0F172A;
  transition: border-color 0.15s;
}

.conf-template-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.conf-template-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #0F172A;
  min-height: 200px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

.conf-template-textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Placeholder Tags */
.conf-placeholders {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.conf-placeholder-tag {
  font-size: 11px;
  font-weight: 500;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.conf-placeholder-tag:hover {
  background: rgba(124, 58, 237, 0.2);
}

/* Conference Hub Modals */
.conf-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.conf-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conf-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.conf-form-input {
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #0F172A;
  transition: border-color 0.15s;
}

.conf-form-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.conf-form-select {
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #0F172A;
  background: #fff;
  cursor: pointer;
}

.conf-form-select:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.conf-form-row {
  display: flex;
  gap: 16px;
}

.conf-form-row > .conf-form-group {
  flex: 1;
}

/* Abstract Editor */
.conf-abstract-editor {
  margin-top: 16px;
}

.conf-abstract-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.conf-word-count {
  font-size: 12px;
  color: #64748B;
}

.conf-word-count.over-limit {
  color: #DC2626;
  font-weight: 600;
}

.conf-abstract-textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #0F172A;
  resize: vertical;
}

.conf-abstract-textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Discover Tab */
.conf-discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding: 20px;
}

.conf-conference-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.conf-conference-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}

.conf-conference-name {
  font-weight: 600;
  color: #0F172A;
  font-size: 16px;
  margin-bottom: 4px;
}

.conf-conference-organizer {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 12px;
}

.conf-conference-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.conf-tag {
  font-size: 11px;
  font-weight: 500;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.conf-conference-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #3B82F6;
  text-decoration: none;
}

.conf-conference-link:hover {
  text-decoration: underline;
}

/* Upload Area */
.conf-upload-area {
  border: 2px dashed #E2E8F0;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #FAFAFA;
}

.conf-upload-area:hover {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.02);
}

.conf-upload-area.dragging {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.05);
}

.conf-upload-icon {
  color: #94A3B8;
  margin-bottom: 12px;
}

.conf-upload-text {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 4px;
}

.conf-upload-hint {
  font-size: 12px;
  color: #94A3B8;
}

/* Comments Section */
.conf-comments {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

.conf-comments-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 12px;
}

.conf-comment {
  padding: 12px;
  background: #F8FAFC;
  border-radius: 8px;
  margin-bottom: 8px;
}

.conf-comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.conf-comment-author {
  font-weight: 600;
  font-size: 13px;
  color: #0F172A;
}

.conf-comment-date {
  font-size: 11px;
  color: #94A3B8;
}

.conf-comment-body {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.conf-add-comment {
  margin-top: 12px;
}

.conf-comment-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  resize: none;
  min-height: 80px;
}

.conf-comment-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Action Buttons */
.conf-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.conf-action-btn.primary {
  background: #7C3AED;
  color: #fff;
}

.conf-action-btn.primary:hover {
  background: #6D28D9;
}

.conf-action-btn.secondary {
  background: #F1F5F9;
  color: #475569;
}

.conf-action-btn.secondary:hover {
  background: #E2E8F0;
}

.conf-action-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.conf-action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Stats Row */
.conf-stats-row {
  display: flex;
  gap: 24px;
  padding: 16px;
  background: #F8FAFC;
  border-radius: 10px;
  margin-bottom: 20px;
}

.conf-stat-item {
  text-align: center;
}

.conf-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #0F172A;
}

.conf-stat-label {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

/* Filter Bar */
.conf-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.conf-filter-select {
  padding: 6px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

.conf-filter-select:focus {
  outline: none;
  border-color: #7C3AED;
}

.conf-search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
}

.conf-search-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Reference Area Editor Cards */
.reference-area-card {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  background: #F8FAFC;
}

.reference-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
  font-weight: 600;
  font-size: 12px;
  color: #475569;
}

.btn-icon-sm {
  padding: 4px;
  border: none;
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-sm:hover {
  background: #FEE2E2;
  color: #EF4444;
}

/* Text Annotation Editor Cards */
.text-annotation-card {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  background: #F8FAFC;
}

.text-annotation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E2E8F0;
  font-weight: 600;
  font-size: 12px;
  color: #475569;
}

.text-annotation-textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  color: #1E293B;
}

.text-annotation-textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Line styling subsection label */
.editor-subsection-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-top: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #F1F5F9;
}

/* Draggable text annotations */
.text-annotation-draggable {
  outline: 2px dashed #7C3AED;
  outline-offset: 2px;
  cursor: grab;
}

.text-annotation-draggable:hover {
  outline-color: #5B21B6;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3) !important;
}

.text-annotation-draggable:active {
  outline-style: solid;
  opacity: 0.8;
  cursor: grabbing;
}

.drag-hint {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #7C3AED;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.8;
}

.drag-position-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #F0EAFF;
  border-radius: 6px;
  font-size: 12px;
  color: #5B21B6;
}

.drag-icon {
  font-size: 16px;
}

.position-coordinates {
  font-size: 11px;
  color: #64748B;
  margin-top: 4px;
  font-family: monospace;
}

/* Inline annotation editor */
.inline-annotation-editor {
  display: block;
  width: 100%;
  min-width: 120px;
}

.inline-annotation-editor:focus {
  outline: none;
}

/* Inline editable chart elements */
.inline-editable-field {
  cursor: pointer;
  transition: all 0.15s ease;
}

.inline-editable-field:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: #7C3AED !important;
}

.inline-chart-editor {
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.inline-chart-editor:focus {
  outline: none;
}

/* Chart container double-click hint */
.chart-container-with-annotations {
  cursor: default;
}

.chart-container-with-annotations:not(:has(.text-annotation-draggable:hover))::after {
  content: '';
  pointer-events: none;
}

/* Quick Edit Bar for Axis Labels */
.chart-quick-edit-bar {
  display: flex;
  gap: 16px;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 8px;
}

.chart-quick-edit-bar .quick-edit-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-quick-edit-bar label {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  white-space: nowrap;
}

.chart-quick-edit-bar input {
  padding: 6px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  width: 150px;
  transition: border-color 0.15s ease;
}

.chart-quick-edit-bar input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Legend Quick Edit Bar */
.chart-legend-edit-bar {
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 8px;
}

.chart-legend-edit-bar > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 8px;
}

.legend-edit-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-edit-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
}

.legend-original-name {
  font-size: 12px;
  color: #64748B;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-arrow {
  color: #CBD5E1;
  font-size: 12px;
}

.legend-edit-item input {
  padding: 4px 8px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-size: 12px;
  width: 100px;
}

.legend-edit-item input:focus {
  outline: none;
  border-color: #7C3AED;
}

.legend-edit-item input::placeholder {
  color: #CBD5E1;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* VISUALIZATION TEMPLATE GALLERY                                               */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Mode Toggle */
.viz-mode-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  background: #F1F5F9;
  border-radius: 8px;
}

.viz-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #64748B;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.viz-mode-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #334155;
}

.viz-mode-btn.active {
  background: white;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.template-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  background: #7C3AED;
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
}

/* Template Gallery Section */
.template-gallery-section {
  padding: 8px 0;
}

/* Template Search */
.template-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  margin-bottom: 12px;
}

.template-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #334155;
  outline: none;
}

.template-search input::placeholder {
  color: #94A3B8;
}

.template-search svg {
  color: #94A3B8;
}

/* Category Chips */
.template-category-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.category-chip {
  padding: 5px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  background: white;
  color: #64748B;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.category-chip:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.category-chip.active {
  background: var(--chip-color, #7C3AED);
  border-color: var(--chip-color, #7C3AED);
  color: white;
}

/* Template Grid */
.template-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

/* Template Card */
.template-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  border-color: #7C3AED;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.template-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-left: 10px;
  border-left: 3px solid #7C3AED;
}

.template-name {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
}

.template-category-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: white;
  text-transform: capitalize;
}

.template-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
  margin-bottom: 8px;
}

/* Template Tags */
.template-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.template-tag {
  padding: 2px 6px;
  background: #F1F5F9;
  border-radius: 4px;
  font-size: 10px;
  color: #64748B;
}

/* Binding Step */
.template-bind-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.template-bind-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  background: #F1F5F9;
  border-radius: 4px;
  color: #64748B;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn:hover {
  background: #E2E8F0;
  color: #334155;
}

/* Binding Section */
.binding-section {
  margin: 12px 0;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 8px;
}

.binding-section h5 {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 4px 0;
}

.binding-hint {
  font-size: 11px;
  color: #64748B;
  margin: 0 0 10px 0;
}

.binding-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #E2E8F0;
}

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

.binding-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  color: #334155;
}

.required-badge {
  padding: 1px 4px;
  background: #FEF2F2;
  color: #DC2626;
  font-size: 9px;
  font-weight: 500;
  border-radius: 3px;
}

.binding-select {
  width: 140px;
  padding: 5px 8px;
  font-size: 12px;
}

.confidence-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.confidence-badge.high {
  background: #DCFCE7;
  color: #166534;
}

.confidence-badge.medium {
  background: #FEF9C3;
  color: #854D0E;
}

.confidence-badge.low {
  background: #FEE2E2;
  color: #991B1B;
}

.binding-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #F1F5F9;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 12px;
  color: #64748B;
}

/* Template Controls */
.template-controls {
  margin: 12px 0;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 8px;
}

.template-controls h5 {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin: 0 0 10px 0;
}

.control-row {
  margin-bottom: 10px;
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.control-checkbox input {
  width: 14px;
  height: 14px;
  accent-color: #7C3AED;
}

.control-select,
.control-number {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.control-select label,
.control-number label {
  font-size: 11px;
  color: #64748B;
}

.control-select select,
.control-number input {
  padding: 6px 8px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-size: 12px;
}

/* Template Actions */
.template-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.template-actions .btn {
  flex: 1;
}

/* =====================================================
   DECK/PRESENTATION EDITOR
   ===================================================== */

/* Decks Panel */
.conf-decks-panel {
  padding: 0;
}

.conf-decks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.conf-deck-item {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.conf-deck-item:hover {
  border-color: #7C3AED;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.conf-deck-info {
  flex: 1;
}

.conf-deck-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Deck Editor Overlay */
.deck-editor-overlay {
  position: fixed;
  inset: 0;
  background: #F8FAFC;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

/* Deck Editor Container */
.deck-editor {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.deck-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
}

.deck-editor-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Slides List (Left Panel) */
.deck-editor-slides {
  width: 180px;
  min-width: 180px;
  background: #fff;
  border-right: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
}

.deck-slides-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deck-slide-thumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #F8FAFC;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.deck-slide-thumb:hover {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

.deck-slide-thumb.active {
  background: rgba(124, 58, 237, 0.08);
  border-color: #7C3AED;
}

.deck-slide-num {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E2E8F0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
}

.deck-slide-thumb.active .deck-slide-num {
  background: #7C3AED;
  color: #fff;
}

.deck-slide-preview {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.deck-thumb-block {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E2E8F0;
  border-radius: 3px;
  color: #64748B;
}

.deck-slide-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.deck-slide-thumb:hover .deck-slide-actions {
  opacity: 1;
}

/* Canvas (Center) */
.deck-editor-canvas {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #E2E8F0;
  padding: 20px;
  overflow: auto;
}

.slide-canvas {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.slide-canvas-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: calc(100% / 12) calc(100% / 9);
  pointer-events: none;
}

/* Slide Blocks */
.slide-block {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.slide-block:hover {
  border-color: #94A3B8 !important;
}

.slide-block.selected {
  border-color: #7C3AED !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Canvas Toolbar */
.deck-canvas-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-top: 16px;
  background: #fff;
  border-radius: 8px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* Insert Sidebar (Right) */
.deck-editor-sidebar {
  width: 260px;
  min-width: 260px;
  background: #fff;
  border-left: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
}

.deck-sidebar-tabs {
  display: flex;
  border-bottom: 1px solid #E2E8F0;
}

.deck-sidebar-tabs button {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.deck-sidebar-tabs button:hover {
  background: #F8FAFC;
  color: #7C3AED;
}

.deck-sidebar-tabs button.active {
  background: rgba(124, 58, 237, 0.08);
  color: #7C3AED;
  border-bottom: 2px solid #7C3AED;
}

.deck-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* Insert Assets List */
.insert-assets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insert-asset-item {
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.insert-asset-item:hover {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.04);
}

/* Responsive */
@media (max-width: 1200px) {
  .deck-editor-slides {
    width: 150px;
    min-width: 150px;
  }

  .deck-editor-sidebar {
    width: 220px;
    min-width: 220px;
  }
}

/* =============================================================================
   V2 CANVAS-BASED SLIDE EDITOR
   ============================================================================= */

/* V2 Editor Container */
.deck-editor-v2 {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #F8FAFC;
}

/* Main Toolbar */
.deck-main-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s;
}

.toolbar-btn:hover {
  background: #F1F5F9;
  color: #7C3AED;
}

.toolbar-btn:active {
  background: #E2E8F0;
}

.toolbar-btn.active {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
}

/* Canvas Area */
.deck-canvas-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #E2E8F0;
  overflow: hidden;
}

.deck-canvas-viewport {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* V2 Slide Canvas */
.slide-canvas-v2 {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  position: relative;
  flex-shrink: 0;
  cursor: crosshair;
}

.slide-canvas-v2 .slide-canvas-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 5% 5%;
  pointer-events: none;
  opacity: 0.5;
}

/* V2 Slide Objects */
.slide-object {
  position: absolute;
  box-sizing: border-box;
  user-select: none;
}

.slide-object:hover {
  outline: 1px solid rgba(59, 130, 246, 0.5);
}

.slide-object.selected {
  outline: 2px solid #3B82F6;
  outline-offset: -1px;
}

.slide-object.locked {
  opacity: 0.7;
}

/* Selection Handles */
.select-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #3B82F6;
  border-radius: 2px;
  z-index: 10;
}

.select-handle.nw { top: -5px; left: -5px; cursor: nw-resize; }
.select-handle.n { top: -5px; left: 50%; transform: translateX(-50%); cursor: n-resize; }
.select-handle.ne { top: -5px; right: -5px; cursor: ne-resize; }
.select-handle.e { top: 50%; right: -5px; transform: translateY(-50%); cursor: e-resize; }
.select-handle.se { bottom: -5px; right: -5px; cursor: se-resize; }
.select-handle.s { bottom: -5px; left: 50%; transform: translateX(-50%); cursor: s-resize; }
.select-handle.sw { bottom: -5px; left: -5px; cursor: sw-resize; }
.select-handle.w { top: 50%; left: -5px; transform: translateY(-50%); cursor: w-resize; }

/* Rotation Handle */
.rotate-handle {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #fff;
  border: 2px solid #3B82F6;
  border-radius: 50%;
  cursor: grab;
  z-index: 10;
}

.rotate-handle::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 14px;
  background: #3B82F6;
  transform: translateX(-50%);
}

/* Marquee Selection */
.marquee-selection {
  position: absolute;
  background: rgba(59, 130, 246, 0.1);
  border: 1px dashed #3B82F6;
  pointer-events: none;
  z-index: 100;
}

/* Inspector Panel */
.deck-inspector-panel {
  width: 280px;
  min-width: 280px;
  background: #fff;
  border-left: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
}

.deck-inspector-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* Insert Panel */
.insert-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insert-section h5 {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.insert-section .insert-asset-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 12px;
}

.insert-section .insert-asset-item svg {
  color: #94A3B8;
  flex-shrink: 0;
}

/* Style Panel */
.style-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.style-section {
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.style-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.style-section h5 {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.style-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.style-row:last-child {
  margin-bottom: 0;
}

.style-row label {
  font-size: 11px;
  color: #64748B;
  min-width: 24px;
}

.style-row input[type="number"] {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  font-size: 12px;
}

.style-row input[type="color"] {
  width: 32px;
  height: 24px;
  padding: 0;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  cursor: pointer;
}

.style-row input[type="number"]:focus,
.style-row input[type="color"]:focus {
  outline: none;
  border-color: #7C3AED;
}

/* Color Swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: transform 0.1s;
}

.color-swatch:hover {
  transform: scale(1.15);
}

.color-swatch.active {
  outline: 2px solid #3B82F6;
  outline-offset: 1px;
}

/* V2 Responsive adjustments */
@media (max-width: 1400px) {
  .deck-inspector-panel {
    width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 1100px) {
  .deck-inspector-panel {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD TWIN ROW - CI ALERTS & WEEKLY BRIEF COMPACT CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.dashboard-twin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

/* Compact Card Base */
.dashboard-card.ci-alerts-compact,
.dashboard-card.weekly-brief-compact {
  min-height: 200px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.dashboard-card.ci-alerts-compact {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFF 100%);
}

.dashboard-card.weekly-brief-compact {
  background: linear-gradient(135deg, #F0FDF4 0%, #FFF 100%);
}

/* Card Header */
.dashboard-card.ci-alerts-compact .card-header,
.dashboard-card.weekly-brief-compact .card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  border-bottom: 1px solid #E2E8F0;
  background: rgba(255, 255, 255, 0.6);
}

.alert-count-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: #EF4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
}

/* Compact Empty State */
.compact-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #64748B;
  font-size: 12px;
  padding: 20px;
}

.compact-empty p {
  margin: 0;
}

/* Compact Alerts List */
.compact-alerts-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.compact-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  border: 1px solid #FEE2E2;
  transition: all 0.15s;
}

.compact-alert-item:last-child {
  margin-bottom: 0;
}

.compact-alert-item:hover {
  background: #FEF2F2;
  border-color: #FECACA;
}

.compact-alert-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-alert-company {
  font-weight: 600;
  font-size: 12px;
  color: #0F172A;
}

.compact-alert-type {
  font-size: 10px;
  color: #64748B;
  padding: 2px 6px;
  background: #F1F5F9;
  border-radius: 4px;
}

.compact-alert-count {
  font-size: 11px;
  font-weight: 700;
  color: #DC2626;
  padding: 2px 8px;
  background: #FEE2E2;
  border-radius: 6px;
}

/* Compact View Button */
.compact-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-top: 1px solid #E2E8F0;
  font-size: 11px;
  font-weight: 600;
  color: #6366F1;
  cursor: pointer;
  transition: background 0.15s;
}

.compact-view-btn:hover {
  background: rgba(99, 102, 241, 0.1);
}

/* Weekly Brief Compact Styles */
.compact-brief-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.compact-brief-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
  color: #64748B;
}

.compact-brief-empty p {
  font-size: 11px;
  margin: 0;
}

.compact-brief-summary {
  font-size: 12px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 12px;
}

.compact-brief-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-brief-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 11px;
  color: #475569;
}

.compact-brief-stat strong {
  color: #0F172A;
}

.compact-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
}

.compact-generate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.compact-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive for smaller screens */
@media (max-width: 900px) {
  .dashboard-twin-row {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COPILOT COMPETITOR SUMMARY CARD (Answer-First)
   ═══════════════════════════════════════════════════════════════════════════ */

.copilot-competitor-summary {
  background: linear-gradient(135deg, #F8FAFC 0%, #FFF 100%);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin: 8px 0;
}

.copilot-competitor-summary.not-found,
.copilot-competitor-summary.no-data {
  background: linear-gradient(135deg, #FEF3C7 0%, #FFF 100%);
  border-color: #FDE68A;
}

.copilot-competitor-summary .summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E2E8F0;
}

.copilot-competitor-summary .company-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copilot-competitor-summary .company-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
}

.copilot-competitor-summary .ticker {
  font-size: 11px;
  color: #64748B;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
}

.copilot-competitor-summary .freshness-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copilot-competitor-summary .freshness-badge.fresh {
  background: #D1FAE5;
  color: #065F46;
}

.copilot-competitor-summary .freshness-badge.recent {
  background: #DBEAFE;
  color: #1E40AF;
}

.copilot-competitor-summary .freshness-badge.stale {
  background: #FEF3C7;
  color: #92400E;
}

.copilot-competitor-summary .freshness-badge.unknown {
  background: #F1F5F9;
  color: #64748B;
}

.copilot-competitor-summary .freshness-badge .days {
  opacity: 0.7;
}

.copilot-competitor-summary .summary-section {
  margin-bottom: 12px;
}

.copilot-competitor-summary .summary-section h4 {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copilot-competitor-summary .summary-section ul {
  margin: 0;
  padding-left: 16px;
}

.copilot-competitor-summary .summary-section li {
  font-size: 13px;
  color: #374151;
  margin-bottom: 4px;
  line-height: 1.4;
}

.copilot-competitor-summary .summary-section p {
  font-size: 13px;
  color: #374151;
  margin: 0;
  line-height: 1.4;
}

.copilot-competitor-summary .summary-section.alerts li {
  color: #B45309;
}

.copilot-competitor-summary .summary-section.alerts h4 {
  color: #D97706;
}

.copilot-competitor-summary .summary-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #94A3B8;
  padding-top: 10px;
  border-top: 1px solid #E2E8F0;
  margin-top: 8px;
}

.copilot-competitor-summary .sources {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copilot-competitor-summary .not-found-message,
.copilot-competitor-summary .no-data-message {
  font-size: 13px;
  color: #64748B;
  margin: 8px 0;
  line-height: 1.4;
}

.copilot-competitor-summary .summary-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
}

.copilot-competitor-summary .summary-action-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.copilot-competitor-summary .summary-action-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

/* Receipt view styling for competitor summary */
.copilot-receipt.competitor-summary-receipt {
  padding: 0;
  border: 1px solid rgba(124, 58, 237, 0.3);
  overflow: visible;
}

.copilot-receipt.competitor-summary-receipt .receipt-header {
  padding: 12px 16px;
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
  border-radius: 12px 12px 0 0;
}

.copilot-receipt.competitor-summary-receipt .receipt-header svg:first-child {
  color: #7C3AED;
}

.copilot-receipt.competitor-summary-receipt .copilot-competitor-summary {
  border: none;
  border-radius: 0 0 12px 12px;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   KOL TIER BADGES & ADVISORY COMMITTEES
   ══════════════════════════════════════════════════════════════ */

/* KOL Tier Badges */
.kol-tier-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.kol-tier-badge.tier1 { background: #EDE9FE; color: #7C3AED; }
.kol-tier-badge.tier2 { background: #DBEAFE; color: #2563EB; }
.kol-tier-badge.tier3 { background: #D1FAE5; color: #059669; }

/* KOL Classification Section in Profile */
.kol-classification-section {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 10px;
  border: 1px solid #E2E8F0;
}
.kol-classification-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kol-fields {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px 14px;
  align-items: center;
}
.kol-fields label {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}
.kol-fields input,
.kol-fields select {
  padding: 7px 10px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kol-fields input:focus,
.kol-fields select:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.kol-fields input[type="number"] {
  width: 100%;
}

/* Advisory Committees View */
.advisory-committees-view {
  padding: 20px;
  height: 100%;
  overflow-y: auto;
}

/* Create Committee Form */
.create-committee-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  flex-wrap: wrap;
}
.create-committee-form input,
.create-committee-form select,
.create-committee-form textarea {
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  background: white;
}
.create-committee-form input { flex: 1; min-width: 180px; }
.create-committee-form select { min-width: 160px; }
.create-committee-form textarea {
  flex: 100%;
  min-height: 60px;
  resize: vertical;
}
.create-committee-form button {
  white-space: nowrap;
}

/* Committees Grid */
.committees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* Committee Card */
.committee-card {
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.committee-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #CBD5E1;
}
.committee-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 8px;
}
.committee-header h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #1E293B;
  flex: 1;
}
.committee-actions {
  display: flex;
  gap: 4px;
}
.committee-actions button {
  padding: 4px;
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.committee-actions button:hover {
  color: #EF4444;
  background: #FEE2E2;
}

/* Committee Type Badge */
.committee-type {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.committee-type.scientific { background: #DBEAFE; color: #1E40AF; }
.committee-type.clinical { background: #D1FAE5; color: #065F46; }
.committee-type.commercial { background: #FEF3C7; color: #92400E; }
.committee-type.patient { background: #FCE7F3; color: #9D174D; }

/* Committee Status Badge */
.committee-status {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  text-transform: uppercase;
}
.committee-status.active { background: #D1FAE5; color: #065F46; }
.committee-status.forming { background: #FEF3C7; color: #92400E; }
.committee-status.inactive { background: #F1F5F9; color: #64748B; }

.committee-purpose {
  font-size: 13px;
  color: #64748B;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* Committee Members Section */
.committee-members,
.committee-meetings {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
}
.committee-members h4,
.committee-meetings h4 {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.member-count {
  background: #F1F5F9;
  color: #64748B;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Member Row */
.member-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #F8FAFC;
}
.member-row:last-of-type {
  border-bottom: none;
}
.member-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.member-name {
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
}
.member-role {
  font-size: 11px;
  color: #64748B;
}
.member-actions button {
  padding: 4px;
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  border-radius: 4px;
}
.member-actions button:hover {
  color: #EF4444;
  background: #FEE2E2;
}

/* Add Member Button */
.add-member-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
  background: transparent;
  color: #64748B;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}
.add-member-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.05);
}

/* Add Member Modal */
.add-member-modal-overlay {
  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;
}
.add-member-modal {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 400px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}
.add-member-modal h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #1E293B;
}
.add-member-modal label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  margin-bottom: 6px;
}
.add-member-modal select,
.add-member-modal input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
}
.add-member-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Empty State for Committees */
.no-committees {
  text-align: center;
  padding: 60px 20px;
  color: #64748B;
}
.no-committees svg {
  margin-bottom: 12px;
  opacity: 0.5;
}
.no-committees p {
  margin: 0;
  font-size: 14px;
}

/* Meeting Row */
.meeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #F8FAFC;
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 12px;
}
.meeting-date {
  font-weight: 500;
  color: #1E293B;
}
.meeting-type {
  color: #64748B;
}
.schedule-meeting-btn {
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 11px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD V2 STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Dashboard V2 Container */
.dashboard-v2 {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 1600px;
  margin: 0 auto;
  /* Ensure scrolling works with parent */
  min-height: min-content;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Dashboard Header with Global Search
   ───────────────────────────────────────────────────────────────────────────── */
.dashboard-v2-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dashboard-v2-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-v2-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.dashboard-v2-title .version-badge {
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(124, 58, 237, 0.05) 100%);
  color: #7C3AED;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* Global Search Bar */
.dashboard-v2-search {
  position: relative;
  flex: 1;
  max-width: 500px;
  margin: 0 40px;
}

.dashboard-v2-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  font-size: 14px;
  color: #1E293B;
  transition: all 0.2s ease;
}

.dashboard-v2-search-input:focus {
  outline: none;
  border-color: #7C3AED;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.dashboard-v2-search-input::placeholder {
  color: #94A3B8;
}

.dashboard-v2-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  width: 18px;
  height: 18px;
}

.dashboard-v2-search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  background: #E2E8F0;
  border-radius: 4px;
  font-size: 11px;
  color: #64748B;
  font-family: monospace;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Search Results Modal
   ───────────────────────────────────────────────────────────────────────────── */
.search-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal {
  width: 90%;
  max-width: 700px;
  max-height: 70vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.search-modal-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}

.search-modal-input:focus {
  outline: none;
  border-color: #7C3AED;
}

.search-modal-close {
  padding: 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #64748B;
  transition: all 0.2s;
}

.search-modal-close:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.search-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #fff;
}

.search-modal-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
}

.search-modal-tab:hover {
  background: #F1F5F9;
  color: #1E293B;
}

.search-modal-tab.active {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
  font-weight: 600;
}

.search-modal-results {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.search-results-category {
  margin-bottom: 20px;
}

.search-results-category-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  margin-bottom: 10px;
}

.search-results-category-count {
  padding: 2px 6px;
  background: #E2E8F0;
  border-radius: 10px;
  font-size: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #F8FAFC;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result-item:hover {
  background: #EEF2FF;
  transform: translateX(4px);
}

.search-result-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

.search-result-actions {
  display: flex;
  gap: 6px;
}

.search-result-action {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 11px;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result-action:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.search-result-action.primary {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  border: none;
}

.search-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #64748B;
}

.search-no-results svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Morning Brief Card
   ───────────────────────────────────────────────────────────────────────────── */
.morning-brief-card {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.25);
  height: 100%;
  max-height: 440px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.morning-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.morning-brief-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.morning-brief-title h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.morning-brief-title .brief-date {
  font-size: 13px;
  opacity: 0.8;
  font-weight: 400;
}

.morning-brief-actions {
  display: flex;
  gap: 8px;
}

.morning-brief-btn {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.morning-brief-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.morning-brief-btn.generating {
  opacity: 0.7;
  cursor: wait;
}

.morning-brief-headline {
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.95;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border-left: 3px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.morning-brief-signals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 4px;
}

.morning-brief-signals::-webkit-scrollbar {
  width: 4px;
}

.morning-brief-signals::-webkit-scrollbar-track {
  background: transparent;
}

.morning-brief-signals::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.morning-brief-signals::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

.brief-signal {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s;
  cursor: pointer;
}

.brief-signal:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.brief-signal:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.2);
}

.brief-signal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.brief-signal-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.brief-signal-icon.competitor { background: rgba(239, 68, 68, 0.3); }
.brief-signal-icon.science { background: rgba(139, 92, 246, 0.3); }
.brief-signal-icon.opportunity { background: rgba(16, 185, 129, 0.3); }

.brief-signal-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

.brief-signal-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.brief-signal-summary {
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.brief-signal-confidence {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.7;
}

.brief-signal-action {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  font-size: 11px;
  font-style: italic;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.morning-brief-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brief-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.brief-stat-value {
  font-size: 24px;
  font-weight: 700;
}

.brief-stat-label {
  font-size: 11px;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.morning-brief-empty {
  text-align: center;
  padding: 40px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.morning-brief-empty p {
  margin-bottom: 16px;
  opacity: 0.9;
}

/* Brief Signal Detail Modal */
.brief-signal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: briefModalFadeIn 0.2s ease;
}

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

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

.brief-signal-modal {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: briefModalSlideIn 0.25s ease;
  color: #fff;
}

.brief-signal-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brief-signal-modal-title-row {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.brief-signal-modal-title-row h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  word-wrap: break-word;
}

.brief-signal-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  margin-left: 12px;
  transition: all 0.15s;
}

.brief-signal-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.brief-signal-modal-body {
  padding: 20px 24px;
}

.brief-signal-modal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.brief-signal-modal-badge.competitor {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.brief-signal-modal-badge.science {
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
}

.brief-signal-modal-badge.opportunity {
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.brief-signal-modal-detail {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.92;
  margin: 0 0 14px 0;
}

.brief-signal-modal-action {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 10px;
}

.brief-signal-modal-action strong {
  opacity: 0.8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 4px;
}

.brief-signal-modal-confidence {
  font-size: 12px;
  opacity: 0.6;
}

.brief-signal-modal-actions {
  display: flex;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.brief-signal-modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.brief-signal-modal-btn.import-btn {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.brief-signal-modal-btn.import-btn:hover {
  background: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.brief-signal-modal-btn.source-btn {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
  color: #93c5fd;
}

.brief-signal-modal-btn.source-btn:hover {
  background: rgba(96, 165, 250, 0.35);
  transform: translateY(-1px);
}

.brief-signal-modal-btn.source-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.brief-signal-modal-btn.source-btn.disabled:hover {
  background: rgba(96, 165, 250, 0.2);
  transform: none;
}

.brief-signal-modal-btn.navigate-btn {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c4b5fd;
}

.brief-signal-modal-btn.navigate-btn:hover {
  background: rgba(168, 85, 247, 0.35);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Decision Radar Section
   ───────────────────────────────────────────────────────────────────────────── */
.decision-radar-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.decision-radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.decision-radar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
}

.decision-radar-title svg {
  color: #7C3AED;
}

.decision-radar-toggle {
  padding: 6px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: all 0.2s;
}

.decision-radar-toggle:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.decision-radar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px;
}

.decision-card {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #E2E8F0;
  transition: all 0.2s;
  cursor: pointer;
}

.decision-card:hover {
  border-color: var(--card-color, #7C3AED);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.decision-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.decision-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #fff;
}

.decision-card-icon.indication { background: #8B5CF6; }
.decision-card-icon.investigator { background: #3B82F6; }
.decision-card-icon.competitive { background: #F59E0B; }
.decision-card-icon.biomarker { background: #10B981; }

.decision-card-label {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
}

.decision-card-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.decision-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748B;
}

.decision-stat-value {
  font-weight: 600;
  color: #1E293B;
}

.decision-card-desc {
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}

.decision-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
}

.decision-card-action-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.decision-card-action-btn:hover {
  background: currentColor;
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Intelligence Feed
   ───────────────────────────────────────────────────────────────────────────── */
.intelligence-feed {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.intelligence-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.intelligence-feed-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
}

.intelligence-feed-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-sort-select {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 12px;
  color: #1E293B;
  cursor: pointer;
}

.feed-refresh-btn {
  padding: 8px 12px;
  background: rgba(124, 58, 237, 0.1);
  border: none;
  border-radius: 8px;
  color: #7C3AED;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.feed-refresh-btn:hover {
  background: rgba(124, 58, 237, 0.15);
}

.intelligence-feed-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.feed-item {
  background: #F8FAFC;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #E2E8F0;
  transition: all 0.2s;
}

.feed-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.feed-item-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.feed-item-relevance {
  min-width: 48px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.feed-item-relevance.high {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.feed-item-relevance.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #D97706;
}

.feed-item-relevance.low {
  background: rgba(148, 163, 184, 0.2);
  color: #64748B;
}

.feed-item-content {
  flex: 1;
  min-width: 0;
}

.feed-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-item-meta {
  font-size: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-item-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.feed-tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-tag.kol { background: rgba(59, 130, 246, 0.1); color: #2563EB; }
.feed-tag.competitor { background: rgba(245, 158, 11, 0.1); color: #D97706; }
.feed-tag.indication { background: rgba(16, 185, 129, 0.1); color: #059669; }
.feed-tag.technology { background: rgba(139, 92, 246, 0.1); color: #7C3AED; }
.feed-tag.phase { background: rgba(236, 72, 153, 0.1); color: #DB2777; }
.feed-tag.citation { background: rgba(99, 102, 241, 0.1); color: #4F46E5; }

.feed-item-insight {
  margin-top: 12px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(124, 58, 237, 0.02) 100%);
  border-radius: 8px;
  border-left: 3px solid #7C3AED;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.feed-item-insight svg {
  flex-shrink: 0;
  color: #7C3AED;
  margin-top: 2px;
}

.feed-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
}

.feed-action-btn {
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 11px;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.feed-action-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.feed-action-btn.primary {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  border: none;
  color: #fff;
}

.feed-action-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   Landscape Map Section
   ───────────────────────────────────────────────────────────────────────────── */
.landscape-map-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.landscape-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  transition: all 0.2s;
}

.landscape-map-header:hover {
  background: #F1F5F9;
}

.landscape-map-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
}

.landscape-map-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landscape-filter-btn {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 11px;
  color: #64748B;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.landscape-filter-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.landscape-filter-btn.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: #7C3AED;
  color: #7C3AED;
}

.landscape-expand-icon {
  transition: transform 0.2s;
}

.landscape-expand-icon.expanded {
  transform: rotate(180deg);
}

.landscape-map-container {
  height: 400px;
  position: relative;
  overflow: hidden;
}

.landscape-map-container.collapsed {
  height: 0;
}

.landscape-map-svg {
  width: 100%;
  height: 100%;
}

.landscape-node {
  cursor: pointer;
  transition: all 0.2s;
}

.landscape-node:hover {
  filter: brightness(1.1);
}

.landscape-node.selected {
  stroke: #1E293B;
  stroke-width: 3;
}

.landscape-node-label {
  font-size: 10px;
  fill: #475569;
  pointer-events: none;
  text-anchor: middle;
}

.landscape-link {
  stroke: #CBD5E1;
  stroke-width: 1;
  fill: none;
  opacity: 0.6;
}

.landscape-link.highlighted {
  stroke: #7C3AED;
  stroke-width: 2;
  opacity: 1;
}

.landscape-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 16px;
}

.landscape-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748B;
}

.landscape-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.landscape-legend-dot.kols { background: #3B82F6; }
.landscape-legend-dot.competitors { background: #F59E0B; }
.landscape-legend-dot.technologies { background: #8B5CF6; }
.landscape-legend-dot.indications { background: #10B981; }

.landscape-tooltip {
  position: absolute;
  background: #1E293B;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 100;
  max-width: 250px;
}

.landscape-tooltip-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.landscape-tooltip-type {
  font-size: 10px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.landscape-zoom-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.landscape-zoom-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #64748B;
  transition: all 0.2s;
}

.landscape-zoom-btn:hover {
  background: #F1F5F9;
  color: #1E293B;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Dashboard V2 Utility Classes
   ───────────────────────────────────────────────────────────────────────────── */
.dashboard-v2-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: #64748B;
}

.dashboard-v2-loading .spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #E2E8F0;
  border-top-color: #7C3AED;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.dashboard-v2-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748B;
}

.dashboard-v2-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.dashboard-v2-empty h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.dashboard-v2-empty p {
  font-size: 13px;
  max-width: 300px;
  margin: 0 auto;
}

/* Quick Actions and Recent Activity (extracted) */
.dashboard-v2-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-v2-row.three-col {
  grid-template-columns: 1fr 1fr 260px;
}

/* CI Alerts Compact */
.ci-alerts-compact {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  padding: 16px;
}

.ci-alerts-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ci-alerts-compact-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
}

.ci-alerts-badge {
  padding: 2px 8px;
  background: #FEE2E2;
  color: #DC2626;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.ci-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
}

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

.ci-alert-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FEF2F2;
  border-radius: 6px;
  color: #DC2626;
}

.ci-alert-content {
  flex: 1;
}

.ci-alert-company {
  font-size: 12px;
  font-weight: 500;
  color: #1E293B;
}

.ci-alert-message {
  font-size: 11px;
  color: #64748B;
}

/* CI Alert Card - Expanded Summary Display */
.ci-alert-card {
  background: #FEFEFE;
  border: 1px solid #FEE2E2;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ci-alert-card:hover {
  border-color: #FECACA;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.ci-alert-card:last-child {
  margin-bottom: 0;
}

.ci-alert-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ci-alert-card-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FEF2F2;
  border-radius: 6px;
  color: #DC2626;
  flex-shrink: 0;
}

.ci-alert-card-ticker {
  font-size: 12px;
  font-weight: 600;
  color: #1E293B;
}

.ci-alert-category-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ci-alert-card-message {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
  margin-bottom: 6px;
}

.ci-alert-card-quote {
  font-size: 11px;
  color: #6B7280;
  font-style: italic;
  line-height: 1.4;
  padding: 8px;
  background: #F9FAFB;
  border-radius: 6px;
  border-left: 2px solid #DC2626;
  margin-bottom: 8px;
}

.ci-alert-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ci-alert-card-date {
  font-size: 10px;
  color: #9CA3AF;
}

.ci-alert-card-footer svg {
  color: #9CA3AF;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CI Revamp — Phase Dots, Indication Chips, Swim Lanes, Drug Matrix
   ───────────────────────────────────────────────────────────────────────────── */

/* Phase dot indicators */
.ci-phase-dots { display: inline-flex; gap: 3px; align-items: center; vertical-align: middle; }
.ci-phase-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ci-phase-dot.empty { background: #E2E8F0; }

/* Indication chips */
.ci-indication-chip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 600; white-space: nowrap; margin: 1px 2px; letter-spacing: 0.2px; }

/* Drug class badges */
.ci-drug-class-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }

/* Enhanced company card (revamp) */
.ci-grid-card-v2 { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 14px; padding: 0; overflow: hidden; transition: all 0.25s ease; position: relative; }
.ci-grid-card-v2:hover { border-color: rgba(124, 58, 237, 0.35); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.08); transform: translateY(-2px); }
.ci-grid-card-v2-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; }
.ci-grid-card-v2-body { padding: 0 16px 10px; }
.ci-grid-card-v2-drugs { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.ci-grid-card-v2-drug-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px 0; }
.ci-grid-card-v2-drug-name { font-weight: 600; color: #0F172A; min-width: 100px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.ci-grid-card-v2-indications { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; min-width: 0; }
.ci-grid-card-v2-latest { font-size: 11px; color: #64748B; line-height: 1.4; padding: 8px 16px; border-top: 1px solid #F1F5F9; background: #F8FAFC; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-grid-card-v2-footer { display: flex; gap: 6px; padding: 10px 16px; border-top: 1px solid #F1F5F9; }
.ci-grid-card-v2-priority { position: absolute; top: 0; left: 0; width: 4px; height: 100%; border-radius: 14px 0 0 14px; }

/* Safety signal indicator */
.ci-safety-signal { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: #EF4444; padding: 2px 8px; border-radius: 8px; background: rgba(239, 68, 68, 0.08); }

/* ── Swim Lane Pipeline Layout ── */
.ci-swimlane-container { display: flex; flex-direction: column; gap: 0; border: 1px solid #E2E8F0; border-radius: 14px; overflow: hidden; background: #FFFFFF; }
.ci-swimlane-header-row { display: flex; background: #F8FAFC; border-bottom: 2px solid #E2E8F0; position: sticky; top: 0; z-index: 2; }
.ci-swimlane-corner { width: 150px; flex-shrink: 0; padding: 10px 14px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748B; border-right: 1px solid #E2E8F0; display: flex; align-items: center; }
.ci-swimlane-phase-header { flex: 1; min-width: 130px; text-align: center; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748B; padding: 10px 4px; border-right: 1px solid #F1F5F9; }
.ci-swimlane-phase-header:last-child { border-right: none; }
.ci-swimlane-row { display: flex; border-bottom: 1px solid #F1F5F9; min-height: 70px; }
.ci-swimlane-row:last-child { border-bottom: none; }
.ci-swimlane-label { width: 150px; flex-shrink: 0; padding: 10px 14px; font-size: 12px; font-weight: 700; display: flex; align-items: flex-start; gap: 8px; border-right: 1px solid #E2E8F0; background: #FAFBFC; }
.ci-swimlane-label-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; margin-top: 2px; }
.ci-swimlane-cell { flex: 1; min-width: 130px; padding: 6px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid #F1F5F9; }
.ci-swimlane-cell:last-child { border-right: none; }
.ci-swimlane-drug { padding: 8px 10px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 11px; cursor: pointer; transition: all 0.2s; }
.ci-swimlane-drug:hover { border-color: rgba(124, 58, 237, 0.4); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08); transform: translateY(-1px); }
.ci-swimlane-drug-name { font-weight: 700; color: #0F172A; font-size: 11px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-swimlane-drug-company { font-size: 10px; color: #7C3AED; font-weight: 500; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-swimlane-drug-meta { display: flex; flex-wrap: wrap; gap: 2px; }
.ci-swimlane-drug-target { font-size: 9px; padding: 1px 5px; border-radius: 6px; background: #F1F5F9; color: #64748B; font-weight: 500; }
.ci-swimlane-drug-trial { font-size: 9px; color: #7C3AED; font-weight: 600; font-style: italic; margin-top: 2px; }

/* Swim lane filter bar */
.ci-swimlane-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ci-swimlane-toggle { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #64748B; cursor: pointer; padding: 6px 12px; border-radius: 8px; border: 1px solid #E2E8F0; background: #FFFFFF; transition: all 0.15s; }
.ci-swimlane-toggle.active { background: #F5F3FF; border-color: #7C3AED; color: #7C3AED; }

/* ── Drug-by-Indication Matrix (Detail View) ── */
.ci-drug-matrix { width: 100%; border-collapse: collapse; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; }
.ci-drug-matrix th { padding: 10px 14px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748B; border-bottom: 2px solid #E2E8F0; text-align: left; background: #F8FAFC; }
.ci-drug-matrix td { padding: 8px 14px; border-bottom: 1px solid #F1F5F9; font-size: 12px; vertical-align: middle; }
.ci-drug-matrix tr:hover td { background: rgba(124, 58, 237, 0.02); }
.ci-drug-matrix .drug-name-cell { font-weight: 700; color: #0F172A; font-size: 13px; }
.ci-drug-matrix .drug-generic-cell { font-size: 11px; color: #64748B; font-style: italic; }
.ci-drug-matrix .drug-separator { border-top: 2px solid #E2E8F0; }
.ci-drug-matrix .phase-symbol { font-size: 14px; margin-right: 6px; }

/* ── Collapsible Sections ── */
.ci-collapsible { margin-bottom: 16px; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; background: #FFFFFF; }
.ci-collapsible-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; cursor: pointer; background: #FFFFFF; transition: background 0.15s; user-select: none; }
.ci-collapsible-header:hover { background: #F8FAFC; }
.ci-collapsible-header h3 { margin: 0; font-size: 14px; font-weight: 700; color: #0F172A; display: flex; align-items: center; gap: 8px; }
.ci-collapsible-header .count-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.ci-collapsible-body { padding: 0 16px 16px; }

/* ── Key Metrics Panel ── */
.ci-metrics-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ci-metric-card { padding: 12px 14px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; text-align: center; }
.ci-metric-card-value { font-size: 22px; font-weight: 800; color: #0F172A; line-height: 1.2; }
.ci-metric-card-label { font-size: 10px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.3px; margin-top: 4px; }

/* ── Enhanced Filter Controls ── */
.ci-sort-select { padding: 6px 10px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 11px; background: #FFFFFF; color: #0F172A; cursor: pointer; }
.ci-sort-select:focus { border-color: #7C3AED; box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1); outline: none; }

/* Export dropdown */
.ci-export-dropdown { position: relative; display: inline-block; }
.ci-export-menu { position: absolute; top: 100%; right: 0; margin-top: 4px; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); min-width: 180px; z-index: 100; overflow: hidden; }
.ci-export-menu-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 12px; font-weight: 500; color: #0F172A; cursor: pointer; transition: background 0.15s; border: none; width: 100%; background: transparent; text-align: left; }
.ci-export-menu-item:hover { background: #F5F3FF; color: #7C3AED; }

/* ─────────────────────────────────────────────────────────────────────────────
   Landscape Map Section - D3 Force Graph
   ───────────────────────────────────────────────────────────────────────────── */
.landscape-map-section {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
  margin-bottom: 20px;
}

.landscape-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #F8FAFC;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.landscape-map-header:hover {
  background: #F1F5F9;
}

.landscape-map-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
}

.landscape-map-icon {
  font-size: 18px;
}

.landscape-map-toggle {
  color: #64748B;
  transition: transform 0.2s;
}

.landscape-map-section.expanded .landscape-map-toggle {
  transform: rotate(180deg);
}

.landscape-map-content {
  padding: 16px 20px;
  border-top: 1px solid #E2E8F0;
}

.landscape-map-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.landscape-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
}

.landscape-filter-btn:hover {
  background: #F1F5F9;
}

.landscape-filter-btn.active {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3B82F6;
  color: #3B82F6;
}

.landscape-map-container {
  background: #FAFBFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.landscape-map-container svg {
  display: block;
}

.landscape-map-legend {
  display: flex;
  justify-content: center;
  padding-top: 12px;
  font-size: 11px;
  color: #94A3B8;
}

/* D3 Graph specific styles */
.landscape-map-container .nodes circle,
.landscape-map-container .nodes rect,
.landscape-map-container .nodes polygon {
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.landscape-map-container .nodes circle:hover,
.landscape-map-container .nodes rect:hover,
.landscape-map-container .nodes polygon:hover {
  filter: brightness(1.1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.landscape-map-container .links line {
  pointer-events: none;
}

.landscape-tooltip {
  max-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.15s;
}

/* ================== TEAM HUB ================== */

.team-hub-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}

.team-hub-header {
  padding: 24px 32px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.team-hub-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.team-hub-header p {
  font-size: 14px;
  color: #64748b;
}

/* Team Hub Tabs */
.team-hub-tabs {
  display: flex;
  gap: 4px;
  padding: 0 32px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.hub-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: #64748B;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  margin-bottom: -1px;
}

.hub-tab:hover {
  color: #374151;
  background: rgba(0,0,0,0.02);
}

.hub-tab.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
}

.hub-tab-icon {
  font-size: 16px;
}

.hub-tab-label {
  font-weight: 500;
}

.hub-tab-badge {
  background: #EF4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.team-hub-content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

.team-hub-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.room-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.room-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #7c3aed;
}

.room-card-create {
  border: 2px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background: #fafafa;
}

.room-card-create:hover {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.room-card-icon {
  font-size: 36px;
  color: #7c3aed;
  margin-bottom: 8px;
}

.room-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.room-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.room-card-delete {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}

.room-card-delete:hover {
  background: #fee2e2;
  color: #ef4444;
}

.room-card-desc {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  line-height: 1.4;
}

.room-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #94a3b8;
}

.team-hub-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
}

.team-hub-empty h3 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 8px;
}

/* Room Workspace */
.room-workspace {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.room-workspace-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.room-back-btn {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.room-back-btn:hover {
  background: #f8fafc;
}

.room-workspace-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.room-description {
  font-size: 13px;
  color: #64748b;
}

.room-workspace-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.room-workspace-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.workspace-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s;
}

.workspace-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.workspace-tab.active {
  background: #7c3aed;
  color: white;
}

.workspace-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

/* Sidecar */
.room-workspace-sidecar {
  width: 360px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e2e8f0;
  background: white;
  position: relative;
  z-index: 10;
  padding-bottom: 80px; /* Space for floating Copilot button */
}

/* Room Chat */
.room-chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.room-chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.room-chat-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.room-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.room-chat-message {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-radius: 8px;
  cursor: pointer;
}

.room-chat-message:hover {
  background: #f1f5f9;
}

.room-chat-message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.room-chat-message-user {
  font-size: 12px;
  font-weight: 600;
  color: #7c3aed;
}

.room-chat-message-time {
  font-size: 11px;
  color: #94a3b8;
}

.room-chat-message-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.4;
}

.room-chat-message-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.room-chat-link-chip {
  font-size: 11px;
  padding: 3px 8px;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: 4px;
  cursor: pointer;
}

.room-chat-link-chip:hover {
  background: #ddd6fe;
}

.room-chat-pinned {
  font-size: 11px;
  color: #10b981;
  margin-top: 6px;
}

.room-chat-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.room-chat-message-actions button {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.room-chat-message-actions button:hover {
  background: #f8fafc;
}

.room-chat-attached {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.room-chat-attached-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 10px;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: 4px;
}

.room-chat-attached-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: #7c3aed;
  font-size: 10px;
  padding: 0 2px;
}

.room-chat-input-container {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}

.room-chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  resize: none;
  font-family: inherit;
}

.room-chat-input:focus {
  outline: none;
  border-color: #7c3aed;
}

.room-chat-send {
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

.room-chat-send:hover {
  background: #6d28d9;
}

/* Evidence Tray */
.evidence-tray {
  border-top: 1px solid #e2e8f0;
  max-height: 200px;
  overflow-y: auto;
}

.evidence-tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.evidence-tray-header h4 {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
}

.evidence-add-btn {
  padding: 4px 12px;
  font-size: 12px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.evidence-add-btn:hover {
  background: #6d28d9;
}

.evidence-linker-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: 2000;
}

.evidence-linker-modal .object-linker-overlay {
  position: relative;
  top: auto;
  left: auto;
  bottom: auto;
  margin-bottom: 0;
  width: 400px;
  max-height: 500px;
}

.evidence-tray-empty {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.evidence-tray-items {
  padding: 8px;
}

.evidence-item {
  padding: 8px 12px;
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: grab;
}

.evidence-item-type {
  font-size: 10px;
  text-transform: uppercase;
  color: #7c3aed;
  font-weight: 600;
  margin-bottom: 2px;
}

.evidence-item-title {
  font-size: 12px;
  color: #334155;
  margin-bottom: 4px;
}

.evidence-item-actions {
  display: flex;
  gap: 6px;
}

.evidence-item-actions button {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.evidence-item-actions button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.evidence-item-actions button.delete-btn {
  color: #ef4444;
  border-color: #fecaca;
}

.evidence-item-actions button.delete-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.evidence-item-usage {
  font-size: 10px;
  color: #10b981;
  margin-top: 4px;
}

/* Agenda */
.room-agenda {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.room-agenda-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.room-agenda-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.room-agenda-items {
  padding: 16px 20px;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.agenda-item.completed .agenda-item-text {
  text-decoration: line-through;
  color: #94a3b8;
}

.agenda-item-number {
  font-size: 13px;
  color: #7c3aed;
  font-weight: 600;
  min-width: 24px;
}

.agenda-item-text {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #334155;
  padding: 4px 8px;
  border-radius: 4px;
}

.agenda-item-text:focus {
  outline: none;
  background: #f8fafc;
}

.agenda-item-delete {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
}

.agenda-item-delete:hover {
  color: #ef4444;
}

.room-agenda-add {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid #e2e8f0;
}

.room-agenda-add input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.room-agenda-add input:focus {
  outline: none;
  border-color: #7c3aed;
}

.room-agenda-add button {
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

/* Tasks */
.room-tasks {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.room-tasks-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.room-tasks-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.room-tasks-add {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.room-tasks-add input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
}

.room-tasks-add input:focus {
  outline: none;
  border-color: #7c3aed;
}

.room-tasks-add button {
  padding: 10px 20px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.room-tasks-list {
  padding: 12px 20px;
}

.room-tasks-completed-header {
  padding: 12px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.room-tasks-list.completed {
  background: #fafafa;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.task-item.completed .task-item-text {
  text-decoration: line-through;
  color: #94a3b8;
}

.task-item-text {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #334155;
  padding: 4px 8px;
}

.task-item-text:focus {
  outline: none;
  background: #f8fafc;
  border-radius: 4px;
}

.task-item-delete {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
}

.task-item-delete:hover {
  color: #ef4444;
}

/* Deck */
.room-deck {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.room-deck-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #e2e8f0;
  gap: 16px;
}

.room-deck-toolbar-left {
  display: flex;
  gap: 8px;
}

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

.deck-btn:hover {
  background: #f8fafc;
}

.deck-btn.primary {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

.deck-btn.primary:hover {
  background: #6d28d9;
}

.deck-btn.active {
  background: #ddd6fe;
  border-color: #7c3aed;
  color: #7c3aed;
}

.deck-btn.danger {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.deck-btn.danger:hover {
  background: #fecaca;
}

.deck-btn.danger-outline {
  color: #dc2626;
  border-color: #fecaca;
}

.deck-btn.danger-outline:hover {
  background: #fee2e2;
}

.deck-slide-info {
  font-size: 13px;
  color: #64748b;
}

.room-deck-nav {
  display: flex;
  gap: 8px;
}

.room-deck-nav button {
  padding: 8px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.room-deck-nav button:hover:not(:disabled) {
  background: #f8fafc;
}

.room-deck-nav button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.room-deck-canvas {
  flex: 1;
  aspect-ratio: 16/9;
  min-height: 300px;
  max-height: 450px;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.room-deck-canvas.adding-text {
  cursor: crosshair;
}

.room-slide {
  width: 100%;
  height: 100%;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  overflow: hidden;
}

.room-slide-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.room-slide-hint.adding {
  color: #7c3aed;
  font-weight: 500;
}

.room-slide-empty {
  color: #94a3b8;
  font-size: 14px;
}

/* Slide Objects */
.slide-object {
  position: absolute;
  cursor: move;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color 0.15s;
}

.slide-object:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.slide-object.selected {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.slide-object.textBox {
  min-width: 100px;
  min-height: 30px;
}

.slide-text-content {
  white-space: pre-wrap;
  word-break: break-word;
}

.slide-text-edit {
  width: 100%;
  height: 100%;
  min-height: 60px;
  border: none;
  background: rgba(255,255,255,0.9);
  font-size: inherit;
  color: inherit;
  font-family: inherit;
  resize: both;
  padding: 4px;
  border-radius: 2px;
}

.slide-text-edit:focus {
  outline: none;
}

.slide-evidence-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
}

.slide-evidence-card .evidence-type {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  color: #7c3aed;
  font-weight: 600;
}

.slide-evidence-card .evidence-title {
  font-size: 12px;
  color: #1e293b;
}

.room-deck-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  border-top: 1px solid #e2e8f0;
}

.room-deck-thumb {
  width: 70px;
  height: 45px;
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.room-deck-thumb:hover {
  border-color: #cbd5e1;
}

.room-deck-thumb.active {
  border-color: #7c3aed;
  background: #ede9fe;
  color: #7c3aed;
}

.thumb-number {
  font-weight: 600;
}

.thumb-objects {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 9px;
  background: #7c3aed;
  color: white;
  padding: 1px 4px;
  border-radius: 3px;
}

/* Room Deck Inspector Panel */
.room-deck-inspector {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: white;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.room-deck-inspector .deck-sidebar-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
}

.room-deck-inspector .deck-sidebar-tabs button {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.room-deck-inspector .deck-sidebar-tabs button:hover {
  background: #f8fafc;
}

.room-deck-inspector .deck-sidebar-tabs button.active {
  color: #7c3aed;
  border-bottom: 2px solid #7c3aed;
  margin-bottom: -1px;
}

.room-deck-inspector .deck-inspector-content {
  flex: 1;
  overflow: auto;
}

/* Adjust room-deck layout for inspector */
.room-deck {
  position: relative;
}

.room-deck-canvas {
  margin-right: 280px;
}

/* Object Linker */
.object-linker-overlay {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 320px;
  max-height: 400px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.object-linker-header {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.object-linker-search {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
}

.object-linker-search:focus {
  outline: none;
  border-color: #7c3aed;
}

.object-linker-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
}

.object-linker-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.object-linker-tab {
  padding: 4px 10px;
  font-size: 11px;
  border: none;
  background: #f1f5f9;
  border-radius: 4px;
  cursor: pointer;
  color: #64748b;
}

.object-linker-tab:hover {
  background: #e2e8f0;
}

.object-linker-tab.active {
  background: #7c3aed;
  color: white;
}

.object-linker-results {
  flex: 1;
  overflow-y: auto;
  max-height: 250px;
}

.object-linker-empty {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.object-linker-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.object-linker-item:hover {
  background: #f8fafc;
}

.object-linker-item-type {
  font-size: 10px;
  text-transform: uppercase;
  color: #7c3aed;
  font-weight: 600;
}

.object-linker-item-title {
  font-size: 13px;
  color: #1e293b;
  display: block;
  margin-top: 2px;
}

.object-linker-item-meta {
  font-size: 11px;
  color: #94a3b8;
  display: block;
}

/* Object Card */
.object-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.object-card:hover {
  background: #f1f5f9;
  border-color: #7c3aed;
}

.object-card-icon {
  font-size: 10px;
  color: #7c3aed;
}

.object-card-title {
  color: #334155;
  font-weight: 500;
}

.object-card-meta {
  color: #94a3b8;
  font-size: 10px;
}

.object-card-add {
  background: none;
  border: none;
  color: #7c3aed;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

/* Object Modal */
.object-modal-overlay {
  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: 2000;
}

.object-modal-content {
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  background: white;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.object-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.object-modal-type {
  font-size: 12px;
  color: #7c3aed;
  font-weight: 600;
}

.object-modal-header h3 {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.object-modal-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
}

.object-modal-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.object-modal-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.object-modal-section {
  margin-bottom: 16px;
}

.object-modal-section strong {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.object-modal-raw {
  background: #f8fafc;
  padding: 16px;
  border-radius: 8px;
  font-size: 12px;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  color: #334155;
}

.object-modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
}

.object-modal-actions button {
  padding: 10px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.object-modal-actions button:hover {
  background: #f8fafc;
}

.object-modal-actions button:first-child {
  background: #7c3aed;
  color: white;
  border-color: #7c3aed;
}

/* Create Room Modal */
.create-room-modal-overlay {
  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: 2000;
}

.create-room-modal {
  width: 480px;
  max-width: 90vw;
  background: white;
  border-radius: 16px;
  padding: 28px;
}

.create-room-modal h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 20px;
}

.create-room-field {
  margin-bottom: 16px;
}

.create-room-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 6px;
}

.create-room-field input,
.create-room-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}

.create-room-field input:focus,
.create-room-field textarea:focus {
  outline: none;
  border-color: #7c3aed;
}

.create-room-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.create-room-cancel {
  padding: 10px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 14px;
}

.create-room-submit {
  padding: 10px 24px;
  background: #7c3aed;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.create-room-submit:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

/* =============================================================================
   SHAPE PICKER COMPONENT STYLES
   ============================================================================= */

/* Overlay */
.shape-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

/* Modal */
.shape-picker-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 700px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.shape-picker-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.shape-picker-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1E293B;
  margin: 0;
}

.shape-picker-search {
  flex: 1;
}

.shape-picker-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.shape-picker-search input:focus {
  border-color: #7C3AED;
}

.shape-picker-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: #94A3B8;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shape-picker-close:hover {
  background: #F1F5F9;
  color: #64748B;
}

/* Category tabs */
.shape-picker-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  border-bottom: 1px solid #E2E8F0;
  overflow-x: auto;
}

.shape-picker-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #64748B;
  cursor: pointer;
  border-radius: 6px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.shape-picker-tab:hover {
  background: #F1F5F9;
  color: #1E293B;
}

.shape-picker-tab.active {
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
  font-weight: 500;
}

.shape-picker-tab .tab-count {
  font-size: 11px;
  padding: 2px 6px;
  background: #E2E8F0;
  border-radius: 10px;
  color: #64748B;
}

.shape-picker-tab.active .tab-count {
  background: rgba(124, 58, 237, 0.2);
  color: #7C3AED;
}

/* Search results header */
.shape-picker-search-results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: #F8FAFC;
  font-size: 13px;
  color: #64748B;
}

.shape-picker-search-results .clear-search {
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: #7C3AED;
  cursor: pointer;
  font-size: 12px;
}

.shape-picker-search-results .clear-search:hover {
  text-decoration: underline;
}

/* Shape grid */
.shape-picker-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  align-content: start;
}

.shape-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #94A3B8;
  font-size: 14px;
}

/* Shape item */
.shape-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: #FAFAFA;
}

.shape-picker-item:hover {
  background: #F1F5F9;
  border-color: #E2E8F0;
}

.shape-picker-item.selected {
  background: rgba(124, 58, 237, 0.08);
  border-color: #7C3AED;
}

.shape-picker-item svg {
  display: block;
}

.shape-picker-item-name {
  font-size: 11px;
  color: #64748B;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shape-picker-item.selected .shape-picker-item-name {
  color: #7C3AED;
  font-weight: 500;
}

/* Footer */
.shape-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid #E2E8F0;
  background: #FAFAFA;
}

.selected-shape-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selected-shape-info svg {
  flex-shrink: 0;
}

.shape-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shape-details .shape-name {
  font-size: 14px;
  font-weight: 500;
  color: #1E293B;
}

.shape-details .shape-desc {
  font-size: 12px;
  color: #64748B;
}

.no-selection {
  color: #94A3B8;
  font-size: 13px;
}

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

.footer-actions .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.footer-actions .btn-secondary {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #64748B;
}

.footer-actions .btn-secondary:hover {
  background: #E2E8F0;
  color: #1E293B;
}

.footer-actions .btn-primary {
  background: #7C3AED;
  border: none;
  color: white;
}

.footer-actions .btn-primary:hover {
  background: #6D28D9;
}

.footer-actions .btn-primary:disabled {
  background: #CBD5E1;
  cursor: not-allowed;
}

/* Shape dropdown (toolbar integration) */
.shape-dropdown {
  position: relative;
}

.shape-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shape-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 100;
  min-width: 200px;
}

.quick-shapes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
}

.quick-shape-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #F8FAFC;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.quick-shape-btn:hover {
  background: rgba(124, 58, 237, 0.1);
}

.dropdown-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 0;
}

.more-shapes-btn {
  width: 100%;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #7C3AED;
  cursor: pointer;
  text-align: center;
}

.more-shapes-btn:hover {
  background: #F8FAFC;
}

.dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
}

/* Fabric.js canvas container styles */
.fabric-canvas-container {
  position: relative;
  display: inline-block;
}

.fabric-canvas-container canvas {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EVIDENCE TAGS & SMART SHARES STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Evidence Tag Badge */
.evidence-tag-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
  border: 1px solid;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  white-space: nowrap;
  user-select: none;
}

.evidence-tag-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Evidence Type Colors */
.evidence-tag-badge.type-document { background: rgba(59, 130, 246, 0.15); color: #2563EB; border-color: #3B82F6; }
.evidence-tag-badge.type-figure { background: rgba(16, 185, 129, 0.15); color: #059669; border-color: #10B981; }
.evidence-tag-badge.type-dataset,
.evidence-tag-badge.type-table { background: rgba(124, 58, 237, 0.15); color: #7C3AED; border-color: #8B5CF6; }
.evidence-tag-badge.type-synthesis,
.evidence-tag-badge.type-analysis { background: rgba(245, 158, 11, 0.15); color: #D97706; border-color: #F59E0B; }
.evidence-tag-badge.type-article { background: rgba(99, 102, 241, 0.15); color: #4F46E5; border-color: #6366F1; }
.evidence-tag-badge.type-investigator,
.evidence-tag-badge.type-kol { background: rgba(236, 72, 153, 0.15); color: #DB2777; border-color: #EC4899; }
.evidence-tag-badge.type-note { background: rgba(107, 114, 128, 0.15); color: #4B5563; border-color: #6B7280; }
.evidence-tag-badge.type-competitor { background: rgba(239, 68, 68, 0.15); color: #DC2626; border-color: #EF4444; }
.evidence-tag-badge.type-protocol { background: rgba(34, 197, 94, 0.15); color: #16A34A; border-color: #22C55E; }
.evidence-tag-badge.type-indication { background: rgba(168, 85, 247, 0.15); color: #9333EA; border-color: #A855F7; }

/* Tag Position Variants */
.evidence-tag-badge.position-top-right { top: 4px; right: 4px; }
.evidence-tag-badge.position-top-left { top: 4px; left: 4px; }
.evidence-tag-badge.position-bottom-right { bottom: 4px; right: 4px; }
.evidence-tag-badge.position-bottom-left { bottom: 4px; left: 4px; }

/* Evidence Preview Popup */
.evidence-preview-popup {
  position: fixed;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  width: 320px;
  max-height: 400px;
  overflow: hidden;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.evidence-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.evidence-preview-header .type-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.evidence-preview-title {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evidence-preview-close {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
}

.evidence-preview-close:hover {
  color: #64748B;
}

.evidence-preview-content {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  max-height: 200px;
}

.evidence-preview-note {
  margin-top: 12px;
  padding: 10px;
  background: #FEF3C7;
  border-radius: 6px;
  font-size: 12px;
  color: #92400E;
}

.evidence-preview-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}

.evidence-preview-action {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.evidence-preview-action:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.evidence-preview-action.primary {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  border-color: transparent;
}

/* Evidence Tag Picker Modal */
.evidence-tag-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.evidence-tag-picker {
  background: #fff;
  border-radius: 16px;
  width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.evidence-tag-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.evidence-tag-picker-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.evidence-tag-picker-search {
  padding: 12px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.evidence-tag-picker-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.evidence-tag-picker-search input:focus {
  border-color: #7C3AED;
}

.evidence-tag-picker-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.evidence-tag-picker-type {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #64748B;
  transition: all 0.15s ease;
}

.evidence-tag-picker-type:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.evidence-tag-picker-type.active {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #fff;
}

.evidence-tag-picker-results {
  flex: 1;
  overflow-y: auto;
  max-height: 300px;
}

.evidence-tag-picker-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.1s ease;
}

.evidence-tag-picker-result:hover {
  background: #F8FAFC;
}

.evidence-tag-picker-result.selected {
  background: #EEF2FF;
}

/* Smart Share Modal */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.share-modal {
  background: #fff;
  border-radius: 16px;
  width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.share-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.share-evidence-preview {
  padding: 16px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.share-recipients {
  padding: 16px 20px;
}

.share-recipients label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.share-recipients-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  min-height: 44px;
}

.share-recipient-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px 4px 10px;
  background: #EEF2FF;
  border-radius: 16px;
  font-size: 12px;
  color: #4F46E5;
}

.share-recipient-chip button {
  background: none;
  border: none;
  color: #6366F1;
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
}

.share-message {
  padding: 0 20px 16px;
}

.share-message label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.share-message textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  outline: none;
}

.share-message textarea:focus {
  border-color: #7C3AED;
}

.share-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #E2E8F0;
}

/* Share Inbox */
.share-inbox {
  padding: 24px 32px;
  max-width: 800px;
  margin: 0 auto;
}

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

.share-inbox-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.share-inbox-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-inbox-filter {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #64748B;
  transition: all 0.15s ease;
}

.share-inbox-filter:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.share-inbox-filter.active {
  background: #7C3AED;
  border-color: #7C3AED;
  color: #fff;
}

.share-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.share-inbox-item {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.share-inbox-item:hover {
  border-color: #7C3AED;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.share-inbox-item.unread {
  border-left: 3px solid #7C3AED;
}

.share-inbox-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.share-inbox-item-from {
  font-weight: 600;
  font-size: 14px;
  color: #0F172A;
}

.share-inbox-item-time {
  font-size: 12px;
  color: #94A3B8;
  margin-left: auto;
}

.share-inbox-item-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.share-inbox-item-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.share-inbox-item-title {
  font-weight: 500;
  font-size: 14px;
  color: #1E293B;
}

.share-inbox-item-message {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 12px;
  line-height: 1.5;
}

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

.share-inbox-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94A3B8;
}

.share-inbox-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.share-inbox-empty p {
  margin: 8px 0;
  font-size: 14px;
}

/* Unread indicator dot */
.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7C3AED;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   AGENT INBOX V2 - Fresh Modern Styles (ai- prefix)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Panel Container */
.ai-panel {
  position: fixed;
  top: 0;
  right: -440px;
  width: 440px;
  height: 100vh;
  background: #FAFBFC;
  border-left: 1px solid #E2E8F0;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1002;
}

.ai-panel.open {
  right: 0;
}

/* Panel Header */
.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
}

.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: #1E293B;
}

.ai-panel-title svg {
  color: #7C3AED;
}

/* Tabs */
.ai-tabs {
  display: flex;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 12px;
}

.ai-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-tab:hover {
  color: #7C3AED;
}

.ai-tab.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
}

.ai-tab-badge {
  background: #7C3AED;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Panel Body */
.ai-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.ai-tab-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Control Card */
.ai-control-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  overflow: hidden;
}

.ai-control-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.ai-control-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-control-footer {
  padding: 12px 16px;
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
}

/* Toggle Switch */
.ai-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
}

.ai-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ai-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
}

.ai-toggle-desc {
  font-size: 11px;
  color: #64748B;
}

.ai-toggle-switch {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.ai-toggle-track {
  width: 44px;
  height: 24px;
  background: #CBD5E1;
  border-radius: 12px;
  transition: background 0.2s ease;
  position: relative;
}

.ai-toggle-switch.active .ai-toggle-track {
  background: linear-gradient(135deg, #84CC16 0%, #65A30D 100%);
}

.ai-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: left 0.2s ease;
}

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

/* Select Row */
.ai-select-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-select-row label {
  font-size: 13px;
  color: #475569;
}

.ai-select-row select {
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  color: #1E293B;
  background: #fff;
  min-width: 140px;
  cursor: pointer;
}

.ai-select-row select:focus {
  outline: none;
  border-color: #7C3AED;
}

/* Buttons */
.ai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-btn:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
}

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

.ai-btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  border-color: transparent;
  color: #fff;
}

.ai-btn-primary:hover {
  background: linear-gradient(135deg, #6D28D9 0%, #4C1D95 100%);
}

.ai-btn-success {
  background: #10B981;
  border-color: transparent;
  color: #fff;
}

.ai-btn-success:hover {
  background: #059669;
}

.ai-btn-danger {
  background: #EF4444;
  border-color: transparent;
  color: #fff;
}

.ai-btn-danger:hover {
  background: #DC2626;
}

.ai-btn-sm {
  padding: 6px 10px;
  font-size: 11px;
}

.ai-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-btn-icon:hover {
  background: #F1F5F9;
  color: #1E293B;
}

/* Sections */
.ai-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 4px;
}

.ai-section-muted {
  opacity: 0.7;
}

.ai-badge {
  background: #E2E8F0;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Task Cards */
.ai-task-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.ai-task-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ai-task-card.running {
  border-color: #7C3AED;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(91, 33, 182, 0.02) 100%);
}

.ai-task-card.completed {
  opacity: 0.7;
}

.ai-task-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F1F5F9;
  color: #64748B;
  flex-shrink: 0;
}

.ai-task-card.running .ai-task-icon {
  background: #7C3AED;
  color: #fff;
}

.ai-task-card.completed .ai-task-icon {
  background: #10B981;
  color: #fff;
}

.ai-task-content {
  flex: 1;
  min-width: 0;
}

.ai-task-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-task-meta, .ai-task-step {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.ai-task-actions {
  display: flex;
  gap: 4px;
}

/* Progress Bar */
.ai-progress {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.ai-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED 0%, #A855F7 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ChangeSet Cards */
.ai-changeset-card {
  padding: 12px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
}

.ai-changeset-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.ai-changeset-meta {
  margin-bottom: 12px;
}

.ai-confidence {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}

.ai-confidence.high {
  background: #D1FAE5;
  color: #065F46;
}

.ai-confidence.medium {
  background: #FEF3C7;
  color: #92400E;
}

.ai-confidence.low {
  background: #FEE2E2;
  color: #991B1B;
}

.ai-changeset-actions {
  display: flex;
  gap: 8px;
}

/* Empty State */
.ai-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.ai-empty-icon {
  color: #CBD5E1;
  margin-bottom: 16px;
}

.ai-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 8px;
}

.ai-empty-desc {
  font-size: 13px;
  color: #64748B;
  max-width: 280px;
  line-height: 1.5;
}

/* Settings */
.ai-settings-group {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ai-settings-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F5F9;
}

/* Modal */
.ai-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1003;
}

.ai-modal {
  background: #fff;
  border-radius: 16px;
  width: 90vw;
  max-width: 700px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
  font-weight: 600;
  font-size: 15px;
  color: #1E293B;
}

.ai-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.ai-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}

/* Diff Viewer */
.ai-diff-file {
  margin-bottom: 16px;
}

.ai-diff-filename {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  padding: 8px 12px;
  background: #F1F5F9;
  border-radius: 6px 6px 0 0;
}

.ai-diff-content {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 12px;
  padding: 12px;
  background: #1E293B;
  color: #E2E8F0;
  border-radius: 0 0 6px 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0;
}

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

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

/* ══════════════════════════════════════════════════════════════════════════════
   CLINICAL CALENDAR STYLES
   ══════════════════════════════════════════════════════════════════════════════ */

/* Dashboard Coming Up Widget */
.dashboard-card.coming-up {
  min-width: 220px;
}

.dashboard-card.coming-up .card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-card.coming-up .card-header-action {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #7C3AED;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.dashboard-card.coming-up .card-header-action:hover {
  background: rgba(124, 58, 237, 0.1);
}

.coming-up-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.coming-up-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #F8FAFC;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.coming-up-event:hover {
  background: #EEF2FF;
}

.coming-up-category {
  width: 4px;
  height: 32px;
  border-radius: 2px;
  flex-shrink: 0;
}

.coming-up-category.internal { background: #7C3AED; }
.coming-up-category.competitor { background: #EF4444; }
.coming-up-category.conference { background: #3B82F6; }
.coming-up-category.regulatory { background: #F59E0B; }
.coming-up-category.kol { background: #10B981; }
.coming-up-category.publication { background: #8B5CF6; }

.coming-up-title {
  font-size: 12px;
  font-weight: 500;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coming-up-countdown {
  font-size: 11px;
  color: #64748B;
}

.coming-up-countdown.critical {
  color: #DC2626;
  font-weight: 600;
}

.coming-up-empty {
  text-align: center;
  padding: 16px 0;
  color: #94A3B8;
  font-size: 12px;
}

/* Mini Calendar */
.mini-calendar {
  margin-top: 8px;
}

.mini-calendar-header {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 6px;
  text-align: center;
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 8px;
  background: #F8FAFC;
  border-radius: 8px;
}

.mini-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #64748B;
  border-radius: 4px;
  position: relative;
}

.mini-cal-day.today {
  background: #7C3AED;
  color: #fff;
  font-weight: 600;
}

.mini-cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7C3AED;
}

.mini-cal-day.has-critical::after {
  background: #DC2626;
}

/* ============================================
   CLINICAL INTELLIGENCE TIMELINE - Enhanced Widget
   ============================================ */

/* Enhanced Coming Up Widget Container */
.dashboard-card.coming-up-enhanced {
  min-width: 280px;
  padding: 16px;
}

/* Enhanced Event Cards */
.event-card-enhanced {
  display: flex;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  gap: 12px;
}

.event-card-enhanced:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
  transform: translateY(-1px);
}

/* Category color borders */
.event-card-enhanced.category-internal { border-left: 4px solid #7C3AED; }
.event-card-enhanced.category-competitor { border-left: 4px solid #EF4444; }
.event-card-enhanced.category-conference { border-left: 4px solid #3B82F6; }
.event-card-enhanced.category-regulatory { border-left: 4px solid #F59E0B; }
.event-card-enhanced.category-kol { border-left: 4px solid #10B981; }
.event-card-enhanced.category-publication { border-left: 4px solid #8B5CF6; }

/* Countdown Timer */
.event-countdown-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 8px;
}

/* Impact Warning Badges */
.event-impact-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.event-impact-warning.critical {
  background: #FEE2E2;
  color: #DC2626;
}

.event-impact-warning.high {
  background: #FEF3C7;
  color: #D97706;
}

.event-impact-warning.moderate {
  background: rgba(59, 130, 246, 0.15);
  color: #2563EB;
}

/* Evidence Badge */
.event-evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Quick Action Buttons */
.event-quick-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.event-action-btn {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-action-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.event-action-btn.primary {
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  border: none;
}

.event-action-btn.primary:hover {
  opacity: 0.9;
}

/* Enhanced Mini Calendar Category Dots */
.mini-cal-day .category-dots {
  display: flex;
  gap: 1px;
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.mini-cal-day .category-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
}

/* Mini Calendar Legend */
.mini-calendar-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 9px;
  color: #94A3B8;
}

/* Critical Event Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.event-card-enhanced .critical-pulse {
  animation: pulse 2s infinite;
}

/* Calendar View - Full Page */
.calendar-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 24px;
  overflow: hidden;
}

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

.calendar-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.calendar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.calendar-title svg {
  color: #7C3AED;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-nav-btn {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
}

.calendar-nav-btn:hover {
  border-color: #7C3AED;
  color: #7C3AED;
}

.calendar-nav-btn.today {
  font-size: 12px;
  font-weight: 500;
}

.calendar-current-month {
  font-size: 16px;
  font-weight: 600;
  color: #0F172A;
  min-width: 160px;
}

.calendar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.calendar-search-icon {
  position: absolute;
  left: 10px;
  color: #94A3B8;
}

.calendar-search-input {
  padding: 8px 30px 8px 32px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  width: 180px;
  transition: all 0.15s;
}

.calendar-search-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.calendar-search-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  padding: 2px;
}

.calendar-filter-select {
  padding: 8px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.calendar-view-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #F1F5F9;
  border-radius: 8px;
}

.calendar-view-tab {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.calendar-view-tab:hover {
  color: #475569;
}

.calendar-view-tab.active {
  background: #fff;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calendar-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.calendar-add-btn:hover {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Calendar Content */
.calendar-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Month View */
.calendar-month-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
}

.calendar-day-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.calendar-day-header {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  flex: 1;
}

.calendar-day {
  min-height: 100px;
  padding: 8px;
  border-right: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  cursor: pointer;
  transition: background 0.15s;
  overflow: hidden;
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:hover {
  background: #FAFAFA;
}

.calendar-day.today {
  background: rgba(124, 58, 237, 0.05);
}

.calendar-day.other-month {
  background: #FAFAFA;
}

.calendar-day.other-month .calendar-day-number {
  color: #CBD5E1;
}

.calendar-day-number {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 4px;
}

.calendar-day.today .calendar-day-number {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #7C3AED;
  color: #fff;
  border-radius: 50%;
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-event-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-chip-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-event-chip.internal {
  background: rgba(124, 58, 237, 0.15);
  color: #5B21B6;
}

.calendar-event-chip.competitor {
  background: rgba(239, 68, 68, 0.15);
  color: #B91C1C;
}

.calendar-event-chip.conference {
  background: rgba(59, 130, 246, 0.15);
  color: #1D4ED8;
}

.calendar-event-chip.regulatory {
  background: rgba(245, 158, 11, 0.15);
  color: #92400E;
}

.calendar-event-chip.kol {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.calendar-event-chip.publication {
  background: rgba(139, 92, 246, 0.15);
  color: #6D28D9;
}

.calendar-more-events {
  font-size: 10px;
  color: #64748B;
  cursor: pointer;
  padding: 2px 4px;
}

.calendar-more-events:hover {
  color: #7C3AED;
}

/* List View */
.calendar-list-view {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.calendar-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: #94A3B8;
}

.calendar-list-empty svg {
  opacity: 0.5;
}

.calendar-list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.calendar-list-item:hover {
  border-color: #7C3AED;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.1);
}

.list-item-category {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.list-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
}

.list-item-priority {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.list-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 4px;
}

.list-item-date,
.list-item-location {
  display: flex;
  align-items: center;
  gap: 4px;
}

.list-item-description {
  font-size: 12px;
  color: #64748B;
  margin: 4px 0 0 0;
  line-height: 1.5;
}

.list-item-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: #F8FAFC;
  border-radius: 8px;
  flex-shrink: 0;
}

.list-item-countdown.soon {
  background: rgba(245, 158, 11, 0.1);
}

.list-item-countdown.critical {
  background: rgba(220, 38, 38, 0.1);
}

.list-item-countdown .countdown-number {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1;
}

.list-item-countdown.soon .countdown-number {
  color: #D97706;
}

.list-item-countdown.critical .countdown-number {
  color: #DC2626;
}

.list-item-countdown .countdown-label {
  font-size: 10px;
  color: #64748B;
  text-transform: uppercase;
  font-weight: 500;
}

/* Calendar Event Modal */
.calendar-event-modal {
  width: 480px;
  max-width: 95vw;
}

.calendar-event-modal .form-group {
  margin-bottom: 16px;
}

.calendar-event-modal .form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.calendar-event-modal .form-group input,
.calendar-event-modal .form-group select,
.calendar-event-modal .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.15s;
}

.calendar-event-modal .form-group input:focus,
.calendar-event-modal .form-group select:focus,
.calendar-event-modal .form-group textarea:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.calendar-event-modal .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calendar-event-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #E2E8F0;
}

.calendar-event-modal .btn-danger {
  background: #FEE2E2;
  color: #DC2626;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calendar-event-modal .btn-danger:hover {
  background: #FECACA;
}

/* Critical badge */
.critical-badge {
  background: #DC2626;
  color: #fff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

/* ============================================================================
   DATA SECTION - Unified Data + Warehouse View
   ============================================================================ */

/* Data Section Tabs Header */
.data-tabs-header {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 24px;
  background: #fff;
}

.data-tab-btn {
  padding: 14px 24px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  font-size: 14px;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-tab-btn:hover {
  color: #7C3AED;
}

.data-tab-btn.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
  font-weight: 600;
}

.data-tab-btn .tab-count {
  font-size: 11px;
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Data Content Container */
.data-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.data-content .split {
  flex: 1;
  min-height: 0;
  height: auto;
}

/* Data Toolbar */
.data-toolbar {
  padding: 16px 24px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.data-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.data-search-input:focus-within {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.data-search-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  color: #0F172A;
  background: transparent;
}

.data-search-input input::placeholder {
  color: #94A3B8;
}

.data-filter-select {
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  color: #334155;
  background: #fff;
  cursor: pointer;
  min-width: 150px;
}

.data-view-toggle {
  display: flex;
  background: #E2E8F0;
  border-radius: 8px;
  padding: 3px;
}

.data-view-toggle button {
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: #64748B;
  transition: all 0.15s ease;
}

.data-view-toggle button.active {
  background: #fff;
  color: #7C3AED;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-quick-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #64748B;
  margin-left: auto;
}

.data-quick-stats strong {
  color: #0F172A;
  margin-right: 4px;
}

/* Dataset Cards Grid */
.data-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.dataset-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dataset-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
}

.dataset-card.selected {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.dataset-card.warehouse {
  border-left: 3px solid #8B5CF6;
}

.dataset-card.merged {
  border-left: 3px solid #7C3AED;
}

.dataset-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dataset-card-name {
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dataset-card-type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.dataset-card-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px;
  background: #F8FAFC;
  border-radius: 8px;
}

.dataset-card-stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.dataset-card-stats .stat-value {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
}

.dataset-card-stats .stat-label {
  font-size: 10px;
  color: #94A3B8;
  text-transform: uppercase;
}

.dataset-card-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.dataset-card-columns .col-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #F1F5F9;
  color: #475569;
}

.dataset-card-columns .col-chip.numeric {
  background: #DBEAFE;
  color: #1E40AF;
}

.dataset-card-columns .col-chip.more {
  background: #E2E8F0;
  color: #64748B;
  font-weight: 600;
}

.dataset-card-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid #E2E8F0;
  padding-top: 12px;
}

.dataset-card-linked {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #7C3AED;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #E2E8F0;
}

/* ============================
   Enhanced Datasets Section
   ============================ */

/* Sub-navigation within Datasets tab */
.datasets-sub-nav {
  display: flex;
  gap: 2px;
  background: #F8FAFC;
  border-radius: 10px;
  padding: 3px;
  width: fit-content;
  border: 1px solid #E2E8F0;
  margin-bottom: 16px;
}

.datasets-sub-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748B;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.datasets-sub-nav-btn:hover {
  background: #F1F5F9;
  color: #475569;
}

.datasets-sub-nav-btn.active {
  background: rgba(124, 58, 237, 0.08);
  color: #7C3AED;
}

/* Quality score badge */
.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.quality-badge.good {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.quality-badge.fair {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

.quality-badge.poor {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Category pill */
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.category-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* AI summary box */
.ai-summary-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), transparent);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.ai-summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #7C3AED;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ai-summary-text {
  color: #0F172A;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
}

/* Key findings */
.key-findings-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.key-finding-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 12px;
  border-radius: 8px;
  background: #F8FAFC;
}

.key-finding-num {
  color: #7C3AED;
  font-size: 12px;
  font-weight: 700;
  min-width: 18px;
}

.key-finding-text {
  color: #475569;
  font-size: 12.5px;
  line-height: 1.5;
}

/* Column profile cards */
.col-profile-card {
  background: #F8FAFC;
  border-radius: 8px;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
}

.col-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.col-profile-name {
  color: #0F172A;
  font-size: 13px;
  font-weight: 600;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

.col-profile-type-badge {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.1);
}

.col-profile-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.col-profile-stat {
  color: #64748B;
  font-size: 11px;
}

.col-profile-stat strong {
  color: #475569;
}

.col-profile-missing {
  font-size: 11px;
}

.col-profile-missing.complete {
  color: #10B981;
}

.col-profile-missing.has-missing {
  color: #F59E0B;
}

/* Detail panel tabs */
.dataset-detail-tabs {
  display: flex;
  border-bottom: 1px solid #E2E8F0;
  padding: 0 12px;
}

.dataset-detail-tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.dataset-detail-tab:hover {
  color: #475569;
}

.dataset-detail-tab.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
}

/* Quick stats grid */
.ds-quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ds-quick-stat {
  background: #F8FAFC;
  border-radius: 8px;
  padding: 12px;
}

.ds-quick-stat-label {
  color: #64748B;
  font-size: 11px;
  margin-bottom: 2px;
}

.ds-quick-stat-value {
  color: #0F172A;
  font-size: 13px;
  font-weight: 600;
}

/* Dataset card AI summary preview */
.dataset-card-summary {
  color: #64748B;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dataset card tags */
.dataset-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.dataset-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: #64748B;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
}

/* Connection indicator bar */
.dataset-card-connection-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}

/* Connection card in detail panel */
.connection-card {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 14px;
  border: 1px solid #E2E8F0;
}

.connection-match-badge {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.connection-match-badge.high {
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}

.connection-match-badge.medium {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

.connection-join-key {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7C3AED;
  font-size: 12px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

/* Cross-insight cards */
.cross-insights-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.cross-insight-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 320px;
  max-width: 380px;
  flex: 0 0 auto;
}

.cross-insight-card:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cross-insight-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.cross-insight-icon {
  font-size: 22px;
}

.cross-insight-impact {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cross-insight-impact.critical {
  color: #EF4444;
  background: rgba(239, 68, 68, 0.1);
}

.cross-insight-impact.high {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
}

.cross-insight-impact.medium {
  color: #06B6D4;
  background: rgba(6, 182, 212, 0.1);
}

.cross-insight-title {
  color: #0F172A;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.3;
}

.cross-insight-desc {
  color: #64748B;
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0 0 12px;
}

.cross-insight-datasets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.cross-insight-ds-pill {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.cross-insight-footer {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cross-insight-join {
  color: #7C3AED;
  font-size: 11.5px;
  font-weight: 600;
}

.cross-insight-confidence {
  color: #64748B;
  font-size: 11px;
  margin-left: auto;
}

.cross-insight-action {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7C3AED;
  font-size: 12px;
  font-weight: 600;
}

/* AI intro banner */
.ai-intro-banner {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(168, 85, 247, 0.04));
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.ai-intro-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ai-intro-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-intro-banner-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
}

.ai-intro-banner-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: #64748B;
}

.ai-intro-banner-text {
  color: #64748B;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

/* Analysis builder */
.analysis-builder-drop {
  background: #FFFFFF;
  border: 2px dashed #CBD5E1;
  border-radius: 14px;
  padding: 40px;
  text-align: center;
}

.analysis-builder-icon {
  margin-bottom: 12px;
  color: #94A3B8;
}

.analysis-builder-text {
  color: #94A3B8;
  font-size: 14px;
  margin: 0 0 16px;
}

.analysis-builder-datasets {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.analysis-builder-ds-btn {
  padding: 6px 14px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.analysis-builder-ds-btn:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.analysis-builder-ds-btn.selected {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  color: #7C3AED;
}

.analysis-builder-ds-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Relationship map */
.relationship-map-container {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.relationship-map-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px;
}

.relationship-map-subtitle {
  color: #64748B;
  font-size: 12.5px;
  margin: 0 0 16px;
}

.relationship-map-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.relationship-map-node-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  cursor: pointer;
  text-align: left;
}

.relationship-map-node-btn:hover {
  background: #F8FAFC;
}

.relationship-map-node-btn.active {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.3);
}

.relationship-map-node-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.relationship-map-node-name {
  color: #0F172A;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.relationship-map-node-meta {
  color: #64748B;
  font-size: 11px;
}

/* Connection details panel */
.connection-details-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
}

.connection-details-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-details-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #F8FAFC;
}

.connection-details-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.connection-details-label {
  color: #475569;
  font-size: 13px;
}

.connection-details-key {
  color: #7C3AED;
  font-size: 12px;
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  padding: 2px 8px;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 4px;
}

.connection-details-confidence {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

/* Profile button */
.btn-profile {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.06);
  color: #7C3AED;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-profile:hover {
  background: rgba(124, 58, 237, 0.12);
}

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

/* Dataset detail panel */
.dataset-detail-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dataset-detail-header {
  padding: 16px 20px;
  border-bottom: 1px solid #E2E8F0;
}

.dataset-detail-title {
  color: #0F172A;
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 0;
  line-height: 1.3;
}

.dataset-detail-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.dataset-detail-meta span {
  color: #64748B;
  font-size: 12px;
}

.dataset-detail-meta strong {
  color: #475569;
  font-weight: 600;
}

.dataset-detail-content {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

/* Category filter buttons in toolbar */
.data-category-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.data-category-filter-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #64748B;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.data-category-filter-btn:hover {
  background: #F8FAFC;
}

.data-category-filter-btn.active {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(124, 58, 237, 0.3);
  color: #7C3AED;
}

/* ============================
   Side-by-Side PDF Viewer
   ============================ */

.sbs-pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sbs-pdf-modal {
  width: 95vw;
  height: 92vh;
  background: #FFFFFF;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.sbs-pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sbs-pdf-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sbs-pdf-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.sbs-pdf-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sbs-pdf-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

.sbs-pdf-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 200px;
}

.sbs-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.sbs-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sbs-panel-actions {
  display: flex;
  gap: 6px;
}

.sbs-panel-btn {
  background: #E2E8F0;
  border: none;
  color: #64748B;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sbs-panel-btn:hover {
  background: #CBD5E1;
  color: #1E293B;
}

.sbs-panel-content {
  flex: 1;
  background: #F1F5F9;
  overflow: hidden;
}

.sbs-panel-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.sbs-pdf-divider {
  width: 8px;
  background: #E2E8F0;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.sbs-pdf-divider:hover {
  background: #CBD5E1;
}

.sbs-pdf-divider::after {
  content: '';
  width: 2px;
  height: 40px;
  background: #94A3B8;
  border-radius: 2px;
}

.sbs-pdf-divider.dragging {
  background: #7C3AED;
}

.sbs-pdf-divider.dragging::after {
  background: white;
}

/* Document Selector Panel */
.sbs-doc-selector {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
}

.sbs-selector-header {
  margin-bottom: 16px;
}

.sbs-selector-header h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
}

.sbs-selector-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sbs-selector-search:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.sbs-selector-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sbs-selector-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sbs-selector-item:hover {
  border-color: #7C3AED;
  background: #F5F3FF;
}

.sbs-selector-item-icon {
  width: 36px;
  height: 36px;
  background: #FEE2E2;
  color: #DC2626;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sbs-selector-item-info {
  flex: 1;
  overflow: hidden;
}

.sbs-selector-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #1E293B;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sbs-selector-item-meta {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.sbs-selector-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748B;
  text-align: center;
  padding: 20px;
}

.sbs-selector-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DOCUMENT DETAIL TABS — AI Summaries & Integrity Score
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Tab Navigation Bar ─── */

.doc-detail-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #F1F5F9;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  margin: 20px 0 24px 0;
}

.doc-detail-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.doc-detail-tab:hover {
  color: #7C3AED;
  background: rgba(124, 58, 237, 0.05);
}

.doc-detail-tab.active {
  background: #FFFFFF;
  color: #7C3AED;
  border-color: #E2E8F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.doc-detail-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.doc-detail-tab-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
  flex-shrink: 0;
}

.doc-detail-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.1);
  color: #7C3AED;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.doc-detail-tab.active .doc-detail-tab-count {
  background: rgba(124, 58, 237, 0.15);
}

.doc-detail-tab-score {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── Empty State (shared by all tabs) ─── */

.doc-tab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  color: #475569;
}

/* ─── AI SUMMARIES TAB ─── */

.ai-summaries-tab {
  margin-top: 4px;
}

.summary-version-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.summary-version-pills {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 2px;
}

.summary-version-pills::-webkit-scrollbar {
  height: 3px;
}

.summary-version-pills::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}

.summary-version-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-family: inherit;
}

.summary-version-pill:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.03);
}

.summary-version-pill.active {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.08);
  color: #7C3AED;
}

.summary-version-num {
  font-weight: 700;
  font-size: 13px;
}

.summary-version-trigger {
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-trigger-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(124, 58, 237, 0.02) 100%);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.summary-trigger-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7C3AED;
  flex-shrink: 0;
}

.summary-trigger-text {
  flex: 1;
  font-size: 13px;
  color: #1E293B;
  line-height: 1.5;
  min-width: 200px;
}

.summary-trigger-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #64748B;
  flex-shrink: 0;
}

.summary-heading {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin: 0 0 16px 0;
}

/* Key Entities */

.key-entities-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.key-entity-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.key-entity-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1E293B;
}

/* Extracted Data Table */

.extracted-data-table {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
}

.edt-header {
  display: grid;
  grid-template-columns: 1fr 1.5fr 140px;
  gap: 12px;
  padding: 10px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
}

.edt-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 140px;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
  align-items: center;
}

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

.edt-field {
  font-weight: 600;
  color: #1E293B;
}

.edt-value {
  color: #475569;
  word-break: break-word;
}

.edt-confidence {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edt-confidence-bar {
  flex: 1;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
}

.edt-confidence-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.edt-confidence-pct {
  font-size: 11px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
  color: #475569;
}

/* Summary Evolution Timeline */

.summary-timeline {
  position: relative;
  padding-left: 24px;
}

.timeline-entry {
  position: relative;
  padding: 12px 0 12px 20px;
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 8px;
}

.timeline-entry:hover {
  background: rgba(124, 58, 237, 0.03);
}

.timeline-entry.active {
  background: rgba(124, 58, 237, 0.06);
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #CBD5E1;
  border: 2px solid #FFFFFF;
  z-index: 1;
}

.timeline-entry.active .timeline-dot {
  background: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.timeline-connector {
  position: absolute;
  left: -20px;
  top: 30px;
  bottom: -4px;
  width: 2px;
  background: #E2E8F0;
}

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

.timeline-num {
  font-weight: 700;
  font-size: 13px;
  color: #7C3AED;
}

.timeline-label {
  font-weight: 600;
  font-size: 13px;
  color: #1E293B;
}

.timeline-date {
  font-size: 11px;
  color: #94A3B8;
}

.timeline-trigger {
  font-size: 12px;
  color: #64748B;
  font-style: italic;
}

/* ─── INTEGRITY SCORE TAB ─── */

.integrity-tab {
  margin-top: 4px;
}

.integrity-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(241, 245, 249, 0.95) 100%);
  border: 1px solid rgba(226, 232, 240, 0.4);
  border-radius: 16px;
  margin-bottom: 20px;
}

.integrity-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.integrity-ring-svg {
  width: 100%;
  height: 100%;
}

.integrity-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.integrity-score-num {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: #1E293B;
  line-height: 1;
}

.integrity-score-label {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  margin-top: 2px;
}

.integrity-score-meta {
  flex: 1;
}

.integrity-interpretation {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 10px;
  margin-bottom: 20px;
}

/* Individual Check Bars */

.integrity-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.integrity-check {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.integrity-check.expanded {
  border-color: rgba(124, 58, 237, 0.2);
}

.integrity-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  background: #FAFBFC;
  transition: background 0.15s ease;
}

.integrity-check-header:hover {
  background: #F1F5F9;
}

.integrity-check-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.integrity-check-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.integrity-check-name {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.integrity-check-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.integrity-check-bar {
  width: 80px;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  overflow: hidden;
}

.integrity-check-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.integrity-check-score {
  font-size: 13px;
  font-weight: 700;
  min-width: 24px;
  text-align: right;
}

.integrity-check-details {
  padding: 0 16px 16px 16px;
  border-top: 1px solid #F1F5F9;
}

.integrity-check-explanation {
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  margin: 12px 0 0 0;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .doc-detail-tabs {
    flex-direction: column;
  }
  .integrity-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .edt-header,
  .edt-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .summary-version-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .summary-trigger-banner {
    flex-direction: column;
    gap: 8px;
  }
  .summary-trigger-text {
    min-width: auto;
  }
}

/* ===== META-ANALYSIS SECTION ===== */

.ma-layout {
  display: flex;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.ma-sidebar {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid #E2E8F0;
  background: #F8FAFC;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.ma-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: #FFFFFF;
}

/* Sidebar: Saved Analyses */
.ma-saved-section {
  padding: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.ma-saved-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ma-saved-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ma-saved-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
  border: 1px solid #E2E8F0;
}

.ma-saved-item:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.ma-saved-item.active {
  background: #EDE9FE;
  border-color: #7C3AED;
}

.ma-saved-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.ma-saved-meta {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

.ma-saved-delete {
  background: none;
  border: none;
  color: #CBD5E1;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.ma-saved-delete:hover {
  color: #EF4444;
}

/* Sidebar: Document Selector */
.ma-docs-section {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
}

.ma-docs-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.ma-doc-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ma-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  color: #475569;
  border: 1px solid transparent;
}

.ma-doc-item:hover {
  background: #F1F5F9;
}

.ma-doc-item.selected {
  background: #EDE9FE;
  color: #5B21B6;
  border-color: #C4B5FD;
}

.ma-doc-item input[type="checkbox"] {
  accent-color: #7C3AED;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ma-doc-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Builder Tab */
.ma-builder {
  max-width: 900px;
}

.ma-builder-title {
  font-size: 24px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
}

.ma-builder-subtitle {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 28px;
  line-height: 1.5;
}

.ma-packages-header {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 6px;
}

.ma-packages-header + p {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 16px;
}

/* Package Grid */
.ma-package-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.ma-package-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  border: 2px solid #E2E8F0;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
}

.ma-package-card:hover {
  border-color: #C4B5FD;
  background: #FAFAFE;
}

.ma-package-card.selected {
  border-color: #7C3AED;
  background: #FAF5FF;
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15);
}

.ma-package-card input[type="checkbox"] {
  accent-color: #7C3AED;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.ma-package-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
}

.ma-package-header p {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
}

/* PRISMA Toggle Card */
.ma-prisma-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  border: 2px dashed #C4B5FD;
  background: #FAF5FF;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 20px;
}

.ma-prisma-option:hover {
  border-style: solid;
  border-color: #A78BFA;
}

.ma-prisma-option.selected {
  border-style: solid;
  border-color: #7C3AED;
  background: #EDE9FE;
}

.ma-prisma-option input[type="checkbox"] {
  accent-color: #7C3AED;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.ma-prisma-option h4 {
  font-size: 14px;
  font-weight: 600;
  color: #5B21B6;
  margin-bottom: 4px;
}

.ma-prisma-option p {
  font-size: 12px;
  color: #7C3AED;
  line-height: 1.4;
}

/* Custom Analysis Section */
.ma-custom-section {
  margin-bottom: 24px;
}

.ma-custom-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
}

.ma-custom-input {
  width: 100%;
  min-height: 80px;
  padding: 12px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #1E293B;
  resize: vertical;
  transition: border-color 0.15s;
  line-height: 1.5;
}

.ma-custom-input::placeholder {
  color: #94A3B8;
}

.ma-custom-input:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Generate Button */
.ma-generate-btn {
  padding: 12px 28px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  gap: 8px;
  display: inline-flex !important;
  align-items: center;
}

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

/* Empty State */
.ma-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 40px;
  color: #94A3B8;
}

.ma-empty svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.ma-empty h3 {
  font-size: 18px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 8px;
}

.ma-empty p {
  font-size: 14px;
  color: #94A3B8;
  max-width: 400px;
  line-height: 1.5;
}

/* Results Tab */
.ma-results {
  max-width: 960px;
}

.ma-results-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E2E8F0;
}

.ma-results-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
}

.ma-results-meta {
  font-size: 12px;
  color: #94A3B8;
  margin-bottom: 10px;
}

.ma-packages-used {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ma-package-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #EDE9FE;
  color: #5B21B6;
}

/* Result Sections */
.ma-section {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  background: white;
}

.ma-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ma-section-title svg {
  color: #7C3AED;
}

/* Summary Box */
.ma-summary-box {
  padding: 18px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FAF5FF 0%, #EDE9FE 100%);
  border: 1px solid #C4B5FD;
  margin-bottom: 28px;
}

.ma-summary-box h3 {
  font-size: 15px;
  font-weight: 700;
  color: #5B21B6;
  margin-bottom: 8px;
}

.ma-summary-box p {
  font-size: 14px;
  color: #4C1D95;
  line-height: 1.6;
}

/* Stat Cards (effect sizes, pooled results) */
.ma-stat-card {
  display: inline-flex;
  flex-direction: column;
  padding: 12px 18px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  margin-right: 12px;
  margin-bottom: 12px;
}

.ma-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.ma-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
}

.ma-stat-sub {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

/* I-squared Gauge */
.ma-i2-gauge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.ma-i2-gauge.low {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
}

.ma-i2-gauge.moderate {
  background: #FFF7ED;
  border: 1px solid #FDBA74;
}

.ma-i2-gauge.high {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
}

.ma-i2-gauge .i2-value {
  font-size: 22px;
  font-weight: 700;
}

.ma-i2-gauge.low .i2-value { color: #059669; }
.ma-i2-gauge.moderate .i2-value { color: #D97706; }
.ma-i2-gauge.high .i2-value { color: #DC2626; }

.ma-i2-gauge .i2-label {
  font-size: 12px;
  color: #64748B;
  line-height: 1.3;
}

/* Risk Badges (publication bias) */
.ma-risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.ma-risk-badge.low {
  background: #ECFDF5;
  color: #059669;
}

.ma-risk-badge.moderate {
  background: #FFF7ED;
  color: #D97706;
}

.ma-risk-badge.high {
  background: #FEF2F2;
  color: #DC2626;
}

/* Forest Plot Container */
.ma-forest-plot-container {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 16px;
  background: #FAFAFA;
  overflow-x: auto;
}

/* Tables in Results */
.ma-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ma-section table th {
  background: #F8FAFC;
  font-weight: 600;
  color: #475569;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 2px solid #E2E8F0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ma-section table td {
  padding: 10px 12px;
  color: #1E293B;
  border-bottom: 1px solid #F1F5F9;
}

.ma-section table tr:hover td {
  background: #F8FAFC;
}

.ma-section table code {
  font-size: 12px;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
  color: #7C3AED;
}

/* PRISMA Tab */
.ma-prisma {
  max-width: 960px;
}

.ma-prisma h2 {
  font-size: 22px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 24px;
}

.ma-prisma h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 16px;
}

/* PRISMA Flow Diagram */
.ma-prisma-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 28px;
  background: #F8FAFC;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  margin-bottom: 28px;
}

.ma-prisma-box {
  padding: 14px 24px;
  border-radius: 10px;
  background: white;
  border: 2px solid #7C3AED;
  text-align: center;
  min-width: 260px;
  position: relative;
}

.ma-prisma-box strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}

.ma-prisma-box span {
  font-size: 12px;
  color: #64748B;
}

.ma-prisma-box.ma-prisma-excluded {
  border-color: #F87171;
  background: #FEF2F2;
}

.ma-prisma-box.ma-prisma-excluded strong {
  color: #991B1B;
}

.ma-prisma-box.ma-prisma-excluded span {
  color: #B91C1C;
}

.ma-prisma-arrow {
  width: 2px;
  height: 28px;
  background: #7C3AED;
  position: relative;
}

.ma-prisma-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #7C3AED;
}

/* Risk of Bias Table */
.ma-rob-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 28px;
}

.ma-rob-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: #475569;
  padding: 10px 12px;
  text-align: center;
  border-bottom: 2px solid #E2E8F0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ma-rob-table th:first-child {
  text-align: left;
}

.ma-rob-table td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid #F1F5F9;
  color: #1E293B;
}

.ma-rob-table td:first-child {
  text-align: left;
  font-weight: 500;
}

/* Risk of Bias Traffic Lights */
.rob-low {
  color: #059669 !important;
  font-weight: 600;
}

.rob-unclear {
  color: #D97706 !important;
  font-weight: 600;
}

.rob-high {
  color: #DC2626 !important;
  font-weight: 600;
}

/* Custom Analysis Results */
.ma-custom-results {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  color: #1E293B;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
}

/* Select All buttons in sidebar */
.ma-docs-section .btn-sm,
.ma-saved-section .btn-sm {
  font-size: 11px;
  padding: 3px 8px;
  margin-bottom: 8px;
}

/* Responsive adjustments for Meta-Analysis */
@media (max-width: 900px) {
  .ma-layout {
    flex-direction: column;
  }
  .ma-sidebar {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid #E2E8F0;
  }
  .ma-package-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Figure Vault View Styles
   ============================================ */

.fv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 20px;
}

.fv-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}
.fv-card:hover {
  border-color: #7C3AED;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
  transform: translateY(-2px);
}

.fv-card-thumb {
  position: relative;
  padding-top: 65%;
  background: #F1F5F9;
  overflow: hidden;
}
.fv-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.fv-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.fv-card-info {
  padding: 12px 14px;
}
.fv-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fv-card-meta {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 4px;
}

.fv-detail {
  position: fixed;
  inset: 24px;
  width: auto;
  height: auto;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fv-viewer {
  position: relative;
  background: #0F172A;
  flex: 1;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}
.fv-viewer:active {
  cursor: grabbing;
}
.fv-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.1s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.fv-filters {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  border-bottom: 1px solid #E2E8F0;
  background: #fff;
}
.fv-filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #F1F5F9;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  color: #64748B;
}
.fv-filter-pill:hover {
  background: #E2E8F0;
}
.fv-filter-pill.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: #7C3AED;
  color: #7C3AED;
}

.fv-feed-section {
  margin-bottom: 24px;
}
.fv-feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
}
.fv-feed-count {
  font-size: 12px;
  color: #64748B;
  font-weight: 400;
}
.fv-feed-carousel {
  display: flex;
  gap: 12px;
  padding: 0 20px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.fv-feed-carousel::-webkit-scrollbar {
  height: 4px;
}
.fv-feed-carousel::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

.fv-extract-progress {
  padding: 12px 20px;
  background: rgba(124, 58, 237, 0.05);
  border-bottom: 1px solid #E2E8F0;
}
.fv-extract-bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}
.fv-extract-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7C3AED, #5B21B6);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.fv-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}
.fv-data-table th {
  background: #F8FAFC;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #64748B;
  border-bottom: 1px solid #E2E8F0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.fv-data-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #F1F5F9;
  color: #374151;
}

/* Figure Vault — Detail Panel Tabs */
.fv-detail-tabs {
  display: flex;
  border-bottom: 1px solid #E2E8F0;
  background: #FAFBFC;
}
.fv-detail-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.fv-detail-tab:hover {
  color: #1E293B;
  background: #F1F5F9;
}
.fv-detail-tab.active {
  color: #7C3AED;
  border-bottom-color: #7C3AED;
  background: #fff;
  font-weight: 600;
}

/* Recreation button */
.fv-recreate-btn {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
}
.fv-recreate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

/* Recreation toolbar */
.fv-recreate-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid #E2E8F0;
  background: #FAFBFC;
}

/* Color editor popover */
.fv-color-editor {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Chart container */
.fv-recreate-chart {
  padding: 16px;
  min-height: 300px;
  background: #fff;
  flex: 1;
}

/* Recreated table */
.fv-recreated-table-wrap {
  padding: 12px 16px;
}
.fv-recreated-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.fv-recreated-table tr:hover td {
  background: #F0F4FF;
}

/* Figure Vault — Export Dropdown */
.fv-export-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  z-index: 200;
  min-width: 180px;
  overflow: hidden;
}
.fv-export-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #1E293B;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.fv-export-option:hover {
  background: #F1F5F9;
}
.fv-export-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 0;
}

/* Figure Vault — Folder Dropdown */
.fv-folder-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1), 0 -4px 10px -4px rgba(0, 0, 0, 0.05);
  z-index: 200;
  min-width: 200px;
  max-height: 280px;
  overflow-y: auto;
}
.fv-folder-option {
  display: block;
  width: 100%;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #1E293B;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.fv-folder-option:hover {
  background: #FFF7ED;
}
.fv-folder-option.active {
  background: #F0FDF4;
  color: #166534;
  font-weight: 600;
}

/* Figure Vault — Annotation Toolbar */
.fv-annotation-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-bottom: 1px solid #FCD34D;
  background: linear-gradient(180deg, #FFFBEB, #FEF3C7);
}
.fv-ann-tool-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  background: #fff;
  color: #64748B;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.12s;
}
.fv-ann-tool-btn:hover {
  background: #F1F5F9;
  color: #1E293B;
}
.fv-ann-tool-btn.active {
  background: #1E293B;
  color: #fff;
  border-color: #1E293B;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.fv-ann-action-btn {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  background: #fff;
  color: #64748B;
  border: 1px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.12s;
}
.fv-ann-action-btn:hover:not(:disabled) {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}
.fv-ann-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Annotation SVG overlay */
.fv-annotation-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}
.fv-annotation-layer text {
  user-select: none;
  pointer-events: auto;
}
.fv-annotation-layer line,
.fv-annotation-layer rect,
.fv-annotation-layer ellipse {
  pointer-events: auto;
}

/* Annotation inline text input */
.fv-ann-text-input {
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.4;
}

/* ===== RCT Explorer (views17) ===== */
.rct-layout { display: flex; gap: 0; height: calc(100vh - 130px); }
.rct-sidebar { width: 380px; border-right: 1px solid #E2E8F0; overflow-y: auto; padding: 20px; flex-shrink: 0; }
.rct-main { flex: 1; overflow-y: auto; padding: 24px; }

/* Filter Bar */
.rct-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.rct-search { flex: 1; min-width: 200px; padding: 8px 14px; border-radius: 8px; border: 1px solid #E2E8F0; font-size: 13px; outline: none; transition: border-color 0.2s; }
.rct-search:focus { border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }
.rct-filter-select { padding: 7px 12px; border-radius: 8px; border: 1px solid #E2E8F0; font-size: 12px; background: white; cursor: pointer; outline: none; }
.rct-filter-select:focus { border-color: #7C3AED; }

/* Drug Cards */
.rct-drug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.rct-drug-card { border-radius: 12px; padding: 16px; border: 1px solid #E2E8F0; cursor: pointer; transition: all 0.2s; border-left: 4px solid transparent; background: white; }
.rct-drug-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.rct-drug-card.selected { background: #F5F3FF; border-color: #DDD6FE; box-shadow: 0 4px 16px rgba(124,58,237,0.12); }
.rct-drug-name { font-weight: 700; font-size: 15px; color: #0F172A; }
.rct-drug-generic { font-size: 12px; color: #64748B; margin-top: 2px; }
.rct-drug-mechanism { font-size: 11px; color: #94A3B8; margin-top: 4px; }
.rct-drug-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.rct-drug-year { font-size: 11px; color: #64748B; margin-top: 6px; }

/* Indication Groups */
.rct-indication-group { margin-bottom: 12px; }
.rct-indication-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #F8FAFC; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; color: #0F172A; border: 1px solid #E2E8F0; transition: background 0.15s; }
.rct-indication-header:hover { background: #F1F5F9; }
.rct-indication-count { margin-left: auto; font-size: 11px; font-weight: 500; color: #64748B; }

/* Trial List Items */
.rct-trial-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; cursor: pointer; margin: 4px 0 4px 12px; transition: background 0.15s; border: 1px solid transparent; }
.rct-trial-item:hover { background: #F5F3FF; border-color: #EDE9FE; }
.rct-trial-item.selected { background: #EDE9FE; border-color: #C4B5FD; }
.rct-trial-name { font-weight: 600; font-size: 13px; color: #0F172A; }
.rct-trial-nct { font-size: 11px; color: #64748B; }
.rct-trial-quick { font-size: 11px; color: #94A3B8; margin-left: auto; }

/* Trial Detail Panel */
.rct-detail { background: white; }
.rct-detail-header { padding-bottom: 16px; border-bottom: 1px solid #E2E8F0; margin-bottom: 16px; }
.rct-detail-title { font-size: 20px; font-weight: 700; color: #0F172A; }
.rct-detail-subtitle { font-size: 13px; color: #64748B; margin-top: 4px; }
.rct-detail-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.rct-detail-meta-item { font-size: 12px; color: #64748B; }
.rct-detail-meta-item strong { color: #0F172A; font-weight: 600; }

.rct-detail-section { margin-bottom: 20px; }
.rct-detail-section h4 { font-size: 12px; font-weight: 700; color: #64748B; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Arms Table */
.rct-arms-table { width: 100%; border-collapse: collapse; font-size: 13px; border-radius: 8px; overflow: hidden; border: 1px solid #E2E8F0; }
.rct-arms-table th { text-align: left; padding: 8px 12px; background: #F8FAFC; font-weight: 600; color: #64748B; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.rct-arms-table td { padding: 8px 12px; border-top: 1px solid #F1F5F9; }

/* NI Forest Plot */
.rct-ni-container { margin: 12px 0; }
.rct-ni-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.rct-ni-badge.met { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.rct-ni-badge.not-met { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* Safety Table */
.rct-safety-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rct-safety-table th { text-align: left; padding: 6px 10px; background: #FFF7ED; font-weight: 600; color: #92400E; font-size: 11px; text-transform: uppercase; }
.rct-safety-table td { padding: 6px 10px; border-top: 1px solid #F1F5F9; }

/* Secondary Endpoints */
.rct-endpoint-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #F1F5F9; font-size: 12px; }
.rct-endpoint-label { color: #0F172A; }
.rct-endpoint-value { color: #64748B; font-weight: 500; }

/* Compare Drawer */
.rct-compare-drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 90vw; max-width: 1400px; background: white; box-shadow: -4px 0 24px rgba(0,0,0,0.12); z-index: 100; padding: 24px; transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; }
.rct-compare-drawer.open { transform: translateX(0); }
.rct-compare-scroll { flex: 1; overflow-x: auto; overflow-y: auto; min-height: 0; padding-bottom: 16px; }
.rct-compare-row-wrap { min-width: max-content; }
.rct-compare-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 99; cursor: pointer; }
.rct-compare-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid #E2E8F0; margin-bottom: 16px; }
.rct-compare-header h3 { font-size: 16px; font-weight: 700; color: #0F172A; }

/* Compare columns */
.rct-compare-grid { display: grid; gap: 16px; }
.rct-compare-row { display: grid; grid-template-columns: 120px repeat(var(--cols, 3), 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #F1F5F9; align-items: start; }
.rct-compare-label { font-size: 11px; font-weight: 600; color: #64748B; text-transform: uppercase; letter-spacing: 0.3px; padding-top: 2px; border-right: 1px solid #CBD5E1; padding-right: 10px; }
.rct-compare-cell { font-size: 12px; color: #0F172A; }

/* Compare FAB button */
.rct-compare-fab { position: fixed; bottom: 24px; right: 24px; background: linear-gradient(135deg, #7C3AED, #5B21B6); color: white; border: none; padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgba(124,58,237,0.3); z-index: 50; display: flex; align-items: center; gap: 8px; transition: transform 0.2s, box-shadow 0.2s; }
.rct-compare-fab:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,0.4); }

/* AI Compare Analysis Panel */
.rct-compare-ai-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; border: 1px solid #7C3AED; background: linear-gradient(135deg, #7C3AED, #6D28D9); color: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.rct-compare-ai-btn:hover { background: linear-gradient(135deg, #6D28D9, #5B21B6); box-shadow: 0 2px 8px rgba(124,58,237,0.3); transform: translateY(-1px); }
.rct-compare-ai-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.rct-compare-ai-panel { margin-top: 20px; border: 1px solid #E9D5FF; border-radius: 12px; background: linear-gradient(135deg, #FAFAF5 0%, #F5F3FF 100%); overflow: hidden; }
.rct-compare-ai-header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; background: linear-gradient(135deg, #7C3AED, #6D28D9); color: white; }
.rct-compare-ai-header span:first-child { font-size: 18px; }
.rct-compare-ai-header strong { font-size: 14px; font-weight: 700; }

.rct-compare-ai-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; text-align: center; }
.rct-compare-ai-loading .rct-compare-ai-spinner { width: 32px; height: 32px; border: 3px solid #E9D5FF; border-top-color: #7C3AED; border-radius: 50%; animation: spin 1s linear infinite; }
.rct-compare-ai-loading p { font-size: 13px; color: #6D28D9; font-weight: 500; }

.rct-compare-ai-body { padding: 16px; }
.rct-compare-ai-headline { font-size: 15px; font-weight: 700; color: #5B21B6; margin-bottom: 16px; padding: 10px 14px; background: rgba(124,58,237,0.06); border-left: 3px solid #7C3AED; border-radius: 0 8px 8px 0; line-height: 1.4; }

.rct-compare-ai-section { margin-bottom: 14px; }
.rct-compare-ai-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; gap: 6px; }

.rct-compare-ai-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rct-compare-ai-list li { font-size: 12px; color: #334155; padding: 6px 10px; background: white; border-radius: 6px; border: 1px solid #F1F5F9; line-height: 1.5; }

.rct-compare-ai-diff-item { font-size: 12px; color: #334155; padding: 8px 10px; background: white; border-radius: 6px; border: 1px solid #F1F5F9; display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.rct-compare-ai-diff-badge { display: inline-flex; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; margin-top: 1px; }
.rct-compare-ai-diff-badge.high { background: #FEE2E2; color: #DC2626; }
.rct-compare-ai-diff-badge.medium { background: #FEF3C7; color: #D97706; }
.rct-compare-ai-diff-badge.low { background: #DBEAFE; color: #2563EB; }

.rct-compare-ai-text-block { font-size: 12px; color: #334155; line-height: 1.6; padding: 10px 12px; background: white; border-radius: 8px; border: 1px solid #F1F5F9; }

.rct-compare-ai-implications { padding: 10px 14px; background: rgba(16,185,129,0.04); border: 1px solid rgba(16,185,129,0.15); border-left: 3px solid #10B981; border-radius: 0 8px 8px 0; font-size: 12px; color: #065F46; line-height: 1.6; }

.rct-compare-ai-limitations { padding: 10px 14px; background: rgba(217,119,6,0.04); border: 1px solid rgba(217,119,6,0.15); border-left: 3px solid #D97706; border-radius: 0 8px 8px 0; font-size: 12px; color: #92400E; line-height: 1.6; }

.rct-compare-ai-error { padding: 16px; text-align: center; color: #DC2626; font-size: 13px; }
.rct-compare-ai-raw { padding: 16px; font-size: 12px; color: #334155; line-height: 1.6; white-space: pre-wrap; }

/* Save to Documents Modal */
.rct-save-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 200; display: flex; align-items: center; justify-content: center; }
.rct-save-modal { background: white; border-radius: 12px; padding: 24px; width: 480px; max-width: 90vw; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.rct-compare-save-btn { margin-left: auto; display: flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.15); color: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.rct-compare-save-btn:hover { background: rgba(255,255,255,0.25); }

/* Document Mode Tabs */
.doc-mode-tabs { display: flex; gap: 0; border-bottom: 2px solid #E2E8F0; margin-bottom: 12px; }
.doc-mode-tab { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border: none; background: none; font-size: 13px; font-weight: 600; color: #64748B; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.doc-mode-tab.active { color: #7C3AED; border-bottom-color: #7C3AED; }
.doc-mode-tab:hover { color: #5B21B6; }
.doc-mode-badge { font-size: 10px; background: #7C3AED; color: white; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }

/* Analysis Library Content */
.analysis-library-content { padding: 8px 0; overflow-y: auto; flex: 1; display: flex; flex-direction: column; }

/* Analysis Portfolio Dashboard Strip */
.analysis-portfolio-strip { display: flex; gap: 8px; margin-bottom: 12px; }
.analysis-stat-card { flex: 1; text-align: center; padding: 10px 8px; background: linear-gradient(135deg, #FAFAF5, #F5F3FF); border: 1px solid #E9D5FF; border-radius: 8px; }
.analysis-stat-value { font-size: 20px; font-weight: 700; color: #7C3AED; }
.analysis-stat-label { font-size: 10px; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; }

/* Drug Tag Cloud */
.analysis-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.analysis-drug-tag { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(124,58,237,0.08); color: #7C3AED; cursor: pointer; transition: all 0.2s; }
.analysis-drug-tag:hover { background: rgba(124,58,237,0.15); }
.analysis-drug-tag .tag-count { font-weight: 400; color: #A78BFA; margin-left: 4px; }

/* Analysis Most Compared Pairs */
.analysis-pairs-section { margin-bottom: 12px; padding: 10px 12px; background: #F8FAFC; border-radius: 8px; }
.analysis-section-label { font-size: 11px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.analysis-pair-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; color: #334155; }
.analysis-pair-count { font-weight: 700; color: #7C3AED; }

/* Analysis Category Filters */
.analysis-category-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.analysis-category-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; border: 1px solid #E2E8F0; background: white; font-size: 11px; font-weight: 600; color: #64748B; cursor: pointer; transition: all 0.2s; }
.analysis-category-chip:hover { border-color: #CBD5E1; background: #F8FAFC; }
.analysis-category-chip.active { font-weight: 700; }
.analysis-chip-count { font-size: 10px; font-weight: 400; color: inherit; opacity: 0.7; margin-left: 2px; }
.analysis-source-badge { font-size: 10px; font-weight: 600; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }

/* Cross-Analysis Insights Button */
.analysis-insights-btn { width: 100%; padding: 10px 16px; border: none; border-radius: 8px; background: linear-gradient(135deg, #7C3AED, #6D28D9); color: white; font-size: 12px; font-weight: 600; cursor: pointer; margin-bottom: 12px; transition: all 0.2s; }
.analysis-insights-btn:hover { box-shadow: 0 2px 8px rgba(124,58,237,0.3); transform: translateY(-1px); }
.analysis-insights-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Analysis Timeline */
.analysis-timeline { flex: 1; overflow-y: auto; }
.analysis-timeline-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #F1F5F9; cursor: pointer; transition: background 0.15s; align-items: flex-start; }
.analysis-timeline-item:hover { background: #F8FAFC; }
.analysis-timeline-item.active { background: #F5F3FF; border-left: 3px solid #7C3AED; }
.analysis-timeline-date { font-size: 10px; color: #94A3B8; white-space: nowrap; min-width: 60px; padding-top: 2px; }
.analysis-timeline-content { flex: 1; min-width: 0; }
.analysis-timeline-title { font-size: 13px; font-weight: 600; color: #0F172A; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analysis-timeline-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.analysis-mini-tag { font-size: 10px; padding: 1px 6px; border-radius: 10px; background: rgba(124,58,237,0.08); color: #7C3AED; }
.analysis-mini-tag.indication { background: rgba(16,185,129,0.08); color: #059669; }
.analysis-trial-count { font-size: 10px; color: #94A3B8; }
.analysis-timeline-headline { font-size: 11px; color: #64748B; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Analysis Library Detail Panel */
.analysis-detail-content { padding: 0; }
.analysis-detail-section { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #F1F5F9; }
.analysis-detail-section:last-child { border-bottom: none; margin-bottom: 0; }

/* RCT Comparison Document Detail */
.rct-comparison-detail { padding: 0; }
.rct-comparison-meta-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; padding: 12px; background: #F8FAFC; border-radius: 8px; border: 1px solid #E2E8F0; }
.rct-comparison-meta-chip { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: rgba(124,58,237,0.08); color: #7C3AED; }
.rct-comparison-meta-date { font-size: 11px; color: #94A3B8; margin-left: auto; }

/* Snapshot Table */
.rct-snapshot-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rct-snapshot-table th { background: #F1F5F9; padding: 8px 10px; text-align: left; font-weight: 600; color: #475569; border-bottom: 2px solid #E2E8F0; }
.rct-snapshot-table td { padding: 8px 10px; border-bottom: 1px solid #F1F5F9; color: #334155; }
.rct-snapshot-table tr:hover { background: #F8FAFC; }

/* Utility badges */
.rct-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.rct-badge-purple { background: rgba(124,58,237,0.1); color: #7C3AED; }
.rct-badge-blue { background: rgba(59,130,246,0.1); color: #2563EB; }
.rct-badge-green { background: rgba(16,185,129,0.1); color: #059669; }
.rct-badge-amber { background: rgba(217,119,6,0.1); color: #D97706; }
.rct-badge-gray { background: rgba(100,116,139,0.1); color: #64748B; }
.rct-badge-red { background: rgba(239,68,68,0.1); color: #DC2626; }

/* Links */
.rct-link { color: #7C3AED; text-decoration: none; font-size: 12px; font-weight: 500; cursor: pointer; }
.rct-link:hover { text-decoration: underline; }

/* Back button */
.rct-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: #64748B; cursor: pointer; margin-bottom: 16px; padding: 6px 10px; border-radius: 6px; border: none; background: none; }
.rct-back:hover { background: #F1F5F9; color: #0F172A; }

/* Empty state */
.rct-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #94A3B8; text-align: center; }
.rct-empty svg { margin-bottom: 16px; opacity: 0.4; }
.rct-empty h3 { color: #64748B; font-size: 16px; margin-bottom: 4px; }
.rct-empty p { font-size: 13px; }

/* Result summary highlight */
.rct-result-highlight { background: linear-gradient(135deg, #F5F3FF, #EDE9FE); border-radius: 10px; padding: 14px 18px; border: 1px solid #DDD6FE; margin: 12px 0; }
.rct-result-highlight p { font-size: 13px; color: #1E293B; line-height: 1.5; }

/* ===== Trial Design Visual Tabs ===== */
.rct-design-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.rct-design-tab { padding: 6px 14px; border-radius: 6px; border: 1px solid #E2E8F0; background: white; font-size: 12px; font-weight: 500; color: #64748B; cursor: pointer; transition: all 0.15s; }
.rct-design-tab:hover { background: #F8FAFC; color: #0F172A; }
.rct-design-tab.active { background: #7C3AED; color: white; border-color: #7C3AED; }

/* CONSORT Flow Chart */
.rct-consort-wrap { overflow-x: auto; padding: 12px 0; }

/* Timeline / Gantt */
.rct-timeline-wrap { overflow-x: auto; padding: 12px 0; }

/* ===== Attrition & Power Tab ===== */
.rct-attrition-subtabs { display: flex; gap: 2px; margin-bottom: 16px; background: #F1F5F9; border-radius: 8px; padding: 3px; }
.rct-attrition-subtab { padding: 8px 16px; border: none; background: transparent; border-radius: 6px; font-size: 13px; font-weight: 600; color: #64748B; cursor: pointer; transition: all 0.15s; }
.rct-attrition-subtab:hover { background: rgba(255,255,255,0.5); }
.rct-attrition-subtab.active { background: #fff; color: #7C3AED; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.rct-power-card { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px; }
.rct-power-value { font-size: 28px; font-weight: 800; line-height: 1.2; }
.rct-power-label { font-size: 12px; color: #64748B; margin-top: 2px; }
.rct-dropout-slider { width: 100%; height: 6px; border-radius: 3px; outline: none; -webkit-appearance: none; appearance: none; cursor: pointer; margin: 4px 0; }
.rct-dropout-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #7C3AED; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25); cursor: grab; margin-top: -6px; }
.rct-dropout-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #7C3AED; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.25); cursor: grab; }
.rct-dropout-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; }
.rct-dropout-slider::-moz-range-track { height: 6px; border-radius: 3px; border: none; }

/* ===== Publications Section ===== */
.rct-pub-section { margin-bottom: 16px; }
.rct-pub-category { font-size: 12px; font-weight: 700; color: #0F172A; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; padding-top: 8px; }
.rct-pub-category-badge { display: inline-flex; align-items: center; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
.rct-pub-primary { background: rgba(124,58,237,0.1); color: #7C3AED; }
.rct-pub-secondary { background: rgba(59,130,246,0.1); color: #2563EB; }
.rct-pub-posthoc { background: rgba(217,119,6,0.1); color: #D97706; }

.rct-pub-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 6px; margin-bottom: 4px; font-size: 12px; line-height: 1.5; }
.rct-pub-item:hover { background: #F8FAFC; }
.rct-pub-authors { font-weight: 600; color: #0F172A; }
.rct-pub-title { color: #334155; font-style: italic; }
.rct-pub-journal { color: #64748B; }
.rct-pub-link { color: #7C3AED; text-decoration: none; font-weight: 500; white-space: nowrap; }
.rct-pub-link:hover { text-decoration: underline; }

/* ===== Phase Badge Colors ===== */
.rct-phase-i { background: rgba(217,119,6,0.12); color: #B45309; }
.rct-phase-ii { background: rgba(37,99,235,0.12); color: #1D4ED8; }
.rct-phase-iii { background: rgba(124,58,237,0.12); color: #6D28D9; }
.rct-phase-nih { background: rgba(5,150,105,0.12); color: #047857; }
.rct-phase-iiib { background: rgba(124,58,237,0.08); color: #7C3AED; border: 1px dashed rgba(124,58,237,0.3); }
.rct-phase-iv { background: rgba(6,182,212,0.12); color: #0E7490; }

/* Phase breakdown in drug cards */
.rct-phase-breakdown { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.rct-phase-chip { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

/* Dose escalation table */
.rct-dose-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.rct-dose-table th { text-align: left; padding: 6px 10px; background: #F8FAFC; border-bottom: 2px solid #E2E8F0; font-weight: 600; color: #334155; font-size: 11px; }
.rct-dose-table td { padding: 6px 10px; border-bottom: 1px solid #F1F5F9; color: #475569; }
.rct-dose-table tr:hover td { background: #FAFBFD; }
.rct-dose-selected { background: rgba(124,58,237,0.06); }
.rct-dose-selected td { font-weight: 600; }

/* Early phase info blocks */
.rct-early-phase-block { background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; padding: 12px; margin: 8px 0; }
.rct-early-phase-label { font-size: 11px; font-weight: 700; color: #92400E; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.rct-early-phase-value { font-size: 12px; color: #78350F; line-height: 1.5; }
.rct-pk-block { background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: 8px; padding: 12px; margin: 8px 0; }
.rct-pk-label { font-size: 11px; font-weight: 700; color: #1E40AF; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.rct-pk-value { font-size: 12px; color: #1E3A5F; line-height: 1.5; }
.rct-rec-dose-block { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; padding: 12px; margin: 8px 0; }
.rct-rec-dose-label { font-size: 11px; font-weight: 700; color: #166534; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.rct-rec-dose-value { font-size: 12px; color: #14532D; line-height: 1.5; }

/* ===== Detail Tab Bar ===== */
.rct-detail-tabs { display: flex; gap: 2px; margin: 0 -20px; padding: 0 20px; border-bottom: 2px solid #E2E8F0; overflow-x: auto; flex-shrink: 0; }
.rct-detail-tab { padding: 6px 10px; border: none; background: none; font-size: 12px; font-weight: 500; color: #64748B; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; white-space: nowrap; }
.rct-detail-tab:hover { color: #334155; background: #F8FAFC; }
.rct-detail-tab.active { color: #7C3AED; border-bottom-color: #7C3AED; font-weight: 600; }

/* ===== Cross-Trial Comparability ===== */
.rct-comp-dim-card { transition: box-shadow 0.15s, transform 0.15s; }
.rct-comp-dim-card:hover { box-shadow: 0 2px 8px rgba(124,58,237,0.10); transform: translateY(-1px); }

/* ===== Subgroup Cards ===== */
.rct-subgroup-card { background: white; border: 1px solid #E2E8F0; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.rct-subgroup-title { font-size: 14px; font-weight: 700; color: #0F172A; margin-bottom: 4px; }
.rct-subgroup-citation { font-size: 11px; color: #64748B; font-style: italic; margin-bottom: 6px; }
.rct-subgroup-conclusion { font-size: 12px; color: #334155; margin-top: 8px; padding: 8px 10px; background: #F0FDF4; border-radius: 6px; border-left: 3px solid #059669; }

/* ===== Durability Analysis ===== */
.rct-durability-card { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 10px; padding: 14px; margin: 8px 0; }
.rct-durability-stat { background: white; border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px 14px; min-width: 110px; text-align: center; flex: 1; }
.rct-durability-value { font-size: 20px; font-weight: 700; color: #059669; line-height: 1.2; }
.rct-durability-label { font-size: 10px; font-weight: 600; color: #64748B; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.3px; }

/* ===== Rescue Criteria ===== */
.rct-rescue-card { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 10px; padding: 14px; margin: 8px 0; }
.rct-rescue-criterion { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; color: #334155; }
.rct-rescue-badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 8px; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0; }
.rct-rescue-functional { background: rgba(37,99,235,0.12); color: #1D4ED8; }
.rct-rescue-anatomic { background: rgba(5,150,105,0.12); color: #047857; }
.rct-rescue-clinical { background: rgba(234,88,12,0.12); color: #C2410C; }

/* ===== Baseline Characteristics Table ===== */
.rct-baseline-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.rct-baseline-table th { text-align: left; padding: 6px 10px; background: #F8FAFC; border-bottom: 2px solid #E2E8F0; font-weight: 600; color: #334155; font-size: 11px; }
.rct-baseline-table td { padding: 5px 10px; border-bottom: 1px solid #F1F5F9; color: #475569; }
.rct-baseline-table tr:hover td { background: #FAFBFD; }

/* Drug Program Map */
.rct-program-map { margin-bottom: 16px; background: #FAFBFC; border-radius: 10px; border: 1px solid #E2E8F0; padding: 12px; overflow-x: auto; }
.rct-program-map svg { display: block; }
.rct-program-map text { user-select: none; }

/* ============================================================================
   RETINAL SCIENCE — Pathway Atlas, Target Encyclopedia, Drug-Target Matrix
   ============================================================================ */

/* Container & Layout */
.sci-container { display: flex; flex-direction: column; height: calc(100vh - 80px); overflow: hidden; }
.sci-top-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; border-bottom: 1px solid #E2E8F0; background: white; gap: 16px; flex-shrink: 0; }
.sci-content { flex: 1; overflow-y: auto; padding: 20px 24px; background: #F8FAFC; }

/* Tab Bar */
.sci-tab-bar { display: flex; gap: 4px; }
.sci-tab { padding: 8px 16px; border-radius: 20px; border: 1px solid #E2E8F0; background: white; font-size: 13px; font-weight: 500; color: #64748B; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.sci-tab:hover { background: #F1F5F9; color: #334155; }
.sci-tab.active { background: #7C3AED; color: white; border-color: #7C3AED; }

/* Search */
.sci-search-bar { position: relative; }
.sci-search-input { padding: 8px 32px 8px 12px; border: 1px solid #E2E8F0; border-radius: 8px; font-size: 13px; width: 240px; outline: none; transition: border-color 0.2s; }
.sci-search-input:focus { border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124,58,237,0.1); }
.sci-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #94A3B8; cursor: pointer; font-size: 14px; }

/* Select dropdowns */
.sci-select { padding: 6px 10px; border: 1px solid #E2E8F0; border-radius: 6px; font-size: 12px; color: #334155; background: white; outline: none; cursor: pointer; }
.sci-select:focus { border-color: #7C3AED; }

/* ============================================================================
   PATHWAY ATLAS TAB
   ============================================================================ */
.sci-pathway-tab { }
.sci-pathway-controls { display: flex; gap: 24px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.sci-pathway-selector, .sci-spotlight-selector { display: flex; align-items: center; gap: 8px; }
.sci-pathway-selector label, .sci-spotlight-selector label { font-size: 12px; font-weight: 600; color: #475569; white-space: nowrap; }
.sci-pathway-desc { background: white; border: 1px solid #E2E8F0; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.sci-pathway-desc p { font-size: 13px; color: #475569; line-height: 1.6; }
.sci-pathway-diagram-container { background: white; border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px; overflow: hidden; }
.sci-pathway-svg { border-radius: 8px; }

/* SVG Edge Animations */
.sci-edge-flow { animation: sci-flow 2s linear infinite; }
@keyframes sci-flow { from { stroke-dashoffset: 32; } to { stroke-dashoffset: 0; } }
.sci-edge-label { pointer-events: none; }

/* SVG Node Hover */
.sci-node-hover { filter: drop-shadow(0 0 6px rgba(124,58,237,0.3)); transition: filter 0.2s; }

/* Drug Block Pulse */
.sci-drug-block-pulse { animation: sci-pulse 1.5s ease-in-out infinite; }
@keyframes sci-pulse { 0%, 100% { opacity: 0.8; } 50% { opacity: 0.3; } }

/* Drug Badge Glow */
.sci-drug-badge-glow { animation: sci-glow 2s ease-in-out infinite; }
@keyframes sci-glow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(0,0,0,0.2)); } 50% { filter: drop-shadow(0 0 10px rgba(124,58,237,0.5)); } }

/* Spotlight Info */
.sci-spotlight-info { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; margin-top: 12px; }
.sci-spotlight-badge { background: #7C3AED; color: white; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sci-spotlight-info p { font-size: 12px; color: #92400E; }

/* ============================================================================
   TARGET ENCYCLOPEDIA TAB
   ============================================================================ */
.sci-encyclopedia { display: flex; gap: 20px; min-height: calc(100vh - 200px); }
.sci-enc-sidebar { width: 240px; flex-shrink: 0; background: white; border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px; overflow-y: auto; max-height: calc(100vh - 200px); }
.sci-enc-category { margin-bottom: 12px; }
.sci-enc-cat-header { font-size: 11px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 8px; }
.sci-enc-target-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s; margin-bottom: 2px; }
.sci-enc-target-item:hover { background: #F1F5F9; }
.sci-enc-target-item.active { background: #EDE9FE; border-left-color: #7C3AED; }
.sci-enc-target-name { font-size: 13px; font-weight: 600; color: #1E293B; }
.sci-enc-target-drugs { font-size: 11px; color: #94A3B8; }

.sci-enc-content { flex: 1; min-width: 0; }
.sci-enc-hero { display: flex; align-items: center; gap: 16px; padding: 20px; background: white; border: 1px solid #E2E8F0; border-radius: 12px; margin-bottom: 16px; border-left: 4px solid; }
.sci-enc-hero-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; flex-shrink: 0; }
.sci-enc-hero-info h2 { font-size: 20px; font-weight: 700; color: #1E293B; margin-bottom: 8px; }
.sci-enc-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.sci-badge { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.sci-badge-outline { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; border: 1px solid #CBD5E1; color: #64748B; background: #F8FAFC; }

.sci-enc-sections { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: calc(100vh - 340px); padding-right: 4px; }
.sci-enc-section { background: white; border: 1px solid #E2E8F0; border-radius: 12px; padding: 16px 20px; }
.sci-enc-section h3 { font-size: 15px; font-weight: 700; color: #1E293B; margin-bottom: 10px; }
.sci-enc-desc { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 12px; }
.sci-enc-detail { margin-bottom: 12px; }
.sci-enc-detail strong { font-size: 12px; color: #334155; display: block; margin-bottom: 4px; }
.sci-enc-detail p { font-size: 12.5px; color: #475569; line-height: 1.6; }

/* Disease chips in encyclopedia */
.sci-enc-disease-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sci-disease-chip { padding: 4px 12px; border-radius: 14px; font-size: 11px; font-weight: 600; border: 1px solid; }
.sci-enc-pathway-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sci-pathway-chip { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; border: 1px solid; background: white; }
.sci-pathway-chip:hover { opacity: 0.8; }

/* Drug list in encyclopedia */
.sci-enc-drug-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sci-enc-drug-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #334155; padding: 4px 0; }
.sci-enc-drug-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Key facts */
.sci-enc-facts { margin: 0; padding-left: 20px; }
.sci-enc-facts li { font-size: 12.5px; color: #475569; line-height: 1.6; margin-bottom: 6px; }

/* ============================================================================
   DRUG-TARGET MATRIX TAB
   ============================================================================ */
.sci-matrix-container { }
.sci-matrix-header { margin-bottom: 16px; }
.sci-matrix-header h3 { font-size: 17px; font-weight: 700; color: #1E293B; margin-bottom: 4px; }
.sci-matrix-header p { font-size: 12px; color: #64748B; }
.sci-matrix-scroll { overflow-x: auto; background: white; border: 1px solid #E2E8F0; border-radius: 12px; }
.sci-matrix-table { width: 100%; border-collapse: collapse; }
.sci-matrix-table th, .sci-matrix-table td { padding: 10px 12px; text-align: center; border-bottom: 1px solid #F1F5F9; }
.sci-matrix-corner { text-align: left; font-size: 11px; font-weight: 600; color: #94A3B8; min-width: 200px; text-transform: uppercase; letter-spacing: 0.5px; }
.sci-matrix-col-header { font-size: 11px; font-weight: 600; color: #475569; cursor: pointer; transition: background 0.15s; min-width: 80px; }
.sci-matrix-col-header.highlighted { background: #EDE9FE; }
.sci-matrix-col-header:hover { background: #F1F5F9; }
.sci-matrix-target-label { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sci-matrix-target-icon { font-size: 16px; }
.sci-matrix-drug-cell { text-align: left; min-width: 220px; }
.sci-matrix-drug-name { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #1E293B; }
.sci-matrix-drug-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sci-matrix-drug-type { font-size: 10px; color: #94A3B8; margin-top: 2px; margin-left: 16px; }
.sci-matrix-cell { position: relative; }
.sci-matrix-cell.col-highlighted { background: #EDE9FE20; }
.sci-matrix-row-highlighted td { background: #F5F3FF; }
.sci-matrix-dot { width: 18px; height: 18px; border-radius: 50%; margin: 0 auto; opacity: 0.85; transition: transform 0.15s; }
.sci-matrix-dot:hover { transform: scale(1.3); opacity: 1; }
.sci-dot-high { width: 20px; height: 20px; }
.sci-dot-indirect { width: 10px; height: 10px; opacity: 0.45; }
.sci-dot-medium { width: 14px; height: 14px; opacity: 0.65; }

/* Matrix Tooltip */
.sci-matrix-tooltip { background: #1E293B; color: white; padding: 10px 14px; border-radius: 8px; z-index: 1000; pointer-events: none; min-width: 200px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.sci-matrix-tt-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.sci-matrix-tt-affinity { font-size: 11px; color: #94A3B8; margin-bottom: 4px; }
.sci-matrix-tt-moa { font-size: 11px; color: #CBD5E1; line-height: 1.4; }

/* Matrix Legend */
.sci-matrix-legend { display: flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 11px; color: #64748B; }

/* Matrix Filter Controls */
.sci-matrix-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.sci-matrix-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.sci-matrix-filter-btn { padding: 6px 14px; border-radius: 20px; border: 1px solid #d1d5db; background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.2s; color: #374151; }
.sci-matrix-filter-btn:hover { border-color: #6366f1; color: #6366f1; }
.sci-matrix-filter-btn.active { background: #6366f1; color: #fff; border-color: #6366f1; }
.sci-matrix-pipeline-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748B; cursor: pointer; white-space: nowrap; }
.sci-matrix-pipeline-toggle input[type="checkbox"] { accent-color: #6366f1; width: 16px; height: 16px; }
.sci-matrix-pipeline-row { background: #fefce8 !important; }
.sci-matrix-pipeline-row:hover { background: #fef9c3 !important; }
.sci-matrix-failed td { opacity: 0.6; }
.sci-matrix-failed .sci-matrix-drug-name span:nth-child(2) { text-decoration: line-through; }
.sci-matrix-pipeline-badge { font-size: 10px; padding: 2px 6px; border-radius: 8px; background: #fef3c7; color: #92400e; margin-left: 6px; font-weight: 600; }
.sci-matrix-failed-badge { background: #fecaca !important; color: #991b1b !important; }
.sci-matrix-category-header th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #9ca3af; border-bottom: none !important; padding-bottom: 2px !important; font-weight: 600; }

/* ============================================================================
   DISEASE MECHANISM CARDS TAB
   ============================================================================ */
.sci-disease-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 16px; }
.sci-disease-card { background: white; border: 1px solid #E2E8F0; border-radius: 12px; padding: 20px; border-left: 4px solid; transition: box-shadow 0.2s; }
.sci-disease-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.sci-disease-card.expanded { grid-column: 1 / -1; }
.sci-disease-card-header { display: flex; align-items: center; gap: 12px; cursor: pointer; margin-bottom: 10px; }
.sci-disease-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sci-disease-info { flex: 1; }
.sci-disease-info h3 { font-size: 16px; font-weight: 700; color: #1E293B; }
.sci-disease-full-name { font-size: 11px; color: #94A3B8; }
.sci-disease-chevron { font-size: 12px; color: #94A3B8; }
.sci-disease-desc { font-size: 12.5px; color: #475569; line-height: 1.6; margin-bottom: 12px; }

/* Chips */
.sci-disease-chips-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.sci-disease-chip-label { font-size: 11px; font-weight: 600; color: #64748B; }
.sci-target-chip { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; border: 1px solid; display: inline-flex; align-items: center; gap: 4px; }
.sci-target-chip:hover { opacity: 0.8; }

/* Progression Timeline */
.sci-progression { margin-top: 12px; }
.sci-progression-label { font-size: 11px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.sci-progression-stages { display: flex; flex-direction: column; gap: 6px; }
.sci-stage { display: flex; align-items: flex-start; gap: 10px; }
.sci-stage-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; position: relative; }
.sci-stage-line { position: absolute; width: 2px; height: 18px; top: 14px; left: 6px; }
.sci-stage-content { flex: 1; }
.sci-stage-name { font-size: 12px; font-weight: 700; }
.sci-stage-desc { font-size: 11px; color: #64748B; line-height: 1.5; margin-top: 2px; }

/* Expanded disease content */
.sci-disease-expanded { margin-top: 12px; border-top: 1px solid #E2E8F0; padding-top: 12px; }
.sci-disease-epi { font-size: 12px; color: #475569; line-height: 1.6; margin-bottom: 10px; background: #F0F9FF; border-radius: 8px; padding: 10px 14px; }
.sci-disease-events { }
.sci-disease-events strong { font-size: 13px; color: #1E293B; display: block; margin-bottom: 6px; }
.sci-disease-events ol { padding-left: 20px; margin: 0; }
.sci-disease-events li { font-size: 12px; color: #475569; line-height: 1.6; margin-bottom: 4px; }

/* ============================================================================
   CROSS-LINKING: Target link styling in RCT Explorer
   ============================================================================ */
.sci-target-link { color: #7C3AED; text-decoration: none; border-bottom: 1.5px dotted #7C3AED; cursor: pointer; font-weight: 500; transition: all 0.15s; padding-bottom: 1px; }
.sci-target-link:hover { color: #5B21B6; border-bottom-color: #5B21B6; background: rgba(124,58,237,0.06); border-radius: 2px; }

/* ============================================================================
   DRUG PROFILES TAB
   ============================================================================ */
.sci-drug-profiles { }
.sci-drug-view-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.sci-view-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid #E2E8F0; background: white; font-size: 13px; font-weight: 500; color: #64748B; cursor: pointer; transition: all 0.2s; }
.sci-view-btn.active { background: #7C3AED; color: white; border-color: #7C3AED; }
.sci-view-btn:hover:not(.active) { background: #F1F5F9; }

/* Drug Cards Grid */
.sci-drug-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.sci-drug-card { background: white; border-radius: 12px; border: 1px solid #E2E8F0; overflow: hidden; transition: box-shadow 0.2s; }
.sci-drug-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.sci-drug-card.expanded { grid-column: 1 / -1; }

/* Card Header */
.sci-drug-card-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px; border-left: 4px solid; }
.sci-drug-card-title { display: flex; gap: 12px; align-items: center; }
.sci-drug-card-icon { font-size: 24px; }
.sci-drug-card-title h3 { margin: 0; font-size: 16px; color: #1E293B; }
.sci-drug-card-generic { font-size: 13px; color: #64748B; }
.sci-drug-card-mfr { font-size: 11px; color: #94A3B8; margin-top: 2px; }
.sci-drug-card-badges { display: flex; gap: 6px; flex-shrink: 0; }
.sci-drug-format-badge { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.sci-drug-year-badge { padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; background: #F1F5F9; color: #475569; }

/* Stats Row */
.sci-drug-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #E2E8F0; margin: 0 16px; border-radius: 8px; overflow: hidden; }
.sci-drug-stat { background: white; padding: 10px 12px; text-align: center; }
.sci-drug-stat-value { font-size: 13px; font-weight: 600; color: #1E293B; line-height: 1.3; }
.sci-drug-stat-label { font-size: 10px; color: #94A3B8; margin-top: 2px; }

/* Card Actions */
.sci-drug-card-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #F1F5F9; }
.sci-drug-expand-btn { flex: 1; padding: 6px 12px; border-radius: 6px; border: 1px solid #E2E8F0; background: white; font-size: 12px; color: #64748B; cursor: pointer; transition: all 0.15s; }
.sci-drug-expand-btn:hover { background: #F8FAFC; color: #1E293B; }
.sci-drug-compare-btn { padding: 6px 12px; border-radius: 6px; border: 1px solid #E2E8F0; background: white; font-size: 12px; color: #64748B; cursor: pointer; transition: all 0.15s; }
.sci-drug-compare-btn.active { background: #7C3AED; color: white; border-color: #7C3AED; }
.sci-drug-compare-btn:hover:not(.active) { background: #F8FAFC; }

/* Expanded Details */
.sci-drug-expanded { border-top: 1px solid #E2E8F0; }
.sci-drug-accordion { border-bottom: 1px solid #F1F5F9; }
.sci-drug-accordion-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; cursor: pointer; font-size: 13px; font-weight: 600; color: #1E293B; transition: background 0.15s; }
.sci-drug-accordion-header:hover { background: #F8FAFC; }
.sci-drug-accordion-arrow { font-size: 10px; color: #94A3B8; }
.sci-drug-accordion-body { padding: 0 16px 16px; font-size: 13px; color: #475569; line-height: 1.6; }
.sci-drug-accordion-body p { margin: 0 0 8px; }
.sci-drug-accordion-body strong { color: #1E293B; }

/* Binding Table */
.sci-drug-binding-table { margin-top: 12px; border: 1px solid #E2E8F0; border-radius: 8px; overflow: hidden; }
.sci-drug-binding-header { display: grid; grid-template-columns: 1fr 80px 1fr; gap: 0; background: #F8FAFC; padding: 8px 12px; font-size: 11px; font-weight: 600; color: #475569; }
.sci-drug-binding-row { display: grid; grid-template-columns: 1fr 80px 1fr; gap: 0; padding: 8px 12px; border-top: 1px solid #F1F5F9; font-size: 12px; }
.sci-drug-kd { font-weight: 600; color: #7C3AED; }

/* PK Grid */
.sci-drug-pk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sci-drug-pk-item { background: #F8FAFC; border-radius: 8px; padding: 10px; }
.sci-drug-pk-label { font-size: 10px; color: #94A3B8; font-weight: 600; text-transform: uppercase; }
.sci-drug-pk-value { font-size: 13px; color: #1E293B; margin-top: 4px; }

/* Indications */
.sci-drug-indications { margin-top: 8px; }
.sci-drug-indication-row { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid #F1F5F9; font-size: 12px; }
.sci-drug-indication-name { font-weight: 600; color: #1E293B; min-width: 80px; }
.sci-drug-loading { font-size: 11px; color: #94A3B8; }

/* Formulation Grid */
.sci-drug-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sci-drug-form-item { font-size: 12px; }
.sci-drug-form-label { font-weight: 600; color: #475569; }

/* AE Tables */
.sci-drug-ae-section { }
.sci-drug-ae-section strong { font-size: 13px; color: #1E293B; }
.sci-drug-ae-table { margin-top: 6px; }
.sci-drug-ae-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #F1F5F9; font-size: 12px; }
.sci-drug-ae-row.serious { color: #DC2626; }
.sci-drug-ae-rate { font-weight: 600; }

/* Cross-links */
.sci-drug-crosslinks { padding: 12px 16px; background: #F8FAFC; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sci-drug-link-chip { display: inline-block; padding: 2px 8px; border-radius: 12px; border: 1px solid; font-size: 11px; font-weight: 500; transition: all 0.15s; }
.sci-drug-link-chip:hover { opacity: 0.8; }

/* Comparison Table */
.sci-comparison-empty { text-align: center; padding: 40px; color: #94A3B8; font-size: 14px; }
.sci-comparison-table-wrapper { overflow-x: auto; border-radius: 12px; border: 1px solid #E2E8F0; }
.sci-comparison-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sci-comparison-table th { padding: 12px 16px; background: #F8FAFC; border-bottom: 2px solid #E2E8F0; text-align: left; font-weight: 600; position: sticky; top: 0; border-top: 3px solid; }
.sci-comparison-table td { padding: 10px 16px; border-bottom: 1px solid #F1F5F9; vertical-align: top; }
.sci-comparison-row-header { font-weight: 600; color: #475569; background: #FAFBFC; min-width: 120px; }

/* ============================================================================
   PIPELINE TAB
   ============================================================================ */
.sci-pipeline { }
.sci-pipeline-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.sci-pipeline-filters { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #475569; }
.sci-pipeline-view-toggle { display: flex; gap: 8px; }

/* Pipeline Table */
.sci-pipeline-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #E2E8F0; background: white; }
.sci-pipeline-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sci-pipeline-table th { padding: 10px 12px; background: #F8FAFC; border-bottom: 2px solid #E2E8F0; text-align: left; font-weight: 600; color: #475569; font-size: 11px; text-transform: uppercase; white-space: nowrap; }
.sci-pipeline-table td { padding: 10px 12px; border-bottom: 1px solid #F1F5F9; vertical-align: top; }
.sci-pipeline-table tr:hover { background: #FAFBFC; }
.sci-pipeline-failed-row { opacity: 0.7; }
.sci-pipeline-failed-row td { text-decoration: line-through; }
.sci-pipeline-failed-row td:first-child, .sci-pipeline-failed-row td:nth-child(5), .sci-pipeline-failed-row td:nth-child(6) { text-decoration: none; }
.sci-pipeline-drug-name { font-weight: 600; font-size: 13px; }
.sci-pipeline-alt { font-size: 11px; color: #94A3B8; }
.sci-pipeline-mech { font-size: 11px; color: #94A3B8; margin-top: 2px; }
.sci-pipeline-modality { padding: 2px 6px; border-radius: 4px; background: #F1F5F9; font-size: 11px; }
.sci-pipeline-trial { font-size: 11px; color: #64748B; margin-bottom: 2px; }

/* Phase Badges */
.sci-phase-badge { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.sci-phase-badge.failed { background: #FEE2E2 !important; color: #E11D48 !important; text-decoration: line-through; }

/* Pipeline Status */
.sci-pipeline-status { font-size: 12px; font-weight: 500; }
.sci-pipeline-status.active { color: #059669; }
.sci-pipeline-status.failed { color: #E11D48; }
.sci-pipeline-disease-chip { display: inline-block; padding: 2px 6px; border-radius: 10px; font-size: 10px; font-weight: 500; margin: 1px 2px; }

/* Swim Lane */
.sci-pipeline-swimlane-wrap { overflow-x: auto; background: white; border-radius: 12px; border: 1px solid #E2E8F0; padding: 16px; }
.sci-pipeline-swimlane { display: block; }

/* ============================================================================
   CATEGORY FILTERS (Target Encyclopedia with 7 categories)
   ============================================================================ */
.sci-enc-category { margin-bottom: 4px; }
.sci-enc-cat-header { padding: 8px 12px; font-size: 12px; font-weight: 600; color: #475569; background: #F8FAFC; border-radius: 6px; cursor: default; }

/* ============================================================================
   ZOOM / PAN CONTROLS (Pathway Atlas)
   ============================================================================ */
.sci-zoom-controls { position: absolute; top: 12px; right: 12px; display: flex; gap: 4px; z-index: 10; background: rgba(255,255,255,0.9); border-radius: 8px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); backdrop-filter: blur(8px); }
.sci-zoom-btn { width: 32px; height: 32px; border: 1px solid #E2E8F0; border-radius: 6px; background: white; color: #475569; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.sci-zoom-btn:hover { background: #F1F5F9; color: #1E293B; border-color: #CBD5E1; }
.sci-zoom-btn:active { transform: scale(0.95); }
.sci-zoom-label { font-size: 11px; color: #64748B; padding: 0 8px; display: flex; align-items: center; font-weight: 500; min-width: 40px; justify-content: center; }

/* ============================================================================
   MINIMAP (Pathway Atlas)
   ============================================================================ */
.sci-minimap { position: absolute; bottom: 12px; right: 12px; width: 160px; height: 90px; background: rgba(255,255,255,0.92); border: 1px solid #E2E8F0; border-radius: 8px; overflow: hidden; z-index: 10; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.sci-minimap svg { width: 100%; height: 100%; }
.sci-minimap-viewport { fill: rgba(37, 99, 235, 0.12); stroke: #2563EB; stroke-width: 1.5; rx: 2; }

/* ============================================================================
   SIDE PANEL (Target detail on node click)
   ============================================================================ */
.sci-side-panel { position: absolute; top: 0; right: 0; width: 320px; height: 100%; background: white; border-left: 1px solid #E2E8F0; box-shadow: -4px 0 16px rgba(0,0,0,0.08); z-index: 20; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; overflow-x: hidden; word-wrap: break-word; overflow-wrap: break-word; border-radius: 0 12px 12px 0; }
.sci-side-panel-open { transform: translateX(0); }
.sci-side-panel-close { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border: none; border-radius: 6px; background: #F1F5F9; color: #64748B; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1; }
.sci-side-panel-close:hover { background: #E2E8F0; color: #1E293B; }
.sci-side-panel-header { padding: 20px 16px 12px; border-bottom: 1px solid #F1F5F9; }
.sci-side-panel-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 10px; }
.sci-side-panel-name { font-size: 18px; font-weight: 700; color: #1E293B; margin-bottom: 2px; }
.sci-side-panel-gene { font-size: 12px; color: #64748B; font-weight: 500; }
.sci-side-panel-body { padding: 12px 16px; }
.sci-side-panel-section { margin-bottom: 12px; }
.sci-side-panel-section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #94A3B8; margin-bottom: 4px; }
.sci-side-panel-desc { font-size: 13px; color: #475569; line-height: 1.5; word-wrap: break-word; overflow-wrap: break-word; }
.sci-side-panel-drugs { display: flex; flex-wrap: wrap; gap: 4px; }
.sci-side-panel-drug-chip { display: inline-block; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; word-break: break-word; max-width: 100%; }
.sci-side-panel-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sci-side-panel-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; background: #F1F5F9; color: #64748B; }
.sci-side-panel-view-btn { display: block; width: 100%; padding: 10px; border: none; border-radius: 8px; background: #2563EB; color: white; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; margin-top: 16px; transition: background 0.15s; }
.sci-side-panel-view-btn:hover { background: #1D4ED8; }

/* ============================================================================
   DRUG ANNOTATION CARD (Drug spotlight overlay)
   ============================================================================ */
.sci-drug-annotation-card { position: absolute; background: white; border: 1px solid #E2E8F0; border-radius: 8px; padding: 8px 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 15; max-width: 200px; pointer-events: none; }
.sci-drug-annotation-card-name { font-size: 12px; font-weight: 600; color: #1E293B; }
.sci-drug-annotation-card-moa { font-size: 11px; color: #64748B; line-height: 1.4; margin-top: 2px; }

/* ============================================================================
   ENCYCLOPEDIA SEARCH & FILTER BAR
   ============================================================================ */
.sci-enc-search-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: white; border: 1px solid #E2E8F0; border-radius: 10px; margin-bottom: 12px; }
.sci-enc-search-bar input { flex: 1; border: none; outline: none; font-size: 13px; color: #1E293B; background: transparent; }
.sci-enc-search-bar input::placeholder { color: #94A3B8; }
.sci-enc-search-icon { color: #94A3B8; font-size: 16px; flex-shrink: 0; }
.sci-enc-filter-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.sci-enc-filter-chip { padding: 4px 10px; border-radius: 16px; border: 1px solid #E2E8F0; background: white; font-size: 11px; font-weight: 500; color: #64748B; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.sci-enc-filter-chip:hover { border-color: #CBD5E1; color: #475569; }
.sci-enc-filter-active { background: #EEF2FF; border-color: #818CF8; color: #4F46E5; }
.sci-enc-filter-active:hover { background: #E0E7FF; }

/* ============================================================================
   PIPELINE COLUMN VIEW
   ============================================================================ */
.sci-pipeline-columns { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 16px; min-height: 400px; }
.sci-pipeline-column { flex: 1; min-width: 160px; max-width: 220px; background: #F8FAFC; border-radius: 10px; padding: 8px; border: 1px solid #E2E8F0; }
.sci-pipeline-column-header { padding: 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 6px; margin-bottom: 8px; text-align: center; color: white; }
.sci-pipeline-col-card { background: white; border-radius: 8px; border: 1px solid #E2E8F0; padding: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s; }
.sci-pipeline-col-card:hover { border-color: #CBD5E1; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transform: translateY(-1px); }
.sci-pipeline-col-card-name { font-size: 13px; font-weight: 600; color: #1E293B; margin-bottom: 3px; }
.sci-pipeline-col-card-company { font-size: 11px; color: #64748B; margin-bottom: 6px; }
.sci-pipeline-col-card-targets { display: flex; flex-wrap: wrap; gap: 3px; }
.sci-pipeline-col-card-chip { display: inline-block; padding: 2px 6px; border-radius: 8px; font-size: 10px; font-weight: 500; }
.sci-pipeline-col-card-detail { margin-top: 8px; padding-top: 8px; border-top: 1px solid #F1F5F9; font-size: 12px; color: #475569; line-height: 1.5; }
.sci-pipeline-col-card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #2563EB; font-weight: 500; cursor: pointer; margin-top: 6px; }
.sci-pipeline-col-card-link:hover { color: #1D4ED8; text-decoration: underline; }
.sci-pipeline-col-card.failed { opacity: 0.6; border-style: dashed; }

/* ============================================================================
   DISEASE SELECTOR (Disease Mechanisms tab)
   ============================================================================ */
.sci-disease-selector { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sci-disease-pill { padding: 6px 14px; border-radius: 20px; border: 1px solid #E2E8F0; background: white; font-size: 12px; font-weight: 500; color: #64748B; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.sci-disease-pill:hover { border-color: #CBD5E1; color: #475569; background: #F8FAFC; }
.sci-disease-pill.active { color: white; border-color: transparent; }

/* ============================================================================
   FLOW DIAGRAM (Disease pathophysiology)
   ============================================================================ */
.sci-flow-diagram { background: white; border-radius: 12px; border: 1px solid #E2E8F0; padding: 20px; margin-bottom: 16px; overflow-x: auto; }
.sci-flow-diagram svg { display: block; margin: 0 auto; }
.sci-flow-node { cursor: pointer; transition: opacity 0.15s; }
.sci-flow-node:hover { opacity: 0.85; }
.sci-flow-arrow { stroke: #CBD5E1; stroke-width: 2; fill: none; }

/* ============================================================================
   TREATMENT LANDSCAPE (Drug grid below flow diagram)
   ============================================================================ */
.sci-treatment-landscape { background: white; border-radius: 12px; border: 1px solid #E2E8F0; padding: 16px; margin-bottom: 16px; }
.sci-treatment-landscape-title { font-size: 14px; font-weight: 700; color: #1E293B; margin-bottom: 12px; }
.sci-treatment-landscape-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.sci-treatment-landscape-card { padding: 10px; border-radius: 8px; border: 1px solid #E2E8F0; background: #FAFBFF; cursor: pointer; transition: all 0.15s; }
.sci-treatment-landscape-card:hover { border-color: #CBD5E1; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
.sci-treatment-landscape-drug { font-size: 13px; font-weight: 600; color: #1E293B; }
.sci-treatment-landscape-class { font-size: 11px; color: #64748B; }
.sci-treatment-landscape-status { font-size: 10px; font-weight: 500; margin-top: 4px; }

/* ============================================================================
   CLINICAL IMAGING SECTION
   ============================================================================ */
.sci-imaging-section { background: white; border-radius: 12px; border: 1px solid #E2E8F0; padding: 16px; margin-bottom: 16px; }
.sci-imaging-section-title { font-size: 14px; font-weight: 700; color: #1E293B; margin-bottom: 10px; }
.sci-imaging-cards-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sci-imaging-card { flex: 1; min-width: 160px; max-width: 260px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 10px; padding: 12px; text-align: center; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.sci-imaging-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); border-color: #93C5FD; }
.sci-imaging-thumb { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 8px; display: block; border: 2px solid #E2E8F0; transition: border-color 0.15s ease; background: #0F172A; }
.sci-imaging-card:hover .sci-imaging-thumb { border-color: #3B82F6; }
.sci-imaging-stage { margin-bottom: 12px; }
.sci-imaging-stage-name { font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 4px; }
.sci-imaging-stage-desc { font-size: 11px; color: #64748B; line-height: 1.5; text-align: left; }

/* ============================================================================
   PARTIAL BINDING DOT (Drug-Target Matrix)
   ============================================================================ */
.sci-matrix-dot.sci-dot-partial { width: 14px; height: 14px; border-radius: 50%; border: 2px solid; background: linear-gradient(to right, currentColor 50%, transparent 50%); }

/* ============================================================================
   DISEASE NODE TYPE (Pathway SVG — expanded VEGF diagram)
   ============================================================================ */
.sci-pathway-disease-node { rx: 8; ry: 8; stroke-dasharray: 4 2; }

/* ============================================================================
   PATHWAY CONTAINER (overflow hidden for zoom/pan)
   ============================================================================ */
.sci-pathway-diagram-zoom-container { position: relative; overflow: hidden; border-radius: 12px; background: white; border: 1px solid #E2E8F0; }
.sci-pathway-diagram-inner { transform-origin: 0 0; cursor: grab; }
.sci-pathway-diagram-inner:active { cursor: grabbing; }

/* ============================================================================
   DRUG CLASS GROUPING HEADERS (Drug Profiles tab)
   ============================================================================ */
.sci-drug-class-header { padding: 10px 16px; font-size: 14px; font-weight: 700; color: #1E293B; border-bottom: 2px solid #E2E8F0; margin-top: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.sci-drug-class-header:first-child { margin-top: 0; }
.sci-drug-class-count { font-size: 12px; font-weight: 500; color: #94A3B8; }

/* ============================================================================
   PATENT EXPIRY BADGE
   ============================================================================ */
.sci-patent-expiry { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* ============================================================================
   DASHBOARD REDESIGN — Section Launcher Grid + Compact Brief + Compact Papers
   ============================================================================ */

/* Compact Daily Brief Bar */
.dash-brief-bar {
  background: linear-gradient(135deg, #7C3AED, #5B21B6);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  margin-bottom: 16px;
}
.dash-brief-bar:hover {
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

/* Section Launcher Grid */
.dash-sections-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.dash-section-card {
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  color: white;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  user-select: none;
}
.dash-section-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.dash-section-card:hover {
  transform: scale(1.06) translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}
.dash-section-card:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Compact Research Papers Card */
.dash-papers-compact {
  max-height: 280px;
  overflow: hidden;
  background: white;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.dash-papers-list {
  max-height: 210px;
  overflow-y: auto;
  padding: 0 18px 14px 18px;
}
.dash-paper-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: background 0.12s;
  border-radius: 6px;
}
.dash-paper-row:hover {
  background: #F8FAFC;
}
.dash-paper-row:last-child {
  border-bottom: none;
}

/* Responsive: 3 columns on smaller screens */
@media (max-width: 900px) {
  .dash-sections-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .dash-sections-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-section-card { min-height: 100px; padding: 14px 8px; }
}
