.approval-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}
.approval-page-header h2 {
    margin: 0;
    font-weight: 600;
    color: #2a3f54;
}
#internal-approval-table thead th,
#internal-approval-area-table thead th {
    vertical-align: top;
    text-align: left;
}
.approval-col-filter {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    font-weight: normal;
    min-width: 0;
}
#internal-approval-area-table thead th.approval-filter-th {
    vertical-align: top;
    text-align: left;
    white-space: normal;
}
#internal-approval-area-table .approval-th-label {
    display: block;
    line-height: 22px;
    height: 22px;
    font-weight: 600;
    white-space: nowrap;
}
#internal-approval-area-table .approval-col-filter,
#internal-approval-area-table .select2-container {
    display: block !important;
    width: 50% !important;
    margin: 6px 0 0 !important;
    min-width: 0;
    font-weight: normal;
}
#internal-approval-area-table .select2-container .select2-selection--single {
    height: 34px;
}
#internal-approval-area-table .select2-container .select2-selection__rendered {
    line-height: 32px;
}
#internal-approval-area-table .select2-container .select2-selection__arrow {
    height: 32px;
}
#internal-approval-table .select2-container,
#internal-approval-area-table .select2-container {
    margin-top: 6px;
    font-weight: normal;
    min-width: 120px;
}
.approval-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.approval-scope-tabs .btn {
    border-radius: 20px;
    padding: 6px 16px;
    border: 1px solid #d0d7de;
    background: #fff;
    color: #57606a;
}
.approval-scope-tabs .btn.active {
    background: #2f80ed;
    border-color: #2f80ed;
    color: #fff;
    box-shadow: 0 2px 6px rgba(47, 128, 237, 0.35);
}
.approval-hint {
    background: linear-gradient(90deg, #f0f9ff 0%, #f6fbff 100%);
    border: 1px solid #cfe2fa;
    border-radius: 8px;
    padding: 12px 16px;
    color: #334;
    margin-bottom: 16px;
}
.approval-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px 16px;
    margin-bottom: 16px;
}
.approval-detail-meta .meta-item {
    background: #f8fafc;
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid #e8eef3;
}
.approval-detail-meta .meta-label {
    font-size: 12px;
    color: #8899a6;
    margin-bottom: 4px;
}
.approval-detail-meta .meta-value {
    font-weight: 600;
    color: #2a3f54;
    word-break: break-all;
}
.approval-timeline {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    position: relative;
}
.approval-timeline:before {
    content: '';
    position: absolute;
    left: 14px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #dfe6ec;
}
.approval-timeline li {
    position: relative;
    padding: 0 0 16px 40px;
}
.approval-timeline .dot {
    position: absolute;
    left: 8px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #cbd5e0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e0;
}
.approval-timeline li.state-active .dot { background: #f0ad4e; box-shadow: 0 0 0 1px #f0ad4e; }
.approval-timeline li.state-done .dot { background: #2f80ed; box-shadow: 0 0 0 1px #2f80ed; }
.approval-timeline li.state-reject .dot { background: #e74c3c; box-shadow: 0 0 0 1px #e74c3c; }
.approval-timeline li.state-transfer { padding-left: 48px; }
.approval-timeline li.state-transfer .dot {
    width: 10px;
    height: 10px;
    left: 10px;
    top: 6px;
    background: #b0bec5;
}
.approval-timeline .timeline-transfer { color: #8899a6; font-weight: normal; font-size: 13px; }
.approval-timeline .node-title { font-weight: 600; color: #2a3f54; }
.approval-timeline .node-sub { font-size: 12px; color: #8899a6; margin-top: 2px; }
.approval-comment-list {
    max-height: 200px;
    overflow-y: auto;
    background: #fafbfc;
    border: 1px solid #e8eef3;
    border-radius: 8px;
    padding: 10px 12px;
}
.approval-comment-item {
    padding: 8px 0;
    border-bottom: 1px dashed #e8eef3;
}
.approval-comment-item:last-child { border-bottom: none; }
.approval-content-panel {
    margin-top: 20px;
    border: 1px solid #b8d4e8;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(42, 63, 84, 0.08);
    background: linear-gradient(180deg, #f0f7ff 0%, #fafcff 100%);
}
.approval-content-panel-head {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1a5276;
    background: linear-gradient(90deg, #d6ebff 0%, #e8f4fc 100%);
    border-bottom: 1px solid #b8d4e8;
    letter-spacing: 0.02em;
}
.approval-content-panel-head .fa {
    margin-right: 8px;
    color: #2980b9;
}
.approval-content-box {
    background: #fff;
    padding: 16px 18px;
    max-height: 320px;
    overflow: auto;
    font-size: 13px;
    line-height: 1.65;
    color: #2c3e50;
}
.approval-content-section-title {
    margin: 14px 0 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #1a5276;
    background: #eef6fc;
    border-left: 4px solid #3498db;
    border-radius: 0 6px 6px 0;
}
.approval-content-section-title:first-child {
    margin-top: 0;
}
.approval-content-line {
    padding: 3px 0 3px 4px;
    white-space: pre-wrap;
    word-break: break-word;
    border-bottom: 1px dashed #eef2f6;
}
.approval-content-line:last-child {
    border-bottom: none;
}
.approval-content-gap {
    height: 6px;
}
.approval-content-empty {
    color: #8899a6;
    font-style: italic;
    padding: 8px 0;
}
.approval-content-box--policy-modify {
    max-height: 520px;
}
.policy-modify-detail .approval-content-section-title {
    margin-top: 16px;
}
.policy-modify-diff-row {
    margin-bottom: 14px;
    border: 1px solid #e3ecf3;
    border-radius: 8px;
    overflow: hidden;
    background: #fafdff;
}
.policy-modify-diff-label {
    padding: 8px 12px;
    font-weight: 600;
    color: #1a5276;
    background: #eef6fc;
    border-bottom: 1px solid #dce8f0;
}
.policy-modify-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #c0392b;
    background: #fdecea;
    border-radius: 10px;
    vertical-align: middle;
}
.policy-modify-diff-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
@media (max-width: 768px) {
    .policy-modify-diff-cols {
        grid-template-columns: 1fr;
    }
}
.policy-modify-diff-col {
    min-width: 0;
    border-right: 1px solid #e8eef3;
}
.policy-modify-diff-col:last-child {
    border-right: none;
}
.policy-modify-diff-head {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #57606a;
}
.policy-modify-before .policy-modify-diff-head {
    background: #f6f8fa;
    color: #6a737d;
}
.policy-modify-after .policy-modify-diff-head {
    background: #f1f8ff;
    color: #22863a;
}
.policy-modify-diff-body {
    padding: 10px 12px 12px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.55;
    color: #2c3e50;
    max-height: 240px;
    overflow: auto;
}
.policy-modify-after .policy-modify-diff-body {
    background: #fcfffe;
}
.approval-detail-footer .btn { min-width: 88px; }
.label-status-running { background: #f0ad4e; }
.label-status-approved { background: #2f80ed; }
.label-status-rejected { background: #e74c3c; }
.approver-tag {
    display: inline-block;
    margin: 4px 6px 4px 0;
    padding: 6px 10px;
    background: #eef6ff;
    border: 1px solid #cce0f5;
    border-radius: 16px;
    font-size: 13px;
    color: #2a3f54;
}
.approver-tag .remove-tag {
    margin-left: 8px;
    cursor: pointer;
    color: #c0392b;
    font-weight: bold;
}
.approver-tag .remove-tag:hover { color: #922b21; }

/* 审批人配置：已选审批人按「流程链」展示（序号节点 → 下一节点 → 审批完成） */
.approval-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    background: #f8fcfa;
    border: 1px dashed #cfe2fa;
    border-radius: 8px;
}
.approval-flow-empty {
    font-size: 13px;
    color: #8899a6;
}
.approval-flow-node {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px 4px 4px;
    background: #fff;
    border: 1px solid #cfe2fa;
    border-radius: 18px;
    box-shadow: 0 1px 3px rgba(42, 63, 84, 0.08);
    font-size: 13px;
    color: #2a3f54;
    max-width: 100%;
}
.approval-flow-step {
    flex: none;
    width: 20px;
    height: 20px;
    line-height: 20px;
    margin-right: 6px;
    border-radius: 50%;
    background: #2f80ed;
    color: #fff;
    font-size: 12px;
    text-align: center;
}
.approval-flow-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.approval-flow-actions {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}
.approval-flow-actions i {
    margin-left: 5px;
    font-size: 12px;
    color: #b0bec5;
    cursor: pointer;
}
.approval-flow-actions i:hover { color: #2f80ed; }
.approval-flow-actions i.flow-remove:hover { color: #e74c3c; }
.approval-flow-arrow {
    margin: 0 6px;
    font-size: 14px;
    color: #b6c6d2;
}
.approval-flow-end {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px dashed #cfd8dc;
    border-radius: 18px;
    background: #f4f7f9;
    color: #78899a;
    font-size: 13px;
}
.approval-flow-end i { margin-right: 4px; }

/* 企业列表里的流程缩略图 */
.approval-flow-mini {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
}
.approval-flow-mini .mini-node {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px 2px 2px;
    border: 1px solid #d9e8fb;
    border-radius: 12px;
    background: #f4f9ff;
    font-size: 12px;
    color: #2a3f54;
}
.approval-flow-mini .mini-step {
    flex: none;
    width: 16px;
    height: 16px;
    line-height: 16px;
    margin-right: 4px;
    border-radius: 50%;
    background: #2f80ed;
    color: #fff;
    font-size: 11px;
    text-align: center;
}
.approval-flow-mini .mini-arrow {
    margin: 0 4px;
    font-size: 12px;
    color: #b6c6d2;
}
#internal-detail-modal .modal-body h5 {
    font-weight: 600;
    color: #2a3f54;
    margin: 18px 0 10px;
}
#internal-detail-modal .modal-body h5:first-child { margin-top: 0; }

/* 打款状态二态切换 */
.pay-status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pay-status-toggle .pay-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 20px;
    border: 1px solid #d0d7de;
    background: #f7f9fb;
    color: #57606a;
    cursor: pointer;
    outline: none;
    transition: all .18s ease;
    white-space: nowrap;
}
.pay-status-toggle .pay-opt i {
    font-size: 14px;
    transition: inherit;
}
.pay-status-toggle .pay-opt:hover {
    border-color: #aebbc7;
    background: #eef1f4;
}
.pay-status-toggle .pay-opt.pay-success.active {
    background: linear-gradient(135deg, #2f80ed 0%, #1c6dd0 100%);
    border-color: #1c6dd0;
    color: #fff;
    box-shadow: 0 3px 8px rgba(31, 111, 208, 0.35);
}
.pay-status-toggle .pay-opt.pay-success.active:hover {
    background: linear-gradient(135deg, #1c6dd0 0%, #1c6dd0 100%);
}
.pay-status-toggle .pay-opt.pay-fail.active {
    background: linear-gradient(135deg, #f27474 0%, #e74c3c 100%);
    border-color: #e74c3c;
    color: #fff;
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.35);
}
.pay-status-toggle .pay-opt.pay-fail.active:hover {
    background: linear-gradient(135deg, #e95f5f 0%, #d43f30 100%);
}
.pay-status-toggle.locked .pay-opt {
    cursor: not-allowed;
}
.pay-status-toggle.locked .pay-opt:not(.active) {
    opacity: 0.45;
}

/* 打款弹窗收款账户 */
.pay-bank-cell {
    font-size: 12px;
    line-height: 1.55;
    min-width: 150px;
}
.pay-bank-cell .pay-bank-supplier {
    font-weight: 700;
    color: #1a5276;
}
.pay-bank-cell .pay-bank-name {
    font-weight: 600;
    color: #2a3f54;
}
.pay-bank-cell .pay-bank-bank {
    color: #57606a;
}
.pay-bank-cell .pay-bank-no {
    color: #1a5276;
    letter-spacing: 0.02em;
}
.pay-bank-cell .pay-bank-add {
    color: #8899a6;
}

/* 打款弹窗表格：单元格垂直居中 */
#internal-pay-body table th,
#internal-pay-body table td {
    vertical-align: middle;
}

/* 详情 / 处理弹窗：明细表格支持左右滑动（列多时不再挤压） */
.fee-detail-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.fee-detail-table {
    margin-bottom: 0;
}
/* 明细表格所有单元格（含表头）水平+垂直居中；!important 用于覆盖 Bootstrap 的 .table>tbody>tr>td 默认顶对齐 */
#internal-detail-body .fee-detail-table th,
#internal-detail-body .fee-detail-table td {
    white-space: nowrap;
    text-align: center;
    vertical-align: middle !important;
}
/* 说明 / 备注允许换行，避免长文本把表格撑得过宽 */
.fee-detail-table td.fee-detail-desc {
    white-space: normal;
    min-width: 110px;
    max-width: 200px;
    word-break: break-all;
}
/* 合并明细表：车费行的「车费」标记 */
#internal-detail-body .fee-detail-table .fee-detail-kind {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    border-radius: 3px;
    background: #eaf4fc;
    color: #1a5276;
    font-size: 12px;
    line-height: 1.5;
}

/* 人员明细：首列供应商（合并单元格） */
#internal-detail-body table td.fee-supplier-cell--name {
    background: #f7fbff;
    border-right: 2px solid #cfe2f3;
    min-width: 110px;
    max-width: 160px;
    white-space: normal;
}
/* 人员明细：末列供应商打款合计（合并单元格） */
#internal-detail-body table td.fee-supplier-cell--total {
    background: #f4f9ff;
    border-left: 2px solid #d5e5fb;
    min-width: 130px;
    white-space: normal;
}
.fee-supplier-cell .fee-supplier-name {
    font-weight: 700;
    color: #1a5276;
    font-size: 13px;
    word-break: break-all;
}
/* 审批中：一键把该供应商的期望打款金额清 0 */
#internal-detail-body .fee-expect-clear-btn {
    display: block;
    width: 100%;
    margin: 4px 0 0;
    padding: 1px 6px;
    border: 1px solid #f0c2c2;
    border-radius: 3px;
    background: #fff;
    color: #c0392b;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.6;
    cursor: pointer;
    white-space: nowrap;
}
#internal-detail-body .fee-expect-clear-btn:hover {
    background: #fdf0f0;
}
.fee-supplier-cell .fee-supplier-stat {
    font-size: 12px;
    color: #57606a;
    line-height: 1.6;
}
.fee-supplier-cell .fee-supplier-stat--pay {
    color: #1c6dd0;
    font-weight: 600;
}
.fee-supplier-cell .fee-supplier-meta {
    font-size: 12px;
    color: #8899a6;
    margin-top: 2px;
}

/* 详情弹窗标题旁的打印按钮 */
#internal-detail-modal .internal-print-btn {
    float: right;
    margin: 0 16px 0 0;
    padding: 2px 10px;
    font-size: 12px;
}

/* 供应商末列：发票数量 + 查看/上传 */
#internal-detail-body .fee-invoice-box {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #d5e5fb;
    text-align: left;
}
#internal-detail-body .fee-invoice-box.is-uploading {
    opacity: .55;
}
#internal-detail-body .fee-invoice-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#internal-detail-body .fee-invoice-count {
    font-size: 12px;
    color: #57606a;
    white-space: nowrap;
}
#internal-detail-body .fee-invoice-actions {
    display: flex;
    align-items: center;
}
#internal-detail-body .fee-invoice-btn {
    margin: 0 0 0 6px;
    padding: 1px 8px;
    border: 1px solid #bdd6f5;
    border-radius: 3px;
    background: #fff;
    color: #1c6dd0;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.6;
    cursor: pointer;
    white-space: nowrap;
}
#internal-detail-body .fee-invoice-btn:hover {
    background: #eaf3fe;
}
#internal-detail-body .fee-invoice-btn[disabled] {
    border-color: #dde5e9;
    color: #a5b1bb;
    background: #f7f9fa;
    cursor: not-allowed;
}
#internal-detail-body .fee-invoice-upload {
    display: inline-block;
}
#internal-detail-body .fee-invoice-upload input[type=file] {
    display: none;
}
#internal-detail-body .fee-invoice-empty {
    margin-top: 4px;
    font-size: 12px;
    color: #a5b1bb;
}
#internal-detail-body .fee-invoice-brief {
    margin-top: 4px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #8899a6;
}

