/* ============================================================
   验收报告模块（票据管理页签）样式，前缀 ac
   ============================================================ */
.ac-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #ece7de; flex-wrap: wrap; }
.ac-search { display: flex; gap: 8px; align-items: center; }
.ac-search .form-input { width: 300px; }
.ac-empty { padding: 42px 16px; text-align: center; color: #a9a49a; font-size: 13px; }
.ac-table-wrap { overflow: auto; }
.ac-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ac-table th { background: #faf8f4; color: #6b6860; font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid #e8e3da; white-space: nowrap; }
.ac-table td { padding: 7px 10px; border-bottom: 1px solid #f2eee6; color: #3d3a35; vertical-align: middle; }
.ac-table tbody tr:hover { background: #fcfbf8; }
.ac-table.small { font-size: 12px; }
.ac-table.small th, .ac-table.small td { padding: 5px 7px; }
.ac-table .center { text-align: center; }
.ac-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ac-no { font-weight: 600; color: #2f2c27; }
.ac-op { display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; white-space: nowrap; }
.ac-op button { border: 1px solid #ddd7cc; background: #fff; color: #4a4741; border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.ac-op button:hover { border-color: #4f8c8c; color: #4f8c8c; }
.ac-op button.danger:hover { border-color: #c0392b; color: #c0392b; }
.ac-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; background: #f1efe9; color: #6b6860; }
.ac-badge.ok { background: #e8f5ef; color: #1d7a52; }
.ac-badge.warn { background: #fdf1ef; color: #b8483f; }

/* 向导：基本信息 */
.ac-form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ac-form-row label { font-size: 12.5px; color: #6b6860; font-weight: 600; }
.ac-sub { font-size: 12.5px; color: #6b6860; margin-bottom: 10px; }
.ac-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.ac-meta-item { flex: 1 1 180px; background: #faf8f4; border: 1px solid #eee9e0; border-radius: 10px; padding: 8px 12px; }
.ac-meta-item span { display: block; font-size: 11.5px; color: #9a968d; margin-bottom: 2px; }
.ac-meta-item b { font-size: 13.5px; color: #2f2c27; font-weight: 600; }

/* 拖拽上传区 */
.ac-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px 18px; border: 2px dashed #d8d2c6; border-radius: 14px; background: #fcfbf8; cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; text-align: center; }
.ac-drop:hover { border-color: #7fb0b0; background: #f7fbfa; }
.ac-drop.dragover { border-color: #4f8c8c; background: #eef7f6; box-shadow: 0 0 0 4px rgba(79,140,140,.10) inset; }
.ac-drop-icon { color: #9aa8a8; margin-bottom: 2px; }
.ac-drop.dragover .ac-drop-icon { color: #4f8c8c; }
.ac-drop-title { font-size: 14px; color: #3d3a35; font-weight: 600; }
.ac-drop-link { color: #4f8c8c; text-decoration: underline; margin-left: 2px; }
.ac-drop-hint { font-size: 12px; color: #a9a49a; }

.ac-filebar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 9px 12px; border: 1px solid #e2eceb; background: #f4faf9; border-radius: 10px; font-size: 13px; }
.ac-file-ico { flex: 0 0 auto; background: #1d7a52; color: #fff; border-radius: 5px; padding: 2px 6px; font-size: 10.5px; letter-spacing: .5px; }
.ac-file-name { flex: 1 1 auto; color: #2f2c27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-file-size { color: #8c8980; font-size: 12px; }
.ac-file-del { cursor: pointer; color: #9a968d; font-size: 18px; line-height: 1; padding: 0 4px; }
.ac-file-del:hover { color: #c0392b; }
.ac-upload-actions { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.ac-quiet { color: #8c8980; font-size: 12.5px; }

/* 解析报告 */
.ac-loading { display: flex; align-items: center; gap: 10px; padding: 18px 4px; color: #6b6860; font-size: 13px; }
.ac-spin { width: 16px; height: 16px; border: 2px solid #dfe8e7; border-top-color: #4f8c8c; border-radius: 50%; display: inline-block; animation: ac-spin .8s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-parse { border: 1px solid #e8e3da; border-radius: 12px; padding: 12px 14px; background: #fdfcf9; margin-top: 12px; }
.ac-parse-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ac-parse-title { font-weight: 700; font-size: 13.5px; color: #2f2c27; }
.ac-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ac-stat { border: 1px solid #ece7de; border-radius: 10px; background: #fff; padding: 8px 10px; }
.ac-stat .k { display: block; font-size: 11.5px; color: #8c8980; }
.ac-stat b { display: block; font-size: 16px; color: #2f2c27; line-height: 1.5; }
.ac-stat i { display: block; font-size: 11px; color: #a9a49a; font-style: normal; }
.ac-stat.ok { border-color: #d9ece3; background: #f7fcfa; }
.ac-stat.ok b { color: #1d7a52; }
.ac-stat.warn { border-color: #f3d9d6; background: #fdf7f6; }
.ac-stat.warn b { color: #b8483f; }
.ac-parse-extra { margin-top: 8px; font-size: 12px; color: #6b6860; }
.ac-parse-extra.ok { color: #1d7a52; }
.ac-parse-extra.warn { color: #b8483f; }
.ac-parse-warn { margin-top: 6px; font-size: 12px; color: #a9762a; background: #fdf8ee; border: 1px solid #f0e4cb; border-radius: 8px; padding: 7px 10px; }
.ac-cols { margin-top: 8px; font-size: 11.5px; color: #8c8980; line-height: 1.9; }
.ac-cols summary { cursor: pointer; color: #4f8c8c; outline: none; }
.ac-cols span { display: inline-block; margin-right: 10px; }
.ac-parse-error { display: flex; flex-direction: column; gap: 4px; color: #b8483f; background: #fdf3f2; border: 1px solid #f3d9d6; border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 12.5px; }
.ac-parse-error b { font-size: 13px; }
.ac-parse-error em { color: #a9762a; font-style: normal; font-size: 12px; }

/* 匹配表 */
.ac-match-table td { font-size: 12.5px; }
.ac-row-unmatched { background: #fffaf9; }
.ac-matched { font-size: 11.5px; color: #1d7a52; margin-top: 2px; }
.ac-matched i { display: block; font-style: normal; color: #8c8980; font-size: 10.5px; }
.ac-matched.hint { color: #a9762a; }

/* 匹配页顶部工具条 */
.ac-match-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; margin: 4px 0 10px; background: #faf8f4; border: 1px solid #eee9e0; border-radius: 10px; }
.ac-match-stat { font-size: 13px; color: #4a4741; }
.ac-match-stat b { font-size: 15px; }
.ac-match-stat b.ok { color: #1d7a52; }
.ac-match-stat b.warn { color: #b8483f; }
.ac-match-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-chip { border: 1px solid #ddd7cc; background: #fff; color: #4a4741; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; transition: all .15s; }
.ac-chip:hover { border-color: #4f8c8c; color: #4f8c8c; }
.ac-chip.active { background: #4f8c8c; border-color: #4f8c8c; color: #fff; }
.ac-chip.danger { border-color: #f0cfcb; color: #b8483f; background: #fdf5f4; }
.ac-chip.danger.active { background: #b8483f; border-color: #b8483f; color: #fff; }
.ac-chip.ok { border-color: #d9ece3; color: #1d7a52; background: #f6fcfa; }
.ac-chip[disabled] { opacity: .55; cursor: default; }
.ac-problem-tip { font-size: 12.5px; color: #b8483f; background: #fdf3f2; border: 1px solid #f3d9d6; border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }

/* 供应商搜索范围 */
.ac-scope { margin-top: 10px; padding: 10px 12px; background: #f7faf9; border: 1px solid #e2eceb; border-radius: 10px; }
.ac-scope-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-scope-title { font-size: 13px; font-weight: 700; color: #2f2c27; }
.ac-scope-tip { font-size: 12px; color: #8c8980; }
.ac-scope-head .btn { margin-left: auto; }
.ac-scope-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; max-height: 96px; overflow: auto; }
.ac-scope-chip { background: #e7f2f1; color: #34625f; border: 1px solid #cfe4e2; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.ac-scope-none { font-size: 12px; color: #a9a49a; }
.ac-scope-modal { display: flex; flex-direction: column; gap: 10px; }
.ac-scope-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-scope-tools .ac-input { flex: 1 1 240px; }
.ac-scope-items { max-height: 46vh; overflow: auto; border: 1px solid #eee9e0; border-radius: 8px; padding: 4px; }
.ac-scope-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 12.5px; color: #3d3a35; cursor: pointer; }
.ac-scope-item:hover { background: #faf8f4; }
.ac-scope-item.on { background: #eef7f6; }
.ac-scope-item input { accent-color: #2563eb; }
.ac-scope-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-scope-cnt { color: #a9a49a; font-size: 11.5px; flex: 0 0 auto; }

/* 匹配页顶部搜索 */
.ac-search-sm { position: relative; flex: 1 1 300px; max-width: 440px; }
.ac-search-sm input { width: 100%; padding: 7px 28px 7px 30px; border: 1px solid #ddd7cc; border-radius: 8px; font-size: 12.5px; background: #fff; }
.ac-search-sm input:focus { outline: none; border-color: #4f8c8c; box-shadow: 0 0 0 3px rgba(79,140,140,.1); }
.ac-search-icon { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: #a9a49a; display: flex; }
.ac-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; line-height: 14px; text-align: center; border-radius: 50%; color: #a9a49a; cursor: pointer; font-size: 14px; display: none; }
.ac-search-clear.show { display: block; }
.ac-search-clear:hover { background: #f0ece4; color: #6b6860; }
.ac-match-stat-line { font-size: 13px; color: #4a4741; margin: 0 0 8px; }
.ac-match-stat-line b { font-size: 15px; }
.ac-match-stat-line b.ok { color: #1d7a52; }
.ac-match-stat-line b.warn { color: #b8483f; }
.ac-sup-name { color: #5c5850; }
.ac-quiet { color: #a9a49a; }

/* 操作列按钮组 */
.ac-ops { display: flex; gap: 4px; justify-content: center; flex-wrap: nowrap; white-space: nowrap; }
.ac-ops button { border: 1px solid #ddd7cc; background: #fff; color: #4a4741; border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.ac-ops button:hover { border-color: #4f8c8c; color: #4f8c8c; }
.ac-ops button.primary { background: #4f8c8c; border-color: #4f8c8c; color: #fff; }
.ac-ops button.primary:hover { background: #437a7a; color: #fff; }
.ac-ops button.ac-btn-mini.danger:hover { border-color: #c0392b; color: #c0392b; }
.ac-ops button.blue { background: #2563eb; border-color: #2563eb; color: #fff; }
.ac-ops button.blue:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.ac-match-table { min-width: 1620px; }
.ac-match-table th, .ac-match-table td { white-space: normal; word-break: break-word; }
.ac-match-code { font-size: 12px; color: #3d6e6e; margin-top: 2px; }
.ac-match-code b { font-weight: 700; letter-spacing: .2px; }

/* 查看 / 修改 弹窗 */
.ac-dialog { width: min(880px, 94vw); max-height: 88vh; background: #fff; border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.22); display: flex; flex-direction: column; overflow: hidden; }
.ac-dialog-head { position: relative; padding: 13px 16px; border-bottom: 1px solid #efeae2; font-size: 15px; font-weight: 700; color: #3d3a35; }
.ac-dialog-body { padding: 14px 16px; overflow: auto; }
.ac-dialog-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px 14px; border-top: 1px solid #f2eee6; }
.ac-view-wrap { display: flex; flex-direction: column; gap: 10px; }
.ac-kv-card { border: 1px solid #eee9e0; border-radius: 10px; overflow: hidden; }
.ac-kv-card.ok { border-color: #d9ece3; }
.ac-kv-card.warn { border-color: #f3d9d6; }
.ac-kv-title { background: #faf8f4; padding: 7px 12px; font-size: 12.5px; color: #6b6860; font-weight: 600; }
.ac-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; padding: 10px 12px; }
.ac-kv-grid div { display: flex; gap: 6px; font-size: 12.5px; min-width: 0; }
.ac-kv-grid span { color: #8c8980; flex: 0 0 auto; }
.ac-kv-grid b { color: #2f2c27; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; margin-bottom: 10px; }
.ac-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b6860; }
.ac-input { padding: 6px 9px; border: 1px solid #ddd7cc; border-radius: 7px; font-size: 13px; color: #2f2c27; background: #fff; }
.ac-input:focus { outline: none; border-color: #4f8c8c; box-shadow: 0 0 0 3px rgba(79,140,140,.1); }
.ac-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #4a4741; margin: 2px 0 10px; }
.ac-edit-note, .ac-edit-tip { font-size: 12.5px; color: #6b6860; background: #faf8f4; border: 1px solid #eee9e0; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.ac-edit-note b { color: #2f2c27; }
.ac-edit-tip { background: #f7faf9; border-color: #e2eceb; color: #5c6d6d; }

/* 手动匹配浮层（沿用出库管理的 tk-pick 选取界面） */
.ac-overlay { position: fixed; inset: 0; background: rgba(28,26,22,.45); z-index: 4200; display: flex; align-items: center; justify-content: center; padding: 18px; }
.ac-pick-lg { position: relative; width: min(1260px, 96vw); max-height: 88vh; background: #fff; border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.22); display: flex; flex-direction: column; overflow: hidden; padding: 14px 16px 12px; }
.ac-pick-lg table.tk-pick { min-width: 1100px; }
.ac-pick-lg table.tk-pick td.tk-empty { text-align: center; color: #a9a49a; padding: 28px 0; }
.ac-pick-lg .tk-modal-actions { padding-top: 10px; margin-top: 6px; }
.ac-pick-close { position: absolute; top: 10px; right: 12px; cursor: pointer; color: #8c8980; font-size: 22px; line-height: 1; padding: 2px 6px; }
.ac-pick-close:hover { color: #c0392b; }
.ac-src-card { margin: 10px 0 0; padding: 10px 12px; background: #f7faf9; border: 1px solid #e2eceb; border-radius: 10px; }
.ac-src-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6b6860; margin-bottom: 6px; }
.ac-src-badge { background: #4f8c8c; color: #fff; border-radius: 999px; padding: 1px 9px; font-size: 11.5px; }
.ac-src-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; }
.ac-src-grid div { display: flex; gap: 6px; font-size: 12.5px; min-width: 0; }
.ac-src-grid span { color: #8c8980; flex: 0 0 auto; }
.ac-src-grid b { color: #2f2c27; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 已匹配：上传数据 vs 已匹配耗材 对比板块 */
.ac-cmp-card { margin: 8px 0 0; padding: 10px 12px; background: #fffdf7; border: 1px solid #f0e6cf; border-radius: 10px; max-height: 24vh; overflow: auto; }
.ac-cmp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #6b6860; margin-bottom: 8px; }
.ac-cmp-head .ac-src-badge.ok { background: #1d7a52; }
.ac-cmp-head i { font-style: normal; }
.ac-cmp-warn { color: #c0392b; font-weight: 600; }
.ac-cmp-ok { color: #1d7a52; font-weight: 600; }
.ac-cmp-code { margin-left: auto; color: #6b6860; }
.ac-cmp-code b { color: #2f2c27; font-weight: 700; }
.ac-cmp { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ac-cmp th, .ac-cmp td { padding: 5px 10px; border-bottom: 1px solid #f4efe2; text-align: left; vertical-align: top; }
.ac-cmp thead th { background: #faf6ea; color: #6b6860; font-weight: 600; }
.ac-cmp tbody th { color: #8c8980; font-weight: 600; white-space: nowrap; }
.ac-cmp td { color: #3d3a35; }
.ac-cmp td.diff { color: #c0392b; font-weight: 700; }
.ac-cmp td.same { color: #5c5850; }
.ac-pick-lg .tk-pick-wrap { flex: 1; overflow: auto; }
.ac-pick-lg .tk-pick tbody tr { cursor: pointer; }
.ac-radio { display: inline-block; width: 14px; height: 14px; border: 1.5px solid #cfc9bd; border-radius: 50%; vertical-align: middle; position: relative; }
.ac-radio.on { border-color: #4f8c8c; }
.ac-radio.on:after { content: ''; position: absolute; inset: 2px; background: #4f8c8c; border-radius: 50%; }
.ac-pick-lg .tk-pager-btn.active { background: #4f8c8c; border-color: #4f8c8c; color: #fff; }

/* 生成结果 */
.ac-gen-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.ac-gen-item { border: 1px solid #e8e3da; border-radius: 10px; padding: 10px 14px; background: #fdfcf9; }
.ac-gen-item b { display: block; font-size: 13.5px; color: #2f2c27; }
.ac-gen-item span { font-size: 12px; color: #8c8980; }
.ac-block-title { font-size: 13.5px; font-weight: 700; color: #2f2c27; margin: 12px 0 6px; }
.ac-tip { font-size: 12.5px; color: #6b6860; background: #f7f5f0; border: 1px solid #ece7de; border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.ac-tip.warn { background: #fdf3f2; border-color: #f3d9d6; color: #b8483f; }

@media (max-width: 720px) {
  .ac-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-drop { padding: 22px 12px; }
}
