/* ===== INVESTOR DASHBOARD V3 STYLES ===== */
/* All classes prefixed with 'dash-' to avoid conflicts with existing styles */

/* Import Google Fonts for this component */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables for Dashboard V3 */
.investor-dashboard-v3 {
    --dash-bg-primary: #0a0e1a;
    --dash-bg-secondary: #0f1629;
    --dash-bg-card: #131a2e;
    --dash-bg-card-hover: #182240;
    --dash-border: #1e2a45;
    --dash-border-light: #263354;
    --dash-text-primary: #e8ecf4;
    --dash-text-secondary: #8892a8;
    --dash-text-muted: #5a6478;
    --dash-green: #10b981;
    --dash-green-dim: rgba(16, 185, 129, 0.12);
    --dash-blue: #3b82f6;
    --dash-blue-dim: rgba(59, 130, 246, 0.12);
    --dash-red: #ef4444;
    --dash-red-dim: rgba(239, 68, 68, 0.12);
    --dash-yellow: #f59e0b;
    --dash-yellow-dim: rgba(245, 158, 11, 0.12);
    --dash-orange: #f97316;
    --dash-orange-dim: rgba(249, 115, 22, 0.12);
    --dash-purple: #8b5cf6;
    --dash-purple-dim: rgba(139, 92, 246, 0.12);
    --dash-cyan: #06b6d4;
    --dash-cyan-dim: rgba(6, 182, 212, 0.12);
    --dash-gold: #eab308;
    --dash-gold-dim: rgba(234, 179, 8, 0.12);
}

/* Base wrapper styles */
.investor-dashboard-v3 {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--dash-text-primary);
    line-height: 1.6;
}

/* ══════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════ */
.dash-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.dash-page-header-left h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    text-transform: none;
}
.dash-page-header-left p {
    font-size: 14px;
    color: var(--dash-text-secondary);
    margin: 0;
}
.dash-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--dash-blue) 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    text-decoration: none;
}
.dash-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    color: white;
}

/* ══════════════════════════════════════════
   VIEW TOGGLE (Comparison Header)
   ══════════════════════════════════════════ */
.dash-view-toggle-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Breathing room above "Your Portfolio" so it isn't crowded against the Next Steps card above it. */
    margin-top: 28px;
    margin-bottom: 16px;
    /* Bright solid gold bar — same family as the "Your Next Steps" ns-head, for a consistent set of
       primary section headers across the dashboard. */
    padding: 14px 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0cd7e, #d9a53f);
}
/* Gold-framed section: one rounded container — gold header on top, dark body below, thin gold border all
   around (same treatment as Deal Flow's .df2-section "Pipeline Snapshot"). No overflow:hidden, so hover
   lifts, tooltips, and popovers inside the body are never clipped; the header rounds its own top corners
   to the frame's inner radius (14px outer - 1px border) and keeps square bottom corners instead. */
.dash-gold-section {
    border: 1px solid #d9a53f;
    border-radius: 14px;
    background: #0d1220;
    margin: 28px 0 24px;
}
.dash-gold-section > .dash-view-toggle-section {
    margin: 0;
    border-radius: 13px 13px 0 0;
}
/* Bottom padding matches the card grid gap so the quick-stats strip sits one gap below the KPI cards. */
.dash-gold-section > .dash-kpi-row {
    margin-bottom: 0;
    padding: 16px 16px 14px;
}
/* The quick-stats strip is an inner card like the KPI cards: inset by the frame's padding so its own
   border never touches (doubles up with) the gold frame border. */
.dash-gold-section > .dash-quick-stats-row {
    margin: 0 16px 16px;
}
/* "Your Next Steps" is the investor's focal point on login: a light gold border frames the redesigned card
   (gold bolt + white title header + priority-railed rows live in the page's inline styles). Scoped to the
   full-width card so other dashboards' action cards are unaffected. */
.dash-action-card--full {
    border: 1px solid #d9a53f;
    border-radius: 14px;
    background: #0d1220;
    /* overflow:hidden clips the full-bleed gold header (ns-head's negative margins) to the rounded corners. */
    overflow: hidden;
}

