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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #fafafa;
    color: #37352f;
    line-height: 1.5;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 60px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1a1a1a 0%, #555 50%, #999 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 0;
}

.nav-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #787774;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    margin-bottom: -1px;
}

.nav-tab:hover {
    color: #37352f;
}

.nav-tab.active {
    color: #37352f;
    border-bottom: 2px solid #37352f;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Table Styles */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

#fundraising-table {
    min-width: auto;
    table-layout: auto;
    width: 100%;
}

/* Column widths for fundraising table */
#fundraising-table th:nth-child(1),
#fundraising-table td:nth-child(1) { min-width: 110px; max-width: 160px; } /* Investor Name - wraps */
#fundraising-table th:nth-child(2) { min-width: 80px; max-width: 100px; } /* Owner */
#fundraising-table th:nth-child(3) { min-width: 120px; } /* Status */
#fundraising-table th:nth-child(4) { min-width: 85px; width: 85px; } /* Last Touch */
#fundraising-table th:nth-child(5),
#fundraising-table td:nth-child(5) { min-width: 150px; max-width: 220px; } /* Action Item - wraps */
#fundraising-table th:nth-child(6) { min-width: 100px; } /* Action Status */
#fundraising-table th:nth-child(7),
#fundraising-table td:nth-child(7) { width: 80px; } /* Check Size */
#fundraising-table th:nth-child(8),
#fundraising-table td:nth-child(8) { width: 70px; } /* Prob */
#fundraising-table th:nth-child(9) { min-width: 60px; } /* Notes */

/* Allow text wrapping for Investor Name and Action Item */
#fundraising-table td:nth-child(1) input,
#fundraising-table td:nth-child(6) input {
    white-space: normal;
    word-wrap: break-word;
}

thead {
    background: #f7f7f7;
    position: sticky;
    top: 0;
}

th {
    text-align: left;
    padding: 12px 10px;
    font-weight: 600;
    color: #6b6b6b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

tr:hover {
    background: #fafafa;
}

/* Input Styles */
input[type="text"],
select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.85rem;
    background: transparent;
    transition: all 0.2s;
    color: #37352f;
}

input[type="text"]:hover,
select:hover {
    background: #f5f5f5;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #2383e2;
    background: white;
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.15);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

/* Date text display */
.date-text {
    font-size: 0.8rem;
    color: #37352f;
    cursor: pointer;
    white-space: nowrap;
}

.date-text:hover {
    color: #2383e2;
}

