/* 自定义样式 */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    margin: 0;
    padding: 10px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: #667eea;
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
}

.header label {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo-link {
    text-decoration: none;
    flex-shrink: 0;
    display: block;
}

.logo-link img {
    height: 70px;
    border-radius: 8px;
    padding: 5px;
    display: block;
}

#authHeader {
    margin-left: auto;
    flex-shrink: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header {
        padding: 20px 15px;
        text-align: center;
    }
    
    .header label {
        font-size: 18px;
    }
    
    .logo-link img {
        height: 50px;
    }
}

/* 打印样式 */
@media print {
    .header {
        background: #667eea;
        color: white;
        padding: 20px 25px;
        border-radius: 12px;
        margin-bottom: 20px;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        display: flex;
        flex-direction: row;
        align-items: center;
        position: relative;
    }
    
    .header label {
        font-size: 22px;
        font-weight: 600;
        letter-spacing: 1px;
        text-align: center;
        white-space: nowrap;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .logo-link {
        text-decoration: none;
        flex-shrink: 0;
        display: block;
    }
    
    .logo-link img {
        height: 60px;
        border-radius: 8px;
        padding: 5px;
        display: block;
    }
    
    #authHeader {
        margin-left: auto;
        flex-shrink: 0;
        display: none;
    }
}

#authHeader .dropdown-toggle {
    border: none;
    background: transparent;
    padding: 0;
}

#authHeader .dropdown-toggle::after {
    display: none !important;
}

#authHeader .user-avatar {
    transition: all 0.3s ease;
}

#authHeader .dropdown-toggle:hover .user-avatar {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#authHeader .admin-menu-item, #authHeader .profile-menu-item {
    font-weight: 600 !important;
    color: #667eea !important;
    background-color: rgba(102, 126, 234, 0.05) !important;
    border-left: 3px solid #667eea !important;
    padding-left: 15px !important;
}

#authHeader .admin-menu-item:hover, #authHeader .profile-menu-item:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.logo-link {
    text-decoration: none;
    flex-shrink: 0;
    display: block;
}

