/* 疾病种管理列表页 */
.disease-page {
    padding-bottom: 48px;
}

.disease-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 14px;
}

.disease-crumbs a:hover {
    color: var(--primary);
}

.disease-crumbs .sep {
    color: var(--text-muted);
}

.disease-crumbs .crumb-current {
    color: var(--text);
}

.disease-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

/* 左侧分类菜单 */
.disease-menu {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.disease-menu h2 {
    margin: 0;
    padding: 20px 20px 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.disease-nav {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.disease-nav a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 20px;
    border-top: 1px solid var(--border);
    font-size: 15px;
    color: var(--text);
    transition: background 0.2s, color 0.2s;
}

.disease-nav a:hover {
    color: var(--primary);
    background: #fff8f8;
}

.disease-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, #e20d20, #c90019);
    font-weight: 600;
}

.disease-nav .menu-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.disease-nav .menu-icon.has-img {
    border: none;
    background: transparent;
    overflow: hidden;
}

.disease-nav .menu-icon.has-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.disease-nav a.active .menu-icon.has-img {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* 主内容区 */
.disease-hero {
    padding: 4px 0 12px;
}

.disease-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 24px;
}

.disease-hero h1 {
    margin: 0;
    color: var(--primary);
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 700;
    line-height: 1.2;
}

.disease-hero .hero-desc {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.disease-stats {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    color: var(--text-secondary);
    font-size: 14px;
}

.disease-stats span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.disease-stats strong {
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
}

.disease-stats .stat-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #C8111F;
}

.disease-filters {
    margin: 8px 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.disease-filters .filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid #e6ded9;
    border-radius: 999px;
    background: #fff;
    color: #424242;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.disease-filters .filter-chip:hover {
    border-color: rgba(200, 17, 31, 0.4);
    color: var(--primary);
}

.disease-filters .filter-chip.active {
    border-color: var(--primary);
    background: linear-gradient(180deg, #df0b1f, #c80418);
    color: #fff;
    font-weight: 600;
}

.disease-articles {
    display: grid;
    gap: 12px;
}

.disease-article-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 18px;
    min-height: 140px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.disease-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(200, 17, 31, 0.1);
}

.disease-article-thumb {
    width: 200px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5, #ebebeb);
    flex-shrink: 0;
}

.disease-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.disease-article-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #FDE8E9;
    color: #C8111F;
    font-size: 12px;
    font-weight: 600;
}

.disease-article-body h2 {
    margin: 8px 0 6px;
    font-size: clamp(15px, 1.2vw, 18px);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.disease-article-body .excerpt {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-byline {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.byline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0ece8 center/cover no-repeat;
    flex-shrink: 0;
    overflow: hidden;
}

.byline-avatar.has-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.byline-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.byline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.byline-divider {
    color: #ddd;
}

.byline-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.byline-date::before {
    content: "";
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") no-repeat center / contain;
}

.disease-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.disease-pagination a,
.disease-pagination span {
    min-width: 32px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.disease-pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.disease-pagination .current {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    cursor: default;
}

.disease-pagination .ellipsis {
    border: none;
    background: transparent;
    cursor: default;
}

/* 右侧栏 */
.disease-rail {
    display: grid;
    align-content: start;
    gap: 14px;
}

.rail-card {
    padding: 18px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rail-head .rail-title {
    margin-bottom: 0;
}

.rail-head .more {
    font-size: 13px;
    color: var(--text-muted);
}

.rail-head .more:hover {
    color: var(--primary);
}

.rail-title {
    margin: 0 0 14px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.rank-row:hover {
    color: var(--primary);
}

.rank-row .rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-no {
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #f0f0f0;
    color: #333;
    font-size: 12px;
    font-weight: 600;
}

.rank-row:nth-child(1) .rank-no {
    background: var(--primary);
    color: #fff;
}

.rank-row:nth-child(2) .rank-no {
    background: #ef7c00;
    color: #fff;
}

.rank-row:nth-child(3) .rank-no {
    background: #f0a10a;
    color: #fff;
}

.rank-views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.rank-views::before {
    content: "";
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center / contain;
}

.rail-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rail-tag-cloud .tag-chip {
    padding: 4px 12px;
    border: 1px solid #eadfda;
    border-radius: 999px;
    background: #fffdfa;
    color: #555;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.rail-tag-cloud .tag-chip:hover {
    border-color: rgba(200, 17, 31, 0.3);
    color: var(--primary);
    background: #fff3f3;
}

.expert-list {
    display: grid;
    gap: 12px;
}

.expert-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

.expert-row:hover {
    opacity: 0.85;
}

.expert-row .expert-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0ece8 center/cover no-repeat;
}

.expert-row strong {
    display: block;
    font-size: 14px;
    color: var(--text);
}

.expert-row .expert-title {
    color: var(--text-muted);
    font-size: 12px;
}

.expert-row p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-submit {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 20px 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #de0c20, #c60018);
    color: #fff;
}

.rail-submit .submit-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    font-size: 28px;
    font-weight: 800;
}

.rail-submit h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.rail-submit .submit-desc {
    margin: 6px 0 12px;
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.4;
}

.rail-submit .submit-btn {
    min-width: 120px;
    height: 32px;
    padding: 0 16px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.rail-submit .submit-btn:hover {
    opacity: 0.92;
}

.disease-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: #fafafa;
}

/* 响应式 */
@media (max-width: 1200px) {
    .disease-layout {
        grid-template-columns: 220px minmax(0, 1fr) 280px;
        gap: 18px;
    }

    .disease-article-card {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .disease-article-thumb {
        width: 160px;
        height: 100px;
    }
}

@media (max-width: 992px) {
    .disease-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .disease-menu {
        grid-column: 1 / -1;
    }

    .disease-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .disease-nav a {
        border-top: none;
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 12px 14px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .disease-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .disease-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .disease-article-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .disease-article-thumb {
        width: 100%;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .disease-nav {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 门户整体以 1280 为最小展示宽度，低分辨率时保持桌面疾病页布局 */
@media (max-width: 1279px) {
    .disease-layout {
        grid-template-columns: 220px minmax(0, 1fr) 280px;
        gap: 18px;
    }

    .disease-menu {
        grid-column: auto;
    }

    .disease-nav {
        display: block;
        max-height: calc(720px - 180px);
    }

    .disease-nav a {
        grid-template-columns: 36px minmax(0, 1fr);
        min-height: 56px;
        padding: 0 18px;
        border-top: 1px solid var(--border);
        border-right: none;
        border-bottom: none;
    }

    .disease-article-card {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .disease-article-thumb {
        width: 160px;
        height: 100px;
    }
}
