/* Notifications */
.notification{position:fixed;top:20px;right:20px;z-index:10001;background:#fff;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.15);padding:12px 14px;min-width:300px;max-width:420px;border:1px solid #e5e7eb;font-family:Inter,system-ui,sans-serif}
.notification-success{border-left:4px solid #16a34a}
.notification-error{border-left:4px solid #dc2626}
.notification-warning{border-left:4px solid #f59e0b}
.notification-info{border-left:4px solid #2563eb}
.notification-content{display:flex;align-items:center;gap:10px}
.notification-message{flex:1}
.notification-close{border:0;background:transparent;font-size:18px;cursor:pointer;color:#6b7280}

/* Sections */
.dashboard-section{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin-bottom:16px}
.dashboard-header{display:flex;justify-content:space-between;align-items:center;padding:16px}
.dashboard-main{padding:16px}
/* Enhanced Dashboard CSS for iDeskHubs */
/* Fixed Modal System for Responsive Display */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    position: relative;
}

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Mobile responsive header */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 0.75rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.3rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

.dashboard-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fe4 0%, #6b439a 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #4e555b);
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #1e7e34;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Dashboard */
.dashboard-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Mobile responsive main content */
@media (max-width: 768px) {
    .dashboard-main {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .dashboard-main {
        padding: 0.75rem;
    }
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.dashboard-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Summary Section */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Mobile responsive summary grid */
@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.summary-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.summary-title {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Quick Actions */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Mobile responsive actions grid */
@media (max-width: 768px) {
    .actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.action-btn i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.dashboard-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.dashboard-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Score and temperature badges */
.score-badge {
    display: inline-block;
    min-width: 36px;
    padding: 6px 10px;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    margin-right: 8px;
}
.score-high { background: #38a169; }
.score-medium { background: #d69e2e; }
.score-low { background: #e53e3e; }

.temperature-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600;
    color: #333;
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    text-transform: capitalize;
}
.score-info .score-legend {
    margin-top: 6px;
    font-size: 11px;
    color: #6c757d;
    display: flex;
    gap: 8px;
}
.lead-info .lead-name.emphasis {
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
}
.lead-info .lead-email.subtle {
    font-size: 0.85rem;
    color: #6b7280;
}
.temperature-hot { background: #ffe5e5; color: #b83232; border-color: #feb2b2; }
.temperature-warm { background: #fff7e6; color: #b7791f; border-color: #fbd38d; }
.temperature-cold { background: #e6f6ff; color: #2b6cb0; border-color: #90cdf4; }

/* ==========================================
   FIXED MODAL STYLES - COMPLETELY REWRITTEN
   ========================================== */

/* Modal Container/Overlay - Fixed positioning */
.modal-container {
    display: none;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px);
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* When modal is active/open */
.modal-container.active {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Also support the old modal class for backward compatibility */
.modal {
    display: none;
    position: fixed !important;
    z-index: 99999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px);
    overflow: hidden !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.modal.show,
.modal[style*="display: block"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Modal Content Container */
.modal-content {
    position: relative !important;
    background-color: white !important;
    border-radius: 12px !important;
    width: 90% !important;
    max-width: 600px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: modalSlideIn 0.3s ease-out !important;
    margin: 0 !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* For analytics modal that needs more width */
.modal-container[style*="max-width: 90vw"] .modal-content,
#analytics-modal .modal-content {
    max-width: 90vw !important;
    width: 90vw !important;
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2,
.modal-header h3,
.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

/* Modal Body */
.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Modal Close Button */
.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Buttons */
.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modal-btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Form Styles in Modal */
.modal .form-group,
.modal-container .form-group {
    margin-bottom: 1.5rem;
}

.modal .form-group label,
.modal-container .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea,
.modal-container .form-group input,
.modal-container .form-group select,
.modal-container .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus,
.modal-container .form-group input:focus,
.modal-container .form-group select:focus,
.modal-container .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal .form-group textarea,
.modal-container .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Form Row for side-by-side fields */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Modal Actions (legacy support) */
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
}

/* Responsive Modal for Mobile */
@media (max-width: 768px) {
    .modal-container {
        padding: 10px !important;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 100% !important;
        max-height: 95vh !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: calc(95vh - 180px);
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2,
    .modal-header h3,
    .modal-title {
        font-size: 1.2rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column;
    }
    
    .modal-footer .btn,
    .modal-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-container {
        padding: 0 !important;
    }
    
    .modal-content {
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .modal-header {
        border-radius: 0;
        padding: 1rem;
    }
    
    .modal-footer {
        border-radius: 0;
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 160px);
    }
    
    .modal-close {
        right: 1rem;
        top: 1rem;
    }
    
    /* Form rows stack on mobile */
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
}

/* Specific Modal Types */

/* Lead Details Modal */
#lead-modal .modal-content,
#lead-details-modal .modal-content {
    max-width: 800px;
}

.lead-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.detail-section h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.detail-item {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 120px;
}

/* Email Modal */
#email-modal .modal-content {
    max-width: 500px;
}

/* Analytics Modal */
#analytics-modal .modal-content,
.analytics-modal-content {
    max-width: 90vw !important;
    width: 90vw !important;
    max-height: 90vh !important;
}

/* Analytics Tabs */
.analytics-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

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

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom-color: #667eea;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.analytics-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.analytics-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.analytics-card h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

/* Chart Placeholders */
#lead-trends-chart,
#conversion-chart,
#revenue-chart,
#response-time-chart,
#source-analysis,
#quality-distribution,
#company-analysis,
#pain-points,
#funnel-chart,
#time-conversion,
#win-loss,
#kpi-dashboard,
#performance-trends,
#goal-tracking {
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
    border: 2px dashed #dee2e6;
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 95vh !important;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .analytics-tabs {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tab-btn {
        border-radius: 8px;
        border-bottom: none;
    }
}

/* Ensure modals work with any trigger */
.modal.active,
.modal.open,
.modal.visible,
.modal-container.active {
    display: flex !important;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
    position: fixed !important;
    width: 100% !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Loading indicator */
.loading-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9998;
    justify-content: center;
    align-items: center;
}

.loading-indicator.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Offline indicator */
.offline-indicator {
    display: none;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
}

.offline-indicator.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Notification Container */
.notifications-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

/* Notification Styles */
.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #007bff;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

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

.notification-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.notification-message {
    flex: 1;
    color: #2c3e50;
    font-size: 0.95rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: #f8f9fa;
    color: #dc3545;
}

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

/* Filters Section */
.section-header {
    margin-bottom: 1.5rem;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filters select,
.filters input {
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 150px;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Pipeline Section */
.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.pipeline-stage {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pipeline-stage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.pipeline-stage:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pipeline-stage h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.stage-count {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stage-value {
    font-size: 1.1rem;
    color: #28a745;
    font-weight: 600;
}

/* Deal Insights Section */
#deal-insights {
    margin-top: 1.5rem;
}

.insights-header {
    margin-bottom: 1.5rem;
}

.insights-summary {
    color: #6c757d;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

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

.insight-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.insight-card.critical {
    border-left: 4px solid #dc3545;
}

.insight-card.high {
    border-left: 4px solid #ffc107;
}

.insight-card.medium {
    border-left: 4px solid #17a2b8;
}

.insight-card.info {
    border-left: 4px solid #6c757d;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.insight-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.insight-content h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.insight-content p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.insight-action button {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.insight-action button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Footer */
.dashboard-footer {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 3rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.p-2 {
    padding: 1rem;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .dashboard-section {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .modal-content {
        background: #2d2d2d !important;
        color: #e0e0e0;
    }
    
    .modal-header {
        background: linear-gradient(135deg, #4a5bb5, #5a3d7a);
    }
    
    .modal-body {
        background: #2d2d2d;
    }
    
    .modal-footer {
        background: #252525;
    }
}