/* 知识库健康体检面板 */

.health-panel {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

.health-header {
    text-align: center;
    margin-bottom: 24px;
}

.health-header h2 {
    margin: 0 0 8px 0;
    color: #1a365d;
}

.health-desc {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.health-loading {
    text-align: center;
    padding: 60px 0;
    color: #888;
    font-size: 15px;
}

/* === 评分卡片 === */
.health-score-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.score-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 6px solid #66bb6a;
    flex-shrink: 0;
    transition: all 0.3s;
}

.score-circle.score-good { background: #e8f5e9; border-color: #4caf50; }
.score-circle.score-warn { background: #fff8e1; border-color: #ffa726; }
.score-circle.score-bad  { background: #ffebee; border-color: #ef5350; }

.score-num {
    font-size: 42px;
    font-weight: 700;
    color: #2e7d32;
    line-height: 1;
}
.score-circle.score-warn .score-num { color: #ef6c00; }
.score-circle.score-bad  .score-num { color: #c62828; }

.score-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    letter-spacing: 1px;
}

.score-meta {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.score-row span { color: #555; font-size: 13px; }
.score-row strong { font-size: 20px; color: #1a365d; }
.score-row.danger strong { color: #c62828; }

/* === 徽章条 === */
.health-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.badge strong { color: #1a365d; margin: 0 4px; }
.badge-warn { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge-warn strong { color: #9a3412; }
.badge-info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge-info strong { color: #1e3a8a; }

.badge-refresh {
    margin-left: auto;
    cursor: pointer;
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 13px;
}
.badge-refresh:hover { background: #f1f5f9; }

/* === 段落 === */
.health-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.health-section h3 {
    margin: 0 0 8px 0;
    color: #1a365d;
    font-size: 16px;
}

.health-tip {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 16px 0;
}

/* === 重复条文卡片 === */
.dup-empty {
    text-align: center;
    padding: 40px;
    color: #16a34a;
    font-size: 16px;
}

.dup-group {
    background: #fafbfc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.dup-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.dup-idx {
    font-weight: 700;
    color: #64748b;
    font-size: 13px;
}

.dup-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}
.dup-tag-same { background: #fef3c7; color: #92400e; }
.dup-tag-cross { background: #dbeafe; color: #1e40af; }
.dup-tag-triple { background: #fecaca; color: #991b1b; }

.dup-count {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
}

.dup-preview {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.7;
    background: #fff;
    border: 1px dashed #e5e7eb;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.dup-articles {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dup-article {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #f1f5f9;
}

.dup-article-meta {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    font-size: 13px;
}

.dup-reg { color: #1e3a8a; font-weight: 500; }
.dup-num { color: #64748b; }
.dup-title { color: #475569; }

.dup-keep-btn {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #047857;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}
.dup-keep-btn:hover { background: #d1fae5; }

/* === 机制说明卡片 === */
.health-mechanism {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
}

.mechanism-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.mechanism-card {
    background: #fff;
    border: 1px solid #e0f2fe;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.mech-icon { font-size: 28px; margin-bottom: 6px; }
.mech-title { font-weight: 600; color: #0c4a6e; font-size: 14px; margin-bottom: 4px; }
.mech-desc { color: #475569; font-size: 12px; line-height: 1.6; }

/* === 响应式 === */
@media (max-width: 640px) {
    .health-score-card { flex-direction: column; gap: 16px; }
    .score-meta { grid-template-columns: 1fr; }
}