/* ── Shared bright-gold section header bar ──────────────────────────────────
   One treatment for every PRIMARY investor-dashboard section header (Your Portfolio,
   Your Pending Deals, Your Active Investments, Pipeline by Stage) so they read as the
   same family as the "Your Next Steps" ns-head. Full-bleed: the parent card needs 20px
   padding + overflow:hidden so the bar clips to the rounded top corners. */
.dash-gold-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: -20px -20px 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f0cd7e, #d9a53f);
}
.dash-gold-bar-title {
    font-size: 18px;
    font-weight: 800;
    color: #241a04;
    letter-spacing: -.01em;
}
/* Right-side control on a gold bar (count, "View All", "View Deal Flow") — dark pill with
   gold text/icon, matching ns-pending-pill so the whole family is consistent. */
.dash-gold-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    padding: 6px 14px;
    border-radius: 999px;
    background: #241a04;
    color: #f0cd7e;
    text-decoration: none;
    white-space: nowrap;
}
a.dash-gold-pill:hover { background: #3a2a08; text-decoration: none; }
/* Subtitle + scope toggle row that sits BELOW the gold bar (pipeline card). */
.dash-chart-subhead {
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* keep the segmented toggle hugging its content, not stretched full-width */
    gap: 10px;
    margin-bottom: 16px;
}
.dash-chart-subhead .dc-scope-toggle { margin-top: 0; }
/* NB: .dash-chart-card--full { overflow:hidden } lives with its width:100% rule in Dashboard.razor's inline
   <style> — that clip is what keeps the full-bleed gold bar inside the card's rounded corners. */

.dash-inline-error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(220, 60, 60, 0.12);
    border: 1px solid rgba(220, 60, 60, 0.4);
    color: #f2b8b8;
    font-size: 0.85rem;
}
.dash-inline-error-x {
    background: none;
    border: none;
    color: #f2b8b8;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 2px 4px;
}
.dash-view-toggle-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;   /* let "· N Investors" wrap instead of spilling outside the gold bar on phones */
    gap: 8px;
    row-gap: 6px;
}
.dash-view-toggle-label {
    /* Dark bold title on the bright gold bar — matches ns-title. */
    font-size: 18px;
    font-weight: 800;
    color: #241a04;
    text-transform: none;
    letter-spacing: -.01em;
}
.dash-vs-text {
    font-size: 14px;
    font-weight: 700;
    color: #4a3410;
    margin: 0 4px;
}
.dash-platform-badge {
    /* Dark pill with gold text — matches ns-pending-pill. */
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 999px;
    background: #241a04;
    color: #f0cd7e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ══════════════════════════════════════════
   KPI CARDS ROW
   ══════════════════════════════════════════ */
.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.dash-kpi-card {
    background: var(--dash-bg-card);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.dash-kpi-card:hover {
    border-color: var(--dash-border-light);
    transform: translateY(-2px);
}
.dash-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 12px 12px 0 0;
}
.dash-kpi-card.pipeline::before { background: var(--dash-blue); }
.dash-kpi-card.active::before { background: var(--dash-green); }
.dash-kpi-card.value::before { background: var(--dash-purple); }
.dash-kpi-card.invested::before { background: var(--dash-cyan); }
.dash-kpi-card.matches::before { background: var(--dash-gold); }
.dash-kpi-card.capital::before { background: var(--dash-orange); }

.dash-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.dash-kpi-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--dash-text-muted);
    margin-bottom: 6px;
}
.dash-kpi-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1;
}
.dash-kpi-sub {
    font-size: 12px;
    color: var(--dash-text-secondary);
}
.dash-kpi-sub.positive { color: var(--dash-green); }
.dash-kpi-sub.negative { color: var(--dash-red); }

/* Platform comparison inside KPI card */
.dash-kpi-platform-compare {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--dash-border);
}
.dash-kpi-platform-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dash-kpi-platform-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--dash-text-muted);
}
.dash-kpi-platform-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--dash-green);
}
.dash-kpi-platform-sub {
    font-size: 10px;
    color: var(--dash-text-muted);
    margin-top: 2px;
}

/* ══════════════════════════════════════════
   QUICK STATS ROW
   ══════════════════════════════════════════ */
