/* 操作类型单选按钮样式 */
.operation-type-radio {
    display: flex;
    gap: 30px;
    margin: 15px 0;
    padding: 10px 0;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
    font-weight: 500;
    min-height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.radio-option:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.radio-option input[type="radio"] {
    margin: 0;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option .radio-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* 扣减选项样式 - 绿色 */
.deduct-option input[type="radio"]:checked + .radio-text {
    color: #1aad19;
    font-weight: 700;
}

.deduct-option:has(input[type="radio"]:checked) {
    border-color: #1aad19;
    background: #f0f9f0;
    box-shadow: 0 2px 8px rgba(26, 173, 25, 0.2);
    transform: translateY(-1px);
}

/* 充值选项样式 - 红色 */
.charge-option input[type="radio"]:checked + .radio-text {
    color: #ff4544;
    font-weight: 700;
}

.charge-option:has(input[type="radio"]:checked) {
    border-color: #ff4544;
    background: #fff5f5;
    box-shadow: 0 2px 8px rgba(255, 69, 68, 0.2);
    transform: translateY(-1px);
}

.hospital-patient-list-page {
    width: 100%;
    padding: 20px;
    font-size: 14px;
    min-font-size: 14px;
}

/* 全局字体大小优化 */
.hospital-patient-list-page * {
    font-size: max(14px, 1em);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.page-title {
    font-size: 32px;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title .dashicons {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 10px;
}

.page-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    border: none;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    font-size: 14px;
    border: 1px solid #cbd5e0;
}

.btn-secondary:hover {
    background: #cbd5e0;
    color: #2d3748;
    border-color: #a0aec0;
}

.patient-filters {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.patient-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 15%;
}

.filter-group.search-group {
    flex: 1;
    min-width: 250px;
}

.filter-group.address-filter-group {
    flex: 2;
    min-width: 400px;
}

/* 结算方式和医保类型筛选组样式 */
.filter-group.settlement-filter-group,
.filter-group.insurance-filter-group {
    flex: 1;
}

/* 结算方式和医保类型筛选行样式 */
.settlement-insurance-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 15px;
    justify-content: flex-start;
}

.settlement-insurance-row .filter-group {
    flex: 0 0 auto;
    width: auto;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px;
}

/* 确保选择框样式一致 */
.settlement-insurance-row .filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background-color: white;
}

/* 确保标签样式一致 */
.settlement-insurance-row .filter-group label {
    font-weight: 600;
    color: #666;
    font-size: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
}

/* 科室筛选样式 */
.department-filter-section {
    width: 100%;
    margin-top: 10px;
}

.department-filter-label {
    font-weight: 600;
    color: #666;
    font-size: 15px;
    margin-bottom: 10px;
    display: block;
}

.department-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.department-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
    margin: 0;
}

