* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f2f4f7; color: #1f2329; min-height: 100vh; }
.container { max-width: 1080px; margin: 0 auto; padding: 24px 16px 80px; }
h1 { font-size: 22px; text-align: center; margin: 10px 0 4px; }
.sub { text-align: center; color: #86909c; font-size: 13px; margin-bottom: 24px; }
.card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 20px; }
.card h2 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step-num { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: #165dff; color: #fff; font-size: 13px; align-items: center; justify-content: center; flex: none; }
.h2-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tagline { font-size: 12px; font-weight: 400; color: #86909c; }
#drop { border: 2px dashed #c9cdd4; border-radius: 10px; padding: 36px 16px; text-align: center; color: #86909c; cursor: pointer; transition: all .2s; }
#drop:hover, #drop.dragover { border-color: #165dff; background: #f0f6ff; color: #165dff; }
#drop .big { font-size: 15px; color: #4e5969; margin-bottom: 6px; }
#drop.mini { padding: 14px 16px; margin-top: 10px; font-size: 13px; border-width: 1px; }
.hint { font-size: 12px; margin-top: 8px; }
.filelist { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.fitem { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #e5e6eb; border-radius: 8px; font-size: 13px; }
.fitem .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitem.err { border-color: #fdcdc5; background: #fff8f7; }
.fitem .fmsg { color: #f53f3f; font-size: 12px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { padding: 2px 10px; border-radius: 20px; font-size: 12px; flex: none; }
.badge.wait { background: #f2f3f5; color: #86909c; }
.badge.doing { background: #e8f3ff; color: #165dff; }
.badge.inv { background: #fff3e8; color: #d25f00; }
.badge.con { background: #e8ffea; color: #00b42a; }
.badge.err { background: #ffece8; color: #f53f3f; }
.retry { border: none; background: #f53f3f; color: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; font-size: 12px; flex: none; }
.retry:hover { background: #f76560; }
.fitem .rmfile { border: 1px solid #e5e6eb; background: #fff; color: #86909c; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 12px; flex: none; }
.fitem .rmfile:hover { border-color: #f53f3f; color: #f53f3f; background: #fff8f7; }
.failbar { margin-top: 12px; padding: 10px 14px; background: #fff3f3; border: 1px solid #fdcdc5; border-radius: 8px; font-size: 13px; color: #a8071a; display: flex; align-items: center; gap: 10px; }
.failbar .spacer { flex: 1; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; font-size: 15px; font-weight: 600; }
.section-title .tag { font-size: 12px; font-weight: 400; color: #86909c; }
.section-title .copy-summary { margin-left: auto; }
table.items { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
table.items th, table.items td { border: 1px solid #e5e6eb; padding: 6px 8px; vertical-align: middle; }
table.items th { background: #f7f8fa; font-weight: 600; white-space: nowrap; }
table.items td input { width: 100%; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 4px; font-size: 13px; }
table.items td input:hover { border-color: #c9cdd4; }
table.items td input:focus { border-color: #165dff; background: #fff; outline: none; }
table.items td.na { color: #a9aeb8; font-size: 12px; background: #fafbfc; }
table.items td input.auto { color: #4e5969; background: #fafbfc; cursor: default; }
/* 日期框：整块都可点开日历（点哪都行），光标提示可点 */
table.items td input[type="date"] { cursor: pointer; min-height: 26px; }
table.items td input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }
table.items tr.hotelrow td { background: #fffdf5; }
table.items tr.hotelrow td:first-child { background: #fffdf5; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; cursor: zoom-in; border: 1px solid #e5e6eb; background: #f7f8fa; }
td.thumbcell { padding: 8px !important; }
.rowbtns { display: flex; gap: 6px; white-space: nowrap; }
.btn-mini { border: 1px solid #c9cdd4; background: #fff; color: #4e5969; border-radius: 6px; padding: 4px 8px; cursor: pointer; font-size: 12px; }
.btn-mini.danger { color: #f53f3f; border-color: #fdcdc5; }
.btn-mini:hover { border-color: #165dff; color: #165dff; }
.btn-mini.danger:hover { border-color: #f53f3f; color: #f53f3f; }
.btn-mini.solid { background: #165dff; border-color: #165dff; color: #fff; }
.btn-mini.solid:hover { background: #4080ff; border-color: #4080ff; color: #fff; }
.amount-cell { min-width: 90px; }
/* 历史上传占用条：显示服务端还留着多少历史，一键清除 */
.history-bar { margin-top: 12px; padding: 8px 12px; background: #f7f8fa; border: 1px solid #e5e6eb; border-radius: 8px; font-size: 12px; color: #4e5969; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-bar b { color: #1d2129; }
.history-bar .spacer { flex: 1; }
.actions { margin-top: 24px; text-align: center; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { border: none; border-radius: 8px; padding: 10px 28px; font-size: 15px; cursor: pointer; }
.btn.primary { background: #165dff; color: #fff; }
.btn.primary:hover { background: #4080ff; }
.btn.primary:disabled { background: #94bfff; cursor: not-allowed; }
.btn.plain { background: #f2f3f5; color: #4e5969; }
.btn.plain:hover { background: #e5e6eb; }
.empty-tip { color: #86909c; font-size: 13px; padding: 14px; text-align: center; background: #fff; border: 1px dashed #e5e6eb; border-radius: 8px; }
#preview { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 99; align-items: center; justify-content: center; cursor: zoom-out; }
#preview img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #1f2329; color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 14px; z-index: 100; display: none; }
.progress-line { font-size: 13px; color: #86909c; margin-top: 10px; }
.addrow-wrap { margin-top: 8px; }
.resume-bar { margin-top: 14px; padding: 10px 14px; background: #f0f6ff; border: 1px solid #bedaff; border-radius: 8px; font-size: 13px; color: #165dff; display: flex; align-items: center; gap: 10px; }
.resume-bar .spacer { flex: 1; }
.done-list { display: flex; flex-direction: column; gap: 8px; }
.done-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid #e5e6eb; border-radius: 8px; font-size: 14px; background: #fafbfc; }
.done-item .dname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.done-item .dact { flex: none; }

/* ---------- 合并（同一报销的多张截图并成一条） ---------- */
table.items th.selcol, table.items td.selcol { width: 34px; text-align: center; padding: 6px 4px !important; }
table.items td.selcol input { width: auto; margin: 0; cursor: pointer; accent-color: #165dff; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.merged-badge { display: inline-block; font-size: 11px; color: #165dff; background: #f0f6ff; border: 1px solid #bedaff; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
table.items tr.mergedrow td { background: #f7fbff; }
.btn-mini.mergeSel { background: #165dff; border-color: #165dff; color: #fff; margin-left: 8px; }
.btn-mini.mergeSel:hover { background: #4080ff; border-color: #4080ff; color: #fff; }
.btn-mini.mergeSel:disabled { background: #f2f3f5; border-color: #e5e6eb; color: #a9aeb8; cursor: not-allowed; }
.merge-hint { font-size: 12px; color: #86909c; margin-left: 10px; }

@media (max-width: 720px) {
  table.items { font-size: 12px; }
  .hide-mobile { display: none; }
}
