/* Scoped card boundaries: retain the existing editors, permissions and preview actions. */
body.rx-crm #view .grid:has(> .card[data-testid^="tpl-"]){gap:20px!important;align-items:stretch;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr))!important}
body.rx-crm #view .card[data-testid^="tpl-"]{border:1px solid var(--border,#dce1d5)!important;border-top:3px solid var(--primary,#626e13)!important;border-radius:14px!important;background:var(--surface,#fff)!important;padding:20px!important;box-shadow:0 3px 12px rgb(25 40 25 / .045)!important;display:flex;flex-direction:column;gap:6px;min-height:235px;min-width:0;overflow-wrap:anywhere}
body.rx-crm #view .card[data-testid^="tpl-"]>div:last-child{margin-top:auto!important;padding-top:16px;border-top:1px solid var(--border,#dce1d5)}
body.rx-crm #view .card[data-testid^="preview-user-"]{border:1px solid var(--border,#dce1d5)!important;border-radius:12px!important;background:var(--surface,#fff)!important;padding:18px!important;gap:12px!important;box-shadow:0 2px 8px rgb(25 40 25 / .035)!important;min-height:100px;min-width:0}
body.rx-crm #view div:has(> .card[data-testid^="preview-user-"]){gap:16px!important;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr))!important;margin-top:14px!important;margin-bottom:26px!important}
body.rx-crm #view .card[data-testid^="preview-user-"] .avatar{flex-shrink:0}
body.rx-crm #view .card[data-testid^="preview-user-"] .btn{flex-shrink:0;margin-left:4px!important}
body.rx-crm .project-picker-logo{display:block!important;width:32px!important;height:32px!important;min-width:32px!important;object-fit:contain!important;background:#fff!important;border-radius:7px;padding:3px!important;box-sizing:border-box;filter:none!important;opacity:1!important;flex:0 0 32px!important}
body.rx-crm [data-testid="project-switch"]{gap:9px!important}
body.rx-crm [data-testid="project-menu"] .hdr-menu__item{display:flex!important;align-items:center!important;gap:11px!important;min-height:52px!important;padding:10px 12px!important;line-height:1.35}
body.rx-crm [data-testid="project-menu"] .hdr-menu__item>span{flex:1;min-width:0;white-space:normal}
body.rx-crm [data-testid="project-menu"] .hdr-menu__head{padding:13px 12px 7px!important}
@media(max-width:600px){body.rx-crm #view .card[data-testid^="tpl-"]{min-height:210px}body.rx-crm #view .card[data-testid^="preview-user-"]{padding:16px!important}}
@media(max-width:800px){body.rx-crm [data-testid="project-switch"] [data-testid="project-menu"].hdr-menu[data-menu="project"]{left:94px!important;right:12px!important;width:auto!important;max-width:calc(100vw - 106px)!important;box-sizing:border-box}}

