/* PDF在线预览工具 */
.pdfpv-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.pdfpv-panel { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px; }
.pdfpv-section { margin-bottom: 20px; }
.pdfpv-section:last-child { margin-bottom: 0; }
.pdfpv-section h3 { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin: 0 0 12px; }
.pdfpv-section h3 i { color: var(--accent); }

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

.pdfpv-formgroup { margin-bottom: 12px; }
.pdfpv-formgroup label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.pdfpv-formgroup input[type="url"] { 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; }
.pdfpv-formgroup input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pdfpv-section .btn { width: 100%; justify-content: center; }

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

.pdfpv-actions { display: flex; gap: 10px; }
.pdfpv-actions .btn { flex: 1; justify-content: center; }
.pdfpv-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.pdfpv-tip { margin-top: 16px; display: flex; gap: 8px; padding: 10px 14px; background: var(--accent-soft); border-radius: var(--radius-sm); font-size: .82rem; color: var(--muted); align-items: flex-start; line-height: 1.5; }
.pdfpv-tip i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }

.pdfpv-controls { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-md); margin-bottom: 14px; flex-wrap: wrap; }
.pdfpv-cbtn { width: 34px; height: 32px; 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; font-size: 1rem; }
.pdfpv-cbtn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pdfpv-cbtn:disabled { opacity: .35; cursor: not-allowed; }
.pdfpv-pageinput { width: 52px; text-align: center; padding: 6px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); font-size: .9rem; }
.pdfpv-pageinput:focus { outline: none; border-color: var(--accent); }
.pdfpv-pageinput + span { font-size: .85rem; color: var(--muted); }
.pdfpv-zoom { font-size: .85rem; color: var(--ink); min-width: 44px; text-align: center; }
.pdfpv-divider { width: 1px; height: 20px; background: var(--rule); margin: 0 4px; }

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

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

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