/* 中医药管理系统 PC端样式 */

/* 基础样式 */
body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    padding-top: 50px;
}

/* 顶部导航 */
.tcm-navbar {
    background-color: #fff;
    border-bottom: 1px solid #e7e7e7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tcm-navbar .navbar-brand {
    color: #d4a574 !important;
    font-size: 18px;
    font-weight: bold;
}

.tcm-navbar .navbar-brand i {
    margin-right: 5px;
}

.tcm-navbar .nav > li > a {
    color: #666;
}

.tcm-navbar .nav > li > a:hover {
    color: #d4a574;
    background-color: transparent;
}

/* 主容器 */
.tcm-container {
    padding: 20px;
}

/* 卡片样式 */
.tcm-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.tcm-card-title {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.tcm-card-title i {
    color: #d4a574;
    margin-right: 8px;
}

.tcm-card-body {
    padding: 20px;
}

/* 个人信息页面样式 */
.info-row {
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
}

.info-label {
    color: #999;
    min-width: 120px;
    text-align: right;
    margin-right: 10px;
}

.info-value {
    color: #333;
    flex: 1;
}

/* 页面布局 */
.tcm-page {
    margin: 0 -15px;
}

/* 左侧边栏 */
.tcm-sidebar {
    background-color: #fff;
    min-height: calc(100vh - 90px);
    border-right: 1px solid #e7e7e7;
    padding: 0;
}

.patient-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.patient-header h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.patient-header p {
    margin: 0;
    font-size: 13px;
}

/* 时间轴 */
.timeline {
    padding: 10px 0;
}

.timeline-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: all 0.3s;
}

.timeline-item:hover,
.timeline-item.active {
    background-color: #faf8f5;
}

.timeline-item.active {
    border-left: 3px solid #d4a574;
}

.timeline-date {
    font-size: 14px;
    color: #333;
    font-weight: bold;
    margin-bottom: 5px;
}

.timeline-tag {
    display: inline-block;
    background-color: #d4a574;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 8px;
}

.timeline-info {
    font-size: 12px;
    color: #999;
}

.timeline-info p {
    margin: 0 0 3px 0;
}

/* 右侧内容区 */
.tcm-content {
    padding: 0 20px;
}

.content-header {
    margin-bottom: 20px;
    text-align: right;
}

.content-header .btn {
    margin-left: 10px;
}

/* 表格样式 */
.tcm-table {
    margin-bottom: 0;
}

.tcm-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

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

.tcm-table .label-cell {
    width: 120px;
    color: #999;
    background-color: transparent;
    border: none;
    padding: 12px 15px;
}

.tcm-table .value-cell {
    color: #333;
    border: none;
    padding: 12px 15px;
}

/* 处方卡片 */
.prescription-card {
    margin-top: 20px;
}

.prescription-card .tcm-card-header {
    background-color: #faf8f5;
}

.order-no {
    color: #1890ff;
    margin-right: 15px;
    font-size: 13px;
}

/* 处方头部 */
.prescription-header {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.rp-label {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-right: 15px;
}

.medicine-count {
    color: #666;
    font-size: 14px;
}

/* 药品网格 */
.medicine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.medicine-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #fafafa;
    border-radius: 4px;
}

.medicine-name {
    font-weight: bold;
    color: #333;
    margin-right: 8px;
}

.medicine-dosage {
    color: #666;
}

.medicine-remark {
    margin-left: 8px;
    padding: 2px 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 12px;
    color: #999;
}

/* 处方信息表格 */
.prescription-info {
    margin-top: 20px;
}

.prescription-info .label-cell {
    width: 100px;
}

/* 按钮样式 */
.btn-warning {
    background-color: #d4a574;
    border-color: #d4a574;
}

.btn-warning:hover {
    background-color: #c49464;
    border-color: #c49464;
}

.btn-default {
    border-color: #d9d9d9;
    color: #666;
}

.btn-default:hover {
    border-color: #d4a574;
    color: #d4a574;
}

/* 文字颜色 */
.text-primary {
    color: #1890ff !important;
}

.text-danger {
    color: #f5222d !important;
}

/* 链接样式 */
.btn-link {
    color: #1890ff;
}

.btn-link:hover {
    color: #40a9ff;
}

/* 响应式 */
@media (max-width: 1200px) {
    .medicine-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .medicine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tcm-sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #e7e7e7;
    }
}

@media (max-width: 768px) {
    .medicine-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .info-label {
        text-align: left;
        margin-bottom: 5px;
    }
}

/* ==================== 首页仪表盘样式 ==================== */

