/* TP ICAP M&A Workflow Management System Styles */

:root {
    --primary-color: #1e3a8a; /* TP ICAP Blue */
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b; /* TP ICAP Gold/Orange */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --pending-color: #3b82f6;
    --approved-color: #10b981;
    --rejected-color: #ef4444;
    --background-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
    color: #1f2937;
    line-height: 1.6;
}

.app-container {
    max-width: 100%;
    margin: 0;
    background: white;
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
}

/* Enhanced Header Styles */
.header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3b82f6 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.company-logo {
    height: 48px;
    width: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    padding: 4px;
    transition: all 0.3s ease;
}

.company-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.header-titles h1 {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0;
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: block;
    margin-top: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.notification-center {
    position: relative;
    cursor: pointer;
}

.notification-icon {
    font-size: 1.5rem;
    color: white;
    transition: var(--transition);
}

.notification-icon:hover {
    color: rgba(255, 255, 255, 0.8);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* User section styling */
.user-section {
    color: white;
}

.user-display {
    color: white;
}

.user-name {
    color: white !important;
}

.user-email {
    color: rgba(255, 255, 255, 0.8) !important;
}

.logout-btn {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Enhanced Navigation Tabs */
.nav-tabs {
    display: flex;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-bottom: 2px solid var(--primary-color);
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(30, 58, 138, 0.05);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.tab-button.active {
    background: white;
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(30, 58, 138, 0.1);
}

.tab-button i {
    font-size: 1rem;
    transition: var(--transition);
}

.tab-button.active i {
    transform: scale(1.1);
}

.tab-badge {
    background: var(--secondary-color);
    color: white;
    border-radius: 12px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-badge.urgent {
    background: var(--error-color);
    animation: pulse 2s infinite;
}

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

/* Main Content */
.main-content {
    padding: 2rem;
}

.tab-content {
    display: none;
}

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

/* Pipeline Styles */
.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.pipeline-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
}

.pipeline-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background: white;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background: #1565c0;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Workflow Stages */
.workflow-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    overflow-x: auto;
}

.stage-column {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 400px;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.stage-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.stage-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.deals-container {
    min-height: 300px;
}

/* Deal Cards */
.deal-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    cursor: grab; /* Make it clear cards are draggable */
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.deal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.deal-card.below-hurdle {
    border-left-color: var(--error-color);
}

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.deal-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.deal-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.deal-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.deal-metrics {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.metric {
    text-align: center;
}

.metric-value {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.metric-label {
    font-size: 0.75rem;
    color: #666;
}

.roic-below-hurdle {
    color: var(--error-color);
}

/* Approval Status Styles */
.deal-card.approval-pending {
    border-left-color: var(--pending-color);
}

.deal-card.approval-approved {
    border-left-color: var(--approved-color);
}

.deal-card.approval-rejected {
    border-left-color: var(--rejected-color);
}

/* Drag and Drop Styles */
.deal-ghost {
    opacity: 0.4;
    background: #f3f4f6 !important;
    transform: rotate(5deg);
}

.deal-chosen {
    cursor: grabbing !important;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000;
}

.deal-drag {
    opacity: 0.8;
    transform: rotate(2deg);
}

.deals-container {
    min-height: 200px;
    transition: background-color 0.2s ease;
    padding: 10px;
    border-radius: var(--border-radius);
}

.deals-container.sortable-drag-over {
    background-color: rgba(59, 130, 246, 0.1);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
}

.approval-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    margin-left: 0.5rem;
}

.approval-badge.pending {
    background-color: #e3f2fd;
    color: var(--pending-color);
}

.approval-badge.approved {
    background-color: #e8f5e8;
    color: var(--approved-color);
}

.approval-badge.rejected {
    background-color: #ffebee;
    color: var(--rejected-color);
}

/* Checklist Styles */
.checklist-summary {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.checklist-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.checklist-progress {
    font-size: 0.75rem;
    color: #666;
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
}

.checklist-progress.complete {
    background-color: #e8f5e8;
    color: var(--approved-color);
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    position: relative;
    pointer-events: auto;
}

.checkbox-display {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    flex-shrink: 0;
}

.checkbox-display.checked {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.checkbox-display i {
    font-size: 10px;
}

.checklist-description {
    flex: 1;
}

.completed-indicator {
    color: var(--success-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.checklist-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.checklist-note i {
    color: var(--primary-color);
}

.checklist-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    position: relative;
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.checklist-item label {
    cursor: pointer;
    color: #666;
    flex: 1;
}

.checklist-item.completed label {
    color: var(--approved-color);
    text-decoration: line-through;
}

/* Submit Approval Button */
.approval-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.submit-approval-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-approval-btn:hover {
    background-color: #1565c0;
    transform: translateY(-1px);
}

.submit-approval-btn:disabled,
.submit-approval-btn.disabled {
    background-color: #9ca3af !important;
    color: #d1d5db !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.6;
}

.submit-approval-btn:disabled:hover,
.submit-approval-btn.disabled:hover {
    background-color: #9ca3af !important;
    transform: none !important;
}

.button-hint {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 0.25rem;
    font-style: italic;
}

.submit-approval-btn i {
    font-size: 0.8rem;
}

/* Approval Progress Styles */
.approval-progress {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.approval-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.approval-progress-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.approval-progress-time {
    font-size: 0.75rem;
    color: #666;
}

.approval-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.approval-progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: #e0e0e0;
    z-index: 1;
}

.approval-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.approval-step.active .step-icon {
    background-color: var(--primary-color);
    color: white;
}

.step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.step-label {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
}

.approval-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.approval-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.approval-detail .detail-label {
    color: #666;
    font-weight: 500;
}

.approval-detail .detail-value {
    color: #333;
    font-weight: 600;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white !important;
}

.status-dropdown {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.status-dropdown:hover {
    border-color: #1976d2;
}

.status-dropdown:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

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

/* Email Preview Modal */
.email-preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.email-preview-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.email-preview-header {
    background: linear-gradient(135deg, #003366 0%, #1976d2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-preview-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.email-preview-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.email-preview-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.email-preview-content {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

.email-meta {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.email-field {
    margin-bottom: 10px;
    font-size: 14px;
}

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

.email-body-preview {
    padding: 20px;
    background: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.email-body-preview > div {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.email-preview-actions {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.email-preview-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-preview-actions .btn-secondary {
    background: #6c757d;
    color: white;
}

.email-preview-actions .btn-secondary:hover {
    background: #5a6268;
}

.email-preview-actions .btn-primary {
    background: #1976d2;
    color: white;
}

.email-preview-actions .btn-primary:hover {
    background: #1565c0;
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive design for email preview modal */
@media (max-width: 768px) {
    .email-preview-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .email-preview-header {
        padding: 15px;
    }
    
    .email-meta,
    .email-body-preview,
    .email-preview-actions {
        padding: 15px;
    }
    
    .email-preview-actions {
        flex-direction: column;
    }
    
    .email-preview-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Deal Modal Styles */
.deal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.deal-modal-overlay.show {
    opacity: 1;
}

.deal-modal {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.deal-modal-overlay.show .deal-modal {
    transform: translateY(0);
}

.deal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.deal-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
    background-color: #e0e0e0;
}

.deal-modal-content {
    height: calc(90vh - 100px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deal-modal-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: white;
}

.tab-btn:hover {
    background-color: #e9ecef;
}

.deal-modal-tab-content {
    flex: 1;
    overflow-y: auto;
}

.tab-content {
    display: none;
    padding: 1.5rem;
}

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

/* Overview Tab Styles */
.deal-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.overview-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
}

.overview-section.full-width {
    grid-column: 1 / -1;
}

.overview-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.overview-item .label {
    font-weight: 500;
    color: #666;
}

.overview-item .value {
    font-weight: 600;
    color: #333;
}

.overview-item .value.below-hurdle {
    color: var(--error-color);
}

.deal-notes {
    margin: 0;
    padding: 1rem;
    background-color: white;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

/* Approval History Tab Styles */
.approval-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.approval-history-header h3 {
    margin: 0;
    color: #333;
}

.approval-summary .approval-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.approval-status.pending {
    background-color: #e3f2fd;
    color: var(--pending-color);
}

.approval-status.approved {
    background-color: #e8f5e8;
    color: var(--approved-color);
}

.approval-status.rejected {
    background-color: #ffebee;
    color: var(--rejected-color);
}

.approval-status.none {
    background-color: #f5f5f5;
    color: #666;
}

.approval-timeline {
    position: relative;
}

.approval-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e0e0e0;
}

.approval-history-item {
    display: flex;
    margin-bottom: 1.5rem;
    position: relative;
}

.approval-history-item.latest {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-left: -1rem;
    margin-right: -1rem;
}

.approval-history-icon {
    width: 40px;
    display: flex;
    justify-content: center;
    margin-right: 1rem;
}

.approval-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background-color: white;
    border: 3px solid #e0e0e0;
}

.approval-status-icon.pending {
    border-color: var(--pending-color);
    background-color: #e3f2fd;
}

.approval-status-icon.approved {
    border-color: var(--approved-color);
    background-color: #e8f5e8;
}

.approval-status-icon.rejected {
    border-color: var(--rejected-color);
    background-color: #ffebee;
}

.approval-history-content {
    flex: 1;
}

.approval-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.approval-stage {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.approval-time {
    font-size: 0.85rem;
    color: #666;
}

.approval-history-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.approval-request-id {
    font-size: 0.75rem;
    color: #999;
    font-family: monospace;
}

.no-approval-history {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Checklist Tab Styles */
.checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checklist-header h3 {
    margin: 0;
    color: #333;
}

.checklist-progress-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.progress-bar {
    width: 150px;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--success-color);
    transition: width 0.3s ease;
}

.checklist-items-detailed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checklist-item-detailed {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.checklist-item-detailed.completed {
    background-color: #f8fff8;
    border-color: var(--success-color);
}

.checklist-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist-description {
    flex: 1;
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

.checklist-item-detailed.completed .checklist-description {
    color: var(--success-color);
    text-decoration: line-through;
}

.checklist-item-meta {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

.no-checklist-items {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .deal-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .deal-overview-grid {
        grid-template-columns: 1fr;
    }
    
    .approval-history-details {
        grid-template-columns: 1fr;
    }
    
    .checklist-progress-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Deal Filters */
.deal-filters {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #666;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    min-width: 120px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.filter-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.clear-filters-btn {
    padding: 0.5rem 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.filter-count {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Filter responsive design */
@media (max-width: 768px) {
    .deal-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .filter-actions {
        margin-left: 0;
        justify-content: space-between;
    }
}

/* Governance Dashboard */
.governance-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.dashboard-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.dashboard-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

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

.metric-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.metric-trend {
    font-size: 0.8rem;
    font-weight: 500;
}

.metric-trend.up {
    color: var(--success-color);
}

.metric-trend.down {
    color: var(--error-color);
}

.metric-trend.stable {
    color: #666;
}

/* Alerts */
.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-warning {
    background: #fff3cd;
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-urgent {
    background: #f8d7da;
    border-left-color: var(--error-color);
    color: #721c24;
}

.alert-error {
    background: #f8d7da;
    border-left-color: var(--error-color);
    color: #721c24;
}

.alert i {
    font-size: 1.2rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.alert-message {
    font-size: 0.9rem;
}

/* Approval Queue */
.approval-queue {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.approval-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.approval-item.urgent {
    border-left-color: var(--error-color);
    background: #fff5f5;
}

.approval-info {
    flex: 1;
}

.approval-deal {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.approval-details {
    font-size: 0.9rem;
    color: #666;
}

.approval-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-approve {
    background: var(--success-color);
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-review {
    background: var(--warning-color);
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Committee Cards */
.committee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.committee-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
}

.committee-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.committee-info {
    margin-bottom: 1rem;
}

.committee-info > div {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.frequency {
    font-weight: 500;
    color: var(--primary-color);
}

.next-meeting {
    color: #666;
}

.attendees {
    color: #666;
    font-size: 0.85rem;
}

/* Financial Dashboard */
.financial-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.financial-metrics {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.compliance-indicator {
    text-align: center;
}

.compliance-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

.compliance-label {
    font-size: 1rem;
    color: #666;
}

.financial-calculator {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.calculator-form {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-group label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.calculation-results {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-top: 1rem;
}

/* Reporting Dashboard */
.reporting-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-status {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

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

.metric-status.warning {
    color: var(--warning-color);
}

.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.chart-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.chart-container h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

/* Documents Manager */
.documents-manager {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.document-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    width: 250px;
}

.documents-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.folder-structure {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* AI Chat */
.ai-chat-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 1rem;
    max-width: 80%;
}

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: #666;
}

.message-content {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    flex: 1;
}

.user-message .message-content {
    background: var(--primary-color);
    color: white;
}

.message-text {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

#uploadDocument {
    padding: 0.75rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
    min-width: 44px;
}

#uploadDocument:hover {
    background: #5a6268;
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quick-action {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

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

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

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
}

.modal-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.modal-tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    transition: var(--transition);
}

.modal-tab:hover {
    background: #e0e0e0;
}

.modal-tab.active {
    background: white;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.modal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: white;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.info {
    border-left-color: var(--primary-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .workflow-stages {
        grid-template-columns: 1fr;
    }
    
    .pipeline-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .pipeline-controls {
        justify-content: space-between;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .documents-content {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        flex: 1;
        min-width: 120px;
    }
}

/* Deal Overview Styles */
.deal-overview-container {
    padding: 1rem;
    width: 100%;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.overview-header h2 {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
}

.overview-controls {
    display: flex;
    gap: 1rem;
}

.overview-table-container {
    overflow-x: auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin: 0;
    padding: 0;
}

.deal-overview-table {
    width: 100%;
    min-width: 2400px;
    border-collapse: collapse;
    font-size: 0.75rem;
    margin: 0;
    border: 0;
}

.deal-overview-table th {
    background: #f8f9fa;
    padding: 0.5rem 0.25rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    font-size: 0.7rem;
    vertical-align: middle;
    margin: 0;
}

.deal-overview-table td {
    padding: 0.5rem 0.25rem;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
    font-size: 0.75rem;
    text-align: center;
    margin: 0;
}

.deal-overview-table tbody tr:hover {
    background: #f8f9fa;
}

.status-group-header {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 700;
    text-align: center;
}

.status-group-header td {
    padding: 1rem !important;
    font-size: 1rem !important;
    margin: 0 !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    background: var(--primary-color) !important;
}

/* Ensure the status header extends to table edges */
.deal-overview-table .status-group-header td:first-child {
    border-left: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.deal-overview-table .status-group-header td:last-child {
    border-right: none !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
}

/* Override any table cell borders for status headers */
.deal-overview-table .status-group-header td {
    border: none !important;
}

/* Ensure status header row has no gaps */
.deal-overview-table .status-group-header {
    border: none !important;
    border-collapse: collapse !important;
}

.process-stage-cell {
    text-align: center;
}

.stage-complete {
    color: var(--success-color);
    font-weight: 600;
}

.stage-current {
    color: var(--warning-color);
    font-weight: 600;
}

.stage-pending {
    color: #ccc;
}

.kpi-positive {
    color: var(--success-color);
    font-weight: 600;
}

.kpi-negative {
    color: var(--error-color);
    font-weight: 600;
}

.value-cell {
    text-align: right;
    font-weight: 500;
}

@media (max-width: 768px) {
    .deal-overview-container {
        padding: 1rem;
    }
    
    .overview-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .deal-overview-table {
        font-size: 0.75rem;
    }
    
    .deal-overview-table th,
    .deal-overview-table td {
        padding: 0.5rem 0.25rem;
    }
}
.deal-overview-table thead tr:first-child th {
    background: #e3f2fd;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
}

.deal-overview-table thead tr:nth-child(2) th {
    background: #f3e5f5;
    font-weight: 600;
    text-align: center;
}

.deal-overview-table thead tr:nth-child(3) th {
    background: #e8f5e8;
    font-weight: 600;
    text-align: center;
}

.process-stage-cell {
    text-align: center;
    font-weight: 600;
}

@media (max-width: 768px) {
    .deal-overview-table {
        font-size: 0.65rem;
        min-width: 2000px;
    }
    
    .deal-overview-table th,
    .deal-overview-table td {
        padding: 0.25rem 0.125rem;
        font-size: 0.65rem;
    }
}
.deal-overview-table td[contenteditable="true"] {
    cursor: text;
    transition: background-color 0.2s ease;
}

.deal-overview-table td[contenteditable="true"]:hover {
    background-color: #f8f9fa;
}

.deal-overview-table td[contenteditable="true"]:focus {
    background-color: #fff3cd;
    outline: 2px solid #ffc107;
    outline-offset: -2px;
}
/* Audit Trail Styles */
.audit-trail-tab {
    padding: 1rem;
}

.audit-trail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.audit-trail-header h3 {
    margin: 0;
    color: #333;
}

.audit-count {
    color: var(--primary-color);
    font-weight: 600;
}

.no-audit {
    color: #666;
    font-style: italic;
}

.no-audit-items {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.audit-trail-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audit-trail-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
}

.audit-trail-item .audit-trail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.audit-field-name {
    font-weight: 600;
    color: var(--primary-color);
}

.audit-timestamp {
    font-size: 0.85rem;
    color: #666;
}

.audit-trail-changes {
    display: flex;
    gap: 2rem;
    margin-bottom: 0.75rem;
}

.audit-change {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.change-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.old-value {
    color: #dc3545;
    font-family: monospace;
    background: #fff5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.new-value {
    color: #28a745;
    font-family: monospace;
    background: #f8fff8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.audit-trail-meta {
    font-size: 0.85rem;
    color: #666;
}

.changed-by {
    font-style: italic;
}
/* Editable fields in modal */
.deal-overview .editable {
    cursor: text;
    transition: background-color 0.2s ease;
    padding: 2px 4px;
    border-radius: 3px;
    min-height: 1.2em;
    display: inline-block;
    min-width: 50px;
}

.deal-overview .editable:hover {
    background-color: #f8f9fa;
}

.deal-overview .editable:focus {
    background-color: #fff3cd;
    outline: 2px solid #ffc107;
    outline-offset: -2px;
}

.deal-notes.editable {
    min-height: 3em;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    width: 100%;
    display: block;
}

.deal-notes.editable:hover {
    border-color: #ddd;
}

.deal-notes.editable:focus {
    border-color: #ffc107;
    background-color: #fff3cd;
}
/* Editable fields in pipeline cards */
.deal-card .editable-card {
    cursor: text;
    transition: background-color 0.2s ease;
    padding: 1px 3px;
    border-radius: 3px;
    min-height: 1em;
    display: inline-block;
    min-width: 30px;
}

.deal-card .editable-card:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.deal-card .editable-card:focus {
    background-color: rgba(255, 193, 7, 0.3);
    outline: 1px solid #ffc107;
    outline-offset: -1px;
}

.deal-name.editable-card {
    font-weight: 600;
    font-size: 1rem;
}

.deal-value.editable-card {
    font-weight: 600;
    color: var(--primary-color);
}

.metric-value.editable-card {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Introduction Tab Styles */
.introduction-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.intro-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
}

.intro-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.intro-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

.intro-content {
    display: grid;
    gap: 2.5rem;
}

.intro-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid #e5e7eb;
}

.intro-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.intro-section p {
    color: #4b5563;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.feature-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 1rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.how-to-steps {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid #e5e7eb;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.metric-label {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.alert-box {
    background: #fef3cd;
    border: 1px solid #fbbf24;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.alert-box p {
    color: #92400e;
    margin-bottom: 0.75rem;
}

.alert-box p:last-child {
    margin-bottom: 0;
}

.alert-box strong {
    color: #78350f;
}

.intro-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: var(--border-radius-lg);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

/* Responsive Design for Introduction */
@media (max-width: 768px) {
    .introduction-container {
        padding: 1rem;
    }
    
    .intro-header h2 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .intro-subtitle {
        font-size: 1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .intro-actions {
        flex-direction: column;
    }
}
/* Approval Actions Section */
.approval-actions-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.approval-actions-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.approval-decision-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.approval-comments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.approval-comments label {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.approval-comments textarea {
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.approval-buttons {
    display: flex;
    gap: 10px;
}

.btn-approve, .btn-reject {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-approve {
    background: #28a745;
    color: white;
}

.btn-approve:hover {
    background: #218838;
}

.btn-reject {
    background: #dc3545;
    color: white;
}

.btn-reject:hover {
    background: #c82333;
}

.btn-approve:disabled, .btn-reject:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
/* Document Management System */
.documents-manager {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.document-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 250px;
}

.documents-content {
    flex: 1;
    display: flex;
    gap: 20px;
    min-height: 0;
}

.folder-structure {
    width: 250px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
}

.folder-breadcrumb {
    margin-bottom: 15px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.breadcrumb-item {
    cursor: pointer;
    color: #007bff;
    padding: 2px 4px;
    border-radius: 3px;
}

.breadcrumb-item:hover {
    background: #e9ecef;
}

.folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.folder-item:hover {
    background: #e9ecef;
}

.folder-content {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.folder-content i {
    color: #ffc107;
    font-size: 16px;
}

.folder-name {
    font-weight: 500;
}

.folder-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.folder-item:hover .folder-actions {
    opacity: 1;
}

.documents-list {
    flex: 1;
    overflow-y: auto;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 10px;
}

.document-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    position: relative;
}

.document-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.document-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.document-icon .fa-file-pdf { color: #dc3545; }
.document-icon .fa-file-word { color: #007bff; }
.document-icon .fa-file-excel { color: #28a745; }
.document-icon .fa-file-powerpoint { color: #fd7e14; }
.document-icon .fa-file-image { color: #6f42c1; }
.document-icon .fa-file-alt { color: #6c757d; }
.document-icon .fa-file { color: #6c757d; }

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
}

.document-meta {
    font-size: 12px;
    color: #6c757d;
}

.document-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.document-item:hover .document-actions {
    opacity: 1;
}

.btn-download, .btn-delete {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-download {
    color: #007bff;
}

.btn-download:hover {
    background: #e3f2fd;
}

.btn-delete {
    color: #dc3545;
}

.btn-delete:hover {
    background: #ffebee;
}

.empty-folder {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-folder i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-folder p {
    font-size: 16px;
    margin: 0;
}
/* AI Assistant Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Typing indicator animation */
.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
