/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f0f4f8; /* 医疗主题浅蓝背景 */
    color: #2c3e50;
    font-size: 14px; /* 基础字体大小 */
    line-height: 1.5; /* 行高，提高可读性 */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部标题栏样式 */
.header {
    background-color: #1a5fb4; /* 医疗主题深蓝色 */
    color: white;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

/* 主内容区域布局 */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 左侧导航菜单样式 */
.sidebar {
    width: 220px;
    background-color: #3584e4; /* 医疗主题蓝色 */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding-top: 20px;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 16px;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #1c71d8; /* 悬停时深一点的蓝色 */
}

.nav-item.active .nav-link {
    background-color: #1c71d8; /* 激活状态深蓝色 */
    border-left: 3px solid #26a269; /* 医疗主题绿色作为强调色 */
    color: #ffffff;
}



/* 右侧主要内容区域样式 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #ffffff;
}

.content-placeholder {
    text-align: center;
    padding: 50px 20px;
}

.content-placeholder h2 {
    color: #1a5fb4; /* 医疗主题深蓝色 */
    margin-bottom: 15px;
    font-size: 24px;
}

.content-placeholder p {
    color: #5e5c64;
    font-size: 16px;
}

/* 页面内容样式 */
.page-content {
    animation: fadeIn 0.5s ease-in-out;
}

.page-content h2 {
    color: #1a5fb4; /* 医疗主题深蓝色 */
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid #26a269; /* 医疗主题绿色作为强调色 */
    padding-bottom: 10px;
}