.department-checkbox:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.department-checkbox input[type="checkbox"] {
    margin: 0;
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.department-checkbox input[type="checkbox"]:checked + .department-name {
    color: #2563eb;
    font-weight: 600;
}

.department-checkbox:has(input[type="checkbox"]:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

.department-name {
    font-size: 14px;
    color: #374151;
    transition: all 0.2s ease;
}

.no-departments {
    color: #9ca3af;
    font-style: italic;
    font-size: 14px;
}

.address-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.address-filter-row select {
    flex: 1;
    min-width: 120px;
}

.address-filter-row select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.filter-group label {
    font-weight: 600;
    color: #666;
    font-size: 15px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
}

.filter-actions-row {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.all-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.all-actions .btn {
    font-size: 15px;
    padding: 8px 16px;
}

.all-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e2e8f0;
}

.all-actions .btn-primary {
    font-size: 16px;
    padding: 8px 20px;
}

.batch-operations {
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.batch-operations-help {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-item {
    font-size: 15px;
    line-height: 1.5;
    color: #4a5568;
}

.help-item strong {
    color: #2d3748;
    font-weight: 600;
}

.patient-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 17px;
}

.stat-item.stat-warning {
    color: #fd7e14;
    font-weight: 600;
}

.stat-label {
    color: #666;
}

.stat-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 18px;
}

.patients-table-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
    min-height: 400px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    width: 100%;
}

.patients-table-container:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.loading .dashicons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.patients-table {
    margin: 0;
    border: none;
    width: 100%;
    table-layout: fixed;
}

.patients-table th {
    padding: 16px 12px;
    vertical-align: middle;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #667eea;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

.patients-table td {
    padding: 16px 12px;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    background: #fff;
}

.column-cb {
    width: 3%;
    text-align: center;
}

.check-column input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

#select-all-patients {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.patient-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.column-patient {
    width: 18%;
}

.column-medical {
    width: 17%;
}

.column-guardian {
    width: 15%;
}

.column-balance {
    width: 14%;
}

.column-time {
    width: 14%;
}

.column-actions {
    width: 15%;
}

.patient-row {
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.patient-row:hover {
    background-color: #f7fafc;
    border-left-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.patient-row:hover td {
    background-color: #f7fafc;
}

.patient-row.patient-discharged {
    opacity: 0.6;
    background-color: #f8f9fa;
}

.patient-row.alert-red {
    border-left-color: #dc3545;
}

.patient-row.alert-orange {
    border-left-color: #fd7e14;
}

.patient-info {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
}

.patient-photo {
    flex-shrink: 0;
}

.patient-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    max-width: 80px !important;
    max-height: 80px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.patient-avatar:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.patient-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #e2e8f0;
    color: #6c757d;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.patient-avatar-placeholder .dashicons {
    font-size: 18px;
}

.patient-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.patient-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.patient-name {
    font-size: 18px;
    color: #2d3748;
    font-weight: 600;
}

.patient-status {
    padding: 0 12px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-admitted {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-discharged {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.patient-tag-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-left: 5px;
    display: inline-block;
}

.alert-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.alert-red {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.alert-orange {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.patient-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.patient-details .patient-id-card {
    flex-basis: 100%;
    width: 100%;
}

.patient-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.patient-details .dashicons {
    font-size: 14px;
}

.medical-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.medical-info>div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.medical-info .dashicons {
    font-size: 14px;
    color: #666;
}

.patient-tag-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.patient-tag-info .dashicons {
    font-size: 14px;
    color: #666;
}

.patient-tag-info .tag-name {
    font-size: 14px;
}

.guardian-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.guardian-contact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guardian-name {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    word-break: keep-all;
    display: inline-block;
}

.guardian-phone {
    color: #666;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    word-break: keep-all;
    display: inline-block;
}

.no-guardian {
    color: #999;
    font-style: italic;
}

.balance-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e9ecef;
    transition: all 0.2s;
}

.balance-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.balance-item.living-fee {
    border-left-color: #667eea;
}

.balance-item.pocket-money {
    border-left-color: #28a745;
}

.balance-label {
    font-size: 15px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance-amount {
    font-weight: 700;
    font-size: 18px;
    color: #2d3748;
}

.balance-amount.balance-red {
    color: #dc3545;
}

.balance-amount.balance-orange {
    color: #fd7e14;
}

.balance-amount.balance-green {
    color: #28a745;
}

.balance-days {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #6c757d;
    margin-top: 8px;
    padding: 6px 10px;
    background: #e3f2fd;
    border-radius: 6px;
    font-weight: 500;
}

.balance-days .dashicons {
    color: #1976d2;
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.time-info>div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-label {
    color: #666;
    font-size: 15px;
}

.time-value {
    color: #2d3748;
    font-weight: 500;
    font-size: 15px;
}

.row-actions {
    font-size: 13px;
}

.row-actions a {
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    font-size: 15px;
}


.action-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    align-items: flex-start !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

.action-item {
    flex: 0 0 calc(50% - 3px);
    max-width: calc(50% - 3px);
    box-sizing: border-box;
}

.action-link {
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    color: #667eea;
    display: block;
    width: 100%;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid transparent;
    white-space: nowrap;
    box-sizing: border-box;
}

.action-link:hover {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-data .dashicons {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-data p {
    font-size: 18px;
    margin: 0;
}

.pagination-container {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pagination-info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 15px;
    text-align: center;
    white-space: nowrap;
}

/* 每页显示条数选择器样式 */
.per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-selector label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.per-page-select {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.per-page-select:hover {
    border-color: #667eea;
}

.per-page-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.displaying-num,
.page-info {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-nav {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    min-width: 36px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.page-btn.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    font-weight: 600;
}

.page-btn.disabled {
    background: #f8f9fa;
    color: #ccc;
    border-color: #e9ecef;
    cursor: not-allowed;
}

.page-dots {
    padding: 8px 4px;
    color: #666;
    font-size: 14px;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.jump-label {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

.page-jump-input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    text-align: center;
    font-size: 14px;
}

.page-jump-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.page-jump-btn {
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 1px solid #667eea;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.page-jump-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    border-color: #5a67d8;
    transform: translateY(-1px);
}

/* 模态框样式 */
.hospital-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.modal-large {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

/* 批量操作模态框样式 */
.batch-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.patient-list {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.patient-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 16px;
    font-size: 14px;
    color: #1976d2;
    position: relative;
    gap: 6px;
}

.patient-tag .remove-patient-tag {
    background: rgba(255, 255, 255, 0.3);
    color: #1976d2;
    border: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
}

.patient-tag .remove-patient-tag:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #d32f2f;
    transform: scale(1.1);
}

.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
}

.form-row input[type="number"],
.form-row input[type="text"],
.form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input[type="number"]:focus,
.form-row input[type="text"]:focus,
.form-row select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-row select {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 30px;
}

/* Radio group styles for transaction and operation types */
.form-row .radio-group {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-top: 8px;
}

.form-row .radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.form-row .radio-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.form-row .radio-option input[type="radio"] {
    margin: 0;
    width: auto;
}

.form-row .radio-option:has(input[type="radio"]:checked) {
    border-color: #007cba;
    background: #e3f2fd;
}

.form-row .radio-option span {
    font-weight: bold;
}

/* Color styles for operation types */
.form-row .charge-option {
    color: #1aad19;
}

.form-row .deduct-option {
    color: #ff4544;
}

/* Payment method group styles */
.form-row .payment-method-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.form-row .payment-method-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 80px;
    justify-content: center;
}

.form-row .payment-method-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.form-row .payment-method-option:has(input[type="radio"]:checked) {
    border-color: #007cba;
    background: #e3f2fd;
    color: #007cba;
    font-weight: bold;
}

.form-row .payment-method-option input[type="radio"] {
    margin: 0;
    width: auto;
}

.form-row .payment-method-option span {
    font-size: 14px;
}

/* Transaction type radio group styles */
.form-row .transaction-type-radio {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 8px;
}

.form-row .transaction-type-radio .radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    min-width: 80px;
    justify-content: center;
}

.form-row .transaction-type-radio .radio-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.form-row .transaction-type-radio .radio-option:has(input[type="radio"]:checked) {
    border-color: #007cba;
    background: #e3f2fd;
    color: #007cba;
    font-weight: bold;
}

.form-row .transaction-type-radio .radio-option input[type="radio"] {
    margin: 0;
    width: auto;
}

.form-row .transaction-type-radio .radio-option span {
    font-size: 14px;
}

.form-row .charge-option:has(input[type="radio"]:checked) {
    border-color: #1aad19;
    background: #f0f9f0;
}

.form-row .deduct-option:has(input[type="radio"]:checked) {
    border-color: #ff4544;
    background: #fff0f0;
}

.form-row .description {
    display: block;
    margin-top: 5px;
    font-size: 14px;
    color: #6c757d;
}

.total-summary {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border-left: 4px solid #28a745;
    font-size: 16px;
}

.total-summary span {
    color: #28a745;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
    height: 44px;
    justify-content: center;
    box-sizing: border-box;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: 1px solid #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.form-actions .btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.form-actions .btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-actions .modal-close {
    background: #6c757d;
    color: #fff;
    border: 1px solid #6c757d;
}

.form-actions .modal-close:hover {
    background: #5a6268;
    color: #fff;
    border-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

/* 新增交易模态框样式 */
.patient-display {
    font-weight: 600;
    color: #1aad19;
    font-size: 16px;
}

.patient-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.patient-name-row label {
    margin-bottom: 0;
    margin-right: 15px;
    flex-shrink: 0;
}

.patient-name-row .patient-display {
    flex: 1;
}

.patient-basic-info {
    margin-bottom: 15px;
}

.patient-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item .info-label {
    font-weight: 600;
    color: #666;
    min-width: 80px;
    margin-right: 0;
}

.info-item .info-value {
    color: #333;
    font-weight: 500;
}

.patient-details-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.patient-details-container .patient-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 24px;
    flex-shrink: 0;
}

.patient-details-container .patient-avatar .patient-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.patient-info-details {
    flex: 1;
}

.patient-admission-time,
.patient-tags,
.patient-balance {
    margin-bottom: 8px;
}

.patient-balance {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.balance-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.patient-balance .balance-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    background: #e8f5e8;
    border-radius: 12px;
    border: 1px solid #c3e6c3;
}

.patient-balance .balance-label {
    font-size: 12px;
    font-weight: 600;
    color: #2d5a2d;
}

.patient-balance .balance-amount {
    font-size: 12px;
    font-weight: 700;
    color: #1e7e34;
}

.info-label {
    font-weight: 600;
    color: #666;
    margin-right: 8px;
}

.info-value {
    color: #333;
}

.patient-tag {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 4px;
}

.tag-admitted {
    background: #d4edda;
    color: #155724;
}

.tag-discharged {
    background: #f8d7da;
    color: #721c24;
}

.tag-department {
    background: #d1ecf1;
    color: #0c5460;
}

.tag-bed {
    background: #fff3cd;
    color: #856404;
}

.tag-balance {
    background: #e8f5e8;
    color: #1e7e34;
    border: 1px solid #c3e6c3;
}

.voucher-upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    border-color: #e2e8f0;
    line-height: 2;
    padding: 10px;
    font-size: 14px;
    color: #777;
}

.form-row .description {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 按钮样式 */
.button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.button:hover {
    background: #f0f0f0;
    border-color: #999;
}

.button-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.button-primary:hover {
    background: #005177;
    border-color: #005177;
    color: #fff;
}

.button-secondary {
    background: #f1f1f1;
    color: #333;
    border-color: #ddd;
}

.button-secondary:hover {
    background: #e1e1e1;
    border-color: #999;
}

.button-link {
    background: none;
    border: none;
    color: #dc3232;
    text-decoration: none;
    padding: 4px 8px;
}

.button-link:hover {
    color: #a00;
    text-decoration: underline;
}

/* 凭据上传样式 */
.voucher-upload-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.voucher-filename {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.voucher-preview-container {
    margin-top: 10px;
}

.voucher-preview {
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8f9fa;
    text-align: center;
    min-height: 60px;
}

#voucher-preview-img {
    max-width: 100%;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#voucher-preview-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
    font-size: 16px;
}

#voucher-preview-pdf .dashicons {
    font-size: 32px;
    color: #dc3545;
}

#voucher-preview-pdf .pdf-filename {
    font-weight: 600;
    color: #333;
}

/* 表单操作按钮样式 */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .button {
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    height: 44px;
    justify-content: center;
    box-sizing: border-box;
}

.form-actions .button-primary {
    background: #0073aa;
    color: #fff;
    border: 1px solid #0073aa;
}

.form-actions .button-primary:hover {
    background: #005177;
    border-color: #005177;
}

.form-actions .button:not(.button-primary) {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.form-actions .button:not(.button-primary):hover {
    background: #e1e1e1;
    border-color: #999;
}

.custom-deduct-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    table-layout: fixed;
}

.custom-deduct-table th,
.custom-deduct-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.custom-deduct-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3748;
}

/* 设置各列的宽度 */
.custom-deduct-table th:nth-child(1),
.custom-deduct-table td:nth-child(1) {
    width: 15%;
    /* 患者姓名 */
}

.custom-deduct-table th:nth-child(2),
.custom-deduct-table td:nth-child(2) {
    width: 20%;
    /* 科室床位 */
}

.custom-deduct-table th:nth-child(3),
.custom-deduct-table td:nth-child(3) {
    width: 35%;
    /* 消费项目 - 加宽 */
}

.custom-deduct-table th:nth-child(4),
.custom-deduct-table td:nth-child(4) {
    width: 18%;
    /* 扣费金额 - 减窄 */
}

.custom-deduct-table th:nth-child(5),
.custom-deduct-table td:nth-child(5) {
    width: 12%;
    /* 操作 */
}

.custom-deduct-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
}

.remove-patient-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.remove-patient-btn:hover {
    background: #c82333;
}

.patients-table-wrapper {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.selected-patients-section h4 {
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 16px;
}

/* 患者搜索区域 */
.patient-search-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.patient-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
}

.search-results {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #fff;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-avatar {
    flex-shrink: 0;
}

.patient-search-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.patient-search-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ddd;
    color: #999;
}

.patient-search-avatar-placeholder .dashicons {
    font-size: 20px;
}

.search-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-name {
    font-weight: 600;
    color: #333;
}

.search-result-details {
    font-size: 14px;
    color: #666;
}

.add-patient-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.add-patient-btn:hover {
    background: #218838;
}

.add-patient-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* 凭据预览样式 */
.voucher-preview {
    margin-top: 10px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #f9f9f9;
    display: none;
    position: relative;
    z-index: 1;
    min-height: 50px;
}

.voucher-preview.show {
    display: block !important;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.preview-title {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.remove-file-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.remove-file-btn:hover {
    background: #c82333;
}

.preview-content {
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

.preview-file {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

.preview-file i {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 10px;
}

.preview-filename {
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

/* 金额提示样式 */
.amount-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.3;
    font-style: italic;
}

/* 响应式设计 */
.patients-table {
    font-size: 14px;
}

.patients-table th,
.patients-table td {
    padding: 10px 8px;
}

@media (max-width: 768px) {
    .operation-type-radio {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .patients-table-container {
        overflow-x: auto;
    }

    .patients-table {
        min-width: 800px;
    }

    .patient-info {
        flex-direction: column;
        gap: 8px;
    }

    .patient-details {
        flex-direction: column;
        gap: 8px;
    }
}