/* ========================================
   综合指标面板样式
   ======================================== */

.metrics-panel {
    margin-bottom: 25px;
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.metrics-header h2 {
    margin: 0;
}

.collapse-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.control-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 15px;
}

.control-group label:first-child {
    margin-right: 10px;
}

.radio-label, .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover, .checkbox-label:hover {
    background: rgba(102, 126, 234, 0.2);
}

.radio-label input, .checkbox-label input {
    cursor: pointer;
}

.metrics-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
}

.metrics-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* === 回归信息条 === */
.regression-info-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.regression-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.regression-info-label {
    color: #a8b2d1;
    font-size: 14px;
    font-weight: 500;
}

.regression-info-value {
    color: #e0e6ed;
    font-size: 16px;
    font-weight: 700;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* === 两列布局容器 === */
.metrics-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 1024px) {
    .metrics-two-column {
        grid-template-columns: 1fr;
    }
}

.metric-section {
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.metric-section.full-width {
    margin-bottom: 25px;
}

.metric-section h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #a8b2d1;
    font-size: 16px;
}

.metric-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.metric-label {
    color: #a8b2d1;
    font-size: 13px;
}

.metric-value {
    color: #e0e6ed;
    font-weight: 600;
    font-size: 14px;
}

.metric-value.positive {
    color: #e74c3c;  /* 正值红色 */
}

.metric-value.negative {
    color: #2ecc71;  /* 负值绿色 */
}

/* === 指标卡片网格 === */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.metric-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.metric-card .metric-label {
    color: #a8b2d1;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.metric-card .metric-value {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* === 风格暴露统计表格 === */
.exposure-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.exposure-table th {
    background: rgba(102, 126, 234, 0.2);
    padding: 10px;
    text-align: center;
    border-bottom: 2px solid #667eea;
    font-size: 13px;
}

.exposure-table td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
}

.exposure-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.exposure-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: #a8b2d1;
}

/* === 组合权重列表 === */
.portfolio-weights-list {
    margin-top: 10px;
}

.portfolio-weights-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.portfolio-weights-table thead {
    background: rgba(102, 126, 234, 0.15);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.portfolio-weights-table th {
    padding: 8px 12px;
    color: #a8b2d1;
    font-weight: 600;
    font-size: 0.95rem;
}

.portfolio-weights-table td {
    padding: 6px 12px;
    color: #e0e6ed;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
}

.portfolio-weights-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

.portfolio-weights-table tbody tr:last-child td {
    border-bottom: none;
}

/* === 响应式 === */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-weights-table {
        font-size: 0.95rem;
    }
    
    .portfolio-weights-table th {
        font-size: 0.9rem;
    }
    
    .portfolio-weights-table td {
        font-size: 0.95rem;
    }
    
    .portfolio-weights-table th,
    .portfolio-weights-table td {
        padding: 5px 8px;
    }
}

