 /* ========================================
           BORTEX EVENT TRACKING CENTER - STYLES
           ======================================== */

 :root {
     --bortex-primary: #f97316;
     --bortex-secondary: #ea580c;
     --bortex-success: #11998e;
     --bortex-warning: #f5af19;
     --bortex-danger: #eb3349;
     --bortex-info: #4facfe;
     --bortex-dark: #1a1a2e;
     --bortex-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
     --bortex-gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
     --bortex-gradient-warning: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
     --bortex-gradient-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
 }

 /* Page Header */
 .page-header-banner {
     background: var(--bortex-gradient);
     border-radius: 16px;
     padding: 24px 32px;
     color: white;
     margin-bottom: 24px;
     position: relative;
     overflow: hidden;
 }

 .page-header-banner::before {
     content: '';
     position: absolute;
     top: -50%;
     right: -10%;
     width: 300px;
     height: 300px;
     background: rgba(255, 255, 255, 0.1);
     border-radius: 50%;
 }

 .page-header-banner::after {
     content: '';
     position: absolute;
     bottom: -60%;
     left: 10%;
     width: 200px;
     height: 200px;
     background: rgba(255, 255, 255, 0.05);
     border-radius: 50%;
 }

 .page-header-title {
     font-size: 1.75rem;
     font-weight: 700;
     margin-bottom: 4px;
     position: relative;
     z-index: 1;
 }

 .page-header-subtitle {
     opacity: 0.9;
     font-size: 0.95rem;
     position: relative;
     z-index: 1;
 }

 /* Stats Cards */
 .stat-card {
     background: white;
     border-radius: 16px;
     padding: 20px 24px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     border: 1px solid rgba(0, 0, 0, 0.03);
     height: 100%;
 }

 .stat-card:hover {
     transform: translateY(-4px);
     box-shadow: 0 12px 40px rgba(249, 115, 22, 0.15);
 }

 .stat-card-icon {
     width: 52px;
     height: 52px;
     border-radius: 14px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.25rem;
     color: white;
 }

 .stat-card-value {
     font-size: 1.75rem;
     font-weight: 700;
     color: #1a1a2e;
     line-height: 1.2;
 }

 .stat-card-label {
     font-size: 0.8rem;
     color: #6c757d;
     font-weight: 500;
     text-transform: uppercase;
     letter-spacing: 0.5px;
 }

 .stat-card-trend {
     font-size: 0.75rem;
     font-weight: 600;
     padding: 4px 8px;
     border-radius: 20px;
 }

 .stat-card-trend.up {
     background: rgba(17, 153, 142, 0.1);
     color: #11998e;
 }

 .stat-card-trend.down {
     background: rgba(235, 51, 73, 0.1);
     color: #eb3349;
 }

 body.dark-theme .stat-card {
     background: #1e1e2d;
     border-color: rgba(255, 255, 255, 0.05);
 }

 body.dark-theme .stat-card-value {
     color: #fff;
 }

 /* Main Tabs */
 .main-tabs {
     background: white;
     border-radius: 16px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
     overflow: hidden;
 }

 .main-tabs .nav-tabs {
     border: none;
     padding: 16px 24px 0;
     gap: 8px;
     background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
 }

 .main-tabs .nav-tabs .nav-link {
     border: none;
     border-radius: 12px 12px 0 0;
     padding: 14px 24px;
     font-weight: 600;
     font-size: 0.9rem;
     color: #6c757d;
     background: transparent;
     transition: all 0.3s ease;
     position: relative;
 }

 .main-tabs .nav-tabs .nav-link:hover {
     color: var(--bortex-primary);
     background: rgba(249, 115, 22, 0.05);
 }

 .main-tabs .nav-tabs .nav-link.active {
     color: white;
     background: var(--bortex-gradient);
     box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
 }

 .main-tabs .nav-tabs .nav-link .badge {
     font-size: 0.65rem;
     padding: 3px 6px;
     margin-left: 6px;
 }

 .main-tabs .tab-content {
     padding: 24px;
 }

 body.dark-theme .main-tabs {
     background: #1e1e2d;
 }

 body.dark-theme .main-tabs .nav-tabs {
     background: linear-gradient(180deg, #16162a 0%, #1e1e2d 100%);
 }

 body.dark-theme .main-tabs .nav-tabs .nav-link {
     color: #a0a0a0;
 }

 /* Filters Section */
 .filters-section {
     background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
     border-radius: 12px;
     padding: 20px;
     margin-bottom: 24px;
     border: 1px solid rgba(0, 0, 0, 0.05);
 }

 .filter-group label {
     font-size: 0.75rem;
     font-weight: 600;
     color: #6c757d;
     text-transform: uppercase;
     letter-spacing: 0.5px;
     margin-bottom: 6px;
     display: flex;
     align-items: center;
     gap: 6px;
 }

 .filter-group label i {
     color: var(--bortex-primary);
 }

 body.dark-theme .filters-section {
     background: linear-gradient(135deg, #16162a 0%, #1e1e2d 100%);
     border-color: rgba(255, 255, 255, 0.05);
 }

 /* Events Table */
 .events-table-container {
     background: white;
     border-radius: 12px;
     overflow: hidden;
     border: 1px solid rgba(0, 0, 0, 0.05);
 }

 .events-table {
     margin-bottom: 0;
 }

 .events-table thead {
     background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
 }

 .events-table thead th {
     font-size: 0.7rem;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.5px;
     color: #6c757d;
     padding: 14px 16px;
     border: none;
     white-space: nowrap;
 }

 .events-table tbody tr {
     transition: all 0.2s ease;
     cursor: pointer;
 }

 .events-table tbody tr:hover {
     background: linear-gradient(90deg, rgba(249, 115, 22, 0.08) 0%, rgba(249, 115, 22, 0.02) 100%);
 }

 .events-table tbody td {
     padding: 14px 16px;
     vertical-align: middle;
     border-color: rgba(0, 0, 0, 0.03);
     font-size: 0.85rem;
 }

 body.dark-theme .events-table-container {
     background: #1e1e2d;
     border-color: rgba(255, 255, 255, 0.05);
 }

 body.dark-theme .events-table thead {
     background: linear-gradient(135deg, #16162a 0%, #1a1a2e 100%);
 }

 body.dark-theme .events-table thead th {
     color: #a0a0a0;
 }

 body.dark-theme .events-table tbody tr:hover {
     background: linear-gradient(90deg, rgba(249, 115, 22, 0.15) 0%, rgba(249, 115, 22, 0.05) 100%);
 }

 body.dark-theme .events-table tbody td {
     border-color: rgba(255, 255, 255, 0.03);
     color: #e0e0e0;
 }

 /* Event Type Badges */
 .event-badge {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 5px 12px;
     border-radius: 20px;
     font-size: 0.72rem;
     font-weight: 600;
     text-transform: capitalize;
 }

 .event-badge.pageview {
     background: rgba(249, 115, 22, 0.12);
     color: #f97316;
 }

 .event-badge.click {
     background: rgba(17, 153, 142, 0.12);
     color: #11998e;
 }

 .event-badge.scroll {
     background: rgba(245, 87, 108, 0.12);
     color: #f5576c;
 }

 .event-badge.form_submit {
     background: rgba(245, 175, 25, 0.12);
     color: #d4a800;
 }

 .event-badge.form_start {
     background: rgba(255, 193, 7, 0.12);
     color: #ffc107;
 }

 .event-badge.form_abandon {
     background: rgba(255, 152, 0, 0.12);
     color: #ff9800;
 }

 .event-badge.custom {
     background: rgba(234, 88, 12, 0.12);
     color: #ea580c;
 }

 .event-badge.time_on_page {
     background: rgba(79, 172, 254, 0.12);
     color: #4facfe;
 }

 .event-badge.error {
     background: rgba(235, 51, 73, 0.12);
     color: #eb3349;
 }

 .event-badge.exit_intent {
     background: rgba(108, 117, 125, 0.12);
     color: #6c757d;
 }

 .event-badge.session_start {
     background: rgba(102, 51, 153, 0.12);
     color: #663399;
 }

 .event-badge.session_end {
     background: rgba(102, 51, 153, 0.12);
     color: #663399;
 }

 .event-badge.rage_click {
     background: rgba(183, 28, 28, 0.12);
     color: #b71c1c;
 }

 .event-badge.outbound_click {
     background: rgba(255, 87, 34, 0.12);
     color: #ff5722;
 }

 .event-badge.download {
     background: rgba(0, 123, 255, 0.12);
     color: #007bff;
 }

 .event-badge.media_play,
 .event-badge.media_complete {
     background: rgba(255, 99, 71, 0.12);
     color: #ff6347;
 }

 .event-badge.user_login,
 .event-badge.user_signup {
     background: rgba(103, 58, 183, 0.12);
     color: #673ab7;
 }

 .event-badge.lead_newsletter {
     background: rgba(0, 200, 83, 0.12);
     color: #00c853;
 }

 .event-badge.ecommerce_cart,
 .event-badge.view_cart {
     background: rgba(255, 152, 0, 0.12);
     color: #ff9800;
 }

 .event-badge.ecommerce_purchase {
     background: rgba(233, 30, 99, 0.12);
     color: #e91e63;
 }

 .event-badge.begin_checkout {
     background: rgba(139, 195, 74, 0.12);
     color: #8bc34a;
 }

 .event-badge.web_vitals {
     background: rgba(156, 39, 176, 0.12);
     color: #9c27b0;
 }

 .event-badge.visibility {
     background: rgba(23, 162, 184, 0.12);
     color: #17a2b8;
 }

 .event-badge.idle {
     background: rgba(23, 162, 184, 0.12);
     color: #17a2b8;
 }

 .event-badge.network {
     background: rgba(40, 167, 69, 0.12);
     color: #28a745;
 }

 .event-badge.clipboard {
     background: rgba(108, 117, 125, 0.12);
     color: #6c757d;
 }

 .event-badge.route_change {
     background: rgba(63, 81, 181, 0.12);
     color: #3f51b5;
 }

 .event-badge.element_impression {
     background: rgba(0, 188, 212, 0.12);
     color: #00bcd4;
 }

 /* Chat Widget Badge */
 .event-badge.chat_open,
 .event-badge.chat_close,
 .event-badge.chat_message,
 .event-badge.chat_interaction,
 .event-badge.widget {
     background: rgba(79, 172, 254, 0.12);
     color: #4facfe;
 }

 /* Source Badges */
 .source-badge {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 4px 10px;
     border-radius: 8px;
     font-size: 0.72rem;
     font-weight: 600;
 }

 .source-badge.widget {
     background: linear-gradient(135deg, rgba(79, 172, 254, 0.15) 0%, rgba(0, 242, 254, 0.15) 100%);
     color: #4facfe;
 }

 .source-badge.tracker {
     background: linear-gradient(135deg, rgba(17, 153, 142, 0.15) 0%, rgba(56, 239, 125, 0.15) 100%);
     color: #11998e;
 }

 .source-badge.bortex {
     background: linear-gradient(135deg, rgba(234, 88, 12, 0.15) 0%, rgba(249, 115, 22, 0.15) 100%);
     color: #f97316;
 }

 /* Live Indicator */
 .live-indicator {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     padding: 6px 14px;
     background: rgba(235, 51, 73, 0.1);
     border-radius: 20px;
     font-size: 0.75rem;
     font-weight: 700;
     color: #eb3349;
     text-transform: uppercase;
     letter-spacing: 1px;
 }

 .live-indicator::before {
     content: '';
     width: 8px;
     height: 8px;
     background: #eb3349;
     border-radius: 50%;
     animation: livePulse 1.2s infinite;
 }

 @keyframes livePulse {

     0%,
     100% {
         opacity: 1;
         transform: scale(1);
     }

     50% {
         opacity: 0.4;
         transform: scale(1.3);
     }
 }

 .live-indicator.paused {
     background: rgba(108, 117, 125, 0.1);
     color: #6c757d;
 }

 .live-indicator.paused::before {
     background: #6c757d;
     animation: none;
 }

 /* Action Buttons */
 .action-btn {
     width: 32px;
     height: 32px;
     border-radius: 8px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     border: none;
     background: transparent;
     color: #6c757d;
     transition: all 0.2s ease;
     cursor: pointer;
 }

 .action-btn:hover {
     background: rgba(249, 115, 22, 0.1);
     color: var(--bortex-primary);
 }

 .action-btn.danger:hover {
     background: rgba(235, 51, 73, 0.1);
     color: #eb3349;
 }

 /* Quick Stats Bar */
 .quick-stats-bar {
     display: flex;
     align-items: center;
     gap: 24px;
     padding: 12px 20px;
     background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
     border-radius: 10px;
     margin-bottom: 16px;
     border: 1px solid rgba(0, 0, 0, 0.03);
 }

 .quick-stat {
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .quick-stat-icon {
     width: 32px;
     height: 32px;
     border-radius: 8px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.85rem;
 }

 .quick-stat-value {
     font-size: 1.1rem;
     font-weight: 700;
     color: #1a1a2e;
 }

 .quick-stat-label {
     font-size: 0.7rem;
     color: #6c757d;
     text-transform: uppercase;
 }

 body.dark-theme .quick-stats-bar {
     background: linear-gradient(135deg, #16162a 0%, #1e1e2d 100%);
     border-color: rgba(255, 255, 255, 0.05);
 }

 body.dark-theme .quick-stat-value {
     color: #fff;
 }

 /* Empty State */
 .empty-state {
     text-align: center;
     padding: 60px 20px;
 }

 .empty-state-icon {
     width: 80px;
     height: 80px;
     border-radius: 50%;
     background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(234, 88, 12, 0.1) 100%);
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 20px;
     font-size: 2rem;
     color: var(--bortex-primary);
 }

 .empty-state-title {
     font-size: 1.1rem;
     font-weight: 600;
     color: #1a1a2e;
     margin-bottom: 8px;
 }

 .empty-state-desc {
     color: #6c757d;
     font-size: 0.9rem;
     max-width: 400px;
     margin: 0 auto;
 }

 body.dark-theme .empty-state-title {
     color: #fff;
 }

 /* Pagination */
 .pagination-wrapper {
     display: flex;
     align-items: center;
     justify-content: space-between;
     padding: 16px 0;
 }

 .pagination-info {
     font-size: 0.85rem;
     color: #6c757d;
 }

 .pagination .page-link {
     border: none;
     border-radius: 8px;
     padding: 8px 14px;
     margin: 0 3px;
     font-weight: 500;
     color: #6c757d;
     background: #f8f9fa;
     transition: all 0.2s ease;
 }

 .pagination .page-link:hover {
     background: rgba(249, 115, 22, 0.1);
     color: var(--bortex-primary);
 }

 .pagination .page-item.active .page-link {
     background: var(--bortex-gradient);
     color: white;
 }

 /* Event Detail Modal - New Design */
 .event-details-modal {
     border-radius: 16px;
     overflow: hidden;
 }

 .event-details-modal .modal-header {
     background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
     padding: 16px 24px;
 }

 .event-details-modal .modal-title {
     font-size: 1rem;
     font-weight: 600;
 }

 .event-modal-header-card {
     background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
     border: 1px solid rgba(0, 0, 0, 0.08);
     border-radius: 12px;
     padding: 16px 20px;
 }

 .event-modal-header-card h6 {
     font-size: 0.9rem;
     word-break: break-all;
 }

 .country-flag-large {
     font-size: 2rem;
     line-height: 1;
 }

 .event-detail-card {
     background: #fff;
     border: 1px solid rgba(0, 0, 0, 0.08);
     border-radius: 12px;
     padding: 16px;
     height: 100%;
 }

 .event-detail-card-title {
     font-size: 0.8rem;
     font-weight: 600;
     color: var(--bortex-primary);
     margin-bottom: 12px;
     padding-bottom: 8px;
     border-bottom: 1px solid rgba(0, 0, 0, 0.06);
 }

 .event-detail-item {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 6px 0;
     font-size: 0.82rem;
 }

 .event-detail-item .label {
     color: #6c757d;
     font-weight: 500;
     flex-shrink: 0;
     width: 100px;
 }

 .event-detail-item .value {
     color: #1a1a2e;
     text-align: right;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
     max-width: 150px;
 }

 .event-detail-item code.value {
     background: #f1f3f4;
     padding: 2px 6px;
     border-radius: 4px;
     font-size: 0.75rem;
 }

 /* Legacy support */
 .event-detail-header {
     background: var(--bortex-gradient);
     padding: 20px 24px;
     color: white;
     border-radius: 12px 12px 0 0;
     margin: -16px -16px 20px;
 }

 .event-detail-row {
     display: flex;
     padding: 12px 0;
     border-bottom: 1px solid rgba(0, 0, 0, 0.05);
 }

 .event-detail-row:last-child {
     border-bottom: none;
 }

 .event-detail-label {
     width: 140px;
     font-weight: 600;
     color: #6c757d;
     font-size: 0.85rem;
     flex-shrink: 0;
 }

 .event-detail-value {
     flex: 1;
     color: #1a1a2e;
     font-size: 0.9rem;
     word-break: break-all;
 }

 body.dark-theme .event-detail-card {
     background: #1e1e2d;
     border-color: rgba(255, 255, 255, 0.08);
 }

 body.dark-theme .event-detail-card-title {
     border-color: rgba(255, 255, 255, 0.08);
 }

 body.dark-theme .event-detail-item .value {
     color: #e0e0e0;
 }

 body.dark-theme .event-detail-item code.value {
     background: #2a2a3d;
 }

 body.dark-theme .event-modal-header-card {
     background: linear-gradient(135deg, #1e1e2d 0%, #16162a 100%);
     border-color: rgba(255, 255, 255, 0.08);
 }

 body.dark-theme .event-detail-row {
     border-color: rgba(255, 255, 255, 0.05);
 }

 body.dark-theme .event-detail-value {
     color: #e0e0e0;
 }

 /* Tracker Card */
 .tracker-card {
     background: white;
     border-radius: 12px;
     padding: 20px;
     border: 1px solid rgba(0, 0, 0, 0.05);
     transition: all 0.3s ease;
 }

 .tracker-card:hover {
     box-shadow: 0 8px 30px rgba(249, 115, 22, 0.1);
     transform: translateY(-2px);
 }

 .tracker-card-header {
     display: flex;
     align-items: center;
     gap: 12px;
     margin-bottom: 16px;
 }

 .tracker-color-dot {
     width: 12px;
     height: 12px;
     border-radius: 50%;
 }

 .tracker-name {
     font-weight: 600;
     font-size: 1rem;
     color: #1a1a2e;
 }

 .tracker-status {
     margin-left: auto;
     padding: 4px 10px;
     border-radius: 20px;
     font-size: 0.7rem;
     font-weight: 600;
 }

 .tracker-status.active {
     background: rgba(17, 153, 142, 0.12);
     color: #11998e;
 }

 .tracker-status.inactive {
     background: rgba(108, 117, 125, 0.12);
     color: #6c757d;
 }

 body.dark-theme .tracker-card {
     background: #1e1e2d;
     border-color: rgba(255, 255, 255, 0.05);
 }

 body.dark-theme .tracker-name {
     color: #fff;
 }

 /* Responsive */
 @media (max-width: 991.98px) {
     .page-header-banner {
         padding: 20px;
     }

     .page-header-title {
         font-size: 1.4rem;
     }

     .stat-card {
         margin-bottom: 12px;
     }

     .quick-stats-bar {
         flex-wrap: wrap;
         gap: 16px;
     }

     .filters-section .row {
         gap: 12px;
     }
 }

 @media (max-width: 767.98px) {
     .main-tabs .nav-tabs {
         padding: 12px 12px 0;
         overflow-x: auto;
         flex-wrap: nowrap;
     }

     .main-tabs .nav-tabs .nav-link {
         padding: 10px 16px;
         font-size: 0.8rem;
         white-space: nowrap;
     }

     .main-tabs .nav-tabs .nav-link i {
         display: none;
     }

     .events-table-container {
         overflow-x: auto;
     }

     .events-table {
         min-width: 800px;
     }
 }

 /* Charts */
 .chart-container {
     position: relative;
     height: 300px;
 }

 /* Bortex Special Section */
 .bortex-section {
     background: linear-gradient(135deg, rgba(234, 88, 12, 0.05) 0%, rgba(249, 115, 22, 0.05) 100%);
     border-radius: 16px;
     padding: 40px;
     text-align: center;
     border: 2px dashed rgba(249, 115, 22, 0.2);
 }

 .bortex-section-icon {
     width: 80px;
     height: 80px;
     border-radius: 50%;
     background: var(--bortex-gradient);
     display: flex;
     align-items: center;
     justify-content: center;
     margin: 0 auto 20px;
     font-size: 2rem;
     color: white;
 }

 .bortex-section-title {
     font-size: 1.3rem;
     font-weight: 700;
     color: #f97316;
     margin-bottom: 8px;
 }

 .bortex-section-desc {
     color: #6c757d;
     max-width: 500px;
     margin: 0 auto;
 }

 /* Snippet Code */
 .snippet-container {
     background: #1a1a2e;
     border-radius: 12px;
     overflow: hidden;
 }

 .snippet-header {
     background: rgba(255, 255, 255, 0.05);
     padding: 12px 16px;
     display: flex;
     align-items: center;
     justify-content: space-between;
 }

 .snippet-title {
     color: #a0a0a0;
     font-size: 0.8rem;
     font-weight: 500;
 }

 .snippet-code {
     padding: 16px;
     font-family: 'Monaco', 'Menlo', monospace;
     font-size: 0.8rem;
     color: #e0e0e0;
     line-height: 1.6;
     max-height: 300px;
     overflow-y: auto;
 }

 .snippet-code::-webkit-scrollbar {
     width: 6px;
 }

 .snippet-code::-webkit-scrollbar-thumb {
     background: rgba(255, 255, 255, 0.2);
     border-radius: 3px;
 }

 /* Session Cards */
 .session-card {
     background: white;
     border-radius: 12px;
     margin-bottom: 12px;
     border: 1px solid rgba(0, 0, 0, 0.05);
     overflow: hidden;
     transition: all 0.2s ease;
 }

 .session-card:hover {
     box-shadow: 0 4px 15px rgba(249, 115, 22, 0.1);
 }

 .session-card-header {
     padding: 16px 20px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: space-between;
     background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
 }

 .session-card-header:hover {
     background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, #fff 100%);
 }

 .session-info {
     display: flex;
     align-items: center;
     gap: 16px;
 }

 .session-avatar {
     width: 44px;
     height: 44px;
     border-radius: 12px;
     background: var(--bortex-gradient);
     display: flex;
     align-items: center;
     justify-content: center;
     color: white;
     font-weight: 600;
     font-size: 1rem;
 }

 .session-avatar.returning {
     background: var(--bortex-gradient-success);
 }

 .session-details h6 {
     margin: 0 0 4px 0;
     font-weight: 600;
     font-size: 0.95rem;
     color: #1a1a2e;
 }

 .session-meta {
     display: flex;
     align-items: center;
     gap: 12px;
     font-size: 0.75rem;
     color: #6c757d;
 }

 .session-meta span {
     display: flex;
     align-items: center;
     gap: 4px;
 }

 .session-stats {
     display: flex;
     align-items: center;
     gap: 16px;
 }

 .session-stat {
     text-align: center;
     padding: 8px 12px;
     background: rgba(249, 115, 22, 0.08);
     border-radius: 8px;
     min-width: 60px;
 }

 .session-stat-value {
     font-size: 1.1rem;
     font-weight: 700;
     color: var(--bortex-primary);
 }

 .session-stat-label {
     font-size: 0.65rem;
     color: #6c757d;
     text-transform: uppercase;
 }

 .session-expand-icon {
     color: #6c757d;
     transition: transform 0.2s ease;
 }

 .session-card.expanded .session-expand-icon {
     transform: rotate(180deg);
 }

 .session-events {
     display: none;
     padding: 0 20px 16px;
     background: #f8f9fa;
 }

 .session-card.expanded .session-events {
     display: block;
 }

 .session-event-item {
     display: flex;
     align-items: center;
     padding: 10px 12px;
     background: white;
     border-radius: 8px;
     margin-top: 8px;
     font-size: 0.85rem;
 }

 .session-event-item:first-child {
     margin-top: 0;
 }

 .session-event-time {
     width: 70px;
     color: #6c757d;
     font-size: 0.75rem;
     flex-shrink: 0;
 }

 .session-event-type {
     width: 120px;
     flex-shrink: 0;
 }

 .session-event-details {
     flex: 1;
     color: #495057;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
 }

 body.dark-theme .session-card {
     background: #1e1e2d;
     border-color: rgba(255, 255, 255, 0.05);
 }

 body.dark-theme .session-card-header {
     background: linear-gradient(135deg, #16162a 0%, #1e1e2d 100%);
 }

 body.dark-theme .session-details h6 {
     color: #fff;
 }

 body.dark-theme .session-events {
     background: #16162a;
 }

 body.dark-theme .session-event-item {
     background: #1e1e2d;
 }

/* Session Events Table */
.session-events-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 12px;
}

.session-events-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    padding: 10px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.session-events-table tbody td {
    padding: 10px 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    vertical-align: middle;
}

.session-events-table tbody tr:last-child td {
    border-bottom: none;
}

.session-events-table tbody tr:hover {
    background: rgba(249, 115, 22, 0.03);
}

body.dark-theme .session-events-table {
    background: #1e1e2d;
}

body.dark-theme .session-events-table thead th {
    background: #16162a;
    color: #a0a0a0;
}

body.dark-theme .session-events-table tbody td {
    border-color: rgba(255,255,255,0.05);
}

/* Event Tags */
.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.event-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: default;
    transition: all 0.2s ease;
}

.event-tag:hover {
    transform: scale(1.05);
}

.event-tag .remove-tag {
    cursor: pointer;
    opacity: 0.7;
    margin-left: 2px;
}

.event-tag .remove-tag:hover {
    opacity: 1;
}

.event-tag.tag-lead {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.event-tag.tag-importante {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
}

.event-tag.tag-conversione {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.event-tag.tag-problema {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

.event-tag.tag-followup {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.add-tag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px dashed #6c757d;
    color: #6c757d;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.add-tag-btn:hover {
    border-color: var(--bortex-primary);
    color: var(--bortex-primary);
    background: rgba(249, 115, 22, 0.05);
}

/* Tag Dropdown */
.tag-dropdown {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 8px;
    z-index: 1000;
    min-width: 150px;
}

.tag-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.tag-dropdown-item:hover {
    background: rgba(249, 115, 22, 0.1);
}

.tag-dropdown-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

body.dark-theme .tag-dropdown {
    background: #1e1e2d;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

body.dark-theme .tag-dropdown-item:hover {
    background: rgba(249, 115, 22, 0.2);
}

/* Event Actions */
.event-actions {
    display: flex;
    gap: 4px;
}

.event-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(249, 115, 22, 0.1);
    color: var(--bortex-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.event-action-btn:hover {
    background: var(--bortex-primary);
    color: white;
}

.event-action-btn.delete:hover {
    background: var(--bortex-danger);
}

/* Session Header Stats Enhancement */
.session-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.session-first-page {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.session-first-page a {
    color: var(--bortex-primary);
    text-decoration: none;
}

.session-first-page a:hover {
    text-decoration: underline;
}

/* Filter by Tag */
.tag-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.tag-filter-btn {
    padding: 5px 12px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter-btn:hover {
    border-color: var(--bortex-primary);
    color: var(--bortex-primary);
}

.tag-filter-btn.active {
    background: var(--bortex-gradient);
    color: white;
    border-color: transparent;
}

/* Main Trackers Table */
.tracker-row {
    transition: all 0.2s ease;
}

.tracker-row:hover {
    background: rgba(249, 115, 22, 0.05) !important;
}

.tracker-row:hover td {
    background: transparent !important;
}

.tracker-color-indicator {
    min-height: 40px;
}

/* Quick Stats Bar */
.quick-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 8px;
    margin-bottom: 16px;
}

body.dark-theme .quick-stats-bar {
    background: linear-gradient(135deg, #1e1e2d 0%, #16162a 100%);
}

/* Edit Event Form */
#editEventForm .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
}

body.dark-theme #editEventForm .form-label {
    color: #a0a0a0;
}

#editEventForm .form-control,
#editEventForm .form-select {
    font-size: 0.85rem;
}

/* ========================================
   EXCEL-STYLE TABLE FOR TRACKER EVENTS
   ======================================== */
.excel-table-wrapper {
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
}

.excel-table-scroll {
    max-height: 600px;
    overflow: auto;
}

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 12px;
    min-width: 900px;
}

.excel-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.excel-table thead th {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #d0d0d0;
    border-top: none;
    padding: 8px 10px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: #495057;
    text-align: left;
    white-space: nowrap;
    user-select: none;
}

.excel-table thead th:first-child {
    border-left: none;
}

.excel-table thead th:last-child {
    border-right: none;
}

.excel-table tbody tr {
    transition: background 0.1s ease;
}

.excel-table tbody tr:nth-child(even) {
    background: #f8f9fc;
}

.excel-table tbody tr:hover {
    background: #e8f4fd !important;
}

.excel-table tbody tr.selected {
    background: #cce5ff !important;
}

.excel-table tbody td {
    border: 1px solid #e0e0e0;
    border-top: none;
    padding: 6px 10px;
    vertical-align: middle;
    color: #212529;
}

.excel-table tbody td:first-child {
    border-left: none;
}

.excel-table tbody td:last-child {
    border-right: none;
}

/* Column-specific styles */
.excel-col-index {
    width: 40px;
    text-align: center;
    background: #f8f9fa !important;
    color: #6c757d;
    font-weight: 500;
    border-right: 2px solid #d0d0d0 !important;
}

.excel-col-type {
    width: 120px;
}

.excel-col-page {
    min-width: 200px;
    max-width: 300px;
}

.excel-col-visitor {
    width: 140px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
}

.excel-col-session {
    width: 120px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 11px;
}

.excel-col-country {
    width: 90px;
    text-align: center;
}

.excel-col-country span {
    font-size: 12px;
}

.excel-col-referrer {
    min-width: 150px;
    max-width: 200px;
}

.excel-col-device {
    width: 100px;
}

.excel-col-datetime {
    width: 150px;
    white-space: nowrap;
}

.excel-col-actions {
    width: 60px;
    text-align: center;
}

/* Cell content styles */
.excel-cell-url {
    color: #0066cc;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 280px;
}

.excel-cell-url:hover {
    text-decoration: underline;
}

.excel-cell-code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 10px;
    color: #495057;
}

.excel-cell-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.excel-cell-badge.pageview {
    background: #fff3e0;
    color: #e65100;
}

.excel-cell-badge.click {
    background: #e8f5e9;
    color: #2e7d32;
}

.excel-cell-badge.scroll {
    background: #fce4ec;
    color: #c2185b;
}

.excel-cell-badge.form_submit {
    background: #fff8e1;
    color: #f9a825;
}

.excel-cell-badge.custom {
    background: #f3e5f5;
    color: #7b1fa2;
}

.excel-cell-badge.error {
    background: #ffebee;
    color: #c62828;
}

.excel-cell-badge.session_start,
.excel-cell-badge.session_end {
    background: #e8eaf6;
    color: #3949ab;
}

/* Device icons */
.excel-device-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6c757d;
}

.excel-device-icon i {
    font-size: 12px;
}

/* Action buttons */
.excel-action-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

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

.excel-action-btn.view:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.excel-action-btn.delete:hover {
    background: #ffebee;
    color: #c62828;
}

/* Table footer/status bar */
.excel-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-top: 1px solid #d0d0d0;
    font-size: 11px;
    color: #6c757d;
}

.excel-table-footer .count {
    font-weight: 600;
    color: #495057;
}

/* Empty state for excel table */
.excel-empty-row td {
    text-align: center;
    padding: 40px 20px !important;
    color: #6c757d;
    background: #fafafa !important;
}

.excel-empty-row td i {
    font-size: 32px;
    color: #dee2e6;
    margin-bottom: 12px;
    display: block;
}

/* Dark theme */
body.dark-theme .excel-table-wrapper {
    background: #1e1e2d;
    border-color: #3a3a4d;
}

body.dark-theme .excel-table thead th {
    background: linear-gradient(180deg, #2a2a3d 0%, #1e1e2d 100%);
    border-color: #3a3a4d;
    color: #a0a0a0;
}

body.dark-theme .excel-table tbody tr:nth-child(even) {
    background: #252538;
}

body.dark-theme .excel-table tbody tr:hover {
    background: #2d3748 !important;
}

body.dark-theme .excel-table tbody td {
    border-color: #3a3a4d;
    color: #e0e0e0;
}

body.dark-theme .excel-col-index {
    background: #252538 !important;
    color: #888;
}

body.dark-theme .excel-cell-url {
    color: #64b5f6;
}

body.dark-theme .excel-cell-code {
    background: #2a2a3d;
    color: #a0a0a0;
}

body.dark-theme .excel-table-footer {
    background: #1a1a2e;
    border-color: #3a3a4d;
}

body.dark-theme .excel-table-footer .count {
    color: #e0e0e0;
}

body.dark-theme .excel-action-btn:hover {
    background: #3a3a4d;
}

/* ========================================
   LIVE Badge - Nuovo evento in tempo reale
   ======================================== */
.live-badge {
    display: none;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: livePulse 0.6s ease-in-out;
    vertical-align: middle;
}

.live-badge.show {
    display: inline-block;
}

@keyframes livePulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes liveFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.live-badge.fade-out {
    animation: liveFadeOut 0.3s ease-out forwards;
}

/* ========================================
   Dark Mode - Fix contrasto testo COMPLETO
   ======================================== */

/* Testi generici */
body.dark-theme,
body.dark-theme .card,
body.dark-theme .card-body {
    color: #e0e0e0;
}

body.dark-theme .text-secondary,
body.dark-theme .text-muted {
    color: #a0aec0 !important;
}

body.dark-theme .text-dark {
    color: #e0e0e0 !important;
}

body.dark-theme .text-sm,
body.dark-theme .text-xs,
body.dark-theme .text-xxs {
    color: #c0c0c0 !important;
}

body.dark-theme p,
body.dark-theme span,
body.dark-theme small {
    color: inherit;
}

/* Card e Header */
body.dark-theme .card {
    background: #1e1e2d;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .card-header {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .card-header h6,
body.dark-theme .card-body h6,
body.dark-theme h6.mb-0,
body.dark-theme h6 {
    color: #fff !important;
}

/* Background gray con testo leggibile */
body.dark-theme .bg-gray-100 {
    background: #2a2a3d !important;
}

body.dark-theme .bg-gray-100 pre,
body.dark-theme .bg-gray-100 code,
body.dark-theme .bg-gray-100 .text-dark {
    color: #e0e0e0 !important;
}

/* Tabelle */
body.dark-theme table,
body.dark-theme .table {
    color: #e0e0e0;
}

body.dark-theme .table td,
body.dark-theme .table th,
body.dark-theme tbody td,
body.dark-theme tbody th {
    color: #e0e0e0 !important;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .table thead th {
    color: #a0aec0 !important;
}

body.dark-theme .tracker-row td,
body.dark-theme .events-table td {
    color: #e0e0e0 !important;
}

body.dark-theme .tracker-row .text-xs,
body.dark-theme .tracker-row .text-sm,
body.dark-theme .tracker-row p,
body.dark-theme .tracker-row span {
    color: #a0aec0 !important;
}

body.dark-theme code {
    color: #e0a0ff !important;
    background: rgba(255, 255, 255, 0.1);
}

/* Tab Navigation */
body.dark-theme .nav-tabs .nav-link,
body.dark-theme .main-tabs .nav-link {
    color: #a0aec0 !important;
}

body.dark-theme .nav-tabs .nav-link.active,
body.dark-theme .main-tabs .nav-link.active {
    color: #fff !important;
    background: transparent;
}

body.dark-theme .nav-tabs .nav-link:hover {
    color: #fff !important;
}

/* Opacity fix */
body.dark-theme .opacity-7 {
    opacity: 0.85 !important;
}

body.dark-theme .text-uppercase.text-secondary {
    color: #8a94a6 !important;
}
