.insights-page {
    --insights-surface-bg: #ffffff;
    --insights-surface-border: #dce3ef;
    --insights-text-muted: #5c6b80;
    --insights-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.insights-page .insights-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.insights-page .insights-title {
    margin-bottom: 0.25rem;
}

.insights-page .insights-subtitle {
    color: var(--insights-text-muted);
    margin-bottom: 0;
    max-width: 72ch;
}

.insights-page .insights-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.insights-page .insights-surface {
    background: var(--insights-surface-bg);
    border: 1px solid var(--insights-surface-border);
    border-radius: 14px;
    box-shadow: var(--insights-shadow);
}

.insights-page .insights-surface + .insights-surface {
    margin-top: 1.25rem;
}

.insights-page .insights-surface .card-header {
    background: #f8fafe;
    border-bottom: 1px solid var(--insights-surface-border);
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.insights-page .insights-info {
    border: 1px solid #bfdbfe;
    background: #f0f7ff;
    color: #1e3a5f;
    margin-bottom: 1.25rem;
}

.insights-page .insights-info p:last-child {
    margin-bottom: 0;
}

.insights-page .insights-table {
    margin-bottom: 0;
}

.insights-page .insights-table thead th {
    background-color: #f4f7fc;
    color: #2a3a52;
    font-weight: 600;
    border-bottom: 1px solid var(--insights-surface-border);
    vertical-align: middle;
}

.insights-page .insights-table td {
    vertical-align: middle;
}

.insights-page .insights-table-fixed {
    table-layout: fixed;
    width: 100%;
}

.insights-page .col-date {
    width: 95px;
}

.insights-page .col-agent {
    width: 165px;
}

.insights-page .col-summary {
    width: 40%;
}

.insights-page .col-actions {
    width: 110px;
}

.insights-page .demo-date-cell {
    font-size: 0.82rem;
    color: var(--insights-text-muted);
}

.insights-page .text-wrap-break {
    word-break: break-word;
}

.insights-page .text-clamp-sm {
    line-height: 1.45;
}

.insights-page .email-truncate {
    max-width: 145px;
}

.insights-page .empty-icon {
    font-size: 2rem;
}

.insights-page .chart-panel {
    height: 100%;
}

.insights-page canvas {
    width: 100% !important;
    max-height: 360px;
}

.insights-page .insights-record {
    border: 1px solid var(--insights-surface-border);
    border-radius: 12px;
    padding: 1rem;
    background: #ffffff;
    height: 100%;
}

.insights-page .insights-record-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.insights-page .insights-meta {
    color: var(--insights-text-muted);
    font-size: 0.92rem;
}

.insights-page .insights-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--insights-text-muted);
}

.insights-page .insights-empty .btn {
    margin-top: 0.75rem;
}

.insights-page .insights-pagination {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--insights-surface-border);
}

.insights-page .pagination {
    margin-bottom: 0;
}

.insights-page .badge-soft {
    background: #e8eefc;
    color: #1f3f79;
    font-weight: 600;
}

.insights-page .metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.insights-page .metric-item {
    border: 1px solid var(--insights-surface-border);
    border-radius: 10px;
    background: #f9fbff;
    padding: 0.65rem 0.75rem;
}

.insights-page .metric-label {
    color: var(--insights-text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.insights-page .metric-value {
    margin-bottom: 0;
    font-size: 0.94rem;
}

.insights-page .sticky-col {
    position: sticky;
    left: 0;
    background-color: #ffffff;
    z-index: 2;
}

.insights-page .table-responsive .sticky-col {
    min-width: 180px;
    max-width: 180px;
    white-space: normal;
    word-wrap: break-word;
}

@media (max-width: 767.98px) {
    .insights-page .insights-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .insights-page .insights-actions {
        width: 100%;
    }

    .insights-page .insights-actions .btn {
        flex: 1 1 100%;
    }

    .insights-page .col-summary,
    .insights-page .col-agent,
    .insights-page .col-date,
    .insights-page .col-actions {
        width: auto;
    }
}
