.pds-import { margin: 0 0 1.1rem; padding: 1rem 1.2rem; border: 1px solid var(--bs-border-color, #dbe4ee); border-radius: 14px; background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #23344d); }
.pds-scan-status { margin: 0 0 1rem; font-size: .85rem; }
.pds-scan-status[hidden], .pds-scan-status [hidden] { display: none !important; }
.pds-scan-status p { margin: .35rem 0; }
.pds-scan-status .is-error { color: var(--bs-danger, #b42318); }
.pds-import-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.pds-import h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .35rem; }
.pds-import p { font-size: .85rem; margin: .4rem 0; }
.pds-import .pds-help { color: var(--bs-secondary-color, #66758a); font-size: .78rem; }
.pds-import [hidden] { display: none !important; }
.pds-import [data-pds-status]:empty { display: none; }
.pds-import [data-pds-status] { padding: .5rem 0; font-weight: 600; }
.pds-import .is-error { color: var(--bs-danger, #b42318); }
.pds-progress, .pds-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: .75rem 0; }
.pds-progress progress { flex: 1; min-width: 140px; height: 9px; accent-color: #2964bc; }
.pds-progress.is-reading progress{appearance:none;border:0;border-radius:99px;overflow:hidden;background:linear-gradient(90deg,transparent 0%,#0f766e 45%,transparent 100%) left/35% 100% no-repeat,#dceeea;animation:pds-reading 1.7s ease-in-out infinite alternate}
.pds-progress.is-reading progress::-webkit-progress-bar{background:transparent}
.pds-progress.is-reading progress::-moz-progress-bar{background:transparent}
.pds-scan-elapsed{font-size:.8rem;color:var(--text-muted,#64748b);font-variant-numeric:tabular-nums;white-space:nowrap}
@keyframes pds-reading{from{background-position:-50% 0}to{background-position:150% 0}}
@media(prefers-reduced-motion:reduce){.pds-progress.is-reading progress{animation:none;background-position:center}}
.pds-review-scroll { max-height: 430px; overflow: auto; border: 1px solid var(--bs-border-color, #dbe4ee); border-radius: 8px; margin: .8rem 0; }
.pds-review-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.pds-review-table th { position: sticky; top: 0; z-index: 1; background: var(--bs-tertiary-bg, #f3f6fb); text-align: left; }
.pds-review-table th, .pds-review-table td { padding: .6rem; border-bottom: 1px solid var(--bs-border-color, #e6ebf1); vertical-align: middle; }
.pds-review-table td:first-child { width: 44px; text-align: center; }
.pds-review-table td:nth-child(2) { min-width: 135px; }
.pds-review-table td:nth-child(3) { width: 48%; min-width: 220px; }
.pds-review-table td:last-child { min-width: 150px; color: var(--bs-secondary-color, #66758a); }
.pds-review-table input:not([type=checkbox]), .pds-review-table select { width: 100%; min-height: 34px; padding: .35rem .5rem; border: 1px solid var(--bs-border-color, #cbd5e1); border-radius: 6px; color: inherit; background: var(--bs-body-bg, white); font: inherit; }
.pds-review-table input[type=checkbox] { width: 17px; height: 17px; accent-color: #2964bc; }
.pds-notes { font-size: .8rem; padding-left: 1.1rem; margin: .5rem 0; }
.pds-import details { font-size: .8rem; margin-top: .65rem; }
.pds-import pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; margin-top: .6rem; }
.pds-source-pages { display: flex; overflow: auto; gap: 1rem; max-height: 600px; padding: .6rem 0; }
.pds-source-pages img { width: auto; max-width: min(100%, 700px); height: auto; object-fit: contain; align-self: start; }
/* PDS scan checklist, adapted from the supplied step-checklist design. */
.pds-scan-loading {
    --scan-accent: #0a6cff; --scan-ink: #1d1d1f; --scan-muted: #86868b;
    --scan-bg: #fff; --scan-bar: #dce4f0; --scan-track: #ebf0f7;
    position: fixed; z-index: 1300; display: grid; place-items: center;
    max-width: none; max-height: none;
    box-sizing: border-box; margin: 0; border: 0; padding: 16px; overflow: auto;
    overscroll-behavior: contain;
    background: rgba(233,239,248,.6); color: var(--scan-ink);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    font: 500 13px/1.4 "Geist", "Segoe UI", system-ui, sans-serif;
}
.pds-loading-card { box-sizing: border-box; width: min(440px, 100%); padding: 28px; display: grid; gap: 20px; border: 1px solid var(--scan-track); border-radius: 20px; background: var(--scan-bg); box-shadow: 0 2px 4px rgba(16,24,40,.06), 0 18px 40px rgba(16,24,40,.14); }
.is-pds-scanning [data-pds-progress], .is-pds-scanning [data-pds-status] { display: none !important; }
.pds-loading-file { font: 500 11px/1.5 ui-monospace, Consolas, monospace; letter-spacing: .08em; color: var(--scan-muted); overflow-wrap: anywhere; }
.pds-loading-card h2 { font: 600 20px/1.2 "Segoe UI", system-ui, sans-serif; margin: 0; }
.pds-loading-list { position: relative; display: grid; gap: 22px; padding: 2px 0; }
.pds-loading-track { position: absolute; left: 9px; top: 12px; bottom: 20px; width: 2px; border-radius: 1px; background: var(--scan-track); overflow: hidden; }
.pds-loading-track b { position: absolute; inset: 0; background: var(--scan-accent); transform-origin: 50% 0; transform: scaleY(0); transition: transform .7s cubic-bezier(.32,.72,0,1); }
.pds-loading-step { position: relative; display: flex; align-items: flex-start; gap: 12px; }
.pds-loading-icon { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--scan-bg); box-shadow: inset 0 0 0 2px var(--scan-bar); display: grid; place-items: center; transition: box-shadow .3s ease, background-color .3s ease; }
.pds-loading-icon i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--scan-accent); opacity: 0; transform: scale(.4); transition: opacity .25s ease, transform .25s ease; }
.pds-loading-icon svg { position: absolute; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .594s cubic-bezier(.34,1.56,.64,1); }
.pds-loading-step.is-active .pds-loading-icon { box-shadow: inset 0 0 0 2px var(--scan-accent); }
.pds-loading-step.is-active .pds-loading-icon i { opacity: 1; animation: pds-checklist-pulse 1.1s ease-in-out infinite; }
.pds-loading-step.is-done .pds-loading-icon { background: var(--scan-accent); box-shadow: inset 0 0 0 2px var(--scan-accent); }
.pds-loading-step.is-done svg { opacity: 1; transform: scale(1); }
.pds-loading-text { display: grid; gap: 4px; min-width: 0; }
.pds-loading-text b { font-size: 13px; color: var(--scan-muted); transition: color .3s ease; }
.pds-loading-text span { font-size: 12px; color: var(--scan-muted); overflow-wrap: anywhere; }
.pds-loading-step.is-active b, .pds-loading-step.is-done b { color: var(--scan-ink); }
.pds-loading-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pds-loading-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--scan-track); padding-top: 16px; }
.pds-loading-time { color: var(--scan-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.pds-loading-footer button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--scan-bar); border-radius: 9px; color: var(--scan-ink); background: var(--scan-bg); font: inherit; cursor: pointer; }
.pds-loading-footer button:focus-visible { outline: 3px solid var(--scan-accent); outline-offset: 3px; }
.pds-loading-footer button:disabled { opacity: .5; cursor: default; }
.pds-loading-card:has(.pds-loading-confirm) > :not(.pds-loading-confirm) { display: none; }
.pds-loading-confirm { padding: 4px 0; }
.pds-loading-confirm strong { font-size: 15px; }
.pds-loading-confirm p { color: var(--scan-muted); font-size: 13px; margin: 8px 0 12px; }
.pds-loading-confirm > div { display: flex; flex-wrap: wrap; gap: 8px; }
.pds-loading-confirm button { min-height: 40px; border: 1px solid var(--scan-bar); border-radius: 9px; padding: 8px 12px; background: var(--scan-bg); color: var(--scan-ink); font: inherit; cursor: pointer; }
.pds-loading-confirm [data-confirm-cancel] { background: #b42318; color: white; border-color: #b42318; }
.pds-loading-confirm button:focus-visible { outline: 3px solid var(--scan-accent); outline-offset: 3px; }
html[data-theme="dark"] .pds-scan-loading { --scan-bg: #18282e; --scan-ink: #ecf3f8; --scan-muted: #a6b6c4; --scan-bar: #405664; --scan-track: #2d424c; --scan-accent: #4fa3ff; }
html[data-theme="dark"] .pds-scan-loading { background: rgba(8,17,25,.6); }
@keyframes pds-checklist-pulse { 0%,100% { transform: scale(.7); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .pds-scan-loading *, .pds-scan-loading *::before, .pds-scan-loading *::after { animation: none !important; transition: none !important; } .pds-loading-step.is-active .pds-loading-icon i { transform: scale(1); } }
@media (max-width: 640px) { .pds-import { padding: .85rem; } .pds-import-heading { align-items: flex-start; flex-direction: column; gap: .4rem; } }
@media (max-width: 640px) {
    .pds-review-table, .pds-review-table tbody { display: block; }
    .pds-review-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .pds-review-table tr { display: grid; grid-template-columns: 32px minmax(0, 1fr); padding: .5rem; border-bottom: 1px solid var(--bs-border-color, #e6ebf1); }
    .pds-review-table td { border: 0; padding: .25rem; min-width: 0 !important; width: auto !important; }
    .pds-review-table td:first-child { grid-column: 1; grid-row: 1 / 4; padding-top: .5rem; }
    .pds-review-table td:nth-child(2) { grid-column: 2; font-weight: 600; }
    .pds-review-table td:nth-child(3), .pds-review-table td:nth-child(4) { grid-column: 2; }
}
