/* 体检报告样式表 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* 页眉样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* 患者信息表格样式 */
.patient-info-table {
    width: 100%;
    margin: 20px auto 0;
    background-color: rgba(255, 255, 255, 0.15);
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.patient-info-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.patient-info-table tbody tr:last-child {
    border-bottom: none;
}

.patient-info-table td {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.patient-info-table td:last-child {
    border-right: none;
}

.patient-info-table .label-cell {
    padding: 12px 15px;
    font-weight: 600;
    text-align: left;
    width: 20%;
    color: rgba(255, 255, 255, 0.9);
}

.patient-info-table .value-cell {
    padding: 12px 15px;
    text-align: left;
    color: #fff;
    font-weight: 500;
}

.patient-info-table .value-cell.abnormal-high {
    color: #ffcccc;
    font-weight: 700;
}

/* 主内容区域 */
.main-content {
    padding: 30px;
}

/* 章节样式 */
.section {
    margin-bottom: 40px;
    page-break-inside: avoid;
}

.section h2 {
    font-size: 22px;
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    font-weight: 600;
}

.section-meta {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.section-meta p {
    margin: 5px 0;
}

.section-summary {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

/* 异常行样式 */
.abnormal-row {
    background-color: #fff5f5 !important;
}

.abnormal-row:hover {
    background-color: #ffe5e5 !important;
}

/* 异常数据标记 */
.abnormal-high {
    color: #dc3545;
    font-weight: 600;
    background-color: #ffe5e5;
    padding: 2px 6px;
    border-radius: 3px;
}

.abnormal-low {
    color: #856404;
    font-weight: 600;
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 3px;
}

/* 状态标签 */
.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status.normal {
    background-color: #d4edda;
    color: #155724;
}

.status.abnormal-high {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

.status.abnormal-low {
    background-color: #fff3cd;
    color: #856404;
    font-weight: 600;
}

/* B超报告样式 */
.ultrasound-report {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.ultrasound-report h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 18px;
}

.ultrasound-report ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.ultrasound-report li {
    margin: 10px 0;
    line-height: 1.8;
}

.ultrasound-report p {
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
}

/* 异常指标汇总 */
.summary-section {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 40px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-top: 4px solid;
}

.summary-card.critical {
    border-top-color: #dc3545;
}

.summary-card.moderate {
    border-top-color: #ffc107;
}

.summary-card.mild {
    border-top-color: #17a2b8;
}

.summary-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.summary-card.critical h3 {
    color: #dc3545;
}

.summary-card.moderate h3 {
    color: #ffc107;
}

.summary-card.mild h3 {
    color: #17a2b8;
}

.summary-card ul {
    list-style: none;
    padding: 0;
}

.summary-card li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    line-height: 1.6;
}

.summary-card li:last-child {
    border-bottom: none;
}

/* 异常指标详细表格样式 */
.abnormal-summary-table {
    margin-top: 20px;
    border: 2px solid #dc3545;
}

.abnormal-summary-table thead {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.abnormal-summary-table th {
    font-weight: 700;
    font-size: 15px;
}

.abnormal-summary-table tbody tr {
    transition: background-color 0.2s;
}

.abnormal-summary-table tbody tr:nth-child(even) {
    background-color: #fff9f9;
}

.abnormal-summary-table tbody tr:nth-child(even).abnormal-row {
    background-color: #fff5f5 !important;
}

.abnormal-summary-table tbody tr:hover {
    background-color: #ffe5e5 !important;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

/* 页脚样式 */
.footer {
    background-color: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #e9ecef;
}

.footer .disclaimer {
    margin-top: 10px;
    font-style: italic;
    color: #999;
}

/* 打印样式 */
@media print {
    body {
        background-color: #fff;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    .section {
        page-break-inside: avoid;
    }

    .abnormal-row {
        background-color: #fff5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .abnormal-high {
        background-color: #ffe5e5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .abnormal-low {
        background-color: #fff3cd !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 24px;
    }

    .patient-info-table {
        font-size: 14px;
    }

    .patient-info-table .label-cell,
    .patient-info-table .value-cell {
        padding: 10px 12px;
    }

    .main-content {
        padding: 15px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }

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

/* 表格响应式处理 */
@media (max-width: 600px) {
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

