/* R12: scoped styles; no changes to existing invoice or email rendering. */
#r11-mailboxes>label{flex-direction:row!important;text-align:left!important;justify-content:flex-start!important}#r11-mailboxes>label>input[type=checkbox]{align-self:center!important}
#r11-mailboxes{display:grid;gap:12px;padding:24px}#r11-mailboxes>label{display:flex;align-items:center;gap:12px;margin:0;padding:12px;border:1px solid #8883;border-radius:10px;line-height:1.5;overflow-wrap:anywhere}#r11-mailboxes>label>input[type=checkbox]{display:inline-block;flex:0 0 19px;width:19px;height:19px;margin:0}#r11-mailboxes>label:has(input:checked){border-color:var(--pf-button,#237b32);box-shadow:inset 3px 0 var(--pf-button,#237b32)}
.dt-intro{display:flex;justify-content:space-between;gap:24px;align-items:center}.dt-intro p{max-width:680px;line-height:1.6}.dt-tools{display:flex;gap:16px;flex-wrap:wrap;justify-content:space-between;align-items:center;margin:18px 0}.dt-tools label{margin:0;display:grid;gap:6px}.dt-legend{display:flex;flex-wrap:wrap;gap:8px}.dt-status{font-size:12px;font-weight:600;border-radius:20px;padding:4px 9px;display:inline-block;background:#edf1f4;color:#405465}.dt-status.active{background:#fff0cc;color:#755300}.dt-status.completed{background:#dff3e6;color:#1e6036}#dt-viewport{height:65vh;min-height:380px;overflow:auto;position:relative;border:1px solid #8884;border-radius:18px;background-color:var(--pf-background,#f4f7fa);background-image:radial-gradient(#889a9a50 1px,transparent 1px);background-size:22px 22px;overscroll-behavior:contain;cursor:grab}#dt-viewport:active{cursor:grabbing}#dt-size{position:relative}#dt-canvas{position:relative;transform-origin:0 0}.dt-lines{position:absolute;inset:0;pointer-events:none}.dt-lines path{fill:none;stroke:#90a6a1;stroke-width:2}.dt-card{position:absolute;width:232px;height:128px;box-sizing:border-box;background:var(--pf-surface,#fff);color:var(--pf-text,#18382d);border:1px solid #95a8a66b;border-top:4px solid #8799a7;border-radius:14px;box-shadow:0 5px 20px #102d2910;overflow:hidden;cursor:default}.dt-card.active{border-top-color:#d99a17}.dt-card.completed{border-top-color:#27884b}.dt-card.dt-match{outline:3px solid #4e92d7;outline-offset:3px}.dt-title{display:flex!important;flex-direction:column;align-items:flex-start;gap:8px;width:100%;padding:12px!important;background:transparent!important;color:inherit!important;border:0!important;box-shadow:none!important;text-align:left;cursor:pointer}.dt-title strong{font-size:14px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.dt-card-actions{position:absolute;bottom:4px;right:8px;display:flex;gap:6px}.dt-card-actions button{min-height:25px!important;padding:2px 9px!important;font-size:13px}.dt-detail{padding:24px;display:grid;gap:16px;max-width:900px}.dt-detail label{display:grid;gap:6px}.dt-description,.dt-comments p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.dt-detail .actions{flex-wrap:wrap}.dt-links{display:grid;gap:8px;overflow-wrap:anywhere}.dt-links a{color:#3478bc}.dt-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,180px));gap:12px}.dt-images img{width:100%;height:130px;object-fit:cover;border-radius:10px;border:1px solid #8884}.dt-upload input{max-width:100%}.dt-comments article{border-top:1px solid #8883;padding:14px 0}.dt-comments small{display:block;margin-top:4px}.dt-detail textarea{width:100%;box-sizing:border-box}.dt-intro .actions{flex-shrink:0}.factory-shell #main{min-width:0}.factory-shell .sidebar .nav{display:grid;gap:8px}@media(max-width:800px){.dt-intro{display:block}.dt-tools{display:grid;grid-template-columns:1fr}.dt-detail{padding:16px}#dt-viewport{height:60vh}.dt-legend{font-size:11px}}
/* R22: files live in the milestone editor, replacing the old photo-only picker. */
.dt-detail .dt-upload{display:none}
.dt22-files{display:grid;gap:12px;margin:12px 0}
.dt22-file{display:flex;gap:16px;border:1px solid var(--border,#d7dfe5);padding:14px;border-radius:10px;overflow-wrap:anywhere}
.dt22-file>div{min-width:0;flex:1}.dt22-file img{width:100px;height:85px;object-fit:cover;border-radius:6px}
.dt22-file .actions{flex-wrap:wrap;margin-top:10px}.dt22-file small,.dt22-edit-file small{opacity:.7;overflow-wrap:anywhere}
.dt22-edit-file{padding:14px;border:1px solid var(--border,#d7dfe5);border-radius:10px;margin-bottom:12px}
.dt22-preview{margin-top:14px;min-height:120px}.dt22-preview iframe{width:100%;height:65vh;border:0}.dt22-full-image{display:block;max-width:100%;max-height:70vh;object-fit:contain;margin:auto}
.dt22-preview pre{white-space:pre-wrap;overflow-wrap:anywhere}.dt22-office{max-height:65vh;overflow:auto;background:white;color:#1f2937;padding:18px}.dt22-office p{white-space:pre-wrap}.dt22-office table{border-collapse:collapse;min-width:100%}.dt22-office td{border:1px solid #cbd5e1;padding:6px;white-space:pre-wrap;min-width:65px}.dt22-office h3{margin-top:24px}
@media(max-width:600px){.dt22-file{flex-direction:column}.dt22-file img{width:100%;height:140px}}