.logo-link img {
    height: 70px;
    border-radius: 8px;
    padding: 5px;
    display: block;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.card {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.card-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.card-body {
    padding: 15px;
}

h3 {
    font-size: 18px;
    margin: 0;
}

h4 {
    font-size: 16px;
    margin: 0 0 10px 0;
}

.form-control {
    padding: 5px 10px;
    font-size: 14px;
}

.btn {
    padding: 6px 12px;
    font-size: 14px;
}

.row {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 10px !important;
}

/* 表格样式 */
table {
    font-size: 14px;
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.table th {
    background-color: #e9ecef;
}

.person-info {
    background: white;
    border: none;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    margin-bottom: 20px;
}

.person-info:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.input-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: nowrap;
}

.input-row input { 
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.input-group label {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.input-group input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    width: 120px;
}

.input-group input[type="month"] {
    width: 150px;
}

.input-group input[type="radio"] {
    width: auto;
    margin: 0;
}

.gender-option {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 10px;
}

/* 数据表格样式 */
.data-table table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    table-layout: fixed;
    width: 100%;
}

.data-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    padding: 14px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.data-table td {
    padding: 12px 10px;
    border-color: #e8ecef;
    text-align: center;
}

.data-table td input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    background: white;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 4px;
    font-weight: bold;
}

.data-table td input:focus {
    outline: none;
    border-color: #667eea;
    background: #f0f7ff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 结果单元格样式 */
.result-cell {
    background: #e3f2fd;
    padding: 8px;
    font-weight: 500;
    color: #1976d2;
}

.result-cell-highlight {
    background: #ffcdd2;
    padding: 8px;
    font-weight: 600;
    color: #c62828;
}

/* 带颜色显示的td，移除圆角 */
.data-table td[style*="background-color"] {
    border-radius: 0 !important;
}

.analysis-table td[style*="background-color"] {
    border-radius: 0 !important;
}

.result-cell-success {
    background: #c8e6c9;
    border-radius: 6px;
    padding: 8px;
    font-weight: 500;
    color: #2e7d32;
}

/* 分析部分样式 */
.analysis-section {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.analysis-table {
    flex: 1;
    min-width: 600px;
    overflow-x: hidden;
}

/* 管理方案样式 */
.management-plan {
    flex: 1;
    min-width: 400px;
    background-color: #f1f8e9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .analysis-section {
        flex-direction: column;
    }
    
    .analysis-table {
        min-width: 100%;
        overflow-x: auto;
    }
    
    .management-plan {
        min-width: 100%;
        margin-top: 20px;
        margin-bottom: 15px;
    }
}

.analysis-table th {
    background-color: #e3f2fd;
}

.management-plan h4 {
    margin-top: 0;
}

.management-plan ol {
    margin: 0;
    padding-left: 20px;
}

.management-plan li {
    margin-bottom: 5px;
}

/* 标注样式 */
.annotation {
    background: #fff3e0;
    border-radius: 10px;
    padding: 20px 25px;
    margin-top: 25px;
    border-left: 4px solid #ff9800;
}

.annotation p {
    margin: 10px 0;
    line-height: 1.7;
    color: #555;
    font-size: 14px;
}

.annotation p:first-child {
    margin-top: 0;
}

.annotation p:last-child {
    margin-bottom: 0;
}

/* 历史记录样式 */
.history-section {
    margin-top: 30px;
}

/* 按钮组样式 */
/* .button-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
} */
.button-group,
.action-buttons {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 优化按钮样式 */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

/* 小按钮样式 */
.btn-sm {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
}

.btn-primary {
    background: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: #11998e;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
}

.btn-secondary {
    background: #bdc3c7;
    color: #2c3e50;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 加载动画 */
.loading-overlay {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.loading-spinner {
    background: white;
    padding: 40px 60px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

.loading-spinner div {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: #667eea;
    font-weight: 500;
    margin-top: 15px;
    margin-bottom: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 提示框样式 */
.alert {
    border-radius: 10px;
    padding: 15px 20px;
    font-weight: 500;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px 20px;
        text-align: center;
    }
    
    .header label {
        font-size: 16px;
        margin: 0 5px;
    }
    
    .logo-link img {
        height: 40px;
    }
    
    .button-group {
        flex-wrap: wrap;
    }
    
    .button-group .btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .input-group {
        width: 100%;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .prediction-left, .prediction-right {
        width: 100%;
    }
    
    .chart-container {
        height: 500px;
    }
    
    table {
        font-size: 12px;
    }
    
    .table th, .table td {
        padding: 8px 5px;
    }
}

@media (max-width: 576px) {
    .button-group .btn {
        flex: 1 1 100%;
    }
    
    .legend-item {
        display: block;
        margin: 8px 0;
    }
    
    .chart-container {
        height: 500px;
    }
    
    .header label {
        font-size: 14px;
        margin: 0 5px;
    }
    
    .logo-link img {
        height: 35px;
    }
}

/* 预测区域 */
.prediction-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
}

.prediction-section h3 {
    color: #333;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.prediction-section .input-row {
    padding-top: 15px;
}

.eye-prediction-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
}

.eye-prediction-section h4 {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 15px;
}

#controlEffect {
    max-width: 220px;
}

.chart-container {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 400px;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
}

.table-container h3 {
    color: #333;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

#tableContainer {
    margin-top: 20px;
    display: none;
}

.legend-container {
            margin-top: 15px;
            text-align: center;
        }
        .legend-item {
            display: inline-block;
            margin-right: 20px;
            font-weight: bold;
        }
        .legend-color {
            display: inline-block;
            width: 30px;
            height: 15px;
            margin-right: 5px;
            vertical-align: middle;
        }
        .red {
            background-color: red;
        }
        .green {
            background-color: rgb(33, 166, 65 , 0.6);
        }
        .green-line {
            background-color: rgba(7, 192, 237, 0.8);
            border: 2px dashed rgba(7, 192, 237, 0.8);
            height: 0;
        }
        .yellow-line {
            background-color: rgba(255, 85, 0, 0.8);
            border: 2px dashed rgba(255, 85, 0, 0.8);
            height: 0;
        }
        .critical-values {
            margin-top: 15px;
            padding: 10px;
            border-radius: 5px;
            font-weight: bold;
        }
        #predictionTable th {
            padding-right: 20px;
        }
/* 优化临界值显示 */
.critical-values {
    background: #fff3e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin-top: 15px;
    border-left: 4px solid #ff9800;
}

.critical-values div {
    margin: 5px 0;
    color: #555;
}

/* 图例 */
.legend-container {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    margin: 5px 15px;
    font-size: 14px;
    color: #555;
}

.legend-color {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.green-line, .yellow-line {
    border-radius: 2px;
    margin-right: 8px;
}

/* 优化分析表格 */
.analysis-table table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 为分析表格添加响应式样式 */
.analysis-table {
    overflow-x: hidden;
}

.analysis-table table {
    min-width: 600px;
}

@media print {
    .analysis-table {
        overflow-x: visible;
    }
    
    .analysis-table table {
        min-width: 100%;
    }
}

.analysis-table th {
    background: #4fc3f7;
    color: white;
    font-weight: 600;
    padding: 14px 12px;
}

/* 优化近视管理方案 */
.management-plan {
    background: #f1f8e9;
    border-radius: 10px;
    padding: 20px 25px;
    border-left: 4px solid #8bc34a;
}

.management-plan h4 {
    color: #558b2f;
    font-weight: 600;
    margin-bottom: 15px;
}

.management-plan li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #33691e;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd6;
}

/* 参考文献区域样式 */
#referenceSection {
    background: #fff;
    padding: 25px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#referenceSection h1 {
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 0;
    margin-bottom: 20px;
}

#referenceSection h3 {
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 0;
    margin-bottom: 20px;
}

#referenceSection .section {
    background: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#referenceSection h2 {
    color: #2c3e50;
    border-left: 4px solid #3498db;
    padding-left: 15px;
    margin-top: 0;
}

