/**
 * Mockfjärds V2 - Insights Page Styles
 */

/* Main Layout */
.insights-main {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-3xl);
    max-width: 1400px;
    margin: 0 auto;
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
}

/* Page Header - Insights specific */
.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-gray-200);
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    margin: calc(-1 * var(--space-xl));
    margin-bottom: var(--space-2xl);
    padding: var(--space-3xl) var(--space-xl);
    border-radius: 0;
}

.insights-header-content h1 {
    font-size: var(--font-size-3xl);
    color: var(--color-white);
    margin-bottom: var(--space-xs);
}

.insights-header-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-lg);
}

.insights-header .btn {
    background: var(--color-white);
    color: var(--color-navy);
}

.insights-header .btn:hover {
    background: var(--color-gray-100);
}

.insights-header .btn svg {
    width: 16px;
    height: 16px;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.kpi-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-card.highlight {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    border-color: var(--color-navy);
}

.kpi-card.highlight .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
}

.kpi-card.highlight .kpi-icon svg {
    color: var(--color-white);
}

.kpi-card.highlight .kpi-value,
.kpi-card.highlight .kpi-label {
    color: var(--color-white);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-navy);
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.2;
}

.kpi-label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-600);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.chart-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

.chart-card h3 {
    font-size: var(--font-size-lg);
    color: var(--color-navy);
    margin-bottom: var(--space-lg);
}

.chart-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.bar-item {
    display: grid;
    grid-template-columns: 100px 1fr 50px;
    align-items: center;
    gap: var(--space-md);
}

.bar-label {
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
    font-weight: 500;
}

.bar-track {
    height: 24px;
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    border-radius: var(--radius-sm);
    transition: width 0.5s ease-out;
}

.bar-value {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-gray-800);
    text-align: right;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: var(--font-size-xl);
    color: var(--color-navy);
}

.leads-count {
    background: var(--color-orange);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 700;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    min-width: 24px;
    text-align: center;
}

/* Tables */
.leads-section,
.sessions-section {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
    margin-bottom: var(--space-2xl);
}

.leads-table-container,
.sessions-table-container {
    overflow-x: auto;
}

.leads-table,
.sessions-table {
    width: 100%;
    border-collapse: collapse;
}

.leads-table th,
.sessions-table th {
    text-align: left;
    padding: var(--space-md);
    background: var(--color-gray-50);
    color: var(--color-gray-600);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--color-gray-200);
}

.leads-table td,
.sessions-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-gray-100);
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
}

.leads-table tbody tr:hover,
.sessions-table tbody tr:hover {
    background: var(--color-gray-50);
}

.product-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-gold-light);
    color: var(--color-navy);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

/* Score Bar */
.score-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100px;
}

.score-fill {
    height: 8px;
    background: var(--color-success);
    border-radius: var(--radius-full);
    flex: 1;
}

.score-value {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-gray-600);
    min-width: 24px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: var(--space-xs);
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-gray-600);
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

/* Empty States */
.leads-empty,
.sessions-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-gray-500);
}

