/* ==========================================================================
   DESIGN SYSTEM & VARIABLES FOR INSIGHTS MODULE (GLASSMORPHIC DELUXE)
   ========================================================================== */
#view-insights {
    display: none;
    flex-direction: column;
    padding: 24px;
    height: 100%;
    overflow-y: auto;
    background-color: var(--wb-bg-desktop);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    gap: 24px;
}

#view-insights.active {
    display: flex;
}

/* Scrollbar premium */
#view-insights::-webkit-scrollbar {
    width: 6px;
}
#view-insights::-webkit-scrollbar-track {
    background: transparent;
}
#view-insights::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
#view-insights::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Header Deluxe */
.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.insights-header-info h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--wb-text-light);
    margin: 0 0 6px 0;
}

.insights-header-info p {
    font-size: 14px;
    color: var(--wb-text-muted);
    margin: 0;
}

.insights-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.insights-control-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0 12px;
    height: 40px;
    transition: all 0.25s ease;
}

.insights-control-group:focus-within {
    border-color: var(--wb-accent-blue);
    box-shadow: 0 0 0 3px rgba(85, 110, 230, 0.15);
}

.insights-control-group label {
    color: var(--wb-text-muted);
    margin-right: 8px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.insights-select {
    background: transparent !important;
    border: none !important;
    color: var(--wb-text-light) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    outline: none !important;
    cursor: pointer;
    padding: 0 !important;
    height: auto !important;
    min-width: 130px;
}

.insights-select option {
    background-color: var(--wb-bg-panel);
    color: var(--wb-text-light);
}

.insights-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.insights-btn-primary {
    background: var(--wb-accent-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.25);
}

.insights-btn-primary:hover {
    background: var(--wb-accent-blue-hover);
    transform: translateY(-1px);
}

.insights-btn-primary:active {
    transform: translateY(0);
}

/* Glassmorphic Cards */
.insights-card {
    background: rgba(42, 48, 66, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

.insights-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

/* KPI Cards Deluxe */
.insights-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.insights-kpi-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.insights-kpi-card:hover {
    transform: translateY(-4px);
}

.kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(85, 110, 230, 0.12);
    color: var(--wb-accent-blue);
    font-size: 24px;
}

#kpi-served .kpi-icon {
    background: rgba(52, 195, 143, 0.12);
    color: var(--wb-status-green);
}

#kpi-resources .kpi-icon {
    background: rgba(241, 180, 76, 0.12);
    color: #f1b44c;
}

.kpi-content h3 {
    margin: 0 0 4px 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--wb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--wb-text-light);
    margin-bottom: 4px;
    line-height: 1.2;
}

.kpi-detail {
    margin: 0;
    font-size: 12px;
    color: var(--wb-text-muted);
}

/* SemÃ¡foros de respuesta */
.insights-semaphore-green .kpi-icon {
    background: rgba(52, 195, 143, 0.15) !important;
    color: var(--wb-status-green) !important;
}
.insights-semaphore-green .semaphore-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--wb-status-green);
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 8px var(--wb-status-green);
}

.insights-semaphore-yellow .kpi-icon {
    background: rgba(241, 180, 76, 0.15) !important;
    color: #f1b44c !important;
}
.insights-semaphore-yellow .semaphore-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #f1b44c;
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 8px #f1b44c;
}

.insights-semaphore-red .kpi-icon {
    background: rgba(244, 106, 106, 0.15) !important;
    color: var(--wb-status-red) !important;
}
.insights-semaphore-red .semaphore-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--wb-status-red);
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 8px var(--wb-status-red);
}

.insights-semaphore-neutral .semaphore-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--wb-text-muted);
    border-radius: 50%;
    margin-right: 4px;
}

/* Charts & Funnel Grid */
.insights-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .insights-charts-grid {
        grid-template-columns: 1fr;
    }
}

.card-header {
    margin-bottom: 24px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--wb-text-light);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-subtitle {
    font-size: 12.5px;
    color: var(--wb-text-muted);
}

/* Embudo de conversiÃ³n (Funnel Visuals) */
.conversion-funnel-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.funnel-metrics {
    display: flex;
    gap: 15px;
    width: 100%;
}

.funnel-metric-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
}