.page-content h3 {
    color: #333;
    margin: 20px 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.page-content h4 {
    color: #444;
    margin: 15px 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.page-content h5 {
    color: #333;
    margin: 15px 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.page-content h6 {
    color: #333;
    margin: 15px 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.page-content p {
    color: #5e5c64;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
}

.placeholder-box {
    background-color: #f0f4f8; /* 医疗主题浅蓝背景 */
    border: 1px dashed #deddda;
    border-radius: 5px;
    padding: 30px;
    text-align: center;
    margin-top: 30px;
}

.placeholder-box p {
    color: #5e5c64;
    font-style: italic;
}

/* 淡入动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 患者管理界面样式 */
.patient-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

/* 按钮样式 */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background-color: #3584e4;
    color: white;
}

.btn-primary:hover {
    background-color: #1c71d8;
}

.btn-secondary {
    background-color: #deddda;
    color: #2c3e50;
}

.btn-secondary:hover {
    background-color: #c0bfbc;
}

.btn-danger {
    background-color: #e01b24;
    color: white;
}

.btn-danger:hover {
    background-color: #c01c28;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 5px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.patients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.patients-table th,
.patients-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.patients-table th {
    background-color: #f0f4f8;
    color: #1a5fb4;
    font-weight: 600;
    position: sticky;
    top: 0;
}

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

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

/* 患者管理表格列宽设置 */
.patients-table th:nth-child(1),
.patients-table td:nth-child(1) {
    width: 100px; /* 患者ID列 */
}

.patients-table th:nth-child(2),
.patients-table td:nth-child(2) {
    width: 120px; /* 姓名列 */
}

.patients-table th:nth-child(3),
.patients-table td:nth-child(3) {
    width: 80px; /* 性别列 */
}

.patients-table th:nth-child(4),
.patients-table td:nth-child(4) {
    width: 80px; /* 年龄列 */
}

.patients-table th:nth-child(5),
.patients-table td:nth-child(5) {
    width: 150px; /* 电话列 */
}

.patients-table th:nth-child(6),
.patients-table td:nth-child(6) {
    width: 200px; /* 邮箱列 */
}

.patients-table th:nth-child(7),
.patients-table td:nth-child(7) {
    width: 150px; /* 创建时间列 */
}

.patients-table th:nth-child(8),
.patients-table td:nth-child(8) {
    width: 150px; /* 操作列 */
    text-align: center;
}

/* 随访计划表格样式 */
.followup-plans-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.followup-plans-table th,
.followup-plans-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.followup-plans-table th {
    background-color: #f0f4f8;
    color: #1a5fb4;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.followup-plans-table tr:hover {
    background-color: #f8f9fa;
}

.followup-plans-table tr:last-child td {
    border-bottom: none;
}

/* 优化随访计划表格列宽 */
.followup-plans-table th:nth-child(1),
.followup-plans-table td:nth-child(1) {
    width: 80px; /* 计划ID列 */
}

.followup-plans-table th:nth-child(2),
.followup-plans-table td:nth-child(2) {
    width: 100px; /* 患者ID列 */
}

.followup-plans-table th:nth-child(3),
.followup-plans-table td:nth-child(3) {
    width: 120px; /* 患者姓名列 */
}

.followup-plans-table th:nth-child(4),
.followup-plans-table td:nth-child(4) {
    width: 120px; /* 初诊日期列 */
}

.followup-plans-table th:nth-child(5),
.followup-plans-table td:nth-child(5) {
    width: 150px; /* 计划随访日期列 */
}

.followup-plans-table th:nth-child(6),
.followup-plans-table td:nth-child(6) {
    width: 100px; /* 状态列 */
}

.followup-plans-table th:nth-child(7),
.followup-plans-table td:nth-child(7) {
    width: 150px; /* 创建时间列 */
}

.followup-plans-table th:nth-child(8),
.followup-plans-table td:nth-child(8) {
    width: 200px; /* 操作按钮列 */
    text-align: center;
}

/* 排序指示器样式 */
.followup-plans-table th[onclick] {
    position: relative;
    user-select: none;
}

.followup-plans-table th[onclick]:hover {
    background-color: #e6f0fa;
}

.followup-plans-table th.sort-asc::after,
.followup-plans-table th.sort-desc::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 0 4px 4px 4px;
    border-style: solid;
    border-color: transparent transparent #1a5fb4 transparent;
}

.followup-plans-table th.sort-desc::after {
    transform: translateY(-50%) rotate(180deg);
}

/* 无数据提示样式 */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #5e5c64;
    font-size: 16px;
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    gap: 5px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #c0c0c0;
    background-color: white;
    color: #2c3e50;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background-color: #f0f4f8;
}

.page-btn.active {
    background-color: #3584e4;
    color: white;
    border-color: #3584e4;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message.show {
    transform: translateX(0);
}

.message.info {
    background-color: #3584e4;
}

.message.success {
    background-color: #26a269;
}

.message.error {
    background-color: #e01b24;
}

.message.warning {
    background-color: #e5a50a;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content[style*="max-width: 1200px"],
.modal-content[style*="max-width:1100px"] {
    max-width: 1200px !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #1a5fb4;
    font-size: 18px;
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.followup-tab-content {
    display: none;
}

.followup-tab-content.active {
    display: block;
}

.followup-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 15px;
}

.followup-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.followup-tab:hover {
    color: #007bff;
}

.followup-tab.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s;
    box-sizing: border-box;
    height: 38px;
    line-height: 1.4;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
    cursor: pointer;
}

.form-group textarea {
    height: auto;
    min-height: 60px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

/* 表单分组样式 */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h4 {
    margin-bottom: 15px;
    color: #1a5fb4;
    font-size: 16px;
    font-weight: 600;
}

/* 表单行布局 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 表单元素聚焦样式 */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

.required {
    color: #e01b24;
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 删除确认对话框特殊样式 */
#deleteConfirmModal .modal-body p {
    margin-bottom: 15px;
    color: #2c3e50;
}

.patient-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.patient-info p {
    margin: 5px 0;
}

.patient-info strong {
    color: #1a5fb4;
}

/* 随访计划页面样式 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.page-actions {
    display: flex;
    gap: 10px;
}

.search-filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box {
    display: flex;
    gap: 10px;
}
/* 搜索输入框样式 */
.search-box input {
    width: 250px;
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* 天数输入框样式，确保与搜索输入框高度一致 */
#daysThresholdInput {
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.filter-box select {
    width: 200px;
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: white;
}

/* 自动完成功能样式 */
.autocomplete-container {
    position: relative;
    width: 100%;
}

.autocomplete-container input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.autocomplete-container input[type="text"]:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #c0c0c0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f0f4f8;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* 帮助文本样式 */
.help-text {
    margin: 8px 0 0 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* 日期输入框样式 */
input[type="date"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

input[type="date"]:focus {
    border-color: #1a5fb4;
    outline: none;
    box-shadow: 0 0 5px rgba(26, 95, 180, 0.3);
}

input[type="date"]:disabled {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
    color: #888;
    cursor: not-allowed;
}

/* 状态样式 */
.status-pending {
    color: #e5a50a;
    font-weight: 500;
}

.status-completed {
    color: #26a269;
    font-weight: 500;
}

/* 按钮大小 */
.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .nav-menu {
        display: flex;
        padding-top: 0;
    }
    
    .nav-item {
        flex: 1;
        margin-bottom: 0;
    }
    
    .nav-link {
        padding: 15px 10px;
        text-align: center;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item.active .nav-link {
        border-left: none;
        border-bottom: 3px solid #26a269; /* 医疗主题绿色作为强调色 */
    }
    
    /* 患者管理界面响应式调整 */
    .patient-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filter-container {
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .table-container {
        font-size: 12px;
    }
    
    .patients-table th,
    .patients-table td {
        padding: 8px 10px;
    }
    
    .btn-sm {
        padding: 4px 8px;
        font-size: 10px;
    }
}

/* 随访记录表格样式 */
.followup-records-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.followup-records-table th,
.followup-records-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.followup-records-table th {
    background-color: #f0f4f8;
    color: #1a5fb4;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.followup-records-table tr:hover {
    background-color: #f8f9fa;
}

.followup-records-table tr:last-child td {
    border-bottom: none;
}

/* 随访记录页面样式 */
.info-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.info-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.info-item span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item.full-width p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* 报告分析页面 - 左右布局样式 */
.report-analysis-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 100px);
    margin-bottom: 10px;
}

.page-content {
    animation: fadeIn 0.5s ease-in-out;
    margin-bottom: 10px;
}

/* 左侧：输入编辑区域 */
.left-panel {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 右侧：患者列表和分析报告 */
.right-panel {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    max-width: 400px;
}

/* 文本框区域样式 */
.text-box-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    flex: 3;
    display: flex;
    flex-direction: column;
}

.text-box-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a5fb4;
    font-size: 18px;
}

.analysis-textarea {
    width: 100%;
    flex: 1;
    min-height: 200px;
    padding: 12px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
}

/* 分析按钮容器样式 */
.analysis-buttons {
    display: flex;
    gap: 10px;
}

.analysis-buttons .btn {
    flex: 1;
    min-width: 100px;
}

/* 当前患者显示样式 */
.current-patient-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background-color: #f0f4f8;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.current-patient-label {
    font-weight: 600;
    color: #1a5fb4;
    white-space: nowrap;
}

.current-patient-value {
    font-size: 14px;
    color: #666;
    padding: 4px 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px dashed #c0c0c0;
    flex: 1;
}

.current-patient-value.selected {
    color: #26a269;
    border-color: #26a269;
    border-style: solid;
    font-weight: 500;
}

.analysis-textarea:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

/* AI对话区域样式 */
.ai-chat-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    flex: 2;
    display: flex;
    flex-direction: column;
}

.ai-chat-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1a5fb4;
    font-size: 18px;
}

.ai-chat-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    max-height: 300px;
}

