/* 标杆患者库样式（叠加在 style.css + cards.css 之上） */

.page-subtitle {
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

/* ===== 疾病列表 ===== */

.diseases-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.disease-card {
    background: #fff;
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all .15s;
}

.disease-card:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 12px rgba(25, 118, 210, .1);
    transform: translateY(-1px);
}

.disease-card.disabled {
    opacity: .5;
    cursor: default;
}

.disease-card.disabled:hover {
    border-color: #eee;
    box-shadow: none;
    transform: none;
}

.disease-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 8px;
}

.disease-name {
    font-size: 17px;
    color: #222;
    font-weight: 600;
    line-height: 1.3;
}

.disease-count {
    font-size: 12px;
    color: #1976d2;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    font-weight: 500;
}

.disease-count.empty {
    color: #999;
    background: #f5f5f5;
}

.disease-intro {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.disease-subtypes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

/* ===== 患者列表（按 subtype 分组） ===== */

.patient-group {
    margin-bottom: 24px;
}

.group-title {
    font-size: 15px;
    color: #5e35b1;
    font-weight: 600;
    padding: 6px 12px;
    background: #ede7f6;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.group-count {
    font-weight: 400;
    color: #777;
    font-size: 13px;
}

.patient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

.patient-card {
    background: #fff;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all .15s;
}

.patient-card:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, .08);
}

.patient-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.patient-alias {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-right: 4px;
}

.meta-chip.status {
    background: #e8f5e9;
    color: #388e3c;
}

.patient-hero {
    font-size: 13px;
    color: #5e35b1;
    font-style: italic;
    margin-bottom: 6px;
    line-height: 1.5;
    border-left: 3px solid #b39ddb;
    padding-left: 8px;
}

.patient-complaint {
    font-size: 13px;
    color: #555;
    line-height: 1.55;
    margin-bottom: 8px;
}

/* ===== 患者详情页 ===== */

.patient-detail-main {
    max-width: 820px;
}

.patient-detail-card {
    padding: 22px 24px;
}

.patient-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.patient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.patient-tags {
    margin-bottom: 10px;
}

.patient-hero-quote {
    border-left: 4px solid #5e35b1;
    background: #f3e5f5;
    padding: 12px 16px;
    margin: 12px 0;
    color: #4a148c;
    font-style: italic;
    line-height: 1.6;
    border-radius: 0 6px 6px 0;
}

.patient-complaint-large {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    margin-top: 8px;
}

.patient-section {
    margin-top: 24px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 17px;
    color: #1976d2;
    font-weight: 600;
    border-left: 4px solid #1976d2;
    padding-left: 10px;
    margin-bottom: 12px;
}

.section-mistakes .section-title { color: #d32f2f; border-left-color: #d32f2f; }
.section-highlights .section-title { color: #388e3c; border-left-color: #388e3c; }
.section-outcome .section-title { color: #f57c00; border-left-color: #f57c00; }
.section-root_cause .section-title { color: #5e35b1; border-left-color: #5e35b1; }
.section-script .section-title { color: #c2185b; border-left-color: #c2185b; }

.section-count {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

.section-body {
    color: #333;
    line-height: 1.75;
    font-size: 14.5px;
}

.section-body h3 {
    font-size: 15px;
    color: #444;
    margin-top: 14px;
    margin-bottom: 8px;
}

.section-body p { margin-bottom: 10px; }
.section-body ul, .section-body ol { margin-left: 22px; margin-bottom: 10px; }
.section-body li { margin-bottom: 4px; }

.section-body strong {
    color: #222;
}

.section-body pre {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 10px 12px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 12.5px;
    line-height: 1.5;
    margin: 10px 0;
}

.section-body code {
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
}

.section-body pre code {
    background: transparent;
    padding: 0;
}

.section-body blockquote {
    border-left: 3px solid #ddd;
    padding-left: 12px;
    color: #666;
    margin: 10px 0;
}

/* ===== 图片墙 ===== */

.img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.img-thumb {
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
    transition: all .15s;
}

.img-thumb:hover {
    border-color: #1976d2;
    transform: scale(1.02);
}

.img-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.img-thumb-name {
    font-size: 11px;
    color: #888;
    padding: 4px 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 图片放大弹层 ===== */

.img-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.img-modal.open {
    display: flex;
}

.img-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.img-modal-close {
    position: fixed;
    top: 20px;
    right: 28px;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
    width: 44px;
    height: 44px;
    text-align: center;
    border-radius: 50%;
    background: rgba(0,0,0,.5);
}

/* ===== 移动端 ===== */

@media (max-width: 600px) {
    .diseases-list {
        grid-template-columns: 1fr;
    }

    .patient-grid {
        grid-template-columns: 1fr;
    }

    .img-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .img-thumb img {
        height: 90px;
    }

    .patient-detail-card {
        padding: 16px;
    }

    .section-title {
        font-size: 15px;
    }
}
