.pb-pdf-open { overflow: hidden; }
.pb-pdf-modal[hidden] { display: none !important; }
.pb-pdf-modal [hidden] { display: none !important; }
.pb-pdf-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 2.5vh 2.5vw; background: rgba(10,18,32,.76); backdrop-filter: blur(8px); font-family: Inter,system-ui,-apple-system,"Segoe UI",sans-serif; }
.pb-pdf-dialog { width: 95vw; height: 95vh; display: grid; grid-template-rows: 64px auto minmax(0,1fr); overflow: hidden; color: #172033; background: #f4f7fb; border: 1px solid rgba(255,255,255,.3); border-radius: 14px; box-shadow: 0 30px 90px rgba(2,8,23,.36); }
.pb-pdf-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px 10px 18px; background: #fff; border-bottom: 1px solid #dfe6ef; }
.pb-pdf-heading { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pb-pdf-heading > div { min-width: 0; }
.pb-pdf-heading small,.pb-pdf-info-head span { display: block; color: #667085; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.pb-pdf-heading strong { display: block; max-width: min(680px,55vw); margin-top: 2px; overflow: hidden; color: #172033; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.pb-pdf-file-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; color: #dc2626; background: #fef2f2; border-radius: 9px; }
.pb-pdf-toolbar { display: flex; align-items: center; gap: 7px; min-height: 52px; padding: 7px 12px; overflow-x: auto; background: #fff; border-bottom: 1px solid #dfe6ef; scrollbar-width: thin; }
.pb-pdf-tool-group { display: flex; align-items: center; gap: 4px; padding-right: 7px; border-right: 1px solid #e4e9f0; }
.pb-pdf-tool-group-end { margin-left: auto; border-right: 0; }
.pb-pdf-icon-button,.pb-pdf-tool-button { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; color: #344054; background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: .15s ease; }
.pb-pdf-icon-button:hover,.pb-pdf-tool-button:hover { color: #2563eb; background: #eff6ff; border-color: #bfdbfe; }
.pb-pdf-icon-button:disabled { opacity: .35; cursor: not-allowed; }
.pb-pdf-page-control { height: 34px; display: flex; align-items: center; gap: 4px; padding: 0 7px; border: 1px solid #d8e0eb; border-radius: 8px; background: #fff; }
.pb-pdf-page-control input { width: 38px; padding: 0; border: 0; outline: 0; text-align: center; font: inherit; font-size: 11px; font-weight: 750; background: transparent; }
.pb-pdf-page-control span { color: #667085; font-size: 10px; white-space: nowrap; }
.pb-pdf-zoom { min-width: 43px; color: #475467; font-size: 10px; font-weight: 750; text-align: center; }
.pb-pdf-search { min-width: 170px; height: 34px; display: flex; align-items: center; gap: 6px; padding-left: 10px; border: 1px solid #d8e0eb; border-radius: 8px; background: #fff; }
.pb-pdf-search > i { color: #98a2b3; font-size: 11px; }
.pb-pdf-search input { width: 112px; min-width: 0; padding: 0; border: 0; outline: 0; font: inherit; font-size: 11px; }
.pb-pdf-search [data-pdf-search-status] { color: #2563eb; font-size: 9px; white-space: nowrap; }
.pb-pdf-layout { min-height: 0; display: grid; grid-template-columns: minmax(0,7fr) minmax(270px,3fr); }
.pb-pdf-viewer { min-width: 0; min-height: 0; overflow: hidden; background: #cdd4de; }
.pb-pdf-stage { position: relative; width: 100%; height: 100%; display: grid; place-items: start center; padding: 24px; overflow: auto; background-color: #cdd4de; background-image: linear-gradient(45deg,rgba(255,255,255,.13) 25%,transparent 25%),linear-gradient(-45deg,rgba(255,255,255,.13) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,rgba(255,255,255,.13) 75%),linear-gradient(-45deg,transparent 75%,rgba(255,255,255,.13) 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
.pb-pdf-stage canvas { display: block; max-width: none; background: #fff; box-shadow: 0 8px 34px rgba(15,23,42,.22); }
.pb-pdf-loading,.pb-pdf-error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 30px; text-align: center; background: rgba(244,247,251,.92); }
.pb-pdf-loading strong,.pb-pdf-error h3 { margin: 0; color: #172033; font-size: 15px; }
.pb-pdf-loading small,.pb-pdf-error p { margin: 0; color: #667085; font-size: 11px; }
.pb-pdf-spinner { width: 34px; height: 34px; border: 3px solid #dbe7ff; border-top-color: #2563eb; border-radius: 50%; animation: pb-pdf-spin .75s linear infinite; }
@keyframes pb-pdf-spin { to { transform: rotate(360deg); } }
.pb-pdf-error > span { width: 48px; height: 48px; display: grid; place-items: center; color: #dc2626; background: #fee2e2; border-radius: 12px; font-size: 19px; }
.pb-pdf-info { min-width: 0; padding: 20px; overflow-y: auto; background: #fff; border-left: 1px solid #dfe6ef; }
.pb-pdf-info-head { padding-bottom: 16px; border-bottom: 1px solid #e4e9f0; }
.pb-pdf-info-head strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.pb-pdf-info dl { display: grid; gap: 0; margin: 10px 0 18px; }
.pb-pdf-info dl > div { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 10px; padding: 12px 0; border-bottom: 1px solid #eef1f5; }
.pb-pdf-info dt { color: #667085; font-size: 10px; font-weight: 700; }
.pb-pdf-info dd { margin: 0; color: #172033; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.pb-pdf-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: #067647; background: #ecfdf3; border-radius: 999px; font-size: 9px; font-weight: 800; }
.pb-pdf-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pb-pdf-info-actions { display: grid; gap: 8px; }
.pb-pdf-primary-button,.pb-pdf-secondary-button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid #2563eb; border-radius: 9px; color: #fff; background: #2563eb; font: inherit; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.pb-pdf-secondary-button { color: #344054; background: #fff; border-color: #d8e0eb; }
.pb-pdf-security { display: flex; align-items: flex-start; gap: 7px; margin: 18px 0 0; color: #667085; font-size: 9px; line-height: 1.55; }
.pb-pdf-security i { margin-top: 2px; color: #16a34a; }
.pb-pdf-print-frame { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pb-pdf-dialog:fullscreen { width: 100vw; height: 100vh; border-radius: 0; }

@media (max-width: 900px) {
    .pb-pdf-modal { padding: 0; }
    .pb-pdf-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; grid-template-rows: 58px auto minmax(0,1fr); }
    .pb-pdf-layout { grid-template-columns: 1fr; }
    .pb-pdf-info { display: none; }
    .pb-pdf-toolbar { position: sticky; top: 0; z-index: 3; }
    .pb-pdf-stage { padding: 14px; }
    .pb-pdf-tool-button span { display: none; }
    .pb-pdf-heading strong { max-width: 68vw; }
}

@media (max-width: 600px) {
    .pb-pdf-toolbar { gap: 3px; padding-inline: 6px; }
    .pb-pdf-tool-group { padding-right: 3px; }
    .pb-pdf-search { order: 10; min-width: 150px; }
    .pb-pdf-search input { width: 90px; }
    .pb-pdf-zoom { display: none; }
}