.funnel-metric-box .box-label {
    font-size: 11.5px;
    color: var(--wb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.funnel-metric-box .box-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--wb-text-light);
}

.funnel-metric-box.box-success {
    border-left: 3px solid var(--wb-status-green);
}
.funnel-metric-box.box-success .box-value {
    color: var(--wb-status-green);
}

.funnel-metric-box.box-danger {
    border-left: 3px solid var(--wb-status-red);
}
.funnel-metric-box.box-danger .box-value {
    color: var(--wb-status-red);
}

.funnel-visual {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.funnel-stage {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
}

.stage-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(85, 110, 230, 0.3) 0%, rgba(85, 110, 230, 0.1) 100%);
    border-radius: 6px;
    border-left: 3px solid var(--wb-accent-blue);
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.funnel-stage-generated .stage-bar {
    width: 100%;
}

.funnel-stage-success .stage-bar {
    background: linear-gradient(90deg, rgba(52, 195, 143, 0.3) 0%, rgba(52, 195, 143, 0.1) 100%);
    border-left-color: var(--wb-status-green);
}

.funnel-stage-abandon .stage-bar {
    background: linear-gradient(90deg, rgba(244, 106, 106, 0.3) 0%, rgba(244, 106, 106, 0.1) 100%);
    border-left-color: var(--wb-status-red);
}

.stage-label {
    position: relative;
    z-index: 2;
    padding-left: 12px;
    font-size: 13px;
    color: var(--wb-text-light);
}

.stage-label strong {
    font-weight: 700;
}

.funnel-extra-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.funnel-extra-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.extra-icon {
    font-size: 18px;
    color: var(--wb-accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(85, 110, 230, 0.08);
}

.extra-content h4 {
    margin: 0;
    font-size: 11px;
    color: var(--wb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.extra-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--wb-text-light);
    margin: 2px 0;
}

.extra-desc {
    margin: 0;
    font-size: 10px;
    color: var(--wb-text-muted);
}

.text-accent {
    color: var(--wb-accent-blue) !important;
}

.text-success {
    color: var(--wb-status-green) !important;
}

/* Top Resources list */
.top-resources-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.top-resources-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resource-title {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--wb-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.resource-count {
    font-size: 12px;
    font-weight: 600;
    color: #f1b44c;
    background: rgba(241, 180, 76, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.resource-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    width: 100%;
    overflow: hidden;
}

.resource-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f1b44c 0%, rgba(241, 180, 76, 0.4) 100%);
    border-radius: 3px;
    width: 0;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.resource-empty {
    color: var(--wb-text-muted);
    font-size: 13px;
    text-align: center;
    padding: 40px 0;
}

/* Chart Card Historic */
.insights-chart-canvas-wrapper {
    margin-top: 15px;
    position: relative;
}

/* Alertas de Ghosting */
.insights-ghosting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .insights-ghosting-grid {
        grid-template-columns: 1fr;
    }
}

.ghosting-list-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}

