/* PDF转图片工具 */
.pti-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; align-items: start; }
.pti-panel { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px; }
.pti-section { margin-bottom: 20px; }
.pti-section:last-child { margin-bottom: 0; }
.pti-section h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .95rem; margin: 0 0 12px; }
.pti-section h3 > span { display: inline-flex; align-items: center; gap: 6px; }
.pti-section h3 i { color: var(--accent); }
.pti-section h3 .btn { flex-shrink: 0; }

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

.pti-fileinfo { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.pti-fname { font-size: .85rem; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pti-fmeta { font-size: .76rem; color: var(--muted); }

.pti-formgroup { margin-bottom: 14px; }
.pti-formgroup label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.pti-formgroup select { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: .9rem; box-sizing: border-box; }
.pti-formgroup select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pti-formgroup input[type="range"] { width: 100%; accent-color: var(--accent); }
.pti-hint2 { font-size: .76rem; color: var(--muted); margin: 6px 0 0; }

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

.pti-previewbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-sm); margin-bottom: 12px; }
.pti-cbtn { width: 32px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-sm); color: var(--muted); cursor: pointer; }
.pti-cbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pti-cbtn:disabled { opacity: .35; cursor: not-allowed; }
.pti-pageinput { width: 50px; text-align: center; padding: 6px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: .88rem; }
.pti-pageinput:focus { outline: none; border-color: var(--accent); }
.pti-pageinput + span { font-size: .85rem; color: var(--muted); }

.pti-viewer { min-height: 320px; display: flex; align-items: center; justify-content: center; background: var(--bg2); border: 1px dashed var(--rule); border-radius: var(--radius-sm); padding: 16px; overflow: auto; }
.pti-placeholder { text-align: center; color: var(--muted); }
.pti-placeholder i { font-size: 3rem; color: var(--accent); display: block; margin-bottom: 12px; opacity: .7; }
.pti-canvaswrap canvas { max-width: 100%; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }

.pti-resultgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pti-resultitem { background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; }
.pti-resultitem img { width: 100%; height: 150px; object-fit: cover; background: #fff; display: block; }
.pti-resultname { display: block; font-size: .75rem; color: var(--ink); padding: 8px 10px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pti-resultmeta { display: block; font-size: .7rem; color: var(--muted); padding: 0 10px 8px; }
.pti-resultitem .btn { width: calc(100% - 20px); margin: 0 10px 10px; justify-content: center; }

.pti-progress { margin-top: 14px; }
.pti-progressbar { height: 8px; background: var(--bg2); border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.pti-progressfill { height: 100%; background: var(--accent); width: 0; transition: width .15s ease; }
.pti-progress span { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; }

.pti-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; padding: 20px; }
.pti-loading i { color: var(--accent); animation: pti-spin 1s linear infinite; }
.pti-error { color: #e11d48; font-size: .9rem; padding: 20px; }
@keyframes pti-spin { to { transform: rotate(360deg); } }

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