/* Inbox Row */
.inbox-row {
    height: 72px; /* Comfortable touch target */
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: background-color 0.1s ease;
    position: relative;
    border-left: 3px solid transparent; /* Selection indicator placeholder */
}

.inbox-row:hover {
    background-color: var(--bg-hover);
}

.inbox-row.selected {
    background-color: var(--bg-active);
    border-left-color: var(--accent-primary);
}

.inbox-row.unread .row-title {
    color: #fff;
    font-weight: 600;
}

/* Row Internal Layout */
.row-icon {
    width: 20px;
    height: 20px;
    margin-right: var(--space-3);
    color: var(--text-muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-content {
    flex: 1;
    min-width: 0; /* Text truncation magic */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.row-title {
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.row-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: var(--space-2);
    font-variant-numeric: tabular-nums;
}

.row-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hover Actions */
.row-actions {
    display: none; /* Hidden by default */
    margin-left: var(--space-2);
    gap: 4px;
}

.inbox-row:hover .row-actions {
    display: flex; /* Show on hover */
}

.inbox-row:hover .row-date {
    display: none; /* Hide date to make room for actions */
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.1s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
}

/* Sidebar Item */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px var(--space-3);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 2px;
    transition: all 0.1s ease;
}

.nav-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: rgba(59, 130, 246, 0.1); /* Blue tint */
    color: var(--accent-primary);
    font-weight: 500;
}

.nav-count {
    font-size: 11px;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.badge-urgent { background: rgba(239, 68, 68, 0.15); color: var(--status-critical); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--status-warning); }
.badge-warm { background: rgba(245, 158, 11, 0.12); color: var(--status-warm); } /* Warm leads - positive amber */
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--status-success); }
.badge-neutral { background: var(--bg-hover); color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.1s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white;
}
.btn-primary:hover {
    background-color: #2563EB;
}

.btn-secondary {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}
.btn-secondary:hover {
    background-color: var(--bg-card);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* Cards (for Stage) */
.panel-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.stage-content-wrapper .panel-card {
    background-color: transparent;
    border-color: var(--border-subtle);
    border-radius: 0;
    padding: var(--space-4) 0;
    margin-bottom: var(--space-6);
}

.stage-content-wrapper .panel-card:not(:last-child) {
    border-bottom: 1px solid var(--border-subtle);
    border-top: none;
    border-left: none;
    border-right: none;
}

.stage-content-wrapper .panel-card:last-child {
    border: none;
}

.panel-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    letter-spacing: 0.05em;
}

/* ============================================================================
   Topic Evidence (Content) — Inline, Collapsible
   ============================================================================ */

.topic-evidence {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.topic-evidence-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.topic-evidence-summary::-webkit-details-marker {
    display: none;
}

.topic-evidence-summary-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topic-evidence-icon {
    font-size: 14px;
    color: #6b7280;
}

.topic-evidence-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.topic-evidence-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topic-evidence-body {
    padding: 14px;
    background: #ffffff;
}

.topic-evidence-section + .topic-evidence-section {
    margin-top: 16px;
}

.topic-evidence-narrative {
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
}

.topic-supporting-insights {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-supporting-insights-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.supporting-insight-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

.supporting-insight-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.supporting-insight-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.supporting-insight-summary {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

.supporting-insight-quote {
    margin: 10px 0 0 0;
    padding: 10px 12px;
    border-left: 3px solid #d1d5db;
    background: #f9fafb;
    border-radius: 0 10px 10px 0;
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
    font-style: italic;
}

.supporting-insight-usage {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.5;
    color: #374151;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    padding: 10px 12px;
}

.supporting-insight-call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
}

.supporting-insight-call-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.supporting-insight-call-sep {
    color: #9ca3af;
}

.supporting-insight-call-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================================
   Topic Stage Polish (Actions, Prose)
   ============================================================================ */

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

.topic-score-help {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    padding: 0;
    line-height: 1;
    font-weight: 600;
}

.topic-draft-ready {
    cursor: pointer;
    border: none;
}

.topic-bullets {
    list-style: disc;
    padding-left: 20px;
}

.topic-bullets li {
    margin-bottom: 6px;
    color: #374151;
}

.topic-prose p {
    margin: 0 0 12px 0;
    line-height: 1.65;
}

.topic-prose ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 12px 0;
}

.topic-prose li {
    margin-bottom: 6px;
}

.topic-prose .topic-hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 16px 0;
}

.topic-prose .topic-code {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 14px 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-primary);
}

.topic-prose .topic-code code {
    font-family: var(--font-mono);
}

/* Topic citation chips + hover tooltip (for [123] references in validated prose) */
.topic-cite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: 2px;
    /* These chips live inside the "white paper" content card, so use light neutrals
       (not the dark app-shell tokens like --bg-hover). */
    color: #374151; /* gray-700 */
    background: rgba(17, 24, 39, 0.06); /* subtle on white */
    border: 1px solid rgba(17, 24, 39, 0.12);
    cursor: help;
    user-select: none;
    font-variant-numeric: tabular-nums;
}

.topic-cite:hover {
    background: rgba(17, 24, 39, 0.10);
    border-color: rgba(17, 24, 39, 0.16);
    color: #111827; /* gray-900 */
}

.topic-cite-tooltip {
    position: fixed;
    z-index: 1100;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.topic-cite-tooltip-title {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.topic-cite-tooltip-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.topic-cite-tooltip-quote {
    font-size: 13px;
    line-height: 1.5;
    padding-left: 10px;
    border-left: 3px solid var(--border-subtle);
    color: var(--text-primary);
}

.topic-cite-tooltip-body {
    font-size: 12px;
    color: var(--text-muted);
}

.topic-cite-tooltip-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-primary);
    text-decoration: underline;
}

/* Topic scorecard (white-paper card) */
.topic-scorecard-panel {
    padding: 24px;
    background: #f9fafb; /* gray-50 */
    border-radius: 12px;
    border: 1px solid #f3f4f6; /* gray-100 */
}

.topic-scorecard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 24px;
    align-items: start;
}

.topic-scorecard-label {
    font-size: 11px;
    color: #9ca3af; /* gray-400 */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.topic-scorecard-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827; /* gray-900 */
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* Keyboard Shortcut Hint */
.kbd {
    display: inline-block;
    padding: 2px 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-hover);
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    min-width: 18px;
    text-align: center;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none; /* Allow clicking through container */
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
    min-width: 300px;
}

.toast-info { border-left: 3px solid var(--accent-primary); }
.toast-success { border-left: 3px solid var(--status-success); }
.toast-error { border-left: 3px solid var(--status-critical); }
.toast-loading { border-left: 3px solid var(--status-warning); }

.toast-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* --- NEW STYLES --- */

/* Avatars */
.company-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--bg-hover), var(--bg-card));
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    margin-right: var(--space-3);
    border: 1px solid var(--border-subtle);
}