#referenceSection h3 {
    color: #2980b9;
    margin-top: 25px;
}

#referenceSection p {
    margin: 10px 0;
}

#referenceSection .source {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

#referenceSection table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95em;
}

#referenceSection th, #referenceSection td {
    border: 1px solid #ddd;
    padding: 10px 8px;
    text-align: center;
}

#referenceSection th {
    background-color: #ecf0f1;
    font-weight: bold;
    color: #2c3e50;
}

#referenceSection tr:nth-child(even) {
    background-color: #f9f9f9;
}

#referenceSection tr:hover {
    background-color: #f1f7ff;
}

#referenceSection .note {
    font-size: 0.9em;
    color: #666;
    background-color: #fffde7;
    padding: 10px;
    border-left: 3px solid #ffc107;
    margin: 15px 0;
}

#referenceSection .sub-table {
    margin-top: 15px;
}

#referenceSection .sub-table th, #referenceSection .sub-table td {
    padding: 6px 4px;
    font-size: 0.9em;
}


/* 参考文献中P50和界值数据加粗 */
/* 表3（3~18 岁未近视儿童青少年眼轴长度参考范围） */
/* 男性P50数据 */
#referenceSection .table3 tbody tr td:nth-child(5),
/* 女性P50数据 */
#referenceSection .table3 tbody tr td:nth-child(12) {
    font-weight: bold !important;
}

/* 表4（3~18 岁儿童青少年轴率比筛查近视界值） */
/* 男性界值数据 */
#referenceSection .table4 tbody tr td:nth-child(2),
/* 女性界值数据 */
#referenceSection .table4 tbody tr td:nth-child(7) {
    font-weight: bold !important;
}

/* 表5（6~10 岁近视儿童眼轴长度安全及较快增长参考范围） */
/* 较快增长P50 */
#referenceSection .table5 tbody tr td:nth-child(5),
/* 安全增长P50 */
#referenceSection .table5 tbody tr td:nth-child(11) {
    font-weight: bold !important;
}

/* 表6（6~10 岁未近视儿童青少年眼轴长度安全及较快增长参考范围） */
/* 较快增长P50 */
#referenceSection .table6 tbody tr td:nth-child(5),
/* 安全增长P50 */
#referenceSection .table6 tbody tr td:nth-child(11) {
    font-weight: bold !important;
}

