/* ══════════════════════════════════════════════
   Investor Matchmaking Dashboard – Styles
   Professional White SaaS Theme
   ══════════════════════════════════════════════ */

/* ─── Reset & Base ─────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fb;
    --bg-glass: rgba(0, 0, 0, 0.02);
    --border: #e5e7eb;
    --border-hover: rgba(79, 70, 229, 0.35);

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8b8ba3;

    --accent-violet: #6366f1;
    --accent-indigo: #4f46e5;
    --accent-blue: #3b82f6;
    --accent-cyan: #0891b2;
    --accent-emerald: #059669;
    --accent-amber: #d97706;
    --accent-rose: #e11d48;
    --accent-orange: #ea580c;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --gradient-warm: linear-gradient(135deg, #e11d48 0%, #ea580c 100%);
    --gradient-cool: linear-gradient(135deg, #0891b2 0%, #3b82f6 100%);
    --gradient-emerald: linear-gradient(135deg, #059669 0%, #047857 100%);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 0 3px rgba(99, 102, 241, 0.1);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ─── Ambient Background (hidden in light theme) ── */
.ambient-bg {
    display: none;
}

.orb { display: none; }

/* ─── Header ───────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 14px 32px;
}

.header-content {
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.logo-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-bar input {
    width: 260px;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-base);
}

.search-bar input:focus {
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 320px;
    background: #ffffff;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 100px;
    background: var(--gradient-primary);
    color: white;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-download:active {
    transform: translateY(0);
}

.btn-download-sm {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid var(--accent-violet);
    border-radius: 100px;
    background: rgba(99, 102, 241, 0.06);
    color: var(--accent-violet);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-download-sm:hover {
    background: rgba(99, 102, 241, 0.12);
}

.btn-reset {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-reset:hover {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
    background: rgba(225, 29, 72, 0.05);
}

/* ─── Main ─────────────────────────────────── */
.main {
    position: relative;
    z-index: 1;
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px 32px 60px;
}

/* ─── KPI Strip ────────────────────────────── */
.kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-base);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    box-shadow: var(--shadow-sm);
}

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }
.kpi-card:nth-child(5) { animation-delay: 0.25s; }

.kpi-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-total { background: rgba(99,102,241,0.08); color: var(--accent-violet); }
.kpi-icon-active { background: rgba(5,150,105,0.08); color: var(--accent-emerald); }
.kpi-icon-sectors { background: rgba(59,130,246,0.08); color: var(--accent-blue); }
.kpi-icon-cities { background: rgba(217,119,6,0.08); color: var(--accent-amber); }
.kpi-icon-ticket { background: rgba(225,29,72,0.08); color: var(--accent-rose); }

.kpi-data {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ─── Filters Bar ──────────────────────────── */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.5s ease 0.3s forwards;
    opacity: 0;
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
    position: relative;
}

.filter-group-wide {
    flex: 2;
    min-width: 280px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ─── Multi-Select Dropdown ────────────────── */
.multi-select {
    position: relative;
}

.ms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition-base);
    gap: 8px;
    min-height: 40px;
    user-select: none;
}

.ms-trigger:hover {
    border-color: #c7c7d4;
    background: var(--bg-secondary);
}

.multi-select.open .ms-trigger {
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ms-placeholder {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.ms-placeholder.has-selection {
    color: var(--text-primary);
    font-weight: 500;
}

.ms-count {
    background: var(--gradient-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.ms-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.multi-select.open .ms-arrow {
    transform: rotate(180deg);
    color: var(--accent-violet);
}

.ms-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--accent-violet);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    display: none;
    max-height: 320px;
    overflow: hidden;
    flex-direction: column;
}

.multi-select.open .ms-dropdown {
    display: flex;
    animation: dropdownIn 0.2s ease;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ms-dropdown-wide {
    min-width: 360px;
}

.ms-search-wrap {
    padding: 8px 10px 4px;
}

.ms-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-fast);
}

.ms-search:focus {
    border-color: rgba(99, 102, 241, 0.4);
    background: #ffffff;
}

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

.ms-actions {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
}

.ms-actions button {
    flex: 1;
    padding: 5px 8px;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ms-select-all {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-violet);
}

.ms-select-all:hover {
    background: rgba(99, 102, 241, 0.15);
}

.ms-clear-all {
    background: rgba(225, 29, 72, 0.06);
    color: var(--accent-rose);
}

.ms-clear-all:hover {
    background: rgba(225, 29, 72, 0.12);
}

.ms-options {
    overflow-y: auto;
    max-height: 220px;
    padding: 4px 6px 6px;
}

.ms-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.ms-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.ms-option:hover {
    background: rgba(99, 102, 241, 0.06);
}

.ms-option.hidden {
    display: none;
}

.ms-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid #c7c7d4;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.ms-option.selected .ms-checkbox {
    background: var(--gradient-primary);
    border-color: var(--accent-violet);
}