.company-avatar.brand-a { background: linear-gradient(135deg, #3B82F6, #1E40AF); color: white; border: none; }
.company-avatar.brand-b { background: linear-gradient(135deg, #10B981, #047857); color: white; border: none; }
.company-avatar.brand-c { background: linear-gradient(135deg, #F59E0B, #B45309); color: white; border: none; }
.company-avatar.brand-d { background: linear-gradient(135deg, #8B5CF6, #5B21B6); color: white; border: none; }
.company-avatar.brand-e { background: linear-gradient(135deg, #EC4899, #9D174D); color: white; border: none; }

/* Metadata Pills */
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-hover);
    color: var(--text-secondary);
    white-space: nowrap;
}

.meta-pill.stage-qualified { background: rgba(16, 185, 129, 0.1); color: var(--status-success); }
.meta-pill.stage-decision { background: rgba(59, 130, 246, 0.1); color: var(--accent-primary); }
.meta-pill.stage-contract { background: rgba(245, 158, 11, 0.1); color: var(--status-warning); }
.meta-pill.stage-closed { background: rgba(239, 68, 68, 0.1); color: var(--status-critical); }
.meta-pill.stage-closed-won { background: rgba(16, 185, 129, 0.15); color: var(--status-success); }

.deal-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
}

/* Bullet Separator */
.sep {
    color: var(--border-subtle);
    font-size: 8px;
}

/* Command Palette */
.cmd-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.cmd-overlay.open {
    display: flex;
}

.cmd-dialog {
    width: 100%;
    max-width: 600px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cmd-input-wrapper {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmd-input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: var(--text-primary);
    width: 100%;
    font-family: inherit;
}

.cmd-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}

.cmd-item:hover, .cmd-item.selected {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.cmd-item-icon {
    margin-right: 12px;
    opacity: 0.7;
}

.cmd-shortcut {
    font-size: 10px;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Search Input (Header) */
.search-input-compact {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    width: 100%;
    outline: none;
}
.search-input-compact::placeholder {
    color: var(--text-secondary);
}

/* Right Panel Container */
.stage-container {
    padding: var(--space-6);
    background-color: transparent !important; /* Let dark background show through */
    height: 100%;
    overflow-y: auto;
    display: block; /* Robust scrolling */
}

.stage-content-wrapper {
    background: #FFFFFF !important; /* Pure White */
    color: #111827 !important; /* Force dark text for readability */
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.1); /* Stronger shadow for dark bg */
    border: 1px solid #374151; /* Darker border */
    padding: 40px; /* Increased padding */
    width: 100%;
    max-width: 800px; /* Constrain reading width */
    margin: 0 auto 40px auto; /* Center horizontally + bottom space */
    height: fit-content;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 24px; /* Space out children */
}

/* The white-paper wrapper owns padding + width; inner stage-content should not re-pad/center. */
.stage-content-wrapper .stage-content {
    padding: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

/* First section after hero gets less spacing for better visual rhythm */
.stage-content > .stage-hero + .stage-section {
    margin-top: 0;
}

/* Subsequent sections get standard spacing */
.stage-content > .stage-section + .stage-section {
    margin-top: 0;
}

/* ============================================================================
   Stage Spacing Primitives (single source of truth for white-paper rhythm)
   ============================================================================ */

.stage-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.stage-hero {
    padding-bottom: var(--space-6);
    margin-bottom: 0;
    border-bottom: 1px solid #E5E7EB;
}

/* Reduce gap after stage-hero for better visual rhythm */
.stage-content > .stage-hero + .stage-section {
    margin-top: 0; /* gap handles spacing, but we want less after hero */
}

.stage-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.stage-divider {
    border: 0;
    border-top: 1px solid #E5E7EB;
    margin: 0;
}

.stage-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.stage-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6);
    padding: var(--space-6);
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.stage-metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.stage-metric.divided {
    padding-top: var(--space-4);
    border-top: 1px solid #E5E7EB;
}

.stage-metric-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9CA3AF;
}

.stage-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.stage-metric-value-sm {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.stage-metric-subtitle {
    font-size: 10px;
    font-weight: 500;
    color: #9CA3AF;
    margin-top: 2px;
    letter-spacing: 0.02em;
}

.stage-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: var(--space-6);
    color: #111827;
}

.stage-card.prose {
    line-height: 1.65;
    font-size: 14px;
    color: #374151;
}

.outreach-draft-options {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #FFFFFF;
    overflow: hidden;
}

.outreach-draft-options summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.outreach-draft-options summary::-webkit-details-marker {
    display: none;
}

.outreach-draft-options-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.outreach-draft-options-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.outreach-preview {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
    max-height: 220px;
    overflow-y: auto;
}

/* Stage header overflow menu (keeps header actions minimal + no layout fights with modules) */
.stage-actions-menu {
    position: relative;
}

.stage-actions-menu summary {
    list-style: none;
    cursor: pointer;
}

.stage-actions-menu summary::-webkit-details-marker {
    display: none;
}

.stage-actions-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    min-width: 180px;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.12), 0 4px 6px -2px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Force dark colors for standard classes inside the light stage */
.stage-content-wrapper .text-primary,
.stage-content-wrapper h1,
.stage-content-wrapper h2,
.stage-content-wrapper h3,
.stage-content-wrapper h4 {
    color: #111827 !important;
}

.stage-content-wrapper .text-secondary {
    color: #374151 !important;
}

.stage-content-wrapper .text-muted {
    color: #6B7280 !important;
}

.stage-content-wrapper .panel-section-title {
    color: #6B7280 !important;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 8px;
    margin-bottom: var(--space-4);
}

.stage-content-wrapper .badge-neutral {
    background: #E5E7EB !important;
    color: #4B5563 !important;
}

.stage-content-wrapper .panel-card {
    background-color: #F9FAFB !important;
    border-color: #E5E7EB !important;
    color: #111827 !important;
}

.stage-content-wrapper .panel-card .text-muted {
    color: #6B7280 !important;
}

.stage-content-wrapper .panel-card div[style*="font-weight: 700"] {
    color: #111827 !important;
}

/* Buttons + chips inside the white-paper stage should use light-surface styling (not dark-shell tokens). */
.stage-content-wrapper .btn-secondary {
    background-color: #F3F4F6;
    color: #111827;
    border-color: #E5E7EB;
}
.stage-content-wrapper .btn-secondary:hover {
    background-color: #E5E7EB;
    border-color: #D1D5DB;
}

.stage-content-wrapper .btn-ghost {
    color: #6B7280;
}
.stage-content-wrapper .btn-ghost:hover {
    background-color: #F3F4F6;
    color: #111827;
}

.stage-content-wrapper .tag-chip {
    background: #FFFFFF;
    color: #374151;
    border-color: #E5E7EB;
}
.stage-content-wrapper .tag-chip:hover {
    background: #F3F4F6;
    border-color: #CBD5E1;
    color: #111827;
}
.stage-content-wrapper .tag-chip.active {
    background: var(--accent-primary);
    color: #FFFFFF;
    border-color: var(--accent-primary);
}

/* Light Mode Panel (Readability) */
.light-mode-panel {
    background-color: #F9FAFB; /* Gray 50 */
    color: #111827; /* Gray 900 */
    border: 1px solid #E5E7EB; /* Gray 200 */
}

.light-mode-panel .panel-section-title {
    color: #4B5563; /* Gray 600 */
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 8px;
}

.light-mode-panel .text-muted {
    color: #6B7280; /* Gray 500 */
}

.light-mode-panel .text-secondary {
    color: #374151; /* Gray 700 */
}

/* Ensure sub-cards in light mode also look good */
.light-mode-panel .panel-card {
    background-color: #FFFFFF;
    border-color: #E5E7EB;
    color: #111827;
}

/* Info Modal for Transparency */
.info-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.info-modal {
    background: white;
    border-radius: 12px;
    width: 600px;
    max-width: 90vw;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.info-modal h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}

.info-modal p {
    font-size: 14px;
    line-height: 1.6;
    color: #4B5563;
    margin-bottom: 12px;
}

.info-modal ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 16px;
}

.info-modal li {
    font-size: 14px;
    color: #4B5563;
    margin-bottom: 4px;
}

.info-modal strong {
    color: #111827;
}

.info-modal-close {
    margin-top: 24px;
    width: 100%;
}

/* ============================================================================
   JobPanel Component
   ============================================================================ */

.job-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.job-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.job-panel-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.job-panel-status-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    background: #e5e7eb;
    color: #6b7280;
}

.job-panel-status-badge[data-status="running"] {
    background: #fef3c7;
    color: #b45309;
}

.job-panel-status-badge[data-status="success"] {
    background: #d1fae5;
    color: #047857;
}

.job-panel-status-badge[data-status="error"] {
    background: #fee2e2;
    color: #b91c1c;
}

.job-panel-controls {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.job-panel-log {
    padding: 0;
}

.job-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.job-log-content {
    margin: 0;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.5;
    background: #111827;
    color: #d1d5db;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ============================================================================
   LogTail Component
   ============================================================================ */

.log-tail {
    background: #111827;
    border-radius: 8px;
    overflow: hidden;
}

.log-tail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1f2937;
    border-bottom: 1px solid #374151;
}

.log-tail-title {
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
}

.log-tail-actions {
    display: flex;
    gap: 4px;
}

.log-tail-content {
    margin: 0;
    padding: 12px;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 11px;
    line-height: 1.5;
    color: #d1d5db;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

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

/* ============================================================================
   Feed Tag Bar (Relationship Tags - Horizontal Filter)
   ============================================================================ */

.feed-tag-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
    overflow-x: visible;
    height: auto;
    min-height: 52px;
    position: relative;
    padding-right: 48px; /* Reserve space for toggle */
    max-height: 1000px;
    transition: max-height 0.3s ease;
}

.feed-tag-bar.collapsed {
    max-height: 52px;
    overflow-y: hidden;
}

.tag-bar-toggle {
    position: absolute;
    right: 8px;
    top: 12px;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    z-index: 10;
}

.tag-bar-toggle:hover {
    background: var(--bg-active);
    color: var(--text-primary);
}

.feed-tag-bar::-webkit-scrollbar {
    height: 4px;
}

.feed-tag-bar::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 2px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.tag-chip:hover {
    background: var(--bg-active);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.tag-chip.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.tag-chip .tag-count {
    font-size: 10px;
    opacity: 0.8;
}

.tag-chip.all-tag {
    font-weight: 600;
}

/* ============================================================================
   Deal Metadata Card (for Relationship Stage)
   ============================================================================ */

.deal-context-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.deal-context-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.deal-context-header .deal-icon {
    font-size: 18px;
}

.deal-context-header .deal-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.deal-context-grid {
    display: flex;
    gap: 32px; /* Generous spacing between items */
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.deal-context-grid .metric {
    text-align: left;
}

.deal-context-grid .metric-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 4px;
}

.deal-context-grid .metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.deal-context-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
}

.deal-context-link:hover {
    text-decoration: underline;
}

/* Badge improvements */
.badge-primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-primary);
}

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

.badge-info {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

/* ============================================================================
   Transcript Insights Sections
   ============================================================================ */

/* At-a-Glance Summary */
.transcript-at-a-glance {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.transcript-at-a-glance-title {
    font-size: 16px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 16px;
}

.transcript-summaries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.transcript-summary-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e0f2fe;
}

.transcript-summary-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.transcript-summary-content {
    flex: 1;
    min-width: 0;
}

.transcript-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: #0369a1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.transcript-summary-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

/* Strategic Analysis */
.transcript-strategic {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.transcript-strategic-title {
    font-size: 16px;
    font-weight: 600;
    color: #a16207;
    margin-bottom: 16px;
}

.transcript-strategic-section {
    background: white;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #fef08a;
}

.transcript-strategic-section:last-child {
    margin-bottom: 0;
}

.transcript-strategic-label {
    font-size: 11px;
    font-weight: 600;
    color: #a16207;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.transcript-strategic-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.transcript-strategic-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #374151;
}

.transcript-strategic-list li {
    margin-bottom: 4px;
}

.transcript-strategic-risks {
    background: #fff7ed;
    border-color: #fdba74;
}

.transcript-strategic-risks .transcript-strategic-label {
    color: #c2410c;
}

.transcript-strategic-opps {
    background: #f0fdf4;
    border-color: #86efac;
}

.transcript-strategic-opps .transcript-strategic-label {
    color: #166534;
}

/* Timeline Section */
.transcript-timeline {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.transcript-timeline-title {
    font-size: 16px;
    font-weight: 600;
    color: #7e22ce;
    margin-bottom: 16px;
}

.transcript-timeline-periods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-period-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #f3e8ff;
}

.transcript-period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.transcript-period-name {
    font-size: 14px;
    font-weight: 600;
    color: #6b21a8;
}

.transcript-period-sentiment {
    font-size: 14px;
    color: #6b7280;
}

.transcript-period-drivers {
    font-size: 12px;
    margin-bottom: 4px;
}

.transcript-driver-positive {
    color: #166534;
}

.transcript-driver-concern {
    color: #b45309;
}

/* Feature Requests */
.transcript-feature-requests {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.transcript-fr-title {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 16px;
}

.transcript-fr-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-fr-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #fcd34d;
    position: relative;
}

.transcript-fr-request {
    font-size: 14px;
    font-weight: 600;
    color: #78350f;
    margin-bottom: 8px;
}

.transcript-fr-context {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 12px;
}

.transcript-fr-quote {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 12px;
    font-size: 14px;
    border-radius: 0 8px 8px 0;
}

.transcript-fr-quote-text {
    font-style: italic;
    color: #374151;
    line-height: 1.5;
}

.transcript-fr-quote-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

/* Transcript Hero (New) */
.transcript-hero {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.transcript-hero-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.transcript-hero-subtitle {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 16px;
}

.transcript-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Transcript Detailed Quote (New) */
.transcript-detailed-quote {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #9ca3af;
    border-radius: 0 8px 8px 0;
    padding: 16px;
    margin-top: 12px;
    position: relative;
}

.transcript-detailed-quote:hover {
    border-color: #d1d5db;
    border-left-color: #6b7280;
    background: #f3f4f6;
}

.transcript-detailed-quote-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    font-style: italic;
    margin-bottom: 8px;
}

.transcript-detailed-quote-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

.transcript-detailed-quote-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.transcript-insight-points {
    margin: 0 0 12px 0;
    padding-left: 20px;
    list-style: disc;
}

.transcript-insight-points li {
    font-size: 14px;
    color: #374151;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ============================================================================
   Confidence Rail - Evidence-Backed Draft View
   ============================================================================ */

.confidence-rail-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 800px;
}

.confidence-rail-editor {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.confidence-rail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.confidence-rail-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confidence-rail-badge {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    background: #dbeafe;
    color: #1d4ed8;
}

.confidence-rail-subject {
    margin-bottom: 16px;
}

.confidence-rail-subject-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.confidence-rail-subject-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: #f9fafb;
}

/* Subject Options (A/B/C) */
.subject-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}

.subject-option:hover {
    border-color: #a78bfa;
    background: #faf5ff;
}

.subject-option.selected {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

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

.subject-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.subject-option.selected .subject-letter {
    background: #8b5cf6;
    color: #ffffff;
}

.subject-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
}

.subject-option.selected .subject-text {
    color: #1f2937;
}

.confidence-rail-body {
    flex: 1;
    padding: 16px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.7;
    color: #374151;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Citation Spans - Underlined text that links to evidence */
.citation-span {
    background: linear-gradient(to top, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    border-bottom: 2px solid rgba(59, 130, 246, 0.4);
    cursor: help;
    transition: all 0.2s ease;
    padding: 0 2px;
    border-radius: 2px;
}

.citation-span:hover {
    background: rgba(59, 130, 246, 0.15);
    border-bottom-color: #3b82f6;
}

.citation-span.highlighted {
    background: rgba(59, 130, 246, 0.25);
    border-bottom-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.confidence-rail-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Evidence Rail - Right Side */
/* Evidence Rail - Horizontal Layout (Phase 6) */
.evidence-rail {
    background: #1f2937;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.evidence-rail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.evidence-rail-title {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evidence-rail-icon {
    font-size: 14px;
}

.evidence-rail-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Evidence Cards */
/* Evidence Cards - Compact Horizontal Chips (Phase 6) */
.evidence-card {
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 8px;
    padding: 10px 14px;
    max-width: 280px;
    flex: 0 0 auto;
    transition: all 0.2s ease;
    cursor: pointer;
}

.evidence-card:hover {
    background: #4b5563;
    border-color: #6b7280;
    transform: translateY(-1px);
}

.evidence-card.highlighted {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.evidence-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 11px;
}

.evidence-card-icon {
    font-size: 16px;
}

.evidence-card-source {
    font-size: 12px;
    font-weight: 600;
    color: #d1d5db;
}

.evidence-card-date {
    font-size: 11px;
    color: #9ca3af;
    margin-left: auto;
}

.evidence-card-quote {
    font-size: 12px;
    color: #e5e7eb;
    line-height: 1.4;
    font-style: italic;
    border-left: 2px solid #6b7280;
    padding-left: 10px;
    /* Compact: 2 lines max with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.evidence-card.highlighted .evidence-card-quote {
    border-left-color: #3b82f6;
}

.evidence-card-meta {
    display: none; /* Hidden in compact mode */
}

/* Empty state for evidence rail */
.evidence-rail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: #6b7280;
    text-align: center;
}

.evidence-rail-empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.evidence-rail-empty-text {
    font-size: 13px;
    line-height: 1.5;
}

/* Confidence Score Badge */
.confidence-score {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.confidence-score.high {
    background: #d1fae5;
    color: #047857;
}

.confidence-score.medium {
    background: #fef3c7;
    color: #b45309;
}

.confidence-score.low {
    background: #fee2e2;
    color: #b91c1c;
}

/* Evidence Summary (replaces confusing % coverage bar) */
.evidence-summary {
    padding: 12px 16px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 16px;
}

.evidence-summary-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

/* ============================================================================
   Transcript Details Hero Section (from legacy index.html)
   ============================================================================ */

.transcripts-details-hero {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.transcripts-details-hero-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.transcripts-details-hero-subtitle {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 16px;
}

.transcripts-details-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Transcript Chip Badges */
.transcripts-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
}

.transcripts-chip strong {
    font-weight: 600;
    color: #111827;
}

.transcripts-cost-badge {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

/* Timeline Feature Requests Inline */
.transcript-period-features {
    font-size: 12px;
    color: #7c3aed;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e9d5ff;
}

.transcript-features-header {
    font-weight: 600;
    margin-bottom: 4px;
}

.transcript-features-list {
    margin: 0;
    padding-left: 16px;
    list-style: disc;
}

.transcript-features-list li {
    margin-bottom: 4px;
}

.transcript-feature-text {
    color: #5b21b6;
    font-weight: 500;
}

.transcript-feature-context {
    color: #6b7280;
    font-style: italic;
}

/* ============================================================================
   Deal Strategy Section (Inline Display - Phase 3: Collapsible)
   ============================================================================ */

/* Collapsible wrapper (Phase 3) */
.strategy-collapsible {
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
}

.strategy-collapsible > summary {
    cursor: pointer;
    list-style: none;
    padding: 16px 20px;
    border-radius: 12px;
    /* Keep the disclosure arrow and header content on the SAME row */
    display: flex;
    align-items: center;
    gap: 8px;
}

.strategy-collapsible > summary::-webkit-details-marker {
    display: none;
}

.strategy-collapsible > summary::before {
    content: '▶';
    font-size: 10px;
    margin-right: 0; /* gap handles spacing */
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

/* Ensure the header takes remaining space and doesn't drop below the arrow */
.strategy-collapsible > summary .strategy-header {
    flex: 1 1 auto;
    min-width: 0;
}

.strategy-collapsible[open] > summary::before {
    transform: rotate(90deg);
}

.strategy-collapsible > summary:hover {
    background: #f3f4f6;
}

.strategy-collapsible[open] > summary {
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
}

.strategy-collapsible .strategy-summary .strategy-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.strategy-container-inner {
    position: relative;
    padding: 20px;
}

.strategy-collapsible.strategy-empty .strategy-container-inner {
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

/* Legacy non-collapsible container (keeping for backwards compatibility) */
.strategy-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
}

.strategy-container.strategy-empty {
    background: #f9fafb;
}

/* Regenerating overlay - keeps strategy visible while regenerating */
.strategy-container {
    position: relative;
}

.strategy-regenerating-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.strategy-regenerating-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.strategy-regenerating-content .toast-spinner {
    width: 24px;
    height: 24px;
    border-color: #d1d5db;
    border-top-color: #6b7280;
}

/* Strategy Header */
.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.strategy-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.strategy-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Freshness indicator in header */
.strategy-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.strategy-timestamp {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
}

.strategy-stale-badge {
    font-size: 0.7rem;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Manual Review Warning Banner */
.strategy-warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 16px;
}

.strategy-warning-banner .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.strategy-warning-banner .warning-content {
    flex: 1;
    min-width: 0;
}

.strategy-warning-banner .warning-title {
    font-weight: 600;
    color: #92400e;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.strategy-warning-banner .warning-message {
    font-size: 0.8125rem;
    color: #78350f;
    line-height: 1.4;
}

.strategy-warning-banner .warning-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.strategy-warning-banner .warning-fix-btn {
    background: #059669;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.strategy-warning-banner .warning-fix-btn:hover {
    background: #047857;
}

.strategy-warning-banner .warning-custom-btn {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.strategy-warning-banner .warning-custom-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.strategy-warning-banner .warning-dismiss-btn {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

.strategy-warning-banner .warning-dismiss-btn:hover {
    color: #374151;
}

.strategy-header-icon {
    font-size: 18px;
}

.strategy-header-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Confidence Badges */
.strategy-confidence {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

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

.strategy-badge-neutral {
    background: #f3f4f6;
    color: #6b7280;
}

/* Strategy Buttons */
.strategy-btn-regenerate {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
}

.strategy-btn-regenerate:hover {
    background: #f3f4f6;
    color: #374151;
}

.strategy-btn-view-full {
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.strategy-btn-view-full:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.strategy-btn-generate {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.strategy-btn-generate:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Strategy Body */
.strategy-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.strategy-empty-body {
    text-align: center;
    padding: 24px;
}

.strategy-empty-text {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Section Headers */
.strategy-section {
    margin-bottom: 8px;
}

.strategy-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.strategy-section-icon {
    font-size: 14px;
}

.strategy-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

/* Draft Guidance Section (Phase 5c) */
.strategy-draft-guidance-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.strategy-draft-guidance-section .strategy-section-title {
    color: #166534;
}

.strategy-draft-guidance-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.draft-guidance-chip {
    display: inline-block;
    background: #22c55e;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    width: fit-content;
}

.draft-guidance-hook {
    font-size: 14px;
    font-style: italic;
    color: #166534;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border-left: 3px solid #22c55e;
}

.draft-guidance-cta,
.draft-guidance-avoid {
    font-size: 13px;
    color: #374151;
}

.draft-guidance-avoid {
    color: #dc2626;
}

/* Winning Narrative Card */
.strategy-narrative-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-radius: 10px;
    padding: 16px;
}

.strategy-narrative-card .strategy-section-title {
    color: #1e40af;
}

.strategy-narrative-text {
    font-size: 15px;
    line-height: 1.6;
    color: #1e3a5f;
    font-weight: 500;
    margin: 0;
}

/* Stall Diagnosis Card */
.strategy-stall-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 10px;
    padding: 16px;
}

.strategy-stall-card .strategy-section-title {
    color: #92400e;
}

.strategy-stall-text {
    font-size: 14px;
    line-height: 1.5;
    color: #78350f;
    margin: 0 0 12px 0;
}

.strategy-stall-evidence {
    background: rgba(255,255,255,0.6);
    border-radius: 6px;
    padding: 10px 12px;
    border-left: 3px solid #f59e0b;
}

.strategy-evidence-quote {
    display: block;
    font-size: 13px;
    font-style: italic;
    color: #78350f;
    line-height: 1.4;
    margin-bottom: 4px;
}

.strategy-evidence-source {
    display: block;
    font-size: 11px;
    color: #92400e;
    font-weight: 500;
}

/* Stakeholders Grid */
.strategy-stakeholders-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.strategy-stakeholder-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid;
    background: #fff;
    min-width: 120px;
    cursor: default;
}

.strategy-stakeholder-icon {
    font-size: 12px;
}

.strategy-stakeholder-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.strategy-stakeholder-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.strategy-stakeholder-role {
    font-size: 11px;
    color: #6b7280;
}

.strategy-stakeholder-more {
    font-size: 12px;
    color: #9ca3af;
    padding: 8px;
}

/* Actions List */
.strategy-section-actions {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e5e7eb;
}

.strategy-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.strategy-action-item {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid;
}

.strategy-action-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.strategy-action-urgency {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-action-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.strategy-action-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.strategy-action-contact {
    font-size: 12px;
    color: #4b5563;
}

.strategy-action-reasoning {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.strategy-more-actions {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    padding: 8px;
}

/* Value Hook */
.strategy-section-compact {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
}

.strategy-value-list {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}

.strategy-value-list li {
    margin-bottom: 4px;
}

.strategy-value-list strong {
    color: #111827;
}

/* Missing Intel */
.strategy-section-warning {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
}

.strategy-section-warning .strategy-section-title {
    color: #991b1b;
}

.strategy-intel-count {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.strategy-intel-summary {
    font-size: 13px;
    color: #7f1d1d;
    line-height: 1.5;
}

/* Deal Velocity Section */
.strategy-velocity-section {
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.1);
}

.strategy-velocity-trend {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-velocity-body {
    margin-top: 12px;
}

.strategy-velocity-metrics {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.strategy-velocity-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.strategy-velocity-metric .metric-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-velocity-metric .metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.engagement-bar-container {
    width: 80px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.engagement-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.strategy-velocity-warning {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: #dc2626;
    font-weight: 500;
}

/* Blockers Section */
.strategy-blockers-section {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.strategy-blocker-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 10px;
}

.strategy-blockers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.strategy-blocker-item {
    background: white;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px;
}

.strategy-blocker-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.strategy-blocker-type {
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategy-blocker-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.strategy-blocker-objection {
    font-size: 13px;
    color: #7f1d1d;
    line-height: 1.5;
    margin-bottom: 8px;
}

.strategy-blocker-approach {
    font-size: 12px;
    color: #059669;
    background: #ecfdf5;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid #059669;
}

.strategy-blocker-approach .approach-label {
    font-weight: 700;
    margin-right: 4px;
}

.strategy-more-blockers {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    padding: 8px;
}

/* Skeptic stakeholder color */
.bg-orange-50 {
    background-color: #fff7ed;
}

.border-orange-200 {
    border-color: #fed7aa;
}

/* ============================================================================
   Morning Briefing Dashboard
   ============================================================================ */

.dashboard-container {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    color: var(--text-primary);
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-greeting {
    font-size: 32px;
    font-weight: 700;
    /* Dashboard renders inside the dark Feed panel (not the white-paper stage),
       so use dark-shell tokens for contrast. */
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.dashboard-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.dashboard-card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.dashboard-card.action-outreach .dashboard-card-icon-wrapper {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #d97706;
}

.dashboard-card.action-relationships .dashboard-card-icon-wrapper {
    background: #eff6ff;
    color: #3b82f6;
}

.dashboard-card.action-deals .dashboard-card-icon-wrapper {
    background: #fff7ed;
    color: #f59e0b;
}

.dashboard-card.action-content .dashboard-card-icon-wrapper {
    background: #f0fdf4;
    color: #10b981;
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.dashboard-card-stat {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1;
}

.dashboard-card-context {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
    flex-grow: 1;
}

.dashboard-card-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    transition: background 0.1s;
    border: none;
    cursor: pointer;
}

.dashboard-card.action-outreach .dashboard-card-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
}
.dashboard-card.action-outreach .dashboard-card-btn:hover { 
    background: linear-gradient(135deg, #d97706, #b45309); 
}

.dashboard-card.action-relationships .dashboard-card-btn {
    background: #3b82f6;
    color: white;
}
.dashboard-card.action-relationships .dashboard-card-btn:hover { background: #2563eb; }

.dashboard-card.action-deals .dashboard-card-btn {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}
.dashboard-card.action-deals .dashboard-card-btn:hover { background: #ffedd5; }

.dashboard-card.action-content .dashboard-card-btn {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.dashboard-card.action-content .dashboard-card-btn:hover { background: #dcfce7; }

/* Secondary Metrics Row */
.dashboard-metrics-row {
    display: flex;
    gap: 32px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    overflow-x: auto;
}

.dashboard-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.dashboard-metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #9ca3af;
}

.dashboard-metric-value {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    font-family: 'JetBrains Mono', monospace;
}

.dashboard-metric-trend {
    font-size: 12px;
    color: #10b981;
    font-weight: 500;
}

/* ============================================================================
   RevOps Inbox Styles
   ============================================================================ */

.revops-stage {
    padding: 24px;
    max-width: 1200px;
}

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

.revops-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #111827;
}

.revops-header-right {
    display: flex;
    gap: 12px;
}

/* Stats Cards */
.revops-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.revops-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    min-width: 140px;
}

.revops-stat-card .stat-icon {
    font-size: 24px;
}

.revops-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    font-family: 'JetBrains Mono', monospace;
}

.revops-stat-card .stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.revops-stat-card.revops-severity-high {
    border-left: 4px solid #ef4444;
}

.revops-stat-card.revops-severity-medium {
    border-left: 4px solid #f59e0b;
}

/* Queue */
.revops-queue {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.revops-loading, .revops-error {
    padding: 48px;
    text-align: center;
    color: #6b7280;
}

.revops-empty {
    padding: 64px;
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
}

.revops-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.revops-empty h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #111827;
}

.revops-empty p {
    color: #6b7280;
    margin: 0 0 16px 0;
}

/* Groups */
.revops-group {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.revops-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.revops-group-icon {
    font-size: 18px;
}

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

.revops-group-count {
    background: #e5e7eb;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.revops-group-items {
    display: flex;
    flex-direction: column;
}

/* Items */
.revops-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

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

.revops-item:hover {
    background: #f9fafb;
}

.revops-item.revops-severity-high {
    border-left: 4px solid #ef4444;
}

.revops-item.revops-severity-medium {
    border-left: 4px solid #f59e0b;
}

.revops-item.revops-severity-low {
    border-left: 4px solid #10b981;
}

.revops-item-main {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.revops-item-severity {
    font-size: 16px;
    flex-shrink: 0;
}

.revops-item-content {
    flex: 1;
    min-width: 0;
}

.revops-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.revops-item-name {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.revops-item-time {
    font-size: 12px;
    color: #9ca3af;
}

.revops-item-summary {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.revops-item-suggestion {
    font-size: 12px;
    color: #059669;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.revops-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 16px;
}

/* ============================================================================
   RevOps Detail View (Feed→Stage Pattern)
   ============================================================================ */

.revops-detail-view {
    padding: 0;
}

/* Hero Section */
.revops-hero {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    margin: -24px -24px 24px -24px;
}

.revops-hero-icon {
    font-size: 32px;
    line-height: 1;
}

.revops-hero-content {
    flex: 1;
}

.revops-hero-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.revops-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.revops-issue-type {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: #e2e8f0;
    padding: 3px 10px;
    border-radius: 4px;
}

.revops-severity-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.revops-severity-badge.revops-severity-medium {
    color: #d97706;
    background: #fffbeb;
}

.revops-severity-badge.revops-severity-low {
    color: #059669;
    background: #ecfdf5;
}

.severity-dot {
    font-size: 10px;
}

.revops-time {
    font-size: 12px;
    color: #94a3b8;
}

/* Section Title */
.revops-detail-view .section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 0 0 12px 0;
}

/* Context Section */
.revops-context-section {
    margin-bottom: 24px;
}

.revops-summary {
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.revops-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #ecfdf5;
    border-radius: 8px;
    color: #047857;
    font-size: 14px;
}

.suggestion-icon {
    flex-shrink: 0;
}

/* Details Grid */
.revops-details-section {
    margin-bottom: 24px;
}

.revops-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.detail-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
}

.detail-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* Resolution Section */
.revops-resolution-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.revops-inline-resolution {
    display: flex;
    gap: 8px;
}

.revops-domain-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.revops-domain-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.revops-resolution-options {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
}

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

/* Ghost Icon Styling (per UI_UX_GUIDELINES.md) */
.ghost-icon {
    filter: grayscale(100%);
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.ghost-icon:hover {
    opacity: 0.8;
}

/* Signal Discovery Section */
.revops-signal-discovery-section {
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.signal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.signal-empty {
    text-align: center;
    padding: 16px;
}

.signal-error {
    text-align: center;
    padding: 12px;
    color: #dc2626;
}

.signal-group {
    margin-top: 12px;
}

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

.signal-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 6px;
}

.signal-item.signal-high-confidence {
    border-left: 3px solid #22c55e;
}

.signal-item.signal-medium-confidence {
    border-left: 3px solid #f59e0b;
}

.signal-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
}

.signal-item-subtitle {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}

/* ============================================================================
   Signal History (Shared Component) — white-paper spacing + ghost aesthetic
   ============================================================================ */

.signal-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.signal-history-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    border-left: 3px solid #CBD5E1;
    background: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.signal-history-item:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.signal-history-icon {
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1;
    margin-top: 2px;
}

.signal-history-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.signal-history-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-history-meta {
    font-size: 12px;
    color: #6B7280;
}

.signal-history-summary {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.signal-history-view-all {
    width: 100%;
    margin-top: 10px;
    padding: 10px 0 0 0;
    background: transparent;
    border: 0;
    color: #6B7280;
    font-size: 12px;
    cursor: pointer;
}

.signal-history-view-all:hover {
    color: #111827;
}

.signal-history-empty {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    border-style: dashed;
}

.signal-history-skeleton {
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(90deg, #F3F4F6, #E5E7EB, #F3F4F6);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: -200% 0%; }
}

.mapping-warning {
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 13px;
    color: #b45309;
    margin-bottom: 12px;
}

.mapping-warning code {
    background: #fef3c7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

/* RevOps Strategy Preview (embedded strategy + signal history) */
.revops-strategy-preview {
    margin-top: 24px;
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
}

.revops-strategy-preview-content {
    /* Strategy component styles apply within */
}

.revops-strategy-empty,
.revops-strategy-error {
    text-align: center;
    padding: 24px;
    color: #64748b;
}

.revops-strategy-error a {
    color: #2563eb;
    text-decoration: underline;
}

/* RevOps Domain Diagnostics */
.revops-domain-diagnostics {
    margin-top: 24px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px;
}

.revops-diagnostics-content {
    /* Container for diagnostics */
}

.revops-diagnostics-content .section-title {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.diagnostics-summary {
    font-size: 13px;
    color: #78350f;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
}

.diagnostics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.diagnostics-column {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 12px;
}

.diagnostics-subtitle {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #92400e;
    margin-bottom: 8px;
}

.diagnostics-subtitle code {
    font-size: 11px;
    background: rgba(146, 64, 14, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.diagnostics-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.diagnostics-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
}

.diagnostics-item.match-exact {
    border-left: 3px solid #22c55e;
}

.diagnostics-item.match-partial {
    border-left: 3px solid #f59e0b;
}

.diagnostics-item .match-indicator {
    width: 14px;
    font-size: 10px;
    color: #22c55e;
}

.diagnostics-item .item-title {
    flex: 1;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.diagnostics-item .item-meta {
    font-size: 11px;
    color: #64748b;
}

.alternative-domains {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.domain-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.domain-chip {
    background: #fff;
    border: 1px solid #d97706;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.domain-chip:hover {
    background: #fef3c7;
    border-color: #b45309;
}

.add-domain-section {
    border-top: 1px solid rgba(146, 64, 14, 0.2);
    padding-top: 12px;
}

.add-domain-section .revops-inline-resolution {
    display: flex;
    gap: 8px;
}

.add-domain-section .revops-domain-input {
    flex: 1;
    font-size: 12px;
    padding: 6px 10px;
}

/* Strategy Empty State - Cleaner version */
.strategy-empty-state {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

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

.strategy-empty-state .empty-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.strategy-empty-state .empty-description {
    font-size: 13px;
    color: #64748b;
    max-width: 300px;
    margin: 0 auto 16px;
}

.strategy-empty-state .btn {
    margin-top: 8px;
}

/* Deal Selector (Ghost aesthetic for scoping insights to specific deals) */
.deal-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 16px;
}

.deal-selector-label {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deal-selector-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #FFFFFF !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 8px center;
    background-size: 16px;
    background-repeat: no-repeat;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    padding: 6px 32px 6px 10px;
    font-size: 13px;
    color: #374151 !important;
    cursor: pointer;
    min-width: 180px;
}

.deal-selector-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.deal-selector-input option {
    color: #374151;
    background: #FFFFFF;
}

/* ============================================
   STRATEGY ASSISTANT - Ghost Aesthetic
   Per UI_UX_GUIDELINES.md
   ============================================ */

/* Overlay - dims background */
.strategy-assistant-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.strategy-assistant-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Panel - slides from right */
.strategy-assistant-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 420px;
    height: 100vh;
    background: #FFFFFF;
    border-left: 1px solid #E5E7EB;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.strategy-assistant-panel.open {
    transform: translateX(0);
}

/* Fullscreen mode */
.strategy-assistant-panel.fullscreen {
    width: 100vw !important;
    max-width: 100vw;
}

.strategy-assistant-panel.fullscreen .strategy-assistant-resize-handle {
    display: none;
}

/* Resize Handle */
.strategy-assistant-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: ew-resize;
    background: transparent;
    transition: background 0.15s ease;
    z-index: 10;
}

.strategy-assistant-resize-handle:hover,
.strategy-assistant-resize-handle:active {
    background: linear-gradient(90deg, #3B82F6 0%, transparent 100%);
}

/* Header - Premium style */
.strategy-assistant-header {
    padding: 16px 24px;
    border-bottom: 1px solid #E5E7EB;
    background: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.strategy-assistant-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.strategy-assistant-status-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    flex-shrink: 0;
}

.strategy-assistant-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strategy-assistant-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.01em;
}

.strategy-assistant-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #6B7280;
}

.strategy-assistant-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.strategy-assistant-fullscreen,
.strategy-assistant-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: #9CA3AF;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.strategy-assistant-fullscreen:hover,
.strategy-assistant-close:hover {
    background: #F3F4F6;
    color: #374151;
}

.strategy-assistant-close {
    font-size: 20px;
}

/* Messages Area */
.strategy-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #FFFFFF;
}

/* Chat Message - Premium layout */
.chat-message {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Assistant message label row */
.chat-message-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-message-label-icon {
    font-size: 14px;
    color: #3B82F6;
}

.chat-message-label-text {
    font-size: 13px;
    font-weight: 600;
    color: #3B82F6;
}

/* User avatar */
.chat-message-avatar {
    width: 28px;
    height: 28px;
    background: #E0F2FE;
    color: #0369A1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.chat-message-content {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    white-space: pre-wrap;
}

/* Chat Markdown Headers */
.chat-message-content .chat-h2 {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 16px 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #E5E7EB;
}

.chat-message-content .chat-h2:first-child {
    margin-top: 0;
}

.chat-message-content .chat-h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1F2937;
    margin: 14px 0 6px 0;
}

.chat-message-content .chat-h3:first-child {
    margin-top: 0;
}

.chat-message-content .chat-h4 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 12px 0 4px 0;
}

.chat-message-content .chat-h4:first-child {
    margin-top: 0;
}

/* Chat Lists */
.chat-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.chat-message-content li {
    margin: 4px 0;
}

/* Assistant messages - full width, no bubble */
.chat-message-assistant .chat-message-content {
    background: transparent;
    padding: 0;
    border: none;
}

/* User messages - clean bubble */
.chat-message-user {
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.chat-message-user .chat-message-content {
    background: #E0F2FE;
    color: #0C4A6E;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    max-width: 85%;
}

/* Timestamp */
.chat-message-time {
    font-size: 11px;
    color: #9CA3AF;
    margin-top: 4px;
}

.chat-message-streaming .chat-message-content::after {
    content: '▋';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.chat-message-error .chat-message-content {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    padding: 12px 16px;
    border-radius: 12px;
}

/* Loading State */
.chat-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6B7280;
}

.chat-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #E5E7EB;
    border-top-color: #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

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

/* Error State */
.chat-error {
    text-align: center;
    padding: 40px 20px;
    color: #991B1B;
}

.chat-error-detail {
    font-size: 13px;
    color: #6B7280;
    margin-top: 8px;
}

.chat-error-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
}

/* Intel Captured */
.intel-captured {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
}

.intel-field {
    font-size: 13px;
    color: #065F46;
    margin-bottom: 4px;
}

.intel-field:last-child {
    margin-bottom: 0;
}

.intel-label {
    font-weight: 500;
}

/* Input Area - Premium style */
.strategy-assistant-input {
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.strategy-assistant-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.strategy-assistant-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #FFFFFF;
    color: #374151;
}

.strategy-assistant-input input::placeholder {
    color: #9CA3AF;
}

.strategy-assistant-input input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.strategy-assistant-send-btn {
    padding: 12px 20px;
    background: #1F2937;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.strategy-assistant-send-btn:hover {
    background: #374151;
    transform: translateY(-1px);
}

.strategy-assistant-send-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.strategy-assistant-footer {
    padding: 16px 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
}

.strategy-assistant-save-btn {
    flex: 1;
    padding: 12px 20px;
    background: #10B981;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.strategy-assistant-save-btn:hover {
    background: #059669;
}

.strategy-assistant-save-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
}

.strategy-assistant-close-btn {
    padding: 12px 20px;
    background: transparent;
    color: #6B7280;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.strategy-assistant-close-btn:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

/* Quick-Reply Suggestion Pills - Card style */
.suggestion-pills {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
}

.suggestion-pill {
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-pill::before {
    content: '→';
    color: #9CA3AF;
    font-size: 12px;
    transition: transform 0.15s ease;
}

.suggestion-pill:hover {
    background: #F9FAFB;
    border-color: #3B82F6;
    color: #1F2937;
}

.suggestion-pill:hover::before {
    color: #3B82F6;
    transform: translateX(2px);
}

.suggestion-pill:active {
    background: #EFF6FF;
    transform: scale(0.99);
}

/* Toast Link (for HubSpot deep link) */
.toast-link {
    color: inherit;
    text-decoration: underline;
    margin-left: 8px;
    font-weight: 500;
}

.toast-link:hover {
    opacity: 0.8;
}

/* Strategy Assistant Button (Ghost style) */
.strategy-assistant-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.strategy-assistant-trigger:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

.strategy-assistant-trigger .icon {
    font-size: 14px;
}

/* Save Confirmation Dialog */
.strategy-assistant-confirm {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.2s ease;
}

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

.confirm-content {
    text-align: center;
    padding: 32px;
    max-width: 300px;
}

.confirm-content-preview {
    max-width: 520px;
    text-align: left;
}

.confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.confirm-header .confirm-icon {
    font-size: 28px;
    margin: 0;
}

.confirm-header .confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.confirm-subtitle {
    color: #6B7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.confirm-note-preview {
    width: 100%;
    min-height: 200px;
    max-height: 350px;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    background: #F9FAFB;
    color: #374151;
    margin-bottom: 16px;
}

.confirm-note-preview:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.confirm-content-preview .confirm-actions {
    flex-direction: row;
    justify-content: flex-end;
}

.confirm-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.confirm-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.confirm-btn-save {
    background: #10B981;
    color: #FFFFFF;
}

.confirm-btn-save:hover {
    background: #059669;
}

.confirm-btn-cancel {
    background: transparent;
    color: #6B7280;
    border: 1px solid #D1D5DB;
}

.confirm-btn-cancel:hover {
    background: #F3F4F6;
}

/* ============================================================================
   STRATEGY ASSISTANT CTA (Deal Page Entry Point)
   ============================================================================ */

.strategy-assistant-cta {
    margin: 16px 0;
}

.strategy-assistant-cta-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    border: 1px solid #4B5563;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.strategy-assistant-cta-btn:hover {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    border-color: #6B7280;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.strategy-assistant-cta-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.strategy-assistant-cta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strategy-assistant-cta-text strong {
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
}

.strategy-assistant-cta-text span {
    color: #9CA3AF;
    font-size: 12px;
}

/* ============================================================================
   CHAT MESSAGE MARKDOWN STYLING
   ============================================================================ */

/* Markdown in assistant messages */
.chat-message-assistant .chat-message-content p {
    margin: 0 0 12px 0;
}

.chat-message-assistant .chat-message-content p:last-child {
    margin-bottom: 0;
}

.chat-message-assistant .chat-message-content strong {
    font-weight: 600;
    color: #111827;
}

.chat-message-assistant .chat-message-content em {
    font-style: italic;
    color: #374151;
}

.chat-message-assistant .chat-message-content ul {
    margin: 8px 0;
    padding-left: 20px;
    list-style-type: disc;
}

.chat-message-assistant .chat-message-content li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.chat-message-assistant .chat-message-content li:last-child {
    margin-bottom: 0;
}

/* Intel captured checkmark highlight */
.chat-message-content .intel-check {
    color: #059669;
    font-weight: 600;
}

/* Inline code (if used) */
.chat-message-assistant .chat-message-content code {
    background: #E5E7EB;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.9em;
}

/* ============================================================================
   FLOATING ACTION BUTTON (FAB)
   Reusable component for quick access to Strategy Assistant
   ============================================================================ */

.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab.fab-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fab-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #111827 0%, #1F2937 100%);
    border: 1px solid #374151;
    border-radius: 28px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #fff;
}

.fab-button:hover {
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    border-color: #4B5563;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.35),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.fab-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

.fab-button:focus {
    outline: none;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(99, 102, 241, 0.4);
}

.fab-icon {
    font-size: 1.4em;
    line-height: 1;
}

.fab-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Mode variants */
.fab-deal .fab-button {
    /* Default dark theme */
}

.fab-relationship .fab-button {
    background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%);
    border-color: #8B5CF6;
}

.fab-relationship .fab-button:hover {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border-color: #A78BFA;
}

.fab-transcript .fab-button {
    background: linear-gradient(135deg, #0891B2 0%, #0E7490 100%);
    border-color: #06B6D4;
}

.fab-transcript .fab-button:hover {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    border-color: #22D3EE;
}

/* Pulse animation for attention (optional) */
@keyframes fab-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
    50% { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4); }
}

.fab.fab-attention .fab-button {
    animation: fab-pulse 2s ease-in-out infinite;
}

/* Hide FAB when Strategy Assistant panel is open */
.strategy-assistant-panel.open ~ .fab {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================================
   EXPORT CONTEXT BUTTON (in Strategy Assistant footer)
   ============================================================================ */

.strategy-assistant-export-btn {
    padding: 12px 20px;
    background: transparent;
    color: #6B7280;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.strategy-assistant-export-btn:hover {
    background: #F3F4F6;
    color: #374151;
    border-color: #9CA3AF;
}

.strategy-assistant-export-btn:active {
    background: #E5E7EB;
}

/* Adjust footer layout for multiple buttons */
.strategy-assistant-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
}

.strategy-assistant-save-btn {
    flex: 1;
}

/* ============================================================================
   OUTREACH OVERVIEW STAGE
   Today's Outreach widget - default view for Relationships context
   ============================================================================ */

/* Stats Bar */
.outreach-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.outreach-stat {
    flex: 1;
    text-align: center;
    padding: 8px;
}

.outreach-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.outreach-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

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

.outreach-section.priority-high {
    padding: 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(249, 115, 22, 0.04));
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.outreach-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.outreach-section-icon {
    font-size: 20px;
}

.outreach-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.outreach-section-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
}

.outreach-section-badge.priority {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* Cards Grid */
.outreach-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Individual Card */
.outreach-card {
    background: #ffffff;
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s ease;
}

.outreach-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

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

.outreach-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.outreach-card-score {
    font-size: 13px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
}

.outreach-card-score.high {
    background: rgba(34, 197, 94, 0.15);
    color: #16A34A;
}

.outreach-card-score.medium {
    background: rgba(234, 179, 8, 0.15);
    color: #CA8A04;
}

.outreach-card-score.low {
    background: rgba(156, 163, 175, 0.15);
    color: #6B7280;
}

.outreach-card-company {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.outreach-card-owner {
    font-size: 12px;
    margin-bottom: 8px;
}

.outreach-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.outreach-card-template .template-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.08);
    color: #6366F1;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.outreach-card-reason {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 10px 0;
    padding: 8px;
    background: var(--bg-subtle);
    border-radius: 6px;
    border-left: 3px solid var(--accent-primary);
}

.outreach-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* Group Headers (collapsible) */
.outreach-group {
    margin-bottom: 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
}

.outreach-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-subtle);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.outreach-group-header:hover {
    background: var(--bg-hover);
}

.outreach-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.outreach-group-toggle {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.outreach-group.collapsed .outreach-group-toggle {
    transform: rotate(-90deg);
}

.outreach-group-count {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--accent-primary);
    color: white;
}

.outreach-group-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.outreach-group-content {
    padding: 16px;
    background: #ffffff;
}

.outreach-group.collapsed .outreach-group-content {
    display: none;
}

/* Sales Owner Section */
.sales-owner-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.sales-owner-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

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

.sales-owner-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.sales-owner-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
.outreach-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 20px;
}

/* Loading state */
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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