.chat-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 80%;
}

.system-message {
    background-color: #e3f2fd;
    align-self: flex-start;
}

.user-message {
    background-color: #f1f8e9;
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    background-color: #f3e5f5;
    align-self: flex-start;
}

.typing {
    font-style: italic;
    color: #666;
    opacity: 0.8;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #c0c0c0;
    border-radius: 4px;
    font-size: 14px;
}

.chat-input:focus {
    outline: none;
    border-color: #3584e4;
    box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.2);
}

/* 患者列表区域样式 */
.patient-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.patient-list-header h3 {
    margin: 0;
    color: #1a5fb4;
    font-size: 18px;
}

.patient-list {
    flex: 1;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow-y: auto;
}

.patient-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.patient-item {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s;
}

.patient-item:hover {
    background-color: #f8f9fa;
}

.patient-item:last-child {
    border-bottom: none;
}

.patient-info-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patient-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.record-id {
    font-size: 13px;
    color: #2196f3;
    font-weight: 500;
}

.patient-id-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.patient-id {
    font-size: 14px;
    color: #666;
}

/* 响应式设计 - 小屏幕时改为上下布局 */
@media (max-width: 768px) {
    .report-analysis-layout {
        flex-direction: column;
        height: auto;
    }
    
    .left-panel,
    .right-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .left-panel {
        height: 50vh;
    }
    
    .right-panel {
        height: 40vh;
    }
}

/* 标签页样式 */
.panel-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    padding: 0 10px;
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background-color: #f0f0f0;
    color: #666;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s;
    font-size: 14px;
}

.tab-btn:hover {
    background-color: #e0e0e0;
}

.tab-btn.active {
    background-color: #3584e4;
    color: white;
}

.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

/* 报告操作按钮 */
.report-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.report-item {
    padding: 12px 15px;
}

.report-item .patient-info-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.report-item .patient-name {
    font-size: 14px;
}

.report-item .patient-id {
    font-size: 12px;
    color: #999;
}

/* 患者列表选中状态 */
.patient-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #3584e4;
}

/* 随访记录列表样式 */
.followup-record-item {
    cursor: pointer;
}

.followup-info-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

.followup-date {
    font-size: 13px;
    color: #666;
}

.visit-type {
    font-size: 12px;
    color: #fff;
    background-color: #4caf50;
    padding: 2px 8px;
    border-radius: 10px;
}

.timepoint {
    font-size: 12px;
    color: #fff;
    background-color: #2196f3;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 分页样式 */
.pagination-container {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
    background-color: #f0f0f0;
    border-color: #999;
}

.page-btn.active {
    background-color: #2196f3;
    border-color: #2196f3;
    color: #fff;
}

.page-btn.disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.page-ellipsis {
    padding: 0 8px;
    color: #999;
}

.page-info {
    margin-left: 15px;
    font-size: 14px;
    color: #666;
}