/* 新客转化率 Beta 模块样式 */

/* Beta徽章 */
.beta-badge {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: normal;
    vertical-align: middle;
}

/* 信息按钮 */
.btn-info-icon {
    display: inline-block;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    padding: 0;
    vertical-align: middle;
}

.btn-info-icon:hover {
    opacity: 0.8;
}

/* 转化率内容容器 */
.conversion-rate-content {
    padding: 20px 0;
}

/* 加载中状态 */
.loading-spinner {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* 错误消息 */
.error-message {
    text-align: center;
    color: #dc3545;
    padding: 40px;
}

/* 无数据提示 */
.no-data-message {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* 汇总卡片容器 */
.conversion-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 汇总卡片 */
.summary-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.summary-card.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.summary-card.primary .card-label {
    color: rgba(255,255,255,0.9);
}

.card-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.summary-card.primary .card-value {
    color: white;
}

/* 转化排行部分 */
.conversion-ranking {
    margin-bottom: 30px;
}

.conversion-ranking h4 {
    margin-bottom: 15px;
    color: #333;
}

/* 转化率表格 */
.conversion-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* 排名徽章 */
.rank-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
}

.rank-badge.rank-1 {
    background: #ffd700;
    color: #333;
}

.rank-badge.rank-2 {
    background: #c0c0c0;
    color: #333;
}

.rank-badge.rank-3 {
    background: #cd7f32;
    color: white;
}

/* 转化率样式 */
.conversion-rate {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.rate-excellent {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.rate-good {
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.1);
}

.rate-normal {
    color: #ffc107;
    background: rgba(255, 193, 7, 0.1);
}

.rate-low {
    color: #fd7e14;
    background: rgba(253, 126, 20, 0.1);
}

.rate-poor {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* 渠道分析部分 */
.channel-analysis {
    margin-top: 30px;
}

.channel-analysis h4 {
    margin-bottom: 15px;
    color: #333;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 渠道卡片 */
.channel-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.channel-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.channel-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.channel-stats {
    display: flex;
    justify-content: space-between;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .conversion-summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .summary-card {
        padding: 15px;
    }
    
    .card-value {
        font-size: 24px;
    }
    
    .channel-grid {
        grid-template-columns: 1fr;
    }
    
    .conversion-table {
        font-size: 14px;
    }
    
    .conversion-table th,
    .conversion-table td {
        padding: 8px 4px;
    }
}

/* 复购率统计样式 */
.repurchase-rate-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.repurchase-rate-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.beta-tag {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: normal;
}

.repurchase-content {
    margin-top: 15px;
}

.repurchase-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.repurchase-stats .stat-box {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.repurchase-stats .stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.repurchase-stats .stat-box.primary {
    background: #007bff;
    color: white;
}

.repurchase-stats .stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.repurchase-stats .stat-box.primary .stat-label {
    color: rgba(255,255,255,0.9);
}

.repurchase-stats .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.repurchase-stats .stat-box.primary .stat-value {
    color: white;
}

.repurchase-note {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .repurchase-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .repurchase-stats .stat-value {
        font-size: 20px;
    }
}

/* 新客比例统计样式 */
.new-customer-ratio-section {
    margin-top: 30px;
    padding: 20px;
    background: #f0f8ff;
    border-radius: 8px;
}

.new-customer-ratio-section h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-customer-content {
    margin-top: 15px;
}

.new-customer-ratio-display {
    text-align: center;
}

.ratio-circle {
    display: inline-block;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.ratio-value {
    font-size: 32px;
    font-weight: bold;
    color: #007bff;
    line-height: 1;
}

.ratio-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.ratio-note {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    text-align: center;
}