/* Accepted FIX22 direction: centered, legible project/lead workspaces. FIX18 invoices stay unchanged. */
.lead-drawer:not(.invoice-workspace){top:50%;left:50%;right:auto;bottom:auto;width:min(1220px,calc(100vw - 64px));height:calc(100vh - 64px);height:calc(100dvh - 64px);max-height:1100px;border:1px solid #dce4ed;border-radius:22px;overflow:hidden;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:opacity .15s;box-shadow:0 24px 90px rgba(17,28,38,.26)}
.lead-drawer.project-workspace{width:min(1440px,calc(100vw - 64px))}.lead-drawer:not(.invoice-workspace).show{visibility:visible;pointer-events:auto;opacity:1;transform:translate(-50%,-50%)}
.lead-drawer:not(.invoice-workspace) .drawer-head{padding:24px 28px;flex-shrink:0;gap:20px}.lead-drawer:not(.invoice-workspace) .drawer-head h2{font-size:25px;line-height:1.35;overflow-wrap:anywhere}.lead-drawer:not(.invoice-workspace) .drawer-head .eyebrow{font-size:12px}.lead-drawer:not(.invoice-workspace) .drawer-body{padding:24px 28px;min-height:0;overscroll-behavior:contain;scroll-behavior:smooth}.lead-drawer:not(.invoice-workspace) .drawer-actions{flex-shrink:0;flex-wrap:wrap;padding:16px 28px;gap:10px;min-height:72px}.lead-drawer:not(.invoice-workspace) .drawer-actions .btn{font-size:14px;min-height:44px;padding:12px 18px}.lead-drawer:not(.invoice-workspace) .drawer-section{scroll-margin-top:16px}.lead-drawer:not(.invoice-workspace) .drawer-section h3{font-size:20px}.lead-drawer:not(.invoice-workspace) .drawer-form{gap:18px}.lead-drawer:not(.invoice-workspace) .field label,.project-workspace .project-edit-grid>label,.project-workspace .sia-form>label{font-size:13px;line-height:1.5}.lead-drawer:not(.invoice-workspace) .drawer-form input,.lead-drawer:not(.invoice-workspace) .drawer-form select,.lead-drawer:not(.invoice-workspace) .drawer-form textarea,.project-workspace .project-edit-grid input,.project-workspace .project-edit-grid select,.project-workspace .sia-form input:not([type=checkbox]),.project-workspace .sia-form select,.project-workspace .sia-form textarea{font-size:16px;padding:11px 13px;min-height:44px}.project-workspace .project-edit-grid,.project-workspace .sia-form{gap:18px}.project-workspace .project-section{padding:24px;border-radius:16px}.project-workspace .project-section-head>div>span{font-size:12px}.project-workspace .project-empty,.project-workspace .project-finance-note,.project-workspace .sia-help,.project-workspace .sia-phase-notice{font-size:14px;line-height:1.65}.project-workspace .sia-phase>summary{padding:18px;font-size:16px;grid-template-columns:minmax(180px,1fr) 120px 120px 120px}.project-workspace .sia-phase-name strong{font-size:16px}.project-workspace .sia-phase-name small{font-size:14px}.project-workspace .sia-phase-body{padding:20px}.project-workspace .sia-code{font-size:13px;min-width:42px;min-height:42px;display:flex;align-items:center;justify-content:center}.project-workspace .project-workspace-summary .project-workspace-kpis{gap:16px}
.workspace-sections{display:flex;flex:0 0 auto;gap:7px;padding:12px 28px;border-bottom:1px solid #dce4ed;background:#fff;overflow-x:auto;overscroll-behavior-x:contain}.workspace-sections button{white-space:nowrap;border:1px solid transparent;border-radius:10px;padding:12px 14px;font:inherit;font-size:14px;background:#f1f4f8;color:#41566d;cursor:pointer}.workspace-sections button:focus-visible{outline:3px solid var(--accent,#285ab5)}.workspace-sections button.active{border-color:#d9e5f4;background:var(--soft,#edf4ff);color:var(--accent,#285ab5)}
.modal-backdrop{z-index:80}.modal-backdrop .modal{display:flex;flex-direction:column;width:min(880px,100%);max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow:hidden;padding:0}.modal-backdrop #modalTitle{padding:22px 26px;margin:0;border-bottom:1px solid #dce4ed;font-size:23px}.modal-backdrop #modalBody{padding:22px 26px;overflow:auto;min-height:0}.modal-backdrop .modal-actions{margin:0;padding:16px 26px;border-top:1px solid #dce4ed;background:#fff}.modal-backdrop .field>label{font-size:14px}.modal-backdrop input:not([type=checkbox]),.modal-backdrop select,.modal-backdrop textarea{font-size:16px;min-height:44px}.workspace-overlay-open{overflow:hidden}
@media(max-width:800px){.lead-drawer:not(.invoice-workspace),.lead-drawer.project-workspace{width:calc(100vw - 24px);height:calc(100vh - 24px);height:calc(100dvh - 24px);border-radius:16px}.lead-drawer:not(.invoice-workspace) .drawer-head{padding:18px}.lead-drawer:not(.invoice-workspace) .drawer-head h2{font-size:21px}.lead-drawer:not(.invoice-workspace) .drawer-body{padding:16px}.lead-drawer:not(.invoice-workspace) .drawer-actions{padding:12px 16px}.workspace-sections{padding:10px 16px}.project-workspace .project-section{padding:18px}.project-workspace .sia-phase>summary{grid-template-columns:minmax(100px,1fr) 54px 54px 60px;gap:6px;font-size:13px;padding:12px}.project-workspace .sia-phase-name strong{font-size:14px}.project-workspace .sia-phase-name small{font-size:12px}.project-workspace .sia-code{min-width:30px;min-height:32px}.project-workspace .sia-phase-body{padding:14px}.project-workspace .project-edit-grid,.project-workspace .sia-form,.lead-drawer:not(.invoice-workspace) .drawer-form{grid-template-columns:1fr}.project-workspace .project-edit-grid .wide{grid-column:1}.project-workspace .project-two-columns{grid-template-columns:1fr}.modal-backdrop{padding:10px}}
@media(max-width:480px){.lead-drawer:not(.invoice-workspace),.lead-drawer.project-workspace{width:100vw;height:100vh;height:100dvh;border-radius:0}.lead-drawer:not(.invoice-workspace) .drawer-actions .btn{padding:10px 12px;font-size:13px}.project-workspace .sia-phase>summary{grid-template-columns:minmax(105px,1fr) 42px 42px 54px}.modal-backdrop #modalBody{padding:18px}.project-workspace .project-section{padding:14px}.workspace-sections button{padding:10px;font-size:13px}}
@media(prefers-reduced-motion:reduce){.lead-drawer:not(.invoice-workspace){transition:none}.lead-drawer:not(.invoice-workspace) .drawer-body{scroll-behavior:auto}}
/* Grid children must shrink: long project titles and native time controls must not widen the modal. */
.modal-backdrop .field{min-width:0}.modal-backdrop #modalBody input:not([type=checkbox]),.modal-backdrop #modalBody select,.modal-backdrop #modalBody textarea{box-sizing:border-box;min-width:0;max-width:100%;width:100%}.modal-backdrop .time-form-preview{grid-column:1/-1}
@media(max-width:600px){.modal-backdrop #modalBody .form-grid{grid-template-columns:minmax(0,1fr)}.modal-backdrop #modalBody .field.full{grid-column:1/-1}.modal-backdrop #modalBody .time-modal-duration{grid-template-columns:minmax(0,1fr)}.modal-backdrop .modal-actions{flex-wrap:wrap;padding:12px 18px}}