.ghosting-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ghosting-table th {
    padding: 10px 12px;
    text-align: left;
    color: var(--wb-text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ghosting-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.ghosting-table tr:last-child td {
    border-bottom: none;
}

.ghosting-table .client-name {
    font-weight: 600;
    color: var(--wb-text-light);
}

.ghosting-table .client-phone {
    font-size: 11px;
    color: var(--wb-text-muted);
    margin-top: 2px;
}

.ghosting-table .last-msg {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--wb-text-main);
    font-style: italic;
}

.ghosting-table .wait-time {
    font-weight: 600;
    color: var(--wb-status-red);
}

.ghosting-table .inactive-time {
    font-weight: 600;
    color: var(--wb-text-muted);
}

.ghosting-empty {
    text-align: center;
    color: var(--wb-text-muted);
    padding: 30px !important;
}

.ghosting-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(85, 110, 230, 0.1);
    color: var(--wb-accent-blue);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ghosting-btn-action:hover {
    background: var(--wb-accent-blue);
    color: #fff;
    transform: scale(1.08);
}


/* ----------------------------------------------------
   RESPONSIVE DESIGN SYSTEM FOR INSIGHTS MODULE (v8.5 - HÃ­brido)
   ---------------------------------------------------- */
@media (max-width: 768px) {
    /* Scaled Design: 2x2 Grid for Core KPIs (Cartera, Atendidos, Tiempos, Recursos) */
    .funnel-metrics {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .funnel-metric-box {
        width: 100% !important;
        padding: 10px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .funnel-metric-box h3 {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }

    .funnel-metric-box .number {
        font-size: 20px !important;
        font-weight: 700 !important;
    }

    .funnel-metric-box .trend {
        font-size: 9.5px !important;
        margin-top: 4px !important;
    }

    /* Column Stacking for Funnel visual graphics */
    .funnel-extra-stats {
        grid-template-columns: 1fr !important;
    }

    .insights-charts-grid,
    .insights-ghosting-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Scrollbars in insights charts/details */
    .insights-chart-canvas-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* ==========================================================================
   INSIGHTS EXPANSION STYLES (SIDEBAR MENU, CSAT, PROSPECTS, PAGINATION)
   ========================================================================== */

.insights-layout-container {
    display: grid;
    grid-template-columns: 0px 1fr;
    gap: 0;
    transition: grid-template-columns 0.35s cubic-bezier(0.16, 1, 0.3, 1), gap 0.35s ease;
    width: 100%;
}

.insights-layout-container.sidebar-open {
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

.insights-sidebar {
    width: 260px;
    background: rgba(30, 35, 52, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    visibility: visible;
}

.insights-sidebar.collapsed {
    width: 0;
    padding: 20px 0;
    opacity: 0;
    visibility: hidden;
    border-color: transparent;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-segment-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--wb-text-muted);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
}

.sidebar-segment-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    transition: transform 0.25s ease;
}

.sidebar-segment-btn:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--wb-text-light);
}

.sidebar-segment-btn:hover i {
    transform: scale(1.15);
}

.sidebar-segment-btn.active {
    background: rgba(85, 110, 230, 0.15);
    color: #8fa0f3;
    border-left: 3px solid var(--wb-accent-blue);
    font-weight: 600;
}

.insights-main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* Expanded KPI Card videollamadas */
.insights-kpi-card-expanded {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 1200px) {
    .insights-kpi-card-expanded {
        grid-column: span 1;
    }
}

.expanded-card-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.expanded-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--wb-text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.meet-multi-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) 2fr repeat(2, 1fr);
    gap: 16px;
    align-items: center;
}

@media (max-width: 1400px) {
    .meet-multi-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sub-kpi-wide {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .meet-multi-kpi-grid {
        grid-template-columns: 1fr;
    }
    .sub-kpi-wide {
        grid-column: span 1;
    }
}

.meet-sub-kpi {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    transition: transform 0.2s ease;
}

.meet-sub-kpi:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
}

.sub-kpi-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--wb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--wb-text-light);
}

.sub-kpi-detail {
    font-size: 11px;
    color: var(--wb-text-muted);
}

.sub-kpi-demand-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demand-progress-bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    margin: 6px 0;
}

.demand-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #a855f7 100%);
    border-radius: 4px;
    width: 0;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CSAT Calidad de Compradores Widget */
.insights-csat-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.csat-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.8fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .csat-container {
        grid-template-columns: 1fr;
    }
}

.csat-summary-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    gap: 12px;
}

.csat-circle-wrapper {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--wb-accent-blue) 0%, #10b981 100%);
    padding: 6px;
    box-shadow: 0 0 20px rgba(85, 110, 230, 0.3);
}

.csat-circle-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1d2235;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.csat-score-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--wb-text-light);
}

.csat-score-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--wb-text-muted);
    text-transform: uppercase;
}

.csat-stars-row {
    display: flex;
    gap: 4px;
    color: #f59e0b;
    font-size: 16px;
}

.csat-total-surveys {
    font-size: 12.5px;
    color: var(--wb-text-muted);
}

.csat-distribution-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csat-distribution-box h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--wb-text-light);
}

.csat-dist-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.csat-dist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
}

.csat-dist-row .star-label {
    width: 45px;
    color: var(--wb-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.csat-dist-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.csat-dist-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    border-radius: 4px;
    width: 0;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.csat-dist-count {
    width: 30px;
    text-align: right;
    font-weight: 600;
    color: var(--wb-text-light);
}

.csat-comments-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csat-comments-box h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--wb-text-light);
}