.dash-quick-stats-row {
    display: flex;
    gap: 24px;
    padding: 14px 20px;
    background: var(--dash-bg-card);
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    margin-bottom: 24px;
}
.dash-quick-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dash-quick-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-quick-stat-content {}
.dash-quick-stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--dash-text-muted);
}
.dash-quick-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
}
.dash-quick-stat-divider {
    width: 1px;
    height: 32px;
    background: var(--dash-border);
}

/* Quick stat platform comparison */
.dash-quick-stat-platform {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed var(--dash-border);
}
.dash-quick-stat-platform-label {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--dash-text-muted);
}
.dash-quick-stat-platform-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--dash-green);
}

/* ══════════════════════════════════════════
   MAIN CONTENT GRID
   ══════════════════════════════════════════ */
.dash-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* ── BAR CHART CARD ── */
.dash-chart-card {
    background: var(--dash-bg-card);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 20px;
}
/* .dash-chart-header/-title/-link removed — the pipeline card now uses the shared .dash-gold-bar header. */
.dash-chart-subtitle {
    font-size: 11px;
    color: var(--dash-text-muted);
    margin-top: 2px;
}

.dash-chart-toggle {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}
.dash-chart-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.dash-chart-radio input {
    display: none;
}
.dash-chart-radio-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--dash-border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.dash-chart-radio input:checked + .dash-chart-radio-circle {
    border-color: var(--dash-blue);
}
.dash-chart-radio input:checked + .dash-chart-radio-circle::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dash-blue);
}
.dash-chart-radio-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--dash-text-muted);
    transition: color 0.2s;
}
.dash-chart-radio input:checked ~ .dash-chart-radio-label {
    color: var(--dash-text-primary);
}

.dash-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dash-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-bar-label {
    width: 90px;
    font-size: 11px;
    font-weight: 600;
    color: var(--dash-text-secondary);
    text-align: right;
    flex-shrink: 0;
}
.dash-bar-track {
    flex: 1;
    height: 28px;
    background: var(--dash-bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.dash-bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    transition: width 0.8s ease;
}
.dash-bar-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: white;
}
.dash-bar-value {
    width: 50px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-text-muted);
    text-align: right;
    flex-shrink: 0;
}

/* ── ACTION ITEMS CARD ── */
.dash-action-card {
    background: var(--dash-bg-card);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.dash-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.dash-action-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}
.dash-action-title svg { color: var(--dash-yellow); }
.dash-action-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--dash-orange-dim);
    color: var(--dash-orange);
}
.dash-action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}
.dash-action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--dash-bg-secondary);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s;
}
.dash-action-item:hover {
    border-color: var(--dash-border);
    background: var(--dash-bg-card-hover);
}
.dash-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-action-content {
    flex: 1;
    min-width: 0;
}
.dash-action-item-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}
.dash-action-item-desc {
    font-size: 11px;
    color: var(--dash-text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-action-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-action-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}
.dash-action-tag.urgent { background: var(--dash-red-dim); color: var(--dash-red); }
.dash-action-tag.new { background: var(--dash-blue-dim); color: var(--dash-blue); }
.dash-action-tag.required { background: var(--dash-orange-dim); color: var(--dash-orange); }
.dash-action-time {
    font-size: 10px;
    color: var(--dash-text-muted);
}
.dash-action-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid var(--dash-border);
    background: transparent;
    color: var(--dash-text-secondary);
    transition: all 0.2s;
    flex-shrink: 0;
    align-self: center;
    text-decoration: none;
}
.dash-action-btn:hover { border-color: var(--dash-blue); color: var(--dash-blue); }
.dash-action-btn.primary {
    /* #2563eb (not --dash-blue #3b82f6) so white label text clears WCAG AA; --dash-blue stays for non-text uses. */
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}
.dash-action-btn.primary:hover { background: #1d4ed8; color: white; }

/* ══════════════════════════════════════════
   DEALS SECTIONS
   ══════════════════════════════════════════ */
.dash-deals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Separates the deal lists from "Pending Deal Pipeline by Stage" below — same 24px rhythm as the
       other dashboard sections (quick stats, main grid). */
    margin-bottom: 24px;
}
.dash-deals-section {
    background: var(--dash-bg-card);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 20px;
    /* Clip the full-bleed gold header bar to the rounded top corners. */
    overflow: hidden;
}
/* .dash-deals-header/-title/-view-all removed — both deal sections now use the shared .dash-gold-bar header. */