.ms-option.selected .ms-checkbox::after {
    content: '';
    display: block;
    width: 8px;
    height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
}

.ms-option-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ms-option.selected .ms-option-label {
    color: var(--text-primary);
    font-weight: 500;
}

.ms-option-count {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

/* ─── Active Filter Tags ──────────────────── */
.active-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    margin-bottom: 24px;
    background: rgba(99, 102, 241, 0.04);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
    animation: fadeInUp 0.3s ease forwards;
}

.tags-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

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

.filter-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-violet);
    white-space: nowrap;
    animation: tagIn 0.2s ease forwards;
}

@keyframes tagIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.filter-tag-type {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.filter-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.1);
    color: var(--accent-rose);
    font-size: 0.65rem;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.filter-tag-remove:hover {
    background: rgba(225, 29, 72, 0.2);
}

.tags-clear {
    padding: 5px 14px;
    border: 1px solid rgba(225, 29, 72, 0.15);
    border-radius: 100px;
    background: transparent;
    color: var(--accent-rose);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.tags-clear:hover {
    background: rgba(225, 29, 72, 0.06);
}

/* ─── Charts Grid ──────────────────────────── */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-base);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    box-shadow: var(--shadow-sm);
}

.chart-card:nth-child(1) { animation-delay: 0.35s; }
.chart-card:nth-child(2) { animation-delay: 0.4s; }
.chart-card:nth-child(3) { animation-delay: 0.45s; }
.chart-card:nth-child(4) { animation-delay: 0.5s; }
.chart-card:nth-child(5) { animation-delay: 0.55s; }
.chart-card:nth-child(6) { animation-delay: 0.6s; }

.chart-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.chart-card-wide {
    grid-column: span 2;
}

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

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.chart-badge {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.chart-body {
    position: relative;
    width: 100%;
    min-height: 260px;
}

.chart-card-wide .chart-body {
    min-height: 320px;
}

/* ─── Table ─────────────────────────────────── */
.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    animation: fadeInUp 0.6s ease 0.65s forwards;
    opacity: 0;
    box-shadow: var(--shadow-sm);
}

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

.table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.table-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.table-count {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.fund-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.82rem;
}

.fund-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.fund-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.fund-table thead th.sortable:hover {
    color: var(--accent-violet);
}

.sort-icon {
    font-size: 0.65rem;
    margin-left: 4px;
    opacity: 0.5;
}

.fund-table tbody tr {
    transition: var(--transition-fast);
}

.fund-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.fund-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #f1f2f5;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fund-table tbody td:first-child {
    color: var(--text-primary);
    font-weight: 600;
}

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

.fund-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fund-dot.active { background: var(--accent-emerald); box-shadow: 0 0 6px rgba(5, 150, 105, 0.3); }
.fund-dot.inactive { background: var(--text-muted); }
.fund-dot.unknown { background: var(--accent-amber); opacity: 0.7; }

.stage-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.stage-early { background: rgba(5, 150, 105, 0.08); color: var(--accent-emerald); }
.stage-growth { background: rgba(59, 130, 246, 0.08); color: var(--accent-blue); }
.stage-early-growth { background: rgba(99, 102, 241, 0.08); color: var(--accent-violet); }
.stage-large { background: rgba(217, 119, 6, 0.08); color: var(--accent-amber); }
.stage-revenue { background: rgba(225, 29, 72, 0.08); color: var(--accent-rose); }
.stage-other { background: var(--bg-secondary); color: var(--text-muted); }

.sector-tags {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}

.sector-tag {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    background: rgba(99, 102, 241, 0.06);
    color: var(--accent-violet);
    white-space: nowrap;
}

.sector-tag.more {
    background: var(--bg-secondary);
    color: var(--text-muted);
}

/* ─── Pagination ───────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover {
    border-color: var(--accent-violet);
    color: var(--accent-violet);
}

.pagination button.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    font-weight: 700;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ─── Footer ───────────────────────────────── */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 28px 32px;
    color: var(--text-muted);
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
    background: #ffffff;
}