.csat-comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
}

.csat-comments-list::-webkit-scrollbar {
    width: 4px;
}
.csat-comments-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.csat-comment-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--wb-text-muted);
}

.comment-client {
    font-weight: 600;
    color: var(--wb-text-light);
}

.comment-text {
    font-size: 12.5px;
    color: var(--wb-text-main);
    line-height: 1.4;
}

.comment-agent {
    font-size: 10px;
    color: var(--wb-text-muted);
    align-self: flex-end;
}

.comments-empty {
    font-size: 12.5px;
    color: var(--wb-text-muted);
    text-align: center;
    padding: 40px 0;
}

/* Valoración de Prospectos Widget */
.insights-prospects-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prospects-valuation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .prospects-valuation-grid {
        grid-template-columns: 1fr;
    }
}

.prospects-sub-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.25s ease;
}

.prospects-sub-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.03);
}

.prospects-sub-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.prospects-sub-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.prospects-sub-content h4 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--wb-text-muted);
}

.prospects-value {
    font-size: 24px;
    font-weight: 700;
}

.prospects-desc {
    margin: 0;
    font-size: 11.5px;
    color: var(--wb-text-muted);
    line-height: 1.4;
}

/* Ghosting Pagination Styles */
.ghosting-pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.pagination-btn {
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 12.5px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: var(--wb-text-light) !important;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(85, 110, 230, 0.15) !important;
    border-color: rgba(85, 110, 230, 0.4) !important;
    color: #8fa0f3 !important;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 12.5px;
    color: var(--wb-text-muted);
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-active {
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Thematic Section Blocks */
.insights-section-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}

.section-block-header {
    margin-bottom: 4px;
}

.section-block-header h3 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--wb-text-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-left: 3px solid var(--wb-accent-blue);
    padding-left: 10px;
}

/* Heatmap / Densidad de Tráfico CSS */
.insights-heatmap-container {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.heatmap-grid-wrapper {
    overflow-x: auto;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: 50px repeat(24, 1fr);
    gap: 4px;
    min-width: 600px;
}

.heatmap-cell-header {
    font-size: 10px;
    color: var(--wb-text-muted);
    text-align: center;
    padding: 4px 0;
    font-weight: 600;
}

.heatmap-cell-day {
    font-size: 11px;
    color: var(--wb-text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-right: 6px;
}

.heatmap-cell-block {
    background: rgba(85, 110, 230, 0.03);
    border-radius: 3px;
    height: 28px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.heatmap-cell-block:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(85, 110, 230, 0.25);
    z-index: 10;
}

/* Tabs for Word/Bigram frequency */
.insights-tab-btn {
    border-bottom: 2px solid transparent !important;
    transition: all 0.25s ease;
    font-size: 13.5px;
    color: var(--wb-text-muted) !important;
    padding: 6px 12px !important;
}

.insights-tab-btn:hover {
    color: var(--wb-text-light) !important;
}

.insights-tab-btn.active {
    color: var(--wb-accent-blue) !important;
    border-bottom: 2px solid var(--wb-accent-blue) !important;
}

/* ==========================================================================
   TOOLTIPS EXPLICATIVOS PARA INSIGHTS CARDS
   ========================================================================== */

/* Tooltip Global Flotante */
#insights-global-tooltip {
    position: absolute;
    background: rgba(17, 24, 39, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.4;
    width: 290px;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

#insights-global-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

#insights-global-tooltip .tooltip-title {
    font-weight: 700;
    font-size: 13.5px;
    color: #8fa0f3;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

#insights-global-tooltip .tooltip-section {
    margin-bottom: 8px;
}

#insights-global-tooltip .tooltip-section:last-child {
    margin-bottom: 0;
}

#insights-global-tooltip .tooltip-label {
    display: block;
    font-weight: 600;
    color: #a6b0cf;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

#insights-global-tooltip .tooltip-text {
    display: block;
    color: #e2e8f0;
}

/* Icono ? de Ayuda Informativa */
.insights-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wb-text-muted, #a6b0cf);
    margin-left: 6px;
    cursor: help;
    transition: color 0.2s ease, transform 0.2s ease;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.insights-tooltip-trigger:hover {
    color: #8fa0f3;
    transform: scale(1.15);
}

