.pdf-tools-page *, .pdf-tools-page *::before, .pdf-tools-page *::after, #pdf-tool *, #pdf-tool *::before, #pdf-tool *::after { box-sizing: border-box; }
#pdf-tool { min-width: 0; max-width: 100%; color: #354a65; }
#pdf-tool [hidden] { display: none !important; }
.pdf-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; }
.pdf-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 13px 0; }
.pdf-field:has(textarea), .pdf-controls > .pdf-logo-preview, .pdf-controls > .pdf-button { grid-column: 1 / -1; }
.pdf-field label { margin: 0; font-weight: 600; color: #17335d; }
#pdf-tool input, #pdf-tool select, #pdf-tool textarea { min-width: 0; max-width: 100%; border: 1px solid #b8c7dc; border-radius: 6px; padding: 10px 12px; background: #fff; color: #253c59; font: inherit; }
#pdf-tool textarea { width: 100%; resize: vertical; line-height: 1.6; }
#pdf-tool input[type="color"] { width: 100%; height: 44px; padding: 4px; }
#pdf-tool input[type="file"] { width: 100%; overflow: hidden; }
#pdf-tool input:focus-visible, #pdf-tool select:focus-visible, #pdf-tool textarea:focus-visible, #pdf-tool [tabindex]:focus-visible, .pdf-button:focus-visible { outline: 3px solid #9bbcea; outline-offset: 3px; }
.pdf-drop { padding: 22px 16px; border: 2px dashed #b8c7dc; background: #f3f7fc; border-radius: 9px; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.pdf-drop:hover, .pdf-drop.is-dragover { border-color: #0052cc; background: #eaf2ff; }
.pdf-drop[aria-disabled="true"] { opacity: .6; cursor: wait; }
.pdf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 14px 0; }
#pdf-tool .pdf-button { display: inline-block; min-height: 44px; max-width: 100%; padding: 10px 16px; border: 1px solid #2354a2; border-radius: 6px; background: #2055a6; color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
#pdf-tool .pdf-button.is-secondary { background: #fff; color: #17335d; border-color: #b8c7dc; }
#pdf-tool .pdf-button:hover { filter: brightness(.96); }
#pdf-tool .pdf-button:disabled, #pdf-tool input:disabled, #pdf-tool select:disabled, #pdf-tool textarea:disabled { opacity: .6; cursor: not-allowed; }
.pdf-help { margin: 5px 0 12px; font-size: 13px; color: #526176; line-height: 1.8; overflow-wrap: anywhere; }
.pdf-warning { padding: 12px 14px; border: 1px solid #e8d28f; border-radius: 8px; color: #854d0e; background: #fffbeb; line-height: 1.8; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
#pdf-tool .tool-message { white-space: pre-line; overflow-wrap: anywhere; }
.pdf-file-list { list-style: none; padding: 0; margin: 14px 0; max-height: 550px; overflow: auto; }
.pdf-file-item { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px; border: 1px solid #dbe4f0; border-radius: 8px; margin-bottom: 10px; background: #f8fbff; }
.pdf-file-info { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.pdf-file-info strong { color: #17335d; }
.pdf-file-info span { font-size: 13px; }
.pdf-file-item canvas { max-width: 140px; max-height: 100px; background: #fff; border: 1px solid #dbe4f0; }
.pdf-file-item .pdf-actions { margin: 0; }
.pdf-result { padding-top: 18px; margin-top: 20px; border-top: 1px solid #dbe4f0; min-width: 0; }
#pdf-tool h3 { color: #17335d; font-size: 19px; line-height: 1.6; margin: 16px 0; }
.pdf-data { margin: 0 0 18px; }
.pdf-data-row { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 14px; padding: 10px 12px; border-bottom: 1px solid #dbe4f0; }
.pdf-data-row:nth-child(odd) { background: #f3f7fc; }
.pdf-data-row dt, .pdf-data-row dd { margin: 0; min-width: 0; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.pdf-data-row dt { color: #17335d; }
.pdf-viewer-viewport { max-width: 100%; width: 100%; height: min(70vh,700px); min-height: 250px; overflow: auto; padding: 12px; background: #e5ebf2; border: 1px solid #c8d4e3; border-radius: 8px; contain: inline-size; }
#pdf-canvas { display: block; background: #fff; max-width: none; box-shadow: 0 2px 8px #172c4420; }
#pdf-view-page { width: 82px; }
#pdf-page-label, #pdf-zoom-label, #pdf-order-label, #pdf-dimensions-label { font-size: 14px; overflow-wrap: anywhere; }
.pdf-table-wrap { width: 100%; max-width: 100%; overflow: auto; margin: 12px 0; }
.pdf-table { border-collapse: collapse; width: 100%; min-width: 650px; font-size: 13px; }
.pdf-table caption { text-align: left; color: #17335d; padding: 8px 0; }
.pdf-table th, .pdf-table td { padding: 9px; border: 1px solid #dbe4f0; text-align: left; }
.pdf-table thead { background: #f3f7fc; }
.pdf-thumbnail-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 14px; list-style: none; padding: 0; }
.pdf-thumbnail { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 10px; border: 1px solid #dbe4f0; border-radius: 8px; background: #f8fbff; }
.pdf-thumbnail strong { align-self: stretch; overflow-wrap: anywhere; font-size: 13px; margin-bottom: 8px; }
.pdf-thumbnail canvas { max-width: 150px; width: auto; height: auto; background: #fff; }
.pdf-thumbnail .pdf-actions { margin: auto 0 0; padding-top: 12px; }
.pdf-logo-preview canvas { max-width: 100%; border: 1px solid #dbe4f0; }
.pdf-downloads { display: flex; flex-direction: column; gap: 12px; max-height: 650px; overflow: auto; }
.pdf-download-item { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e3eaf4; }
.pdf-download-item span { font-size: 13px; }
#pdf-tool details { max-width: 100%; margin: 14px 0; }
#pdf-tool summary { color: #17335d; line-height: 1.7; cursor: pointer; margin-bottom: 10px; }
#pdf-metadata-raw { max-height: 450px; font-size: 12px; }
#content.work-listing [data-pdf-tool-card="206"] { grid-column: 1; }
#content.work-listing [data-pdf-tool-card] h3 { min-height: 2.84em; }
@media (max-width: 767px) {
    .pdf-tools-page .tool-shell { padding: 16px; }
    .pdf-controls { grid-template-columns: minmax(0,1fr); }
    .pdf-data-row { grid-template-columns: minmax(0,1fr); gap: 3px; }
    .pdf-actions .pdf-button { flex: 1 1 100px; }
    .pdf-thumbnail-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .pdf-thumbnail { padding: 8px; }
    .pdf-thumbnail canvas { max-width: 100%; }
    .pdf-file-item { padding: 10px; }
    .pdf-file-item .pdf-actions { width: 100%; }
}