.date-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Check size input wrapper for inline display */
.ticket-wrapper {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.ticket-input {
    width: 45px;
    padding: 4px 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: right;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
}

.ticket-input:hover {
    background: #f5f5f5;
}

.ticket-input:focus {
    outline: none;
    border-color: #2383e2;
    background: white;
}

.ticket-suffix {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-left: 1px;
}

/* Probability wrapper for inline display */
.prob-wrapper {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.prob-input {
    width: 40px;
    padding: 4px 2px;
    font-size: 0.85rem;
    text-align: right;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
}

.prob-input:hover {
    background: #f5f5f5;
}

.prob-input:focus {
    outline: none;
    border-color: #2383e2;
    background: white;
}

.prob-suffix {
    font-size: 0.85rem;
    color: #666;
    margin-left: 1px;
}

/* Status Pills */
.status-select {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-intro { background: #e3f2fd; color: #1565c0; }
.status-firstmeeting { background: #fff3e0; color: #ef6c00; }
.status-duediligence { background: #f3e5f5; color: #7b1fa2; }
.status-termsheet { background: #e8f5e9; color: #2e7d32; }
.status-legal { background: #fff8e1; color: #f9a825; }
.status-closed { background: #e8f5e9; color: #1b5e20; }
.status-passed { background: #ffebee; color: #c62828; }

/* Action Status Pills */
.action-not-started { background: #f5f5f5; color: #757575; }
.action-in-progress { background: #e3f2fd; color: #1565c0; }
.action-bottleneck { background: #ffebee; color: #c62828; }

/* Currency Display */
.currency {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-weight: 500;
}

/* Meeting Notes Button */
.call-history-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #37352f;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.call-history-btn:hover {
    background: #eeeeee;
    border-color: #ccc;
}

.call-history-btn svg {
    width: 14px;
    height: 14px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlide 0.2s ease;
}

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

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

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #787774;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: #37352f;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.call-entry {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 12px;
}

.call-entry:last-child {
    margin-bottom: 0;
}

.call-date {
    font-weight: 600;
    color: #37352f;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.call-summary {
    color: #6b6b6b;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* KPI Dashboard */
.kpi-week-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #37352f;
    margin-bottom: 16px;
}

.kpi-dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.kpi-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-card-highlight {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid #bbf7d0;
}

.kpi-card-chart {
    padding: 20px 24px;
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #787774;
    margin-bottom: 8px;
    font-weight: 600;
}

.kpi-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: #37352f;
    line-height: 1.1;
}

.kpi-value.currency {
    color: #166534;
}

.kpi-subtext {
    font-size: 0.75rem;
    color: #787774;
    margin-top: 6px;
}

.kpi-class-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.class-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.class-bar-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #37352f;
    width: 110px;
    flex-shrink: 0;
}

.class-bar-container {
    flex: 1;
    height: 28px;
    background: #f5f5f5;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}

.class-bar {
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 36px;
    transition: width 0.4s ease;
}

.class-bar-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.class-bar.bar-vcfirm { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.class-bar.bar-angel { background: linear-gradient(90deg, #ef6c00, #ffa726); }
.class-bar.bar-cvc { background: linear-gradient(90deg, #7b1fa2, #ab47bc); }
.class-bar.bar-familyoffice { background: linear-gradient(90deg, #2e7d32, #66bb6a); }
.class-bar.bar-accelerator { background: linear-gradient(90deg, #f9a825, #ffca28); }

/* Investor Pipeline Tab */
.investor-pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.search-input {
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 300px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #2383e2;
    box-shadow: 0 0 0 3px rgba(35, 131, 226, 0.15);
}

/* Investor Pipeline Table specific styles */
#investor-pipeline-table {
    min-width: auto;
    table-layout: auto;
    width: 100%;
}

#investor-pipeline-table th:nth-child(1),
#investor-pipeline-table td:nth-child(1) { min-width: 140px; max-width: 180px; } /* Investor Name */
#investor-pipeline-table th:nth-child(2),
#investor-pipeline-table td:nth-child(2) { min-width: 100px; width: 110px; } /* Type */
#investor-pipeline-table th:nth-child(3),
#investor-pipeline-table td:nth-child(3) { min-width: 120px; } /* Contact Person */
#investor-pipeline-table th:nth-child(4),
#investor-pipeline-table td:nth-child(4) { min-width: 180px; } /* Contact Details (email) */
#investor-pipeline-table th:nth-child(5),
#investor-pipeline-table td:nth-child(5) { width: 80px; } /* Potential Check */
#investor-pipeline-table th:nth-child(6),
#investor-pipeline-table td:nth-child(6) { min-width: 90px; } /* Owner */
#investor-pipeline-table th:nth-child(7),
#investor-pipeline-table td:nth-child(7) { min-width: 80px; } /* Priority */

/* Priority Pills */
.priority-high { background: #ffebee; color: #c62828; }
.priority-medium { background: #fff8e1; color: #f57f17; }
.priority-low { background: #e8f5e9; color: #2e7d32; }

/* Investor Type Pills */
.class-vcfirm { background: #e3f2fd; color: #1565c0; }
.class-angel { background: #fff3e0; color: #ef6c00; }
.class-cvc { background: #f3e5f5; color: #7b1fa2; }
.class-familyoffice { background: #e8f5e9; color: #2e7d32; }
.class-accelerator { background: #fff8e1; color: #f9a825; }

/* Week select styling */
.week-select {
    min-width: 90px;
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        padding: 24px;
    }

    h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        overflow-x: auto;
    }

    .nav-tab {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Add row button */
.add-row-btn {
    margin-top: 16px;
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #6b6b6b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-row-btn:hover {
    background: #eee;
    border-color: #999;
    color: #37352f;
}
