/* Deal Room Styles */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --info-color: #4299e1;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: #f0f4ff;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Main Content */
.main-content {
    padding: 32px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Deal Header */
.deal-header {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-participants {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.participant-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.participant-details h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.participant-details p {
    font-size: 14px;
    color: var(--text-secondary);
}

.connection-line {
    color: var(--primary-color);
}

.deal-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.due-diligence {
    background: #fef3e6;
    color: #c05621;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.deal-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.deal-actions {
    display: flex;
    gap: 12px;
}

.btn-secondary, .btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Deal Progress */
.deal-progress {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

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

.progress-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.estimated-completion {
    text-align: right;
}

.completion-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.completion-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
}

.progress-timeline {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 16px;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
    position: relative;
}

.timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -24px;
    width: 24px;
    height: 2px;
    background: var(--border-color);
}

.timeline-step.completed::after,
.timeline-step.active::after {
    background: var(--primary-color);
}

.step-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
}

.timeline-step.completed .step-marker {
    background: var(--success-color);
    color: white;
}

.timeline-step.active .step-marker {
    background: var(--bg-primary);
    border: 3px solid var(--primary-color);
}

.timeline-step.pending .step-marker {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.step-progress {
    position: absolute;
    top: 0;
    left: 0;
}

.step-progress circle {
    transform: rotate(-90deg);
    transform-origin: center;
}

.step-number {
    font-size: 14px;
    font-weight: 600;
}

.step-content {
    text-align: center;
}

.step-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
}

/* AI Assistant Card */
.ai-assistant-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid #e0e7ff;
}

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

.ai-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.ai-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.ai-status {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--success-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse 2s infinite;
}

.ai-insights {
    margin-bottom: 20px;
}

.insight-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.insight-item.priority {
    background: #fef5e7;
    border-left: 4px solid var(--warning-color);
}

.insight-item.positive {
    background: #f0fff4;
    border-left: 4px solid var(--success-color);
}

.insight-item.suggestion {
    background: #f0f4ff;
    border-left: 4px solid var(--info-color);
}

.insight-icon {
    font-size: 16px;
}

.insight-content h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.insight-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.insight-action {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.insight-action:hover {
    background: var(--primary-color);
    color: white;
}

.ai-chat {
    border-top: 1px solid #e0e7ff;
    padding-top: 16px;
}

.chat-header {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
}

.chat-send {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Document Analysis */
.document-analysis {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-upload {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background: var(--bg-primary);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-upload:hover {
    background: var(--primary-color);
    color: white;
}

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

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.document-item:hover {
    box-shadow: var(--shadow-sm);
}

.doc-icon {
    font-size: 24px;
}

.doc-info {
    flex: 1;
}

.doc-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.doc-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.doc-status .status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.status-badge.analyzed {
    background: #f0fff4;
    color: var(--success-color);
}

.status-badge.processing {
    background: #fef3e6;
    color: var(--warning-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-badge.pending {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.processing-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.doc-actions .doc-action {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* Document Summary */
.document-summary {
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

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

.ai-badge {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
}

.confidence-score {
    font-size: 11px;
    background: var(--success-color);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.metric {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: var(--radius-sm);
}

.metric-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-change {
    font-size: 11px;
    font-weight: 600;
}

.metric-change.positive {
    color: var(--success-color);
}

.risk-factors, .opportunities {
    margin-bottom: 12px;
}

.risk-factors h5, .opportunities h5 {
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.risk-factors ul, .opportunities ul {
    font-size: 11px;
    color: var(--text-secondary);
    padding-left: 16px;
}

/* Right Column */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Quick Actions */
.quick-actions {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.quick-actions h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.action-card:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.action-icon {
    font-size: 24px;
}

.action-card span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Deal Checklist */
.deal-checklist {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.checklist-header {
    margin-bottom: 20px;
}

.checklist-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.checklist-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

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

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    margin-left: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    transition: width 0.3s ease;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background: var(--bg-secondary);
}

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

.checklist-item.completed .item-checkbox {
    background: var(--success-color);
}

.checklist-item.in-progress .item-checkbox {
    background: var(--bg-tertiary);
}

.checklist-item.pending .item-checkbox {
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
}

.progress-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--bg-tertiary);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

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

/* Recent Activity */
.recent-activity {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.recent-activity h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
}

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    flex-shrink: 0;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.activity-content p {
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .right-column {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        display: grid;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .deal-header {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .progress-timeline {
        flex-direction: column;
        align-items: center;
    }
    
    .timeline-step::after {
        display: none;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .key-metrics {
        grid-template-columns: 1fr;
    }
}
