/* 精简专业表格样式 */
:root {
    --primary: #2C7BE5;
    --border: #E9ECEF;
	border: 1px solid var(--table-border); /* 添加容器边框 */

    --zebra: #F9FBFD;
	    --table-border: #DEE2E6; /* 新增表格边框颜色 */
}
a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
}

/* 分页链接特效 */
.page-link {
    color: #4A5568;
    border: 1px solid #CBD5E0;
    transition-property: color, border-color, transform;
}

.page-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 分页链接悬浮动画 */
.page-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.page-link:hover::after {
    width: calc(100% - 2rem);
}



/* 当前页样式增强 */
.page-link[aria-current] {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}
body {
    font: 12px/1.5 'Segoe UI', system-ui, sans-serif;
    margin: 20px;
    background: #F8F9FA;
}

/* 表格容器 */
.table-wrap {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    background: white;
    overflow-x: auto;
}

/* 专业数据表格 */
.data-table {
    width: 100%;
    min-width: 1024px;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th {
    background: #F8FAFD;
    border-bottom: 2px solid var(--primary);
    padding: 10px 12px;
    text-align: left;
    color: var(--primary);
    white-space: nowrap;
}

.data-table td {
    padding: 8px 12px;
	border-right: 1px solid var(--table-border); /* 添加右侧边框 */
    border-bottom: 1px solid var(--border);
}

/* 斑马纹效果 */
.data-table tr:nth-child(odd) td {
    background: var(--zebra);
}

.data-table tr:hover td {
    background: #F2F4F6;
    cursor: default;
}



/* 筛选面板 */
.filter-panel {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-control {
    padding: 5px 8px;
    border: 1px solid #CED4DA;
    border-radius: 3px;
    font: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white!important;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
}

/* 统计卡片 */
.stats-box {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
	margin-top: 15px;
}

.stat-item {
    background: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-num {
    color: var(--primary);
    font-size: 16px;
    font-weight: bold;
	text-align:center;
    margin-top: 5px;
}

/* 分页样式 */
.pagination {
    margin-top: 15px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

.page-link {
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: #666;
    text-decoration: none;
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}
/* 筛选标签样式 */
.filter-tag {
    position: relative; /* 添加相对定位 */
    display: inline-block;
    padding: 4px 12px;
    border-radius: 5px;
    background: #EDF2F7;
    color: #4A5568;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
    margin: 8px; /* 增加外边距避免重叠 */
    margin-right: 20px; /* 右侧留更多空间 */
}

/* 移除按钮样式 - 右上角小圆点 */
.remove-tag {
    position: absolute;
    top: -8px; /* 定位到容器上方 */
    right: -8px; /* 定位到容器右侧 */
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1; /* 确保在标签上方 */
}

.remove-tag:hover {
    background-color: #E53E3E;
    transform: scale(1.1);
}

.remove-tag:before {
    content: "×"; /* 使用×符号 */
    display: block;
    margin-top: -3px; /* 微调垂直居中 */
}

/* 标签文本样式 */
.tag-label {
    font-weight: 500;
}
.filter-tag:hover {
    background: #E2E8F0;
    color: #2D3748;
    transform: translateY(-1px);
}

.filter-tag.active {
    background: var(--primary);
    color: white !important;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(44, 123, 229, 0.2);
}
/* 关键词弹窗样式 */
.keywords-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 60%;
    max-width: 600px;
    margin: 100px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.keywords-content {
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}
.stat-item.active {
    background: var(--primary);
    color: #fff !important; /* 强制白色文字 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); /* 增加文字阴影 */
}

/* 增强对比度 */
.stat-item.active .stat-num {
    color: rgba(255,255,255,0.95) !important;
    font-weight: 700; /* 加粗字体 */
}

/* 禁用悬停颜色变化 */
.stat-item.active:hover {
    background: var(--primary); /* 保持原色 */
    opacity: 0.95; /* 改用透明度变化 */
}
/* 来院整行高亮 */
.data-table tr.arrived-row td {
    background: #e8f5e9 !important; /* 覆盖斑马纹的浅绿色 */
    border-color: #c8e6c9; /* 调整边框颜色协调 */
}

.data-table tr.arrived-row:hover td {
    background: #c8e6c9 !important; /* 悬停时加深 */
}

/* 左侧标识条 */
.data-table tr.arrived-row {
    position: relative;
}

.data-table tr.arrived-row::before {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4CAF50;
    z-index: 1;}
.contact-label {
    color: #666;
    font-size: 0.9em;
}
.separator {
    color: #999;
    margin: 0 5px;
}
.no-contact {
    color: #999;
    font-style: italic;
}
.no-followup {
    color: #006600;

}
.status-toggle {
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 8px;
    margin: 0 5px;
    background: white;
    transition: all 0.3s;
}
.status-1 { /* 已发状态 */
    color: #dc3545;
    border-color: #dc3545;
}
.status-0 { /* 未发状态 */
    color: #28a745;
    border-color: #28a745;
}
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* 表格容器样式 */
.table-wrap {
    overflow: auto;
    height: calc(100vh - 250px); /* 留出顶部空间 */
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 表格样式 */
.data-table {
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* 表头悬浮 */
.data-table thead th {
    position: sticky;
    top: 0;
    background-color: #2C7BE5;
    color: white;
    z-index: 20;
    font-weight: 500;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #1a2530;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 冻结患者姓名列 */
.data-table tbody td:first-child,
.data-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 15;
    background-color: #f8f9fa;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.data-table thead th:first-child {
    background-color:  #2C7BE5;
    z-index: 25; /* 高于其他元素 */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1), 0 2px 5px rgba(0,0,0,0.1);
}

/* 已反馈行的冻结列特殊样式 */
.data-table tr.has-feedback td:first-child {
    background-color: #e8f5e9;
}

/* 单元格样式 */
.data-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: white;
    white-space: nowrap;
}

/* 列宽优化 */
.data-table th:nth-child(1), .data-table td:nth-child(1) { width: 120px; } /* 就诊ID */
.data-table th:nth-child(2), .data-table td:nth-child(2) { width: 100px; } /* 患者姓名 */
.data-table th:nth-child(3), .data-table td:nth-child(3) { width: 100px; } /* 收费分类 */
.data-table th:nth-child(4), .data-table td:nth-child(4) { width: 180px; } /* 收费项目名称 */
.data-table th:nth-child(5), .data-table td:nth-child(5) { width: 120px; } /* 规格 */
.data-table th:nth-child(6), .data-table td:nth-child(6) { width: 120px; } /* 项目编码 */
.data-table th:nth-child(7), .data-table td:nth-child(7) { width: 80px; }  /* 单价 */
.data-table th:nth-child(8), .data-table td:nth-child(8) { width: 80px; }  /* 单位 */
.data-table th:nth-child(9), .data-table td:nth-child(9) { width: 80px; }  /* 数量 */
.data-table th:nth-child(10), .data-table td:nth-child(10) { width: 100px; } /* 金额 */
/* 其他列宽度根据内容自适应 */

/* 操作列样式 */
.data-table td:last-child {
    position: sticky;
    right: 0;
    background-color: #f8f9fa;
    z-index: 10;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    width: 100px;
    text-align: center;
}

.data-table th:last-child {
    position: sticky;
    right: 0;
    background-color: #2c3e50;
    z-index: 30;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1), 0 2px 5px rgba(0,0,0,0.1);
    width: 100px;
    text-align: center;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1 0 calc(50% - 20px);
    margin: 0 10px;
    margin-bottom: 15px;
    min-width: 250px;
}

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

.info-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px 12px;
    min-height: 38px;
}

.select-control, .textarea-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.textarea-control {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    margin-top: 15px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancel {
    background: #f1f3f5;
    color: #495057;
}

.btn-cancel:hover {
    background: #e9ecef;
}

.btn-submit {
    background: #3498db;
    color: white;
}

.btn-submit:hover {
    background: #2980b9;
}

/* 新增：已反馈记录 */
.data-table tr.has-feedback td {
	background: #e8f5e9 !important; /* 浅绿色背景 */
}

.data-table tr.has-feedback::before {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #4caf50; /* 绿色 */
	z-index: 1;
}
h2.title {
	color: #2c3e50;
	margin: 0 0 25px 0;
	padding-bottom: 15px;
	border-bottom: 2px solid #3498db;
	font-weight: 500;
	text-align:center
}
.record-count {
  font-size: 14px;

  color: #2c3e50;
  padding: 0 15px;
  background-color: #e3f2fd;
  border-radius: 4px;
  border-left: 4px solid #2196f3;
  border-right: 4px solid #2196f3;
}
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 左侧状态说明 */
.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.color-box {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 3px;
}

/* 新增状态说明 */
.legend-item.feedback {
    margin-left: 10px;
}

.color-box.feedback {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
}

/* 按钮样式调整 */
.btn-feedback-view {
    padding: 6px 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* 遮罩层样式 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    text-align: center;
}

.overlay-content {
    max-width: 80%;
    padding: 30px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 10px;
    border: 2px solid #4caf50;
}

.overlay h2 {
    color: #4caf50;
    margin-bottom: 20px;
}

.overlay .btn-close-overlay {
    margin-top: 20px;
    padding: 10px 30px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
}
.table-wrap {
    overflow-x: auto;
    position: relative;
}
.data-table {
    min-width: 100%;
}
.data-table th:last-child,
.data-table td:last-child {
    position: sticky;
    right: 0;
    background-color: #f8f9fa;
    z-index: 10;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}
.data-table th:last-child {
    background-color: #2C7BE5;
    z-index: 20;
}

/* 菜单导航样式 - 使用纯CSS */
.menu-nav {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 0 15px;
  border-radius: 4px;
  background: #e3f2fd;
  border-left: 4px solid #2196f3;
  margin-left: 15px;
  transition: all 0.3s;
}

.menu-nav:hover {
  background: #d0e6ff;
}

.menu-title {
  font-weight: bold;
  color: #2c3e50;
  margin-left: 8px;
  font-size: 15px;
}

/* 纯CSS下拉箭头 */
.nav-icon {
  position: relative;
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #2c3e50;
  transition: all 0.3s;
}


.menu-nav:hover .nav-icon {
  transform: rotate(180deg);
  border-top-color: #2196f3;
}

.menu-nav .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 180px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 10px 0;
  z-index: 100;
  border: 1px solid #e0e0e0;
  margin-top: 5px;
}

.menu-nav:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  display: block;
  padding: 10px 20px;
  text-decoration: none;
  color: #2c3e50;
  transition: background 0.2s;
  font-size: 14px;
}

.dropdown-content a:hover {
  background: #f5f9ff;
  color: #1a73e8;
}

/* 提示文字 */
.menu-nav::after {
  font-size: 12px;
  color: #666;
  margin-left: 5px;
}

/* 新增：状态栏链接样式 */
.status-bar .status-legend .status-link {
    display: inline-block;
    padding: 8px 15px;
    background: #e3f2fd;
    border-radius: 4px;
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
    border: 1px solid #bbdefb;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.status-bar .status-legend .status-link:hover {
    background: #d0e6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: #0d47a1;
}

.status-bar .status-legend .status-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1a73e8;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.status-bar .status-legend .status-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* 新增：菜单导航中的链接样式 */
.dropdown-content a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.2s;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a::before {
    content: "→";
    margin-right: 10px;
    color: #3498db;
    opacity: 0;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background: #f5f9ff;
    color: #1a73e8;
    padding-left: 25px;
}

.dropdown-content a:hover::before {
    opacity: 1;
    margin-right: 15px;
}

/* 添加省略号样式 */
.ellipsis-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: default;
}

/* 添加弹出框样式 */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 2000;
    max-width: 80%;
    max-height: 80vh;
    overflow: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.popup-title {
    font-weight: bold;
    font-size: 18px;
}

.popup-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.popup-content {
    padding: 15px 0;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1999;
}
     h2.title {
            color: #2c3e50;
            margin: 0 0 25px 0;
            padding-bottom: 15px;
            border-bottom: 2px solid #3498db;
            font-weight: 500;
            text-align: center;
        }
        
        .ellipsis-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

/* 空值样式 */
.empty-value {
    color: #999;
    font-style: italic;
}

/* 变更内容行 */
.change-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.change-from {
    color: #e74c3c;
    text-decoration: line-through;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%;
}

.change-to {
    color: #27ae60;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%;
}

.change-arrow {
    color: #7f8c8d;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

.modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    color: white;
    background: ;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 25px;
    right: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}



.modal-body {
    margin: 15px 0;
}

.full-change-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.full-change-from {
    background-color: #fce4e3;
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
}

.full-change-to {
    background-color: #e3f5ee;
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
}

/* 移动端特定样式 */
.mobile .change-container {
    padding: 8px;
    border: 1px solid #e3ebf6;
    border-radius: 8px;
    background: #f8fafd;
}