/* AI Insights */
.ai-insights-section {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

.ai-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.ai-insight-card {
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.ai-insight-card.trend {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.ai-insight-card.opportunity {
    background: linear-gradient(135deg, rgba(230, 122, 35, 0.1) 0%, rgba(230, 122, 35, 0.05) 100%);
    border: 1px solid rgba(230, 122, 35, 0.2);
}

.ai-insight-card.insight {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.1) 0%, rgba(30, 58, 95, 0.05) 100%);
    border: 1px solid rgba(30, 58, 95, 0.2);
}

.insight-icon {
    font-size: 1.5rem;
}

.insight-text {
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
    line-height: 1.6;
}

.no-insights {
    text-align: center;
    color: var(--color-gray-500);
    padding: var(--space-xl);
}

/* Lead Modal */
.lead-modal {
    padding: var(--space-2xl);
    max-width: 500px;
}

.lead-modal h2 {
    font-size: var(--font-size-2xl);
    color: var(--color-navy);
    margin-bottom: var(--space-xl);
}

.lead-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.lead-detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.lead-detail-item label {
    font-size: var(--font-size-xs);
    color: var(--color-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lead-detail-item span {
    font-size: var(--font-size-base);
    color: var(--color-gray-800);
    font-weight: 500;
}

.lead-actions {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-gray-200);
}

.lead-actions .btn {
    width: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .insights-main {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }
    
    .insights-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .insights-header-content h1 {
        font-size: var(--font-size-2xl);
    }
    
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bar-item {
        grid-template-columns: 80px 1fr 40px;
    }
    
    .ai-insights-grid {
        grid-template-columns: 1fr;
    }
    
    .lead-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 4px;
}

.status-photo {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-quote {
    background: #e3f2fd;
    color: #1565c0;
}

.status-viz {
    background: #f3e5f5;
    color: #7b1fa2;
}


/* KPI Detail Modal Styles */
.kpi-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.kpi-detail-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.kpi-detail-section h3,
.kpi-detail-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
}

.kpi-detail-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, #005292 0%, #0073b1 100%);
    border-radius: 8px;
    color: white;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 4px;
}

/* Detail Chart */
.detail-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-label {
    width: 100px;
    font-size: 12px;
    color: #666;
    text-transform: capitalize;
}

.chart-bar-container {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    background: linear-gradient(90deg, #005292 0%, #0073b1 100%);
    border-radius: 4px;
    min-width: 4px;
}

.chart-value {
    width: 40px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* Funnel Chart */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.funnel-label {
    width: 140px;
    font-size: 13px;
    color: #333;
}

.funnel-bar-container {
    flex: 1;
    height: 28px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.funnel-bar {
    height: 100%;
    background: linear-gradient(90deg, #005292 0%, #e87722 100%);
    border-radius: 4px;
    min-width: 4px;
}

.funnel-value {
    width: 50px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #005292;
}

@media (max-width: 768px) {
    .kpi-detail-grid {
        grid-template-columns: 1fr;
    }
    .kpi-detail-stats {
        flex-direction: column;
    }
}

/* ========================================
   ENHANCED KPI MODAL STYLES
   ======================================== */
.kpi-modal {
    padding: 0;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
}

.kpi-modal h2 {
    margin: 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, #005292 0%, #0073b1 100%);
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.kpi-modal h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e87722;
}

.kpi-modal h4 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#kpiModalContent {
    padding: 0;
}

#kpiModalContent > h2 + * {
    padding: 24px 32px;
}

#kpiModalContent > h2 + .kpi-detail-stats {
    padding: 24px 32px 0;
}

#kpiModalContent > h2 + .kpi-detail-stats + * {
    padding: 0 32px 32px;
}

#kpiModalContent > h2 + .kpi-detail-grid {
    padding: 24px 32px 32px;
}

#kpiModalContent > h2 ~ h3 {
    padding: 0 32px;
    margin-top: 24px;
}

#kpiModalContent > h2 ~ .funnel-chart,
#kpiModalContent > h2 ~ table {
    margin: 16px 32px 32px;
}

/* Improved Stats Cards */
.kpi-detail-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #005292 0%, #0073b1 100%);
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 82, 146, 0.3);
}

.stat-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 8px;
    font-weight: 500;
}

/* Improved Grid */
.kpi-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.kpi-detail-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

