/* PDF合并工具 */
.pdfm-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 20px; align-items: start; }
.pdfm-panel { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px; }
.pdfm-section { margin-bottom: 20px; }
.pdfm-section:last-child { margin-bottom: 0; }
.pdfm-section h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .95rem; margin: 0 0 12px; }
.pdfm-section h3 > span { display: inline-flex; align-items: center; gap: 6px; }
.pdfm-section h3 i { color: var(--accent); }
.pdfm-tip { font-size: .75rem; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.pdfm-tip i { color: var(--accent); }

.pdfm-upload { border: 2px dashed var(--rule); border-radius: var(--radius-md); padding: 30px 16px; text-align: center; cursor: pointer; transition: all .2s ease; background: var(--bg2); }
.pdfm-upload:hover, .pdfm-upload.dragover { border-color: var(--accent); background: var(--accent-soft); }
.pdfm-upload i:first-child { font-size: 2rem; color: var(--accent); }
.pdfm-upload p { margin: 10px 0 6px; font-weight: 600; }
.pdfm-hint { font-size: .8rem; color: var(--muted); }

.pdfm-stats { margin-top: 12px; display: flex; gap: 18px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-sm); font-size: .82rem; color: var(--muted); }
.pdfm-stats strong { color: var(--accent); }

.pdfm-placeholder { text-align: center; color: var(--muted); padding: 30px 0; }
.pdfm-placeholder i { font-size: 2.2rem; color: var(--accent); display: block; margin-bottom: 8px; opacity: .6; }
.pdfm-placeholder p { font-size: .88rem; }

.pdfm-filelist { display: flex; flex-direction: column; gap: 8px; }
.pdfm-fileitem { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 9px 12px; }
.pdfm-fileitem.dragging { opacity: .4; }
.pdfm-fileitem.drag-over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pdfm-fileidx { width: 22px; height: 22px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; border-radius: 50%; }
.pdfm-fileitem i.pdfm-ficon { color: var(--accent); font-size: 1.2rem; flex-shrink: 0; }
.pdfm-fileinfo { flex: 1; min-width: 0; }
.pdfm-fname { display: block; font-size: .85rem; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfm-fmeta { display: block; font-size: .75rem; color: var(--muted); }
.pdfm-factions { display: flex; gap: 4px; flex-shrink: 0; }
.pdfm-fbtn { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; color: var(--muted); cursor: pointer; font-size: .85rem; }
.pdfm-fbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pdfm-fbtn:disabled { opacity: .35; cursor: not-allowed; }
.pdfm-fbtn.del:hover { border-color: #e11d48; color: #e11d48; }

.pdfm-actions { display: flex; gap: 10px; }
.pdfm-actions .btn { flex: 1; justify-content: center; }
.pdfm-actions .btn:disabled { opacity: .5; cursor: not-allowed; }

.pdfm-previewbox { min-height: 420px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border: 1px dashed var(--rule); border-radius: var(--radius-sm); padding: 20px; }
.pdfm-previewbox canvas { max-width: 100%; max-height: 460px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.pdfm-previewinfo { text-align: center; font-size: .82rem; color: var(--muted); margin: 10px 0 0; min-height: 18px; }

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