.dashboard-card {
    margin-top: 20px;
}

.dashboard-row {
    margin: 0 -10px;
}

.dashboard-item {
    display: flex;
    align-items: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    margin: 0 10px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-item:hover {
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.dashboard-item.patient-item:hover {
    border-color: #52c41a;
}

.dashboard-item.prescription-item:hover {
    border-color: #1890ff;
}

.dashboard-item.medicine-item:hover {
    border-color: #fa8c16;
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.patient-item .dashboard-icon {
    background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
}

.prescription-item .dashboard-icon {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
}

.medicine-item .dashboard-icon {
    background: linear-gradient(135deg, #fa8c16 0%, #ffa940 100%);
}

.dashboard-icon i {
    font-size: 28px;
    color: #fff;
}

.dashboard-info {
    flex: 1;
}

.dashboard-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.dashboard-info p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

.dashboard-count {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.dashboard-arrow {
    color: #ddd;
    font-size: 24px;
    margin-left: 10px;
}

.dashboard-item:hover .dashboard-arrow {
    color: #d4a574;
}

/* 快捷入口 */
.quick-entry-row {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.section-title {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.section-title i {
    color: #d4a574;
    margin-right: 8px;
}

.quick-entry-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.quick-entry-item:hover {
    text-decoration: none;
    background: #f0f0f0;
}

.quick-entry-item i {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #d4a574;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quick-entry-item span {
    font-size: 14px;
    color: #666;
}

.quick-entry-item:hover span {
    color: #d4a574;
}

/* 响应式 */
@media (max-width: 992px) {
    .dashboard-item {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
    }
    
    .dashboard-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .dashboard-arrow {
        display: none;
    }
}

/* ==================== 患者列表样式 ==================== */

.patient-list-card {
    margin-top: 20px;
}

.patient-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.male-stat {
    background: #e6f7ff;
    color: #1890ff;
}

.female-stat {
    background: #fff0f6;
    color: #eb2f96;
}

.gender-section {
    margin-bottom: 30px;
}

.gender-section:last-child {
    margin-bottom: 0;
}

.gender-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.male-title {
    color: #1890ff;
    border-color: #1890ff;
}

.female-title {
    color: #eb2f96;
    border-color: #eb2f96;
}

.gender-count {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin-left: 5px;
}

.patient-cards {
    margin: 0 -10px;
}

.patient-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    margin: 20px 10px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.patient-card:hover {
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.male-card:hover {
    border-color: #1890ff;
}

.female-card:hover {
    border-color: #eb2f96;
}

.patient-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.male-card .patient-avatar {
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
}

.female-card .patient-avatar {
    background: linear-gradient(135deg, #eb2f96 0%, #ff6b9d 100%);
}

.patient-avatar i {
    font-size: 24px;
    color: #fff;
}

.patient-info {
    flex: 1;
    min-width: 0;
}

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

.patient-basic {
    margin: 0 0 8px 0;
}

.gender-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 8px;
}

.male-tag {
    background: #e6f7ff;
    color: #1890ff;
}

.female-tag {
    background: #fff0f6;
    color: #eb2f96;
}

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

.patient-phone,
.patient-address {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.patient-phone i,
.patient-address i {
    margin-right: 5px;
    width: 12px;
}

.patient-arrow {
    color: #ddd;
    font-size: 20px;
    margin-left: 10px;
}

.patient-card:hover .patient-arrow {
    color: #d4a574;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-state p {
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .patient-cards .col-md-3 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .patient-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .patient-cards .col-md-3 {
        width: 100%;
    }
    
    .patient-card {
        margin: 0 0 15px 0;
    }
}

/* 搜索区域 */
.search-area {
    background: #fafafa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.search-area .form-control {
    border: 1px solid #d9d9d9;
    height: 36px;
}

.search-area .form-control:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.2);
}

.btn-search {
    background: #d4a574;
    border-color: #d4a574;
    color: #fff;
}

.btn-search:hover {
    background: #c49464;
    border-color: #c49464;
    color: #fff;
}

.btn-reset {
    margin-left: 10px;
}

/* 病历号样式 */
.patient-recordno {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #1890ff;
    font-weight: 500;
}

.patient-recordno i {
    margin-right: 5px;
    color: #999;
}

.total-stat {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* 头部操作按钮 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-add {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

.btn-add:hover {
    background: #73d13d;
    border-color: #73d13d;
    color: #fff;
}

/* 卡片结构 */
.patient-card {
    display: block;
    padding: 0;
    overflow: hidden;
}

.card-main-link {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.card-main-link:hover {
    text-decoration: none;
    color: inherit;
}

.card-actions {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.btn-medical {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-medical:hover {
    background: #d4a574;
    border-color: #d4a574;
    color: #fff;
    text-decoration: none;
}

.btn-medical i {
    margin-right: 5px;
}

/* ==================== 添加患者表单样式 ==================== */

.add-patient-card {
    margin-top: 20px;
}

.patient-form {
    padding: 10px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.section-title:first-of-type {
    margin-top: 0;
}

.section-title i {
    color: #d4a574;
    margin-right: 8px;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.form-label .required {
    color: #f5222d;
    margin-left: 4px;
}

.form-control {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    height: 40px;
    padding: 8px 12px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 2px rgba(212, 165, 116, 0.2);
    outline: none;
}

textarea.form-control {
    height: auto;
    resize: vertical;
}

.form-group {
    margin-bottom: 20px;
}

.form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.form-actions .btn {
    margin: 0 10px;
    padding: 10px 30px;
    font-size: 14px;
}

.btn-submit {
    background: #d4a574;
    border-color: #d4a574;
    color: #fff;
}

.btn-submit:hover {
    background: #c49464;
    border-color: #c49464;
    color: #fff;
}

.btn-cancel:hover {
    border-color: #d4a574;
    color: #d4a574;
}

/* ==================== 新版添加患者表单样式 ==================== */

.add-patient-card .tcm-card-body {
    padding: 30px;
}

.form-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.form-section:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.section-header {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e8e8e8;
}

.section-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4a574 0%, #c49464 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fff;
    font-size: 18px;
}

.section-icon.blue {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
}

.section-icon.green {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
}

.section-icon.orange {
    background: linear-gradient(135deg, #fa8c16 0%, #d46b08 100%);
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.section-body {
    padding: 25px;
}

.form-item {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    margin-bottom: 10px;
}

.form-label.required::after {
    content: '*';
    color: #f5222d;
    margin-left: 4px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: #999;
    font-size: 14px;
    z-index: 10;
}

.input-group .form-control {
    padding-left: 38px;
    height: 42px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    width: 100%;
}

.input-group .form-control:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
    outline: none;
}

.input-unit {
    position: absolute;
    right: 12px;
    color: #999;
    font-size: 13px;
}

/* 性别选择器 */
.gender-selector {
    display: flex;
    gap: 15px;
}

.gender-option {
    flex: 1;
    cursor: pointer;
}

.gender-option input {
    display: none;
}

.gender-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
    background: #fff;
}

.gender-btn i {
    margin-right: 6px;
    font-size: 16px;
}

.gender-btn.male i {
    color: #1890ff;
}

.gender-btn.female i {
    color: #eb2f96;
}

.gender-btn:hover {
    border-color: #d9d9d9;
    background: #fafafa;
}

.gender-option input:checked + .gender-btn.male {
    border-color: #1890ff;
    background: #e6f7ff;
    color: #1890ff;
}

.gender-option input:checked + .gender-btn.female {
    border-color: #eb2f96;
    background: #fff0f6;
    color: #eb2f96;
}

.gender-btn.selected {
    border-width: 2px;
}

/* 下拉框样式 */
.form-control select,
select.form-control {
    height: 42px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 14px;
    width: 100%;
    background: #fff;
    cursor: pointer;
}

.form-control select:focus,
select.form-control:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
    outline: none;
}

/* 文本域样式 */
textarea.form-control {
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    width: 100%;
    resize: vertical;
    min-height: 80px;
}

textarea.form-control:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.15);
    outline: none;
}

/* 文件上传 */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-label i {
    margin-right: 8px;
    color: #d4a574;
}

.file-label:hover {
    border-color: #d4a574;
    color: #d4a574;
    background: #fff7f0;
}

/* 操作按钮 */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 30px;
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.form-actions .btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 35px;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.form-actions .btn i {
    margin-right: 8px;
    font-size: 16px;
}

.btn-save {
    background: linear-gradient(135deg, #d4a574 0%, #c49464 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.35);
}

.btn-save:hover {
    background: linear-gradient(135deg, #c49464 0%, #b48454 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 165, 116, 0.45);
    color: #fff;
}

.btn-reset {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-reset:hover {
    background: #e8e8e8;
    color: #333;
}

.btn-cancel {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-cancel:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

/* 只读输入框 */
input[readonly] {
    background: #f5f5f5 !important;
    color: #999 !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .add-patient-card .tcm-card-body {
        padding: 15px;
    }
    
    .section-body {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 处方管理样式 ==================== */

/* 处方列表卡片 */
.prescription-list-card {
    margin-top: 20px;
}

.prescription-cards {
    margin: 0 -10px;
}

.prescription-item {
    padding: 0 10px;
    margin-bottom: 20px;
}

.prescription-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.prescription-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-main-link {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.card-main-link:hover {
    text-decoration: none;
    color: inherit;
}

.prescription-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #d4a574 0%, #c49464 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #fff;
    font-size: 24px;
}

.prescription-info {
    flex: 1;
    min-width: 0;
}

.prescription-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.prescription-no {
    font-size: 12px;
    color: #1890ff;
    margin: 0 0 6px 0;
}

.prescription-no i {
    color: #999;
    margin-right: 4px;
}

.prescription-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prescription-meta {
    display: flex;
    gap: 15px;
}

.meta-item {
    font-size: 12px;
    color: #999;
}

.meta-item i {
    margin-right: 4px;
}

.prescription-arrow {
    color: #ccc;
    font-size: 20px;
}

.card-actions {
    padding: 12px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.btn-edit {
    display: inline-flex;
    align-items: center;
    padding: 6px 20px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: #d4a574;
    border-color: #d4a574;
    color: #fff;
    text-decoration: none;
}

.btn-edit i {
    margin-right: 5px;
}

/* 处方详情样式 */
.prescription-detail-card {
    margin-top: 20px;
}

.prescription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e8e8e8;
    margin: -20px -25px 25px -25px;
}

.prescription-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.prescription-title i {
    color: #d4a574;
    margin-right: 10px;
    font-size: 22px;
}

.prescription-type {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-left: 8px;
}

.prescription-no {
    font-size: 14px;
}

.no-label {
    color: #666;
}

.no-value {
    color: #1890ff;
    font-family: monospace;
}

/* 药品列表 */
.medicine-list-section {
    margin-bottom: 30px;
}

.medicine-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.rp-label {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-right: 15px;
}

.medicine-count {
    font-size: 14px;
    color: #666;
}

.medicine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.medicine-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fafafa;
    border-radius: 8px;
    font-size: 14px;
}

.medicine-name {
    font-weight: 500;
    color: #333;
    margin-right: 8px;
}

.medicine-dosage {
    color: #666;
}

.medicine-remark {
    margin-left: 8px;
    padding: 2px 8px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 12px;
    color: #999;
}

/* 处方备注 */
.prescription-remark {
    margin-bottom: 30px;
    padding: 20px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
}

.remark-label {
    font-size: 14px;
    font-weight: 600;
    color: #d48806;
    margin-bottom: 10px;
}

.remark-label i {
    margin-right: 6px;
}

.remark-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 处方信息 */
.prescription-info-section {
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.prescription-info-section .info-item {
    font-size: 13px;
}

.prescription-info-section .info-label {
    color: #999;
}

.prescription-info-section .info-value {
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
}

.status-normal {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.status-disabled {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffa39e;
}

/* 新增处方表单 */
.add-prescription-card {
    margin-top: 20px;
}

.add-prescription-card .form-section {
    margin-bottom: 25px;
}

.add-prescription-card .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-add-medicine {
    padding: 6px 15px;
    background: #52c41a;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-medicine:hover {
    background: #73d13d;
}

.btn-add-medicine i {
    margin-right: 5px;
}

/* 药品表格 */
.medicine-table-wrapper {
    overflow-x: auto;
}

.medicine-table {
    width: 100%;
    border-collapse: collapse;
}

.medicine-table th {
    padding: 12px 15px;
    background: #fafafa;
    border-bottom: 2px solid #e8e8e8;
    font-weight: 600;
    color: #333;
    text-align: left;
    font-size: 14px;
}

.medicine-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.medicine-table .row-num {
    color: #999;
    font-size: 13px;
    text-align: center;
}

.medicine-table .form-control {
    height: 36px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 13px;
    width: 100%;
}

.medicine-table .form-control:focus {
    border-color: #d4a574;
    outline: none;
}

.btn-delete-row {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff1f0;
    color: #ff4d4f;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete-row:hover {
    background: #ff4d4f;
    color: #fff;
}

/* 响应式 */
@media (max-width: 1200px) {
    .medicine-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .medicine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prescription-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .medicine-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 首页居中样式 ==================== */

.home-dashboard {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
    padding-top: 15vh;
}

.home-dashboard > .col-md-12 {
    display: flex;
    justify-content: center;
}

.dashboard-wrapper {
    display: flex;
    gap: 60px;
    justify-content: center;
    align-items: flex-start;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 320px;
    height: 380px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    padding-top: 60px;
}

.dashboard-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-decoration: none;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
}

.patient-card::before {
    background: linear-gradient(90deg, #1890ff, #36cfc9);
}

.prescription-card::before {
    background: linear-gradient(90deg, #d4a574, #c49464);
}

.card-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 30px;
    transition: all 0.4s ease;
}

.patient-card .card-icon {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    color: #1890ff;
}

.prescription-card .card-icon {
    background: linear-gradient(135deg, #fff7e6 0%, #ffe7ba 100%);
    color: #d4a574;
}

.dashboard-card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.card-desc {
    font-size: 15px;
    color: #666;
    text-align: center;
    padding: 0 30px;
    line-height: 1.6;
}

.card-arrow {
    position: absolute;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.patient-card .card-arrow {
    background: linear-gradient(135deg, #1890ff, #36cfc9);
}

.prescription-card .card-arrow {
    background: linear-gradient(135deg, #d4a574, #c49464);
}

.dashboard-card:hover .card-arrow {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式 */
@media (max-width: 768px) {
    .home-dashboard {
        height: auto;
        padding: 40px 20px;
    }
    
    .dashboard-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    
    .dashboard-card {
        width: 100%;
        max-width: 320px;
        height: 300px;
    }
}

/* ==================== 病历详情页处方样式 ==================== */

.prescription-section {
    margin-top: 20px;
}

.prescription-section .tcm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.prescription-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prescription-header-left i {
    color: #d4a574;
    font-size: 20px;
}

.prescription-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.prescription-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.prescription-no {
    font-size: 13px;
    color: #1890ff;
    font-family: monospace;
}

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

.btn-save-template {
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
}

.btn-save-template:hover {
    background: #f5f5f5;
    border-color: #d9d9d9;
    color: #333;
}

.btn-save-template i {
    color: #faad14;
}

/* 药品列表 */
.prescription-section .medicine-list-section {
    margin-bottom: 25px;
}

.prescription-section .medicine-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.prescription-section .rp-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-right: 15px;
}

.prescription-section .medicine-count {
    font-size: 14px;
    color: #666;
}

.prescription-section .medicine-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.prescription-section .medicine-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px 0;
    font-size: 14px;
}

.prescription-section .medicine-name {
    color: #333;
    font-weight: 500;
}

.prescription-section .medicine-dosage {
    color: #666;
}

.medicine-remark-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #fff7e6;
    border: 1px solid #ffd591;
    border-radius: 4px;
    font-size: 12px;
    color: #d48806;
}

/* 处方信息表格 */
.prescription-info-table {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.prescription-info-table .table {
    margin-bottom: 0;
}

.prescription-info-table .table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

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

.prescription-info-table .info-label {
    width: 80px;
    padding: 12px 15px;
    background: #fafafa;
    color: #666;
    font-size: 14px;
    border: none;
}

.prescription-info-table .info-value {
    padding: 12px 15px;
    color: #333;
    font-size: 14px;
    border: none;
}

.prescription-info-table .price-value {
    color: #ff4d4f;
    font-weight: 600;
    font-size: 16px;
}

/* 响应式 */
@media (max-width: 1200px) {
    .prescription-section .medicine-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .prescription-section .medicine-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prescription-section .tcm-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .prescription-header-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .prescription-section .medicine-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 病历详情页独立滚动样式 ==================== */

.medical-record-page {
    display: flex;
    margin: 0;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.medical-record-page > .col-md-3,
.medical-record-page > .col-md-9 {
    padding: 0;
    float: none;
}

/* 左侧侧边栏 */
.sidebar-left {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-right: 1px solid #e8e8e8;
}

.patient-header-fixed {
    padding: 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.patient-header-fixed h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.patient-header-fixed p {
    margin: 0;
    font-size: 13px;
}

/* 时间轴可滚动区域 */
.timeline-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.timeline-scrollable::-webkit-scrollbar {
    width: 6px;
}

.timeline-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.timeline-scrollable::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.timeline-scrollable::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 右侧内容区 */
.content-right {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.content-right::-webkit-scrollbar {
    width: 8px;
}

.content-right::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.content-right::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.content-right::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.content-right .content-header {
    margin-bottom: 20px;
}

.content-right .tcm-card {
    margin-bottom: 20px;
}

/* 响应式 */
@media (max-width: 992px) {
    .medical-record-page {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .sidebar-left {
        height: auto;
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .content-right {
        height: auto;
        overflow: visible;
    }
}