.dash-deals-table {
    width: 100%;
    border-collapse: collapse;
}
.dash-deals-table thead th {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--dash-text-muted);
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--dash-border);
}
.dash-deals-table tbody td {
    padding: 12px 10px;
    font-size: 12px;
    border-bottom: 1px solid rgba(30, 42, 69, 0.4);
    vertical-align: middle;
}
.dash-deals-table tbody tr:last-child td { border-bottom: none; }
.dash-deals-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}
.dash-deals-table tbody tr:hover { background: var(--dash-bg-card-hover); }

.dash-deal-name { font-weight: 600; }
.dash-deal-sector { color: var(--dash-text-muted); font-size: 10px; }
.dash-deal-score {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
}
.dash-deal-stage-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.dash-deal-moic {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 12px;
}
.dash-deal-health {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dash-health-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dash-health-label {
    font-size: 10px;
    font-weight: 600;
}

/* Pagination */
.dash-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--dash-border);
}
.dash-pagination-info {
    font-size: 11px;
    color: var(--dash-text-muted);
}
.dash-pagination-btns {
    display: flex;
    gap: 6px;
}
.dash-pagination-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--dash-border);
    background: transparent;
    color: var(--dash-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.dash-pagination-btn:hover:not(:disabled) {
    border-color: var(--dash-blue);
    color: var(--dash-blue);
}
.dash-pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ══════════════════════════════════════════
   MOBILE CARD VIEW FOR DEALS
   ══════════════════════════════════════════ */
.dash-deals-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dash-deal-card-item {
    background: var(--dash-bg-secondary);
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s;
    cursor: pointer;
}
.dash-deal-card-item:hover {
    border-color: rgba(96,165,250,0.6);
    background: var(--dash-bg-card-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.dash-deal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.dash-deal-card-metrics {
    display: flex;
    gap: 24px;
    padding-top: 12px;
    border-top: 1px dashed var(--dash-border);
}
.dash-deal-card-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dash-deal-card-metric-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--dash-text-muted);
}
.dash-deal-card-metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--dash-text-primary);
}

