/* Compact document handoff, inheriting all three CRM themes. */
#officeWorkspace .handoff-verification-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0 18px}
#officeWorkspace .handoff-verification-head h3{font-size:var(--fs-xl,17px);line-height:1.4;margin:0 0 5px}
#officeWorkspace .handoff-verification-head p{font-size:var(--fs-lg,14px);color:var(--muted);margin:0}
.handoff-document-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
#officeWorkspace .handoff-document{box-sizing:border-box;min-width:0;padding:16px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--blue,#76a6ce) 5%,var(--surface)),var(--surface));min-height:166px}
.handoff-document-heading{display:flex;align-items:center;gap:10px;min-width:0}
#officeWorkspace .handoff-document-heading :is(h4,strong){font-family:inherit;font-size:var(--fs-lg,14px);font-weight:var(--fw-s,600);line-height:1.45;margin:0;color:var(--text);overflow-wrap:anywhere}
.handoff-pdf-mark,.handoff-summary-mark{display:grid;place-items:center;width:34px;height:40px;flex:none;border:1px solid color-mix(in srgb,var(--blue,#76a6ce) 30%,var(--border));border-radius:6px 6px 10px 6px;background:color-mix(in srgb,var(--blue,#76a6ce) 9%,var(--surface));color:var(--text);font-size:var(--fs-xs,11.5px);font-weight:var(--fw-b,700);letter-spacing:.04em}
.handoff-summary-mark{font-size:var(--fs-2xl,22px);line-height:1;font-weight:var(--fw-n,400)}
#officeWorkspace .handoff-document>p{margin:10px 0 3px;font-size:var(--fs-lg,14px);line-height:1.5;color:var(--muted)}
#officeWorkspace .handoff-document small{display:block;font-size:var(--fs-sm,12.5px);line-height:1.5;color:var(--muted)}
#officeWorkspace .handoff-document.is-confirmed>p{color:var(--text)}
#officeWorkspace .handoff-document.is-missing{border-color:color-mix(in srgb,#E5A83D 50%,var(--border))}
#officeWorkspace .handoff-document-actions{display:flex;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}
#officeWorkspace .handoff-document-actions .btn{min-height:32px;padding:6px 12px;font-size:var(--fs-md,13.5px);line-height:1.3}
#officeWorkspace .handoff-document-actions .handoff-attach{border:0;background:transparent;color:var(--muted);padding-inline:4px}
#officeWorkspace .handoff-document{padding:20px;background:linear-gradient(125deg,color-mix(in srgb,var(--blue,#76a6ce) 7%,var(--surface)),var(--surface));display:flex;flex-direction:column;gap:10px}
#officeWorkspace .handoff-document.is-confirmed{border-color:color-mix(in srgb,#2FBF87 40%,var(--border))}
#officeWorkspace .handoff-document.is-reviewed{background:linear-gradient(125deg,color-mix(in srgb,#2FBF87 8%,var(--surface)),var(--surface))}
.handoff-document-status{display:inline-flex;align-self:flex-start;padding:4px 9px;border:1px solid var(--border);border-radius:6px;font-size:var(--fs-md,13.5px);line-height:1.5;color:var(--muted);background:var(--surface2);margin-bottom:4px}
.handoff-document-status.ok{color:var(--cc-green,#2FBF87);border-color:color-mix(in srgb,var(--cc-green,#2FBF87) 35%,var(--border));background:color-mix(in srgb,var(--cc-green,#2FBF87) 8%,var(--surface))}
.handoff-document-parties{display:grid;gap:10px;margin:6px 0;min-width:0}
.handoff-document-parties>div{display:grid;gap:3px}
#officeWorkspace .handoff-document-parties strong{font-size:var(--fs-lg,14px);line-height:1.5;color:var(--text);font-weight:var(--fw-s,600);overflow-wrap:anywhere}
.handoff-review-control{margin-top:auto;padding-top:14px;border-top:1px solid var(--border)}
#officeWorkspace .handoff-review-control .handoff-review-sign{color:var(--cc-blue);background:color-mix(in srgb,var(--cc-blue) 9%,var(--surface));border-color:color-mix(in srgb,var(--cc-blue) 35%,var(--border));font-size:var(--fs-lg,14px)}
.handoff-review-signature{font-size:var(--fs-lg,14px);line-height:1.5;color:var(--cc-green)}
.handoff-review-undo{font-size:var(--fs-sm,12.5px)!important;color:var(--muted)!important}
.handoff-document-recovery{margin-top:12px;font-size:var(--fs-md,13.5px);color:var(--muted)}
.handoff-document-recovery p{font-size:var(--fs-md,13.5px)}
.handoff-source-actions{display:flex;justify-content:flex-end;margin-top:12px}
#officeWorkspace .handoff-summary-status{color:var(--cc-green);font-size:var(--fs-md,13.5px)}
#officeWorkspace .handoff-summary:not(.is-confirmed) .handoff-summary-status{color:var(--muted)}
#officeWorkspace .handoff-summary>summary{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.handoff-summary>summary .handoff-document-heading{flex:1 1 180px}
#officeWorkspace details.handoff-summary{margin:0;min-height:166px}
#officeWorkspace .handoff-summary>summary{cursor:pointer;list-style:none;display:grid;gap:12px;background:transparent;padding:0;border:0}
#officeWorkspace .handoff-summary>summary::-webkit-details-marker{display:none}
.handoff-summary-status{display:flex;justify-content:space-between;gap:8px;font-size:var(--fs-lg,14px);color:var(--muted)}
.handoff-summary[open] .handoff-summary-status>span{transform:rotate(180deg)}
.handoff-summary-body{border-top:1px solid var(--border);margin-top:14px;padding-top:14px}
.handoff-summary-body p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:var(--fs-lg,14px);line-height:1.65;margin:0 0 10px;color:var(--text)}
#officeWorkspace form.handoff-attestation{border:1px solid color-mix(in srgb,var(--blue,#76a6ce) 40%,var(--border));border-radius:12px;padding:20px;gap:16px;margin-top:22px;background:color-mix(in srgb,var(--blue,#76a6ce) 4%,var(--surface))}
.handoff-attestation>header{display:flex;justify-content:space-between;align-items:start;gap:12px}
.handoff-eyebrow{display:block;color:var(--muted);font-size:var(--fs-sm,12.5px);margin-bottom:6px}
.handoff-attestation h4{font-size:var(--fs-xl,17px);line-height:1.5;margin:0;color:var(--text)}
.handoff-version{color:var(--muted);font-size:var(--fs-md,13.5px);white-space:nowrap}
.handoff-signatory{padding:12px 0;border-bottom:1px solid color-mix(in srgb,var(--text) 25%,var(--border))}
.handoff-signatory span{display:block;color:var(--muted);font-size:var(--fs-md,13.5px);margin-bottom:6px}
.handoff-signatory strong{display:block;font-size:var(--fs-2xl,22px);line-height:1.4;font-weight:var(--fw-s,600);letter-spacing:-.02em;color:var(--text)}
#officeWorkspace .handoff-attestation label:has(input[type=checkbox]){padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);font-size:var(--fs-lg,14px);line-height:1.55;cursor:pointer}
#officeWorkspace .handoff-attestation label:has(input:checked){border-color:color-mix(in srgb,var(--blue,#76a6ce) 65%,var(--border));background:color-mix(in srgb,var(--blue,#76a6ce) 10%,var(--surface))}
#officeWorkspace .handoff-attestation input[type=checkbox]{appearance:auto;accent-color:var(--blue,#76a6ce);width:18px;height:18px;margin:2px 0 0}
.handoff-attestation footer{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:16px}
.handoff-attestation footer p{flex:1 1 200px;font-size:var(--fs-md,13.5px);color:var(--muted);line-height:1.5;margin:0}
#officeWorkspace .handoff-sign-button{min-height:40px;padding:10px 15px;font-size:var(--fs-lg,14px);line-height:1.4;white-space:normal}
.handoff-signed-record{display:grid;gap:5px;padding:14px 16px;border-left:3px solid #2FBF87;border-radius:8px;background:color-mix(in srgb,#2FBF87 7%,var(--surface));margin:15px 0}
.handoff-signed-record strong{font-size:var(--fs-lg,14px);line-height:1.5}.handoff-signed-record span{font-size:var(--fs-md,13.5px);color:var(--muted)}
#officeWorkspace .handoff-related{margin-top:20px}
#handoffPdfDialog,#handoffAttachDialog{box-sizing:border-box;width:min(1050px,calc(85vw / var(--crm-ui-scale, 1)));max-height:calc(90dvh / var(--crm-ui-scale, 1));padding:0;border:1px solid var(--border);border-radius:16px;color:var(--text);background:var(--surface);box-shadow:0 25px 90px #0006;overflow:hidden}
#handoffPdfDialog[open]{display:flex;flex-direction:column;height:calc(85dvh / var(--crm-ui-scale, 1));animation:handoff-pdf-in .18s ease-out}
#handoffPdfDialog::backdrop,#handoffAttachDialog::backdrop{background:#0008;backdrop-filter:blur(3px)}
#handoffPdfDialog header,#handoffAttachDialog header{padding:16px 22px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);flex:none}
#handoffPdfDialog h2,#handoffAttachDialog h2{font-size:var(--fs-xl,17px);line-height:1.4;margin:0}
#handoffPdfDialog header p{font-size:var(--fs-lg,14px);color:var(--muted);margin:5px 0 0}
#handoffPdfDialog .handoff-pdf-status{font-size:var(--fs-md,13.5px);line-height:1.5;color:var(--muted);margin:0;padding:10px 22px;flex:none}
#handoffPdfDialog iframe{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:0;flex:1;border:0;background:#e6e8eb}
#handoffPdfDialog iframe[hidden]{display:none}
#handoffPdfDialog footer,#handoffAttachDialog footer{margin-top:auto;display:flex;justify-content:flex-end;gap:10px;padding:14px 22px;background:var(--surface);border-top:1px solid var(--border);flex:none}
#handoffAttachDialog{width:min(600px,calc(90vw / var(--crm-ui-scale, 1)))}
#handoffAttachDialog form{display:grid;gap:16px;padding:20px}
#handoffAttachDialog label{display:grid;gap:8px;font-size:var(--fs-lg,14px);line-height:1.5}
#handoffAttachDialog select{font:inherit;padding:10px;max-width:100%;min-width:0;background:var(--surface2);border:1px solid var(--border);border-radius:8px;color:var(--text)}
#handoffAttachDialog p{font-size:var(--fs-md,13.5px);line-height:1.5;color:var(--muted);margin:0}
@keyframes handoff-pdf-in{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
@media(max-width:750px){.handoff-document-grid{grid-template-columns:1fr}#officeWorkspace .handoff-document,#officeWorkspace details.handoff-summary{min-height:0}#officeWorkspace form.handoff-attestation{padding:16px}.handoff-attestation>header{flex-wrap:wrap}.handoff-sign-button{width:100%}#handoffPdfDialog{width:calc(96vw / var(--crm-ui-scale, 1));height:calc(92dvh / var(--crm-ui-scale, 1))}#handoffPdfDialog header,#handoffPdfDialog footer{padding:12px 16px}}
@media(prefers-reduced-motion:reduce){#handoffPdfDialog[open]{animation:none}}

/* Office verification: two independently accepted parts and one named signature. */
#officeWorkspace .office-verification-part{margin:16px 0;border:1px solid var(--premium-line,var(--border));border-radius:14px;background:var(--premium-paper,var(--surface));overflow:hidden}
#officeWorkspace .office-verification-part>summary{padding:18px 20px;background:linear-gradient(115deg,var(--premium-soft,var(--surface2)),var(--premium-paper,var(--surface)));gap:14px}
#officeWorkspace .office-verification-part>summary>span:not(.office-part-number){display:flex;flex:1;flex-direction:column;gap:5px;min-width:0}
#officeWorkspace .office-verification-part>summary strong{font-size:var(--fs-xl,17px);font-weight:var(--fw-s,600);line-height:1.4;color:var(--premium-ink,var(--text))}
#officeWorkspace .office-verification-part>summary small{font-size:var(--fs-md,13.5px);line-height:1.4;color:var(--premium-muted,var(--muted))}
.office-part-number{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border:1px solid var(--premium-line,var(--border));border-radius:50%;font-size:var(--fs-lg,14px);color:var(--premium-ink,var(--text))}
#officeWorkspace .office-verification-part.is-complete{border-color:color-mix(in srgb,var(--green,#2FBF87) 38%,var(--border))}
#officeWorkspace .office-verification-part.is-complete .office-part-number{border-color:color-mix(in srgb,var(--green,#2FBF87) 45%,var(--border));background:color-mix(in srgb,var(--green,#2FBF87) 9%,var(--surface));color:var(--green,#2FBF87)}
#officeWorkspace .office-verification-part-body{padding:20px!important;border-top:1px solid var(--premium-line,var(--border))}
#officeWorkspace .office-verification-part .office-accountant-approval{padding:0;margin:0;background:transparent;border:0}
#officeWorkspace .office-verification-part .office-entity-comparison .btn{margin-top:12px;align-self:start}
.office-pack-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin-top:20px;padding-top:18px;border-top:1px solid var(--premium-line,var(--border))}
.office-pack-footer p{font-size:var(--fs-lg,14px);line-height:1.5;color:var(--premium-muted,var(--muted));margin:0}
#officeWorkspace article.handoff-summary>header{display:flex;flex-wrap:wrap;gap:14px;align-items:center}
#officeWorkspace article.handoff-summary .handoff-summary-body{flex:1;display:flex;flex-direction:column}
#officeWorkspace article.handoff-summary:not(.is-reviewed) .handoff-summary-status{color:var(--premium-muted,var(--muted))}
#officeWorkspace .handoff-sign-button,#handoffPdfDialog .handoff-sign-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:46px;padding:13px 22px!important;border-radius:11px!important;border:1px solid color-mix(in srgb,#719bcb 55%,var(--premium-line,var(--border)))!important;background:color-mix(in srgb,#719bcb 16%,var(--premium-paper,var(--surface)))!important;color:var(--premium-ink,var(--text))!important;font-size:var(--fs-xl,17px);font-weight:var(--fw-s,600);line-height:1.4;white-space:normal;box-shadow:0 3px 10px #00000006}
#officeWorkspace .handoff-sign-button:disabled,#handoffPdfDialog .handoff-sign-button:disabled{opacity:.55;cursor:default}
#officeWorkspace .handoff-sign-button:focus-visible,#handoffPdfDialog .handoff-sign-button:focus-visible{outline:2px solid #719bcb;outline-offset:3px}
#handoffPdfDialog [data-pdf-review][hidden]{display:none!important}
#handoffPdfDialog footer{flex-wrap:wrap}
@media(max-width:750px){#officeWorkspace .office-verification-part>summary{padding:14px}#officeWorkspace .office-verification-part-body{padding:14px!important}.office-pack-footer .btn{width:100%}}

/* Compact office pack; keep every document, status and named approval. */
html.crm-premium-trial body #officeWorkspace .handoff-document-grid{gap:10px;align-items:start}
html.crm-premium-trial body #officeWorkspace :is(.handoff-document,details.handoff-summary){min-height:0;padding:12px!important;gap:6px}
html.crm-premium-trial body #officeWorkspace .office-verification-part{margin:10px 0}
html.crm-premium-trial body #officeWorkspace .office-verification-part>summary{padding:10px 12px!important;gap:9px}
html.crm-premium-trial body #officeWorkspace .office-verification-part-body{padding:12px!important}
html.crm-premium-trial body #officeWorkspace .handoff-document-parties{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;margin:2px 0}
html.crm-premium-trial body #officeWorkspace .handoff-document-status{padding:2px 6px;margin:0;line-height:1.3}
html.crm-premium-trial body #officeWorkspace .handoff-document-actions{margin-top:4px;gap:6px}
html.crm-premium-trial body #officeWorkspace .handoff-review-control{padding-top:7px;margin-top:3px}
html.crm-premium-trial body #officeWorkspace .handoff-review-control .document-signature-box{padding:8px!important;margin:0 0 6px!important;gap:4px}
html.crm-premium-trial body #officeWorkspace .handoff-review-control .document-signature-box :is(p,strong){margin:0!important;font-size:var(--fs-md,13.5px)!important;line-height:1.4}
html.crm-premium-trial body #officeWorkspace .handoff-review-control .audit-attestation-signature{padding:4px 0 0!important;margin-top:4px!important}
html.crm-premium-trial body #officeWorkspace .handoff-review-control .audit-attestation-signature :is(b,span){font-size:var(--fs-md,13.5px)!important;line-height:1.4}
html.crm-premium-trial body #officeWorkspace .handoff-review-control .document-signature-submit{min-height:34px!important;padding:6px 10px!important;margin:0!important;font-size:var(--fs-md,13.5px)!important}
html.crm-premium-trial body #officeWorkspace .office-pack-footer{margin-top:10px;padding-top:10px;gap:8px}
html.crm-premium-trial body #officeWorkspace .office-pack-footer .handoff-sign-button{min-height:36px;padding:8px 12px!important;font-size:var(--fs-lg,14px)!important}
#handoffPdfDialog .handoff-pdf-pages{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;background:#e6e8eb;padding:8px;scrollbar-width:thin}
#handoffPdfDialog .handoff-pdf-pages[hidden]{display:none!important}
#handoffPdfDialog .handoff-pdf-page{width:100%;aspect-ratio:595.28/841.89;margin:0 auto 10px;background:white;box-shadow:0 1px 4px #0002;position:relative}
#handoffPdfDialog .handoff-pdf-page canvas{display:block;width:100%;height:auto}

/* One compact title/status row; no second PDF signature form on the card. */
html.crm-premium-trial body #officeWorkspace .handoff-document-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0;margin:0;border:0;min-width:0}
html.crm-premium-trial body #officeWorkspace .handoff-document-header .handoff-document-heading{flex:1;gap:7px;min-width:0}
html.crm-premium-trial body #officeWorkspace .handoff-document-header .handoff-pdf-mark{width:28px;height:30px;font-size:var(--fs-xs,11.5px)}
html.crm-premium-trial body #officeWorkspace .handoff-document-state{display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right;flex:0 1 auto}
html.crm-premium-trial body #officeWorkspace .handoff-document-state .handoff-document-status{align-self:auto;margin:0;font-size:var(--fs-sm,12.5px);white-space:normal}
html.crm-premium-trial body #officeWorkspace .handoff-document .handoff-review-control{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
html.crm-premium-trial body #officeWorkspace .handoff-document .handoff-review-signature{margin:0;font-size:var(--fs-sm,12.5px)}
html.crm-premium-trial body #officeWorkspace .handoff-document .handoff-review-undo{padding:3px 6px;min-height:28px}

#handoffPdfDialog .handoff-pdf-pages{display:flex;padding:0;overflow:hidden}
#handoffPdfDialog .handoff-pdf-pages[hidden]{display:none}
#handoffPdfDialog iframe.handoff-pdf-reader{width:100%;height:100%;min-height:0;flex:1;border:0;display:block}

/* Office intake: compact comparison and completion of individually signed documents. */
#officeWorkspace .office-entity-fields>div{display:flex;flex-direction:column;gap:8px;min-width:0}
#officeWorkspace .office-entity-fields label{display:flex;flex-direction:column;gap:4px;min-width:0}
#officeWorkspace .office-entity-fields input,#officeWorkspace .office-entity-fields select{width:100%;min-width:0;box-sizing:border-box}
#officeWorkspace .office-verification-part.is-complete>summary{color:var(--green,#2FBF87);background:color-mix(in srgb,var(--green,#2FBF87) 8%,transparent)}
#officeWorkspace .office-verification-part.is-complete{border-color:color-mix(in srgb,var(--green,#2FBF87) 60%,transparent)}

/* Transfer105: consistent compact handoff cards, scoped to office. */
html.crm-premium-trial body #officeWorkspace .handoff-document-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
html.crm-premium-trial body #officeWorkspace .handoff-summary.handoff-document{grid-column:auto;display:block}
html.crm-premium-trial body #officeWorkspace .handoff-document :is(h4,strong){font-size:var(--fs-lg,14px);line-height:1.35}
html.crm-premium-trial body #officeWorkspace .handoff-summary-body{padding:6px 0 0;margin:0}
html.crm-premium-trial body #officeWorkspace .handoff-summary-body>p{margin:4px 0;white-space:pre-wrap}
html.crm-premium-trial body #officeWorkspace .handoff-document>.finale-document-evidence{display:block;margin:5px 0!important;text-align:left;align-self:start;width:fit-content;font-size:var(--fs-xs,11.5px);padding:3px 6px}
html.crm-premium-trial body #officeWorkspace .handoff-document .handoff-document-state{margin-left:auto;position:static}
html.crm-premium-trial body #officeWorkspace .handoff-document .crm-verification-status{position:static;white-space:nowrap;margin:0}
html.crm-premium-trial body #officeWorkspace .handoff-document .handoff-document-parties{margin:4px 0;font-size:var(--fs-sm,12.5px);line-height:1.35}
@media(max-width:760px){html.crm-premium-trial body #officeWorkspace .handoff-document-grid{grid-template-columns:1fr}}

html.crm-premium-trial body #officeWorkspace .office-verification-part>summary>.office-verification-title{flex:1;min-width:0}
html.crm-premium-trial body #officeWorkspace .office-verification-part>summary>.crm-verification-status{margin-left:auto;position:static;flex:none}
html.crm-premium-trial body #officeWorkspace details.handoff-summary>summary{display:flex;flex-wrap:nowrap}