/* ─── Animations ───────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Scrollbar ────────────────────────────── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ─── Responsive ───────────────────────────── */
@media (max-width: 1200px) {
    .kpi-strip {
        grid-template-columns: repeat(3, 1fr);
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-card-wide {
        grid-column: span 1;
    }
    .ms-dropdown-wide {
        min-width: unset;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
    }
    .header-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .header-actions {
        flex-wrap: wrap;
        justify-content: stretch;
    }
    .search-bar { flex: 1; }
    .search-bar input {
        width: 100%;
    }
    .search-bar input:focus {
        width: 100%;
    }
    .main {
        padding: 16px;
    }
    .kpi-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .kpi-card {
        padding: 16px;
    }
    .kpi-value {
        font-size: 1.3rem;
    }
    .filters-bar {
        flex-direction: column;
        gap: 12px;
    }
    .filter-group {
        min-width: unset;
    }
    .filter-group-wide {
        min-width: unset;
    }
    .chart-card {
        padding: 16px;
    }
    .table-section {
        padding: 14px;
    }
    .ms-options-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .kpi-strip {
        grid-template-columns: 1fr;
    }
    .logo-text {
        font-size: 1.1rem;
    }
}

/* ─────────────────────────────────────────────
   INVESTOR MATCHMAKER ADDITIONS
   ───────────────────────────────────────────── */

/* ─── Tab Navigation ───────────────────────── */
.nav-tabs {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    position: sticky;
    top: 73px;
    z-index: 99;
}

.nav-tabs-content {
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    user-select: none;
}

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

.nav-tab.active {
    color: var(--accent-violet);
    border-bottom-color: var(--accent-violet);
    background: rgba(99, 102, 241, 0.03);
}

.nav-tab svg {
    transition: transform var(--transition-base);
}

.nav-tab.active svg {
    color: var(--accent-violet);
    transform: scale(1.05);
}

/* ─── Table Description Expansion ──────────── */
.desc-cell {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.desc-cell:hover {
    color: var(--text-primary);
}

.desc-cell::after {
    content: ' 🔍';
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.desc-cell:hover::after {
    opacity: 0.5;
}

.desc-cell.expanded {
    white-space: normal;
    word-break: break-word;
    max-width: 320px;
    overflow: visible;
    text-overflow: unset;
    color: var(--text-primary);
}

.desc-cell.expanded::after {
    content: ' ❌';
}

/* ─── Matchmaker Section ───────────────────── */
.matchmaker-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeInUp 0.5s ease forwards;
}

.matchmaker-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.matchmaker-card:hover {
    border-color: rgba(99, 102, 241, 0.15);
}

.card-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.matchmaker-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.optional {
    color: var(--text-muted);
    font-size: 0.68rem;
    text-transform: none;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition-base);
}

.form-group select option {
    background: #ffffff;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent-violet);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Input with currency prefix */
.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-weight: 600;
    pointer-events: none;
    font-size: 0.88rem;
}

.input-with-symbol input {
    width: 100%;
    padding-left: 28px !important;
}

.btn-match {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    margin-top: 8px;
}

.btn-match:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.btn-match:active {
    transform: translateY(0);
}

/* ─── Match Results ────────────────────────── */
.match-results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInUp 0.5s ease forwards;
}

.results-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

.results-title-group {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.search-bar-sm input {
    width: 200px;
    padding: 8px 12px 8px 36px;
    font-size: 0.8rem;
}

.search-bar-sm input:focus {
    width: 240px;
}

.search-bar-sm .search-icon {
    left: 12px;
}

.match-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Investor Match Card */
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    position: relative;
    transition: var(--transition-base);
    animation: fadeInUp 0.4s ease forwards;
    box-shadow: var(--shadow-sm);
}

.match-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Rank Badge */
.match-rank {
    background: rgba(99, 102, 241, 0.06);
    color: var(--accent-violet);
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    font-size: 0.9rem;
    font-weight: 800;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
}

.match-card:nth-child(1) .match-rank {
    background: rgba(217, 119, 6, 0.08);
    color: var(--accent-amber);
    border-color: rgba(217, 119, 6, 0.25);
}

.match-card:nth-child(2) .match-rank {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border);
}

.match-card:nth-child(3) .match-rank {
    background: rgba(234, 88, 12, 0.06);
    color: var(--accent-orange);
    border-color: rgba(234, 88, 12, 0.15);
}

/* Main Body */
.match-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.match-fund-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

.match-badge {
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}

.match-badge-geo {
    background: rgba(59, 130, 246, 0.06);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.match-badge-ticket {
    background: rgba(225, 29, 72, 0.06);
    color: var(--accent-rose);
    border: 1px solid rgba(225, 29, 72, 0.12);
}

.match-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Reason for Match */
.match-reason-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-violet);
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 4px;
}