/* 打印样式 */
@media print {
    /* 隐藏按钮组区域和authHeader */
    .button-group,
    .action-buttons,
    .controls,
    #authHeader {
        display: none !important;
    }
    
    /* 保留页面样式 */
    body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px !important;
        background-color: #f5f5f5 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        font-size: 14px !important;
        font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif !important;
    }
    
    /* 全局文本元素字体大小 */
    p, span, div, label, td, th, li, a, button {
        font-size: 14px !important;
    }
    
    /* 标题元素字体大小 */
    h1 {
        font-size: 20px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    h3, h4, h5, h6 {
        font-size: 16px !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        padding: 20px !important;
    }
    
    /* 保留header样式 */
    .header {
        background: #667eea !important;
        color: white !important;
        padding: 25px 30px !important;
        border-radius: 12px !important;
        margin-bottom: 25px !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        position: relative !important;
    }
    
    .header label {
        font-size: 26px !important;
        font-weight: 600 !important;
        letter-spacing: 1px !important;
        text-align: center !important;
        white-space: nowrap !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .logo-link {
        text-decoration: none !important;
        flex-shrink: 0 !important;
        display: block !important;
    }
    
    .logo-link img {
        height: 70px !important;
        border-radius: 8px !important;
        padding: 5px !important;
        display: block !important;
    }
    
    /* 保留person-info区域样式 */
    .person-info {
        display: block !important;
        background: white !important;
        border: none !important;
        padding: 20px !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        margin-bottom: 20px !important;
    }
    
    /* 保留数据表格样式 */
    .data-table table {
        background: white !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    .data-table th {
        background: #667eea !important;
        color: white !important;
        font-weight: 600 !important;
        padding: 14px 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        text-align: center !important;
    }
    
    .data-table td {
        padding: 12px 10px !important;
        border-color: #e8ecef !important;
        text-align: center !important;
    }
    
    /* 保留分析表格样式 */
    .analysis-table table {
        background: white !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
        min-width: 600px !important;
    }

    .analysis-table th {
        background: #4fc3f7 !important;
        color: white !important;
        font-weight: 600 !important;
        padding: 14px 12px !important;
    }
    
    /* 保留管理方案样式 */
    .management-plan {
        background: #f1f8e9 !important;
        border-radius: 10px !important;
        padding: 20px 25px !important;
        border-left: 4px solid #8bc34a !important;
        flex: 1 !important;
        min-width: 400px !important;
        margin-bottom: 15px !important;
    }
    
    /* 保留标注样式 */
    .annotation {
        background: #fff3e0 !important;
        border-radius: 10px !important;
        padding: 20px 25px !important;
        margin-top: 25px !important;
        border-left: 4px solid #ff9800 !important;
    }
    
    /* 保留预测区域样式 */
    .prediction-section {
        background: white !important;
        border-radius: 12px !important;
        padding: 30px !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
        margin-top: 30px !important;
        font-size: 14px !important;
    }
    
    .prediction-section h3 {
        color: #333 !important;
        font-weight: 600 !important;
        padding-bottom: 15px !important;
        border-bottom: 2px solid #667eea !important;
    }
    
    .eye-prediction-section {
        background: #f8f9fa !important;
        border-radius: 10px !important;
        padding: 20px !important;
        margin-top: 20px !important;
        border-left: 4px solid #667eea !important;
        font-size: 14px !important;
    }
    
    .eye-prediction-section h4 {
        color: #667eea !important;
        font-weight: 600 !important;
        margin-bottom: 15px !important;
    }
    
    /* 预测曲线相关元素样式 */
    .prediction-section h3,
    .prediction-section h4,
    .prediction-section p,
    .prediction-section div,
    .prediction-section span,
    .prediction-section label {
        font-size: 14px !important;
    }
    
    /* 临界值显示区域样式 */
    #criticalValuesOD,
    #criticalValuesOS {
        font-size: 14px !important;
        width: 30% !important;
        min-width: 250px !important;
        padding: 15px !important;
        background-color: #f8f9fa !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
    
    #criticalValuesOD div,
    #criticalValuesOS div {
        font-size: 14px !important;
        margin-bottom: 5px !important;
    }
    
    /* 保留图例样式 */
    .legend-container {
        background: white !important;
        padding: 15px 20px !important;
        border-radius: 8px !important;
        margin-top: 20px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    }
    
    .legend-item {
        display: inline-flex !important;
        align-items: center !important;
        margin: 5px 15px !important;
        font-size: 14px !important;
        color: #555 !important;
    }
    
    /* 保留表格容器样式 */
    .table-container {
        background: white !important;
        border-radius: 12px !important;
        padding: 30px !important;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08) !important;
        margin-top: 30px !important;
    }
    
    .table-container h3 {
        color: #333 !important;
        font-weight: 600 !important;
        padding-bottom: 15px !important;
        border-bottom: 2px solid #667eea !important;
    }
    
    /* 确保表格和其他元素在打印时正确显示 */
    table {
        page-break-inside: avoid !important;
    }
    
    /* 区域1：header、人员信息、data-table 在一个页面上 */
    .header,
    .person-info,
    .data-table,
    .analysis-table {
        page-break-inside: avoid !important;
    }
    
    /* 在analysis-section之后强制分页，确保区域2从新页面开始 */
    .analysis-table {
        page-break-after: always !important;
    }
    
    /* 区域2：analysis-section（包含近视管理理念与核心方案）、标注 在一个A4纸页面 */
    .management-plan,
    .annotation {
        page-break-inside: avoid !important;
    }
    
    /* 在annotation之后强制分页，确保区域3从新页面开始 */
    .annotation {
        page-break-after: always !important;
    }
    
    /* 区域3：眼轴预测功能和下面三个区域在一个页面 */
    .prediction-section,
    .eye-prediction-section,
    .legend-container {
        page-break-inside: avoid !important;
    }
    
    /* 区域4：预测数据详情 在一个页面上 */
    #tableContainer {
        page-break-inside: avoid !important;
    }
    
    /* 设置页面边距 */
    @page {
        margin: 1cm;
        size: A4;
    }
    
    /* 不显示页眉页脚 */
    @page {
        margin-top: 1cm;
        margin-bottom: 1cm;
    }
}