/* 发票查看弹窗：同一供应商的多张发票在同一弹窗内平铺展示 */
#internal-invoice-view-modal .invoice-view-body {
    max-height: 70vh;
    overflow-y: auto;
}
#internal-invoice-view-modal .invoice-view-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -6px;
}
#internal-invoice-view-modal .invoice-view-card {
    width: 48%;
    margin: 0 1% 12px;
    padding: 8px;
    border: 1px solid #e3e9ef;
    border-radius: 4px;
    background: #fafdff;
    box-sizing: border-box;
}
#internal-invoice-view-modal .invoice-view-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    border: 1px solid #eef2f5;
    background: #fff;
}
#internal-invoice-view-modal .invoice-view-thumb img {
    max-width: 100%;
    max-height: 296px;
}
#internal-invoice-view-modal .invoice-view-frame {
    display: block;
    width: 100%;
    height: 300px;
    border: 1px solid #eef2f5;
    background: #fff;
}
#internal-invoice-view-modal .invoice-view-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    border: 1px dashed #dbe7f8;
    background: #fff;
    color: #5b6b7a;
}
#internal-invoice-view-modal .invoice-view-file i {
    font-size: 32px;
    margin-bottom: 6px;
    color: #b3c2cc;
}
#internal-invoice-view-modal .invoice-view-meta {
    display: flex;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
    color: #8899a6;
}
#internal-invoice-view-modal .invoice-view-name {
    flex: 1;
    min-width: 0;
    margin-right: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#internal-invoice-view-modal .invoice-view-meta span {
    margin-right: 6px;
    white-space: nowrap;
}
#internal-invoice-view-modal .invoice-view-del {
    color: #c0392b;
}
#internal-invoice-view-modal .invoice-view-empty {
    padding: 36px 0;
    text-align: center;
    color: #a5b1bb;
}

/* 审批人配置：同一企业按审批类型逐行展示审批链 */
.approval-type-flow-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.approval-type-flow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.approval-type-badge {
    flex: none;
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: #eef6ff;
    border: 1px solid #cfe2fa;
    color: #1a5276;
    font-size: 12px;
    line-height: 18px;
    white-space: nowrap;
}
.approval-type-badge.is-default {
    background: #f4f7f9;
    border-color: #d9e2e8;
    color: #57606a;
}