.reason-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-violet);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.reason-bullets {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reason-bullet {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.4;
}

.reason-bullet strong {
    color: var(--text-primary);
}

/* Match Score Circle */
.match-score-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.score-circle {
    position: relative;
    width: 68px;
    height: 68px;
}

.score-circle svg {
    width: 68px;
    height: 68px;
    transform: rotate(-90deg);
}

.score-circle circle {
    fill: none;
    stroke-width: 6;
}

.score-circle .bg-ring {
    stroke: #f1f2f5;
}

.score-circle .fill-ring {
    stroke: url(#logoGrad);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.score-number {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.score-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
}

.score-pct {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 600;
}

.score-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 6px;
}

/* Responsive Matchmaker */
@media (max-width: 768px) {
    .nav-tabs {
        padding: 0 16px;
        top: 120px;
    }
    .nav-tab {
        padding: 12px 14px;
        font-size: 0.8rem;
    }
    .matchmaker-card {
        padding: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .match-card {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .match-score-wrapper {
        align-self: flex-start;
        flex-direction: row;
        gap: 12px;
    }
    .score-circle {
        width: 48px;
        height: 48px;
    }
    .score-circle svg {
        width: 48px;
        height: 48px;
    }
    .score-val {
        font-size: 0.95rem;
    }
}

/* ─── Matchmaker Form Multi-Select ─────────── */
.form-multi-select {
    position: relative;
}

.form-ms-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition-base);
    gap: 8px;
    min-height: 44px;
    user-select: none;
}

.form-ms-trigger:hover {
    border-color: #c7c7d4;
    background: var(--bg-secondary);
}

.form-multi-select.open .form-ms-trigger {
    border-color: var(--accent-violet);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.form-ms-placeholder {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.form-ms-placeholder.has-selection {
    color: var(--text-primary);
    font-weight: 500;
}

.form-ms-count {
    background: var(--gradient-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
    display: none;
}

.form-ms-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.form-multi-select.open .form-ms-arrow {
    transform: rotate(180deg);
    color: var(--accent-violet);
}

.form-ms-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--accent-violet);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    display: none;
    max-height: 280px;
    overflow: hidden;
    flex-direction: column;
}

.form-multi-select.open .form-ms-dropdown {
    display: flex;
    animation: dropdownIn 0.2s ease;
}

.form-ms-search-wrap {
    padding: 8px 10px 4px;
}

.form-ms-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-ms-search:focus {
    border-color: rgba(99, 102, 241, 0.4);
    background: #ffffff;
}

.form-ms-search::placeholder {
    color: var(--text-muted);
}

.form-ms-options {
    overflow-y: auto;
    max-height: 210px;
    padding: 4px 6px 6px;
}

.form-ms-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.form-ms-option:hover {
    background: rgba(99, 102, 241, 0.06);
}

.form-ms-option.hidden {
    display: none;
}

.form-ms-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid #c7c7d4;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.form-ms-option.selected .form-ms-checkbox {
    background: var(--gradient-primary);
    border-color: var(--accent-violet);
}

.form-ms-option.selected .form-ms-checkbox::after {
    content: '';
    display: block;
    width: 8px;
    height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translateY(-1px);
}

.form-ms-option-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex: 1;
}

.form-ms-option.selected .form-ms-option-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Selected tags row below trigger */
.form-ms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.form-ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 100px;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent-violet);
}

.form-ms-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: none;
    border-radius: 50%;
    background: rgba(225, 29, 72, 0.1);
    color: var(--accent-rose);
    font-size: 0.6rem;
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.form-ms-tag-remove:hover {
    background: rgba(225, 29, 72, 0.2);
}

/* ─── Matchmaker Results Filter Bar ────────── */
.match-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 16px 0;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.3s ease forwards;
    box-shadow: var(--shadow-sm);
}

.match-filters-bar .filter-group {
    min-width: 150px;
}

.match-active-tags {
    margin-top: 0;
    margin-bottom: 12px;
}

.score-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
}

.score-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.score-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
    transition: transform 0.15s ease;
}

.score-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.score-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-violet);
    border: 2px solid white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}

.score-slider-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-violet);
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.btn-reset-sm {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-reset-sm:hover {
    border-color: rgba(225, 29, 72, 0.25);
    color: var(--accent-rose);
    background: rgba(225, 29, 72, 0.04);
}

.match-results-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 2px;
}

.match-results-count strong {
    color: var(--accent-violet);
    font-weight: 700;
}