/* Improved Chart Bars */
.detail-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-chart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-label {
    width: 110px;
    font-size: 13px;
    color: #4a5568;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-bar-container {
    flex: 1;
    height: 24px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.chart-bar {
    height: 100%;
    background: linear-gradient(90deg, #005292 0%, #0073b1 100%);
    border-radius: 6px;
    min-width: 8px;
    transition: width 0.3s ease;
}

.chart-value {
    width: 45px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
    color: #005292;
}

/* Improved Funnel */
.funnel-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f8fafc;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.funnel-label {
    width: 160px;
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}

.funnel-bar-container {
    flex: 1;
    height: 32px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.funnel-bar {
    height: 100%;
    background: linear-gradient(90deg, #005292 0%, #e87722 100%);
    border-radius: 6px;
    min-width: 8px;
    transition: width 0.3s ease;
}

.funnel-value {
    width: 60px;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: #005292;
}

/* Improved Table in Modal */
.kpi-modal .sessions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.kpi-modal .sessions-table thead th {
    background: #f1f5f9;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.kpi-modal .sessions-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.kpi-modal .sessions-table tbody tr:hover {
    background: #f8fafc;
}

.kpi-modal .sessions-table tbody tr:last-child td {
    border-bottom: none;
}

/* Close button override for KPI modal */
.kpi-modal .modal-close,
#kpiModal .modal-close {
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.kpi-modal .modal-close:hover,
#kpiModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

@media (max-width: 768px) {
    .kpi-modal {
        max-width: 95%;
        margin: 10px;
    }
    
    .kpi-modal h2 {
        padding: 20px;
        font-size: 20px;
    }
    
    .kpi-detail-stats {
        flex-direction: column;
    }
    
    .stat-item {
        min-width: auto;
    }
    
    .funnel-label {
        width: 100px;
        font-size: 12px;
    }
    
    .chart-label {
        width: 80px;
        font-size: 11px;
    }
}

/* Modal Body Wrapper */
.kpi-modal-body {
    padding: 28px 32px 32px;
}

.kpi-modal-body h3 {
    margin-top: 28px;
    margin-bottom: 16px;
}

.kpi-modal-body h3:first-child {
    margin-top: 0;
}

.kpi-modal-body .kpi-detail-stats {
    margin-bottom: 8px;
}

.kpi-modal-body .kpi-detail-grid {
    margin-top: 0;
}

.kpi-modal-body .sessions-table {
    margin-top: 12px;
}

.kpi-modal-body .funnel-chart {
    margin-top: 0;
}

/* Lead Cards List */
.lead-list-hint {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
    font-style: italic;
}

.lead-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
}

.lead-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.lead-card:hover {
    background: #fff;
    border-color: var(--color-navy);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.lead-card.hot-lead {
    border-left: 4px solid #e74c3c;
    background: #fff5f5;
}

.lead-card.hot-lead:hover {
    background: #fff;
}

.lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.lead-name-score {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lead-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.hot-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lead-score {
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}

.lead-card-body {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.lead-detail {
    font-size: 13px;
    color: #555;
}

.lead-detail strong {
    color: #333;
}

.lead-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.lead-date {
    font-size: 12px;
    color: #888;
}

.lead-view-btn {
    font-size: 13px;
    color: var(--color-navy);
    font-weight: 500;
}

/* Lead Profile Modal */
.lead-modal {
    max-width: 900px;
}

.lead-profile-header {
    background: linear-gradient(135deg, var(--color-navy) 0%, #1a3a6e 100%);
    padding: 24px 32px;
    color: white;
    border-radius: 12px 12px 0 0;
}

.lead-profile-header.hot {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.profile-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-title-row h2 {
    margin: 0;
    font-size: 24px;
    color: white;
    background: none;
    padding: 0;
}

.hot-badge-large {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.profile-score {
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: auto;
}

.profile-email {
    margin: 8px 0 0;
    font-size: 15px;
    opacity: 0.9;
}

.profile-date {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.7;
}

.lead-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 28px 32px 32px;
}

.profile-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.profile-section.full-width {
    grid-column: 1 / -1;
}

.profile-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #2c3e50;
    border-bottom: 2px solid var(--color-navy);
    padding-bottom: 8px;
}

.profile-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-data-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-data-item.highlight {
    background: #e8f4fd;
    padding: 10px;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.data-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-value {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
}

.profile-data-item.highlight .data-value {
    font-size: 18px;
    color: var(--color-navy);
}

/* AI Recommendation Box */
.ai-recommendation-box {
    background: #e8f4fd;
    border-left: 4px solid var(--color-navy);
    padding: 16px;
    border-radius: 0 8px 8px 0;
}

.ai-recommendation-box p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
}

/* Window Configurations */
.configs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.config-item {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.config-num {
    font-weight: 600;
    color: var(--color-navy);
}

.config-detail {
    font-size: 13px;
    color: #555;
    padding-left: 10px;
    border-left: 1px solid #ddd;
}

/* Chat History */
.chat-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.chat-message {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.chat-message.assistant {
    background: #e8f4fd;
    border-color: #cce4f6;
}

.chat-role {
    font-weight: 600;
    font-size: 12px;
    color: var(--color-navy);
    min-width: 50px;
}

.chat-message.assistant .chat-role {
    color: #2980b9;
}

.chat-text {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.chat-more {
    text-align: center;
    color: #888;
    font-size: 12px;
    font-style: italic;
    margin: 8px 0 0;
}

/* Customer Journey Steps */
.journey-steps {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.journey-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 100px;
    padding: 16px 10px;
    position: relative;
}

.journey-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 30px;
    width: 50%;
    height: 3px;
    background: #ddd;
}

.journey-step:not(:first-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 30px;
    width: 50%;
    height: 3px;
    background: #ddd;
}

.journey-step.completed::after,
.journey-step.completed::before {
    background: #27ae60;
}

.journey-step.completed + .journey-step::before {
    background: #27ae60;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.journey-step.completed .step-icon {
    background: #27ae60;
    color: white;
}

.journey-step.skipped .step-icon {
    background: #e9ecef;
    color: #aaa;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.journey-step.completed .step-label {
    color: #27ae60;
    font-weight: 500;
}

/* Lead Modal Close Button */
.lead-modal .modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.lead-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .lead-profile-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .profile-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .profile-score {
        margin-left: 0;
    }
    
    .lead-card-body {
        flex-direction: column;
        gap: 6px;
    }
    
    .journey-steps {
        flex-direction: column;
    }
    
    .journey-step::before,
    .journey-step::after {
        display: none;
    }
    
    .journey-step {
        flex-direction: row;
        gap: 12px;
        justify-content: flex-start;
        padding: 10px;
    }
    
    .step-label {
        text-align: left;
    }
}
