        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            max-width: 1800px;
            margin: 0 auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-height: calc(100vh - 40px);
        }
        
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px 30px;
            text-align: center;
            position: relative;
        }
        
        .header h1 {
            font-size: 32px;
            margin-bottom: 8px;
            font-weight: 700;
        }
        
        .header p {
            opacity: 0.9;
            font-size: 14px;
        }
        
        /* Main Layout */
        .main-layout {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        /* Vertical Sidebar Menu */
        .sidebar {
            width: 280px;
            background: #2d3748;
            color: white;
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }
        
        .sidebar-header {
            padding: 20px;
            background: #1a202c;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .sidebar-header h3 {
            font-size: 14px;
            color: #a0aec0;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }
        
        .sidebar-menu {
            flex: 1;
            padding: 10px 0;
        }
        
        .sidebar-item {
            padding: 15px 20px;
            cursor: pointer;
            transition: all 0.3s;
            border-left: 4px solid transparent;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 15px;
            color: #e2e8f0;
        }
        
        .sidebar-item:hover {
            background: rgba(102, 126, 234, 0.1);
            color: white;
        }
        
        .sidebar-item.active {
            background: rgba(102, 126, 234, 0.2);
            border-left-color: #667eea;
            color: white;
            font-weight: 600;
        }
        
        .sidebar-item-icon {
            font-size: 20px;
            width: 24px;
            text-align: center;
        }
        
        .sidebar-footer {
            padding: 15px 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 12px;
            color: #a0aec0;
            text-align: center;
        }
        
        /* Content Area */
        .content-wrapper {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .section-content {
            display: none;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
        }
        
        .section-content.active {
            display: flex;
        }
        
        .section-header {
            background: #f8f9fa;
            padding: 20px 30px;
            border-bottom: 2px solid #e9ecef;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .section-header h2 {
            font-size: 24px;
            color: #2d3748;
            margin-bottom: 5px;
        }
        
        .section-header p {
            font-size: 14px;
            color: #718096;
        }
        
        .logout-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            text-decoration: none;
            transition: all 0.3s;
        }
        
        .logout-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: rgba(255, 255, 255, 0.5);
        }
        
        /* Tabs */
        .tabs {
            display: flex;
            background: #f8f9fa;
            border-bottom: 2px solid #e9ecef;
            overflow-x: auto;
        }
        
        .tab {
            padding: 15px 30px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            color: #718096;
            transition: all 0.3s;
            border-bottom: 3px solid transparent;
            white-space: nowrap;
        }
        
        .tab:hover {
            background: #e9ecef;
            color: #2d3748;
        }
        
        .tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
            background: white;
        }
        
        .tab-content {
            display: none;
            padding: 30px;
            overflow-y: auto;
            flex: 1;
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* Coming Soon Placeholder */
        .coming-soon {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 400px;
            padding: 60px 40px;
            text-align: center;
        }
        
        .coming-soon-icon {
            font-size: 80px;
            margin-bottom: 30px;
            opacity: 0.3;
        }
        
        .coming-soon h3 {
            font-size: 28px;
            color: #2d3748;
            margin-bottom: 15px;
        }
        
        .coming-soon p {
            font-size: 16px;
            color: #718096;
            max-width: 500px;
        }
        
        /* Dashboard Stats */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }
        
        .stat-card.green {
            background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
        }
        
        .stat-card.orange {
            background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
        }
        
        .stat-card.red {
            background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
        }
        
        .stat-card.blue {
            background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
        }
        
        .stat-label {
            font-size: 13px;
            opacity: 0.9;
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .stat-value {
            font-size: 32px;
            font-weight: bold;
        }
        
        .stat-subvalue {
            font-size: 12px;
            opacity: 0.8;
            margin-top: 5px;
        }
        
        /* Filters */
        .filters {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
            flex-wrap: wrap;
            align-items: center;
        }
        
        .filter-group {
            flex: 1;
            min-width: 200px;
        }
        
        .filter-label {
            font-size: 12px;
            font-weight: 600;
            color: #4a5568;
            margin-bottom: 5px;
            display: block;
        }
        
        .filter-input, .filter-select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e9ecef;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .filter-input:focus, .filter-select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .filter-btn {
            padding: 10px 20px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 20px;
        }
        
        .filter-btn:hover {
            background: #5568d3;
            transform: translateY(-2px);
        }
        
        /* Table */
        .table-container {
            overflow-x: auto;
            border-radius: 8px;
            border: 2px solid #e9ecef;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        
        thead {
            background: #f8f9fa;
            position: sticky;
            top: 0;
        }
        
        th {
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            color: #2d3748;
            border-bottom: 2px solid #e9ecef;
            white-space: nowrap;
        }
        
        td {
            padding: 12px 15px;
            border-bottom: 1px solid #f0f0f0;
        }
        
        tr:hover {
            background: #f8f9fa;
        }
        
        .status-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .status-success {
            background: #c6f6d5;
            color: #22543d;
        }
        
        .status-error {
            background: #fed7d7;
            color: #742a2a;
        }
        
        .status-pending {
            background: #feebc8;
            color: #7c2d12;
        }
        
        .badge {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 16px;
            font-size: 12px;
            font-weight: 600;
            color: white;
            white-space: nowrap;
            text-align: center;
            line-height: 1.2;
        }
        
        .badge-green {
            background: #48bb78;
            color: white;
        }
        
        .badge-red {
            background: #f56565;
            color: white;
        }
        
        .badge-gray {
            background: #cbd5e0;
            color: #2d3748;
        }
        
        .badge-primary {
            background: #667eea;
            color: white;
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 600;
        }
        
        .badge-success {
            background: #48bb78;
            color: white;
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 600;
        }
        
        .badge-info {
            background: #4299e1;
            color: white;
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 600;
        }
        
        .badge-warning {
            background: #ed8936;
            color: white;
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 600;
        }
        
        .badge-error {
            background: #f56565;
            color: white;
            padding: 6px 14px;
            border-radius: 16px;
            font-size: 13px;
            font-weight: 600;
        }
        
        .btn-detail {
            padding: 5px 12px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .btn-detail:hover {
            background: #5568d3;
        }
        
        /* Modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            overflow-y: auto;
            padding: 20px;
        }
        
        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background: white;
            border-radius: 12px;
            max-width: 900px;
            width: 100%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        }
        
        .modal-header {
            padding: 20px 30px;
            background: #f8f9fa;
            border-bottom: 2px solid #e9ecef;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-header h2 {
            font-size: 20px;
            color: #2d3748;
        }
        
        .modal-close {
            font-size: 28px;
            cursor: pointer;
            color: #718096;
            transition: color 0.3s;
        }
        
        .modal-close:hover {
            color: #2d3748;
        }
        
        .modal-body {
            padding: 30px;
        }
        
        .detail-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 25px;
        }
        
        .detail-item {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
        }
        
        .detail-label {
            font-size: 11px;
            font-weight: 600;
            color: #718096;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }
        
        .detail-value {
            font-size: 14px;
            color: #2d3748;
            word-break: break-word;
        }
        
        .detail-section {
            margin-bottom: 25px;
        }
        
        .detail-section h3 {
            font-size: 16px;
            color: #2d3748;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #e9ecef;
        }
        
        .email-body {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            font-size: 13px;
            line-height: 1.6;
            max-height: 400px;
            overflow-y: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        .error-box {
            background: #fed7d7;
            border: 2px solid #fc8181;
            padding: 15px;
            border-radius: 8px;
            color: #742a2a;
            font-size: 13px;
            margin-bottom: 15px;
        }
        
        .loading {
            text-align: center;
            padding: 40px;
            color: #667eea;
            font-size: 16px;
        }
        
        .loading::after {
            content: '...';
            animation: dots 1.5s steps(4, end) infinite;
        }
        
        @keyframes dots {
            0%, 20% { content: '.'; }
            40% { content: '..'; }
            60%, 100% { content: '...'; }
        }
        
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #718096;
        }
        
        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.5;
        }
        
        /* Login Styles */
        .login-container {
            max-width: 400px;
            margin: 100px auto;
            background: white;
            border-radius: 12px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            padding: 40px;
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-header h1 {
            font-size: 28px;
            color: #2d3748;
            margin-bottom: 10px;
        }
        
        .login-header p {
            color: #718096;
            font-size: 14px;
        }
        
        .login-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .login-input {
            padding: 12px 15px;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .login-input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }
        
        .login-btn {
            padding: 12px 30px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .login-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }
        
        .login-error {
            padding: 12px;
            background: #fed7d7;
            color: #c53030;
            border-radius: 8px;
            font-size: 13px;
            text-align: center;
        }
        
        .pagination {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-top: 20px;
        }
        
        .pagination button {
            padding: 8px 16px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .pagination button:hover:not(:disabled) {
            background: #5568d3;
        }
        
        .pagination button:disabled {
            background: #cbd5e0;
            cursor: not-allowed;
        }
        
        .chart-container {
            background: white;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
        }
        
        .chart-title {
            font-size: 16px;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 15px;
        }
        
        /* Chatbot Trace Cards */
        .trace-card {
            background: white;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 15px;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .trace-card:hover {
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
        }
        
        .trace-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e9ecef;
        }
        
        .trace-meta {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .trace-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .trace-badge.intent {
            background: #e6f3ff;
            color: #0066cc;
        }
        
        .trace-badge.sub-intent {
            background: #f0e6ff;
            color: #6b21a8;
        }
        
        .trace-query {
            background: #f8f9fa;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 10px;
            font-size: 14px;
            color: #2d3748;
            border-left: 3px solid #667eea;
        }
        
        .trace-reply {
            background: #e6f3ff;
            padding: 12px;
            border-radius: 6px;
            font-size: 14px;
            color: #2d3748;
            border-left: 3px solid #48bb78;
        }
        
        .trace-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 12px;
            color: #718096;
            margin-top: 10px;
        }
        
        .btn-expand {
            padding: 6px 16px;
            background: #667eea;
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .btn-expand:hover {
            background: #5568d3;
        }
        
        .json-viewer {
            background: #1e1e1e;
            color: #d4d4d4;
            padding: 15px;
            border-radius: 6px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            overflow-x: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        /* Knowledge Base Viewer */
        .kb-viewer {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 6px;
            border: 1px solid #e9ecef;
        }
        
        .kb-grid {
            display: grid;
            gap: 12px;
        }
        
        .kb-item {
            display: grid;
            grid-template-columns: 200px 1fr;
            gap: 10px;
            padding: 10px;
            background: white;
            border-radius: 4px;
            border-left: 3px solid #667eea;
        }
        
        .kb-key {
            font-weight: 600;
            color: #2d3748;
            font-size: 13px;
        }
        
        .kb-value {
            color: #4a5568;
            font-size: 13px;
            word-break: break-word;
        }
        
        @media (max-width: 768px) {
            .kb-item {
                grid-template-columns: 1fr;
                gap: 5px;
            }
        }
        
        /* Lead Journey Funnel Chart */
        .funnel-chart {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-width: 800px;
            margin: 0 auto;
        }
        
        .funnel-stage {
            display: flex;
            align-items: center;
            gap: 15px;
            transition: all 0.3s;
        }
        
        .funnel-bar-container {
            flex: 1;
            background: #f8f9fa;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            height: 50px;
        }
        
        .funnel-bar {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
            color: white;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .funnel-bar.stage-1 { background: linear-gradient(90deg, #667eea 0%, #764ba2 100%); }
        .funnel-bar.stage-2 { background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%); }
        .funnel-bar.stage-3 { background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%); }
        .funnel-bar.stage-4 { background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%); }
        .funnel-bar.stage-5 { background: linear-gradient(90deg, #fa709a 0%, #fee140 100%); }
        
        .funnel-label {
            font-size: 13px;
            font-weight: 600;
            color: #2d3748;
            min-width: 150px;
        }
        
        .funnel-rate {
            font-size: 12px;
            color: #718096;
            min-width: 80px;
            text-align: right;
        }
        
        /* Lead Journey Event Cards */
        .journey-event-card {
            background: white;
            border: 2px solid #e9ecef;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 15px;
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .journey-event-card:hover {
            border-color: #667eea;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
        }
        
        .journey-event-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 15px;
            padding-bottom: 12px;
            border-bottom: 1px solid #e9ecef;
        }
        
        .journey-event-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .journey-event-badge.lead-created { background: #e6f3ff; color: #0066cc; }
        .journey-event-badge.showing { background: #f0e6ff; color: #6b21a8; }
        .journey-event-badge.application { background: #e6ffe6; color: #228b22; }
        .journey-event-badge.notification { background: #fff6e6; color: #ff8c00; }
        .journey-event-badge.error { background: #ffe6e6; color: #dc3545; }
        
        /* Timeline View */
        .timeline-container {
            position: relative;
            padding-left: 40px;
        }
        
        .timeline-item {
            position: relative;
            padding-bottom: 30px;
        }
        
        .timeline-item:last-child {
            padding-bottom: 0;
        }
        
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -30px;
            top: 8px;
            bottom: -30px;
            width: 2px;
            background: #e9ecef;
        }
        
        .timeline-item:last-child::before {
            display: none;
        }
        
        .timeline-dot {
            position: absolute;
            left: -38px;
            top: 0;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 3px solid white;
            box-shadow: 0 0 0 2px #667eea;
        }
        
        .timeline-dot.success { box-shadow: 0 0 0 2px #48bb78; background: #48bb78; }
        .timeline-dot.error { box-shadow: 0 0 0 2px #f56565; background: #f56565; }
        .timeline-dot.pending { box-shadow: 0 0 0 2px #ed8936; background: #ed8936; }
        
        .timeline-content {
            background: white;
            border: 2px solid #e9ecef;
            border-radius: 8px;
            padding: 15px;
        }
        
        .timeline-time {
            font-size: 12px;
            color: #718096;
            margin-bottom: 8px;
        }
        
        .timeline-title {
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 8px;
        }
        
        .timeline-description {
            font-size: 14px;
            color: #4a5568;
        }
        
        /* Pending Confirmations */
        .pending-card {
            background: white;
            border-left: 4px solid #ed8936;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .pending-card.urgent {
            border-left-color: #f56565;
            background: #fff5f5;
        }
        
        .pending-deadline {
            font-size: 18px;
            font-weight: 700;
            color: #ed8936;
            margin-bottom: 10px;
        }
        
        .pending-deadline.urgent {
            color: #f56565;
        }
        
        /* Event Badge System */
        .event-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
        }
        
        .event-badge.lead-created {
            background: #c6f6d5;
            color: #22543d;
        }
        
        .event-badge.showing-scheduled {
            background: #bee3f8;
            color: #2c5282;
        }
        
        .event-badge.showing-confirmed {
            background: #9ae6b4;
            color: #22543d;
        }
        
        .event-badge.showing-cancelled {
            background: #fed7d7;
            color: #742a2a;
        }
        
        .event-badge.notification-sent {
            background: #e9d8fd;
            color: #44337a;
        }
        
        .event-badge.application-event {
            background: #fbd38d;
            color: #7c2d12;
        }
        
        .event-badge.other {
            background: #e2e8f0;
            color: #2d3748;
        }
        
        /* Timeline Visual */
        .timeline-container {
            position: relative;
            padding-left: 40px;
        }
        
        .timeline-item {
            position: relative;
            padding-bottom: 30px;
        }
        
        .timeline-item::before {
            content: '';
            position: absolute;
            left: -29px;
            top: 0;
            bottom: -30px;
            width: 2px;
            background: #e2e8f0;
        }
        
        .timeline-item:last-child::before {
            display: none;
        }
        
        .timeline-marker {
            position: absolute;
            left: -40px;
            top: 5px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            z-index: 1;
        }
        
        .timeline-marker.success {
            background: #48bb78;
            color: white;
        }
        
        .timeline-marker.error {
            background: #f56565;
            color: white;
        }
        
        .timeline-marker.info {
            background: #4299e1;
            color: white;
        }
        
        .timeline-content {
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            padding: 15px;
        }
        
        .timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .timeline-time {
            font-size: 12px;
            color: #718096;
            font-weight: 600;
        }
        
        .timeline-description {
            font-size: 14px;
            color: #2d3748;
            margin-bottom: 10px;
        }
        
        .timeline-meta {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            font-size: 13px;
            color: #718096;
        }
        
        .timeline-meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        
        /* Reports Table */
        .reports-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        
        .reports-table th {
            background: #f7fafc;
            padding: 15px;
            text-align: left;
            font-weight: 700;
            font-size: 13px;
            color: #2d3748;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .reports-table td {
            padding: 15px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 14px;
            color: #4a5568;
        }
        
        .reports-table tr:hover {
            background: #f7fafc;
        }
        
        .reports-table .rate-cell {
            font-weight: 700;
        }
        
        .reports-table .rate-good {
            color: #38a169;
        }
        
        .reports-table .rate-medium {
            color: #dd6b20;
        }
        
        .reports-table .rate-poor {
            color: #e53e3e;
        }
        
        /* Search Results Dropdown */
        .search-result-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .search-result-item:hover {
            background: #f7fafc;
        }
        
        .search-result-item:last-child {
            border-bottom: none;
        }
        
        .search-result-name {
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 4px;
        }
        
        .search-result-details {
            font-size: 12px;
            color: #718096;
        }
        
        .btn-view-detail {
            padding: 6px 12px;
            background: #4299e1;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .btn-view-detail:hover {
            background: #3182ce;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .btn-preview {
            padding: 8px 16px;
            background: #48bb78;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .btn-preview:hover {
            background: #38a169;
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

/* ============================================================
   Lead Journeys — lead-centric view (namespaced .lj-*)
   ============================================================ */
.lj-cards{display:flex;flex-direction:column;gap:15px}
.lj-card{background:#fff;border:1px solid #e8ebf3;border-radius:14px;
  box-shadow:0 1px 2px rgba(27,33,48,.05),0 8px 24px -14px rgba(27,33,48,.22);padding:16px 20px 16px}
.lj-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.lj-who{display:flex;gap:13px;min-width:0}
.lj-avatar{width:42px;height:42px;border-radius:12px;flex:none;display:grid;place-items:center;color:#fff;
  font-weight:700;font-size:15px;background:linear-gradient(135deg,#5b60e6,#7c4fd0)}
.lj-name{font-weight:650;font-size:15.5px;letter-spacing:-.01em;color:#1b2130}
.lj-contact{display:flex;flex-wrap:wrap;gap:5px 15px;margin-top:3px;color:#697084;font-size:12.5px}
.lj-contact span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.lj-status{display:flex;align-items:center;gap:9px;flex:none}
.lj-status .lbl{color:#98a0b1;font-size:12px;font-weight:600}
.lj-badge{font-weight:650;font-size:12.5px;padding:5px 13px;border-radius:8px}
.lj-b-green{background:#e2f3ea;color:#0f7a4f}
.lj-b-brand{background:#edeefe;color:#5b60e6}
.lj-b-amber{background:#fbefd6;color:#c8871f}
.lj-b-red{background:#fbe6e3;color:#d94f40}
.lj-b-idle{background:#eef1f7;color:#697084}
.lj-meta{display:flex;flex-wrap:wrap;gap:24px;margin:14px 0 4px;padding-left:55px}
.lj-cell{display:flex;flex-direction:column;gap:1px}
.lj-cell .k{font-size:10.5px;letter-spacing:.05em;text-transform:uppercase;color:#98a0b1;font-weight:650}
.lj-cell .v{font-size:13px;font-weight:600;color:#1b2130}
.lj-barwrap{overflow-x:auto;padding-bottom:2px;margin-top:4px}
.lj-bar{display:flex;gap:3px;min-width:900px}
.lj-seg{flex:1 1 0;min-width:96px;min-height:46px;display:flex;align-items:center;justify-content:center;gap:5px;
  background:#eef1f7;color:#a2abbb;font-weight:600;font-size:11.5px;line-height:1.2;text-align:center;padding:6px 9px}
.lj-seg.done{background:#e2f3ea;color:#0f7a4f}
.lj-seg.current{background:#16a06a;color:#fff}
.lj-seg.cancel{background:#d94f40;color:#fff}
.lj-seg:first-child{border-radius:9px 0 0 9px}
.lj-seg:last-child{border-radius:0 9px 9px 0}
.lj-seg.gap{margin-left:9px;border-radius:9px}
.lj-dates{display:flex;gap:3px;min-width:900px;margin-top:6px}
.lj-dcell{flex:1 1 0;min-width:96px;text-align:center;font-size:10.5px;color:#98a0b1}
.lj-dcell.gap{margin-left:9px}
.lj-foot{display:flex;justify-content:center;margin-top:15px}
.lj-toggle{background:#fff;border:1px solid #e8ebf3;border-radius:20px;font-size:12px;font-weight:600;color:#697084;
  padding:5px 16px;cursor:pointer;display:inline-flex;align-items:center;gap:7px}
.lj-toggle:hover{color:#5b60e6;border-color:#cfd3f4}
.lj-timeline{display:none;margin:16px 0 2px;padding:16px 0 0 55px;border-top:1px solid #f0f2f8}
.lj-card.open .lj-timeline{display:block}
.lj-fitem{position:relative;display:flex;gap:12px;padding-bottom:18px}
.lj-fitem:last-child{padding-bottom:0}
.lj-fitem::before{content:"";position:absolute;left:15px;top:32px;bottom:-2px;width:2px;background:#e8ebf3}
.lj-fitem:last-child::before{display:none}
.lj-fmark{width:32px;height:32px;border-radius:9px;flex:none;display:grid;place-items:center;font-size:14px;
  background:#eef1f7;z-index:1;box-shadow:inset 0 0 0 1px #e8ebf3}
.lj-fmark.g{background:#e2f3ea}.lj-fmark.a{background:#fbefd6}.lj-fmark.r{background:#fbe6e3}.lj-fmark.v{background:#efeafe}
.lj-fbody .t{font-size:13px;color:#1b2130}.lj-fbody .t b{font-weight:650}
.lj-fbody .ti{color:#98a0b1;font-size:11.5px;margin-top:1px}
.lj-pills{display:flex;align-items:center;gap:6px;margin-top:7px;flex-wrap:wrap}
.lj-pill{font-size:11px;font-weight:650;padding:3px 9px;border-radius:7px}
.lj-p-new{background:#eef1f7;color:#697084}.lj-p-prog{background:#e2f3ea;color:#0f7a4f}
.lj-p-amber{background:#fbefd6;color:#c8871f}.lj-p-red{background:#fbe6e3;color:#d94f40}
.lj-join{color:#98a0b1;font-size:12px}
.lj-empty{text-align:center;color:#98a0b1;padding:50px 20px}