/* Desktop/Mobile visibility toggles */
.dash-desktop-only {
    display: table;
}
.dash-mobile-only {
    display: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE STYLES
   ══════════════════════════════════════════ */
@media (max-width: 1200px) {
    .dash-kpi-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .dash-main-grid { grid-template-columns: 1fr; }
    .dash-deals-grid { grid-template-columns: 1fr; }
    .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .dash-quick-stats-row { flex-wrap: wrap; }
}

@media (max-width: 600px) {
    .dash-page-header { 
        flex-direction: column; 
        gap: 16px; 
    }
    .dash-page-header-left {
        text-align: center;
        width: 100%;
    }
    .dash-btn-primary {
        width: 100%;
        justify-content: center;
    }
    .dash-kpi-row { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    .dash-kpi-card { padding: 14px; }
    .dash-gold-section > .dash-kpi-row { padding: 12px 12px 10px; }
    .dash-gold-section > .dash-quick-stats-row { margin: 0 12px 12px; padding: 12px 14px; }
    .dash-kpi-value { font-size: 22px; }
    .dash-kpi-icon { width: 32px; height: 32px; margin-bottom: 10px; }
    .dash-quick-stats-row { 
        flex-direction: column; 
        gap: 12px; 
    }
    .dash-quick-stat-divider { display: none; }
    .dash-view-toggle-section { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 8px; 
    }
    
    /* Action items mobile */
    .dash-action-item {
        flex-direction: column;
        align-items: stretch;
    }
    .dash-action-btn {
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }
    
    /* Switch to card view on mobile */
    .dash-desktop-only {
        display: none !important;
    }
    .dash-mobile-only {
        display: flex !important;
    }
    
    /* Deals section mobile adjustments */
    .dash-deals-section {
        padding: 16px;
    }
    /* Match the gold bar's bleed to the reduced mobile padding so its title lines up with the cards below. */
    .dash-deals-section .dash-gold-bar {
        margin: -16px -16px 16px;
    }
    .dash-deal-name {
        font-size: 14px;
        font-weight: 600;
    }
    .dash-deal-sector {
        font-size: 11px;
    }
    .dash-deal-stage-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* ══════════════════════════════════════════
   PRESERVE EXISTING PAGE BACKGROUND
   ══════════════════════════════════════════ */
.investor-dashboard-page.investor-dashboard-v3 {
    background: radial-gradient(circle at 50% 35%, rgba(59, 130, 246, 0.35), rgba(0,0,0,0) 62%), 
                radial-gradient(circle at 20% 85%, rgba(59, 130, 246, 0.18), rgba(0,0,0,0) 55%);
}

/* ══════════════════════════════════════════
   Shared investor action buttons (literal colors so they render on ANY page —
   the dd-* tokens are scoped to .dealdetail-v3 and don't resolve elsewhere).
   Visually matches the deal-details green "Data Room" button.
   ══════════════════════════════════════════ */
.nea-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border-radius: 8px;
    font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px;
    cursor: pointer; border: none; transition: all 0.2s; white-space: nowrap;
}
.nea-btn-primary { background: #10b981; color: #04140d; }
.nea-btn-primary:not(:disabled):not([aria-disabled="true"]):hover { background: #0ea572; }
.nea-btn-secondary { background: transparent; color: #8892a8; border: 1px solid #263354; }
.nea-btn-secondary:not(:disabled):hover { border-color: #3b82f6; color: #3b82f6; }
.nea-btn-purple { background: #8b5cf6; color: #fff; }
.nea-btn-purple:not(:disabled):hover { background: #7c4de0; }
.nea-btn:disabled { opacity: 0.5; cursor: default; }

/* ══════════════════════════════════════════
   DEAL CARD GRID (dc-*) — card layouts that replace the
   pending-deals / active-investments tables on the investor dashboard.
   Prefixed dc-* so they don't collide with the dash-deal-* table classes
   still used elsewhere.
   ══════════════════════════════════════════ */
.dc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 14px;
    align-items: start;
}
.dc-mono { font-family: 'JetBrains Mono', monospace; }

/* ---- Pending deal card ---- */
.dc-deal-card {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid #262f45;
    border-radius: 16px;
    background: linear-gradient(160deg, #141a2b, #0d1220 60%);
    padding: 18px 18px 16px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dc-deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.65);
}
.dc-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.dc-card-top {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.dc-icon-badge {
    flex: none;
    display: inline-flex;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
}
.dc-card-idblock {
    flex: 1;
    min-width: 0;
}
.dc-company {
    font-size: 16.5px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    overflow-wrap: anywhere;
    /* Reserve TWO lines for the company name so short and long names occupy the same height (keeps the
       pending-deal and active-investment cards consistent); a name that would spill to a 3rd line is
       ellipsis-clamped at 2. The full name stays available via the title attribute on the element. */
    min-height: 2.6em;            /* 2 lines × 1.3 line-height */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.dc-company--gold { color: #f0cd7e; }
.dc-stage-line {
    font-size: 12px;
    color: #7eb3ff;
    margin-top: 3px;
    overflow-wrap: anywhere;
}
.dc-sector {
    font-size: 12px;
    color: #7c8598;
    margin-top: 2px;
    overflow-wrap: anywhere;
}
.dc-score-block {
    flex: none;
    text-align: right;
}
.dc-score {
    font-size: 24px;
    font-weight: 800;
    color: #4fd18b;
    line-height: 1;
}
.dc-label {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7690;
    margin-top: 2px;
}
.dc-progress-wrap { margin-top: 16px; }
.dc-progress-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7690;
    margin-bottom: 6px;
}
.dc-progress-head span:first-child {
    overflow-wrap: anywhere;
    min-width: 0;
}
.dc-progress-track {
    height: 6px;
    border-radius: 99px;
    background: #1c2334;
    overflow: hidden;
}
.dc-progress-fill {
    height: 100%;
    border-radius: 99px;
}
.dc-card-foot {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.dc-raise-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7690;
}
.dc-raise-value {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-top: 2px;
}
.dc-cta {
    border: 0;
    border-radius: 8px;
    padding: 8px 18px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    /* House primary: the gold button (dark label on gold, ~8:1). */
    background: linear-gradient(180deg, #f5d79c, #c9a85c);
    color: #1a1306;
    box-shadow: 0 4px 14px -6px rgba(201, 168, 92, 0.6);
    transition: filter 0.15s;
}
.dc-cta:hover { filter: brightness(1.06); }
.dc-cta:focus-visible { outline: 2px solid #f0c987; outline-offset: 2px; }

/* ---- Active investment card (fixed gold treatment) ---- */
.dc-inv-card {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    border: 1px solid #3a2f14;
    border-radius: 16px;
    background: linear-gradient(160deg, #1c1608, #0d1220 55%);
    /* Tightened top/bottom so the (tile-heavy) active card matches the pending-deal card height. */
    padding: 16px 18px 14px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    color: inherit;
    box-shadow: 0 10px 30px -14px rgba(217, 165, 63, 0.35);
    transition: transform 0.15s ease;
}
.dc-inv-card:hover { transform: translateY(-2px); }
.dc-inv-accent { background: linear-gradient(90deg, #f0cd7e, #d9a53f); }
.dc-inv-badge {
    background: linear-gradient(135deg, #f0cd7e, #d9a53f);
    color: #241a04;
}
.dc-tag-pill {
    flex: none;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    background: #241a04;
    color: #f0c987;
    white-space: nowrap;
}
.dc-invested-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
/* Amount + "invested" stay together on the left; the Monitor button docks to the right (moved up from the
   removed next-report footer so the active card height matches the pending-deal card). */
.dc-invested-amt {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.dc-invested {
    font-size: 28px;
    font-weight: 800;
    color: #f0cd7e;
    line-height: 1;
    overflow-wrap: anywhere;
}
.dc-invested-label {
    font-size: 11px;
    font-weight: 700;
    color: #a8895a;
}
.dc-tiles {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dc-tile {
    background: rgba(10, 14, 24, 0.6);
    border: 1px solid #33260f;
    border-radius: 9px;
    padding: 8px 12px;
    min-width: 0;
}
.dc-tile-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a8895a;
}
.dc-tile-value {
    font-size: 15px;
    font-weight: 800;
    color: #f4f6fa;
    margin-top: 3px;
}
.dc-health {
    font-size: 14px;
    font-weight: 800;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.dc-health-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex: none;
}
.dc-nextreport {
    font-size: 12.5px;
    color: #a8895a;
    min-width: 0;
    overflow-wrap: anywhere;
}
.dc-nextreport strong {
    color: #e7eaf1;
    font-weight: 700;
}
/* Empty state spans the full card grid */
.dc-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 16px;
    color: var(--dash-text-muted);
    font-size: 13px;
}

/* ── Pipeline by Stage: segmented scope toggle + stat-card grid ── */
.dc-scope-toggle {
    margin-top: 14px;
    display: inline-flex;
    border: 1px solid #262f45;
    border-radius: 9px;
    padding: 3px;
    background: #0a0e18;
}
.dc-scope-btn {
    border: 0;
    border-radius: 6px;
    padding: 7px 14px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: #9aa3b8;
}
.dc-scope-btn.on { background: var(--dash-blue); color: #fff; }

.dc-stage-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}
.dc-stage-card {
    position: relative;
    border: 1px solid #1e2536;
    border-radius: 12px;
    background: #13182a;
    padding: 14px 12px;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
}
.dc-stage-card.dim { background: #10141f; opacity: 0.55; }
.dc-stage-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.dc-stage-name {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #8b93a3;
    line-height: 1.3;
    min-height: 28px;
}
.dc-stage-count { font-size: 26px; font-weight: 800; color: #fff; margin-top: 8px; line-height: 1; }
.dc-stage-card.dim .dc-stage-count { color: #6b7690; }
.dc-stage-sub { font-size: 10.5px; font-weight: 700; color: #6b7690; margin-top: 2px; }
.dc-stage-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid #1e2536; }
.dc-stage-value { font-size: 14px; font-weight: 800; color: #dfe4ee; }
.dc-stage-card.dim .dc-stage-value { color: #6b7690; }
.dc-stage-value-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #565f75;
    margin-top: 1px;
}

/* Metric labels in gold (owner, 2026-10-15): the muted grey was too dim to read on the dark cards. */
.dash-kpi-label,
.dash-kpi-platform-label,
.dash-quick-stat-label,
.dash-quick-stat-platform-label { color: #e0b866; }
/* Metric figures in white (owner, 2026-10-15): gold is for the labels above them. */
.dash-kpi-value,
.dash-quick-stat-value { color: #fff; }
