/* Consistent compact workspace · PC, tablet and phone. */
:root{--ux-accent:#215b78;--ux-border:#dce5ec;--ux-soft:#f7f9fb}
body{font-size:14px;line-height:1.45}button,input,select,textarea{font-family:inherit}button{line-height:1.25}
main>header{padding:0!important;margin-bottom:8px!important;align-items:center;gap:8px!important}main>header h2{font-size:21px!important;line-height:1.2;margin:0!important}main>header p{font-size:12px!important;margin:3px 0 0!important}.eyebrow{font-size:10px!important;letter-spacing:.1em}.head-actions{gap:6px!important;align-items:center}.head-actions button,.head-actions summary{font-size:12px!important;padding:7px 10px!important;min-height:34px!important}.head-actions .badge{font-size:10px;padding:4px 8px}#workspaceBreadcrumb{font-size:11px;margin:3px 0 7px;line-height:1.3}
.team-page-heading h2,.work-toolbar h2{font-size:19px!important;margin:0!important}.team-page-heading p{font-size:12px;margin:3px 0!important}.team-page-heading .eyebrow{display:none}.team-page-heading{padding:0!important;margin:0 0 12px!important;gap:8px}.work-detail h2,.team-detail h2{font-size:19px!important}.work-detail h3,.team-detail h3{font-size:15px}.work-toolbar{gap:7px;margin:0 0 12px}.work-toolbar>div{gap:6px}.crm-actions,.work-actions{gap:6px!important}.crm-actions button,.work-actions button,.work-toolbar button,.team-page-heading button{font-size:13px!important;padding:7px 10px!important;min-height:34px!important;margin:0}
.rc2-navigation{position:static!important;display:flex;gap:6px;margin:0 0 10px!important;padding:0!important;border:0!important;background:transparent!important;z-index:auto!important}.rc2-navigation button{font-size:12px!important;padding:5px 8px!important;min-height:30px!important}.rc2-navigation span{font-size:11px}.rc2-navigation button:disabled{opacity:.45}
#sidebar{z-index:80}#sidebar nav{gap:5px}#sidebar nav button{font-size:12px;padding:8px 10px!important;min-height:34px!important}#sidebar nav summary{font-size:12px;padding:9px 10px!important}.nav-subgroup>summary{font-size:11px!important}.sidebar-collapsed #sidebar{z-index:80}
.workflow-dialog,.crm-dialog,.team-dialog{border:1px solid var(--ux-border);box-shadow:0 18px 70px #17364730;border-radius:14px;padding:18px;width:min(850px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}.crm-dialog>header,.team-dialog>header{align-items:center;margin:0 0 14px!important;gap:8px}.crm-dialog>header h2,.team-dialog>header h2{font-size:19px!important;line-height:1.25;margin:0!important}.crm-dialog>header button,.team-dialog>header button{margin-left:auto;flex:none}.crm-form-grid{gap:12px 16px}.crm-form label{font-size:12px!important;line-height:1.4;color:#3d5263;gap:5px}.crm-form input:not([type=checkbox]):not([type=radio]),.crm-form select,.crm-form textarea{font-size:14px;line-height:1.4;border:1px solid #cbd8e2;border-radius:8px;background:white;padding:8px 10px;min-height:38px;width:100%;color:#203b4b}.crm-form textarea{min-height:96px;resize:vertical}.crm-form input:focus,.crm-form select:focus,.crm-form textarea:focus{outline:2px solid #317e9b;outline-offset:1px}.crm-form input[type=hidden]{display:none!important}.crm-form label:has(>input[type=hidden]){display:none!important}
.crm-form button,.workflow-dialog button{min-height:34px;padding:7px 11px;font-size:13px;border-radius:8px}.crm-form-footer{display:flex;flex-wrap:wrap;gap:8px;align-items:center;border-top:1px solid var(--ux-border);padding:12px 0 0!important;margin:14px 0 0!important;background:white}.crm-form-footer>[type=submit]{background:#215b78!important;color:white!important;font-weight:600}.crm-form-footer>button:not([type=submit]){background:#f0f4f7;color:#3d5263}.crm-form-status{flex-basis:100%;margin:0;color:#a23428;font-size:12px}.crm-form-status:empty{display:none}.crm-help{font-size:12px;line-height:1.45}.date-clear{font-size:11px!important;min-height:26px!important;padding:3px 7px!important;justify-self:end;background:#edf3f7!important;color:#4a6173!important}
.crm-form label:has(>input[type=checkbox]),.crm-form label:has(>input[type=radio]),.announcement-recipient,.cw-checkbox{display:flex!important;align-items:center;gap:8px;min-height:32px!important}.crm-form input[type=checkbox],.crm-form input[type=radio],.workflow-form input[type=checkbox]{width:17px!important;height:17px!important;min-height:17px!important;flex:0 0 17px;padding:0!important;margin:0!important;accent-color:var(--ux-accent)}
.ux-section{border:1px solid var(--ux-border);border-radius:10px;padding:14px;background:white;min-width:0}.ux-section>h3{margin:0 0 12px;font-size:14px;color:#234b60;line-height:1.3}.ux-section>summary{font-size:13px;font-weight:600;cursor:pointer;min-height:24px!important;display:list-item;color:#385d72}.ux-section[open]>summary{margin-bottom:12px}.ux-section .crm-form-grid{margin:0}.ux-section .ux-section{border:0;padding:0}.ux-form>.crm-form-grid{gap:12px}.ux-form-intro{margin:0;color:#657b8a;font-size:12px}.ux-approval-note{border-left:3px solid #7b9daa;background:#f1f6f8;padding:10px 12px;font-size:12px}.ux-approval-note p{margin:4px 0}.ux-contact-picker{min-width:0}.ux-contact-picker>div,.ux-contact-picker{gap:6px}.ux-contact-picker button{display:block;width:100%;background:#f6f9fb!important;color:#284c62!important;border:1px solid #dfe8ed!important;text-align:left;margin:5px 0;padding:8px 10px!important;min-height:34px!important}.ux-contact-picker button small{display:block;font-size:11px;color:#6a7d89;line-height:1.4;margin-top:2px}.ux-contact-picker small{color:#687e8e;font-size:12px}.cw-suggestions:empty{display:none}.cw-suggestions button{font-size:13px!important;min-height:36px!important;padding:8px 10px!important}.cw-picker small{font-size:11px!important}
.ux-visit [data-repeat=contacts]{border:0;padding:0;margin:0}.ux-visit [data-repeat=contacts] legend{font-size:12px;color:#536c7b}.work-repeat-row{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:10px;border-radius:9px;background:#f8fafc}.work-repeat-row label:has(textarea){grid-column:1/-1}.ux-visit .work-repeat-row label:has([data-key=name]){grid-column:1/-1}.work-repeat-row>[data-remove-repeat]{justify-self:end;min-width:32px;grid-column:1/-1}.crm-record,.offer-summary{padding:12px 14px!important;margin:8px 0!important}.offer-summary h3{font-size:15px!important;margin:0 0 6px!important}.offer-summary p{margin:5px 0!important;line-height:1.4!important}.offer-summary small{font-size:11px!important}
@media(pointer:fine){.crm-form input,.crm-form select,.crm-form textarea{font-size:14px!important}.adjustable-table .edit,.adjustable-table .comment-edit{font-size:13px;line-height:20px;min-height:36px!important;padding:5px 7px}.adjustable-table td,.adjustable-table th{padding:7px 9px}.adjustable-table .sort-btn{min-height:32px;font-size:12px}.column-total{font-size:11px}}
@media(pointer:coarse){.crm-form input:not([type=checkbox]):not([type=radio]),.crm-form select,.crm-form textarea{font-size:16px!important;min-height:42px}.crm-form button,.work-actions button,.crm-actions button,.head-actions button,.head-actions summary{min-height:42px!important}.ux-section>summary{min-height:34px!important;align-content:center}.crm-form label:has(>input[type=checkbox]){min-height:42px!important}}
@media(max-width:900px){#sidebar{width:min(85vw,290px)}main{padding:12px!important}.head-actions{width:auto!important;flex:0 1 auto;max-width:100%;justify-content:flex-end!important}main>header{flex-wrap:wrap}.rc2-navigation button{min-height:34px!important}.work-detail{padding:14px}.work-split{gap:12px}.crm-dialog,.team-dialog{width:calc(100vw - 20px);padding:14px;max-height:calc(100dvh - 20px)}}
@media(max-width:600px){main>header>div:first-child{flex:1;min-width:150px}main>header h2{font-size:19px!important}.head-actions{gap:4px!important;flex-wrap:nowrap!important}.head-actions .badge{display:none}#globalSearchBtn{font-size:0!important;min-width:38px;padding:6px!important}#globalSearchBtn:after{content:'⌕';font-size:22px}.head-actions .notifications>summary{font-size:0!important;min-width:38px;padding:7px!important}.head-actions .notifications>summary:after{content:'🔔';font-size:17px}.head-actions .notifications>summary::marker{font-size:0}#menuBtn{min-width:38px!important;min-height:38px!important;padding:6px}.rc2-navigation{gap:4px;margin:0 0 8px!important}.rc2-navigation button{font-size:0!important;min-width:36px;min-height:34px!important}.rc2-navigation button:first-child:after{content:'←';font-size:19px}.rc2-navigation button:nth-child(2):after{content:'↻';font-size:19px}.rc2-navigation span{display:none}.crm-form-grid{grid-template-columns:minmax(0,1fr)!important;gap:11px}.crm-dialog,.team-dialog{border-radius:11px;padding:12px}.ux-section{padding:12px}.ux-section>h3{font-size:13px;margin-bottom:10px}.crm-form-footer{position:static}.work-repeat-row{grid-template-columns:minmax(0,1fr)}.work-toolbar button{flex:none;white-space:normal}.work-toolbar>div{width:auto!important}.team-page-heading>div:last-child{width:auto}.crm-form input,.crm-form select,.crm-form textarea{max-width:100%}.work-toolbar h2{font-size:17px!important}.crm-dialog>header h2{font-size:18px!important}}
@media(max-height:500px) and (orientation:landscape){main{padding:8px 12px!important}main>header p,.eyebrow,#workspaceBreadcrumb{display:none!important}main>header{margin-bottom:4px!important}main>header h2{font-size:17px!important}.rc2-navigation{margin-bottom:5px!important}.rc2-navigation button{min-height:28px!important;padding:3px 7px!important}#sidebar{height:100dvh;min-height:0;overflow-y:auto;padding-top:8px}#sidebar .brand{margin:0;gap:8px}#sidebar .brand-icon{width:30px;height:30px}#sidebar nav button{min-height:30px!important;padding:6px 9px!important}.crm-dialog,.team-dialog{max-height:calc(100dvh - 12px);margin:6px auto;padding:12px}.crm-dialog>header{margin-bottom:8px!important}.crm-form-footer{position:static}.toolbar{gap:5px!important;margin:5px 0!important;flex-direction:row!important}.toolbar button,.toolbar input{width:auto!important;padding:5px 8px!important;min-height:32px!important}.cards{display:flex!important;gap:8px;margin:6px 0!important}.cards>article,.cards>.card{flex:1;padding:6px 10px!important;min-width:0}.cards h3,.cards p{margin:0!important;font-size:12px!important}.cards strong{font-size:17px!important}.table-wrap{max-height:none!important;min-height:130px}.calculation-note{display:none}.panel{padding:8px!important}.head-actions{width:auto!important}}

html body .crm-form label.hidden,html body .crm-form label[hidden],html body .crm-form .ux-section.hidden,html body .crm-form fieldset[hidden]{display:none!important}

.ux-contact-more>summary{font-size:12px;color:#527181;cursor:pointer;min-height:26px!important}.ux-contact-more[open]>summary{margin-bottom:9px}.ux-contact-more{grid-column:1/-1}.ux-contact-more .crm-form-grid{gap:10px}
/* On a narrow viewport pinned descriptive columns must not cover the editable cells. */
@media(max-width:900px){.adjustable-table td.sticky2{position:static!important}.adjustable-table th.sticky2{left:auto!important}}
@media(max-width:600px){.adjustable-table td.sticky1{position:static!important}.adjustable-table th.sticky1{left:auto!important}}
html body .crm-form .ux-contact-picker[hidden]{display:none!important}
@media(max-width:600px){.head-actions #globalSearchBtn:before{content:none!important}}
@media(max-height:500px) and (orientation:landscape){.table-wrap{flex:0 0 56dvh!important;height:56dvh!important;min-height:160px!important;max-height:56dvh!important}}
@media(max-width:900px){.head-actions #globalSearchBtn{font-size:0!important;width:38px;min-width:38px;padding:6px!important}.head-actions #globalSearchBtn:before{content:none!important}.head-actions #globalSearchBtn:after{content:'⌕';font-size:22px}}

/* v0.7.12: readable contacts on visit cards. */
.visit-contact-names{display:block;font-weight:650;font-size:1em;line-height:1.4;margin:.3em 0;overflow-wrap:anywhere}

.service-flag{color:#a31621;font-weight:700}

/* v0.7.13: give all CRM project columns their own space; scroll the table on tablet. */
.crm-root{min-width:0;max-width:100%}
.crm-root .crm-project-table{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.crm-root .crm-project-table table{table-layout:fixed;min-width:1740px;width:100%}
.crm-root .crm-project-table th,.crm-root .crm-project-table td{min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
.crm-root .crm-project-table th:nth-child(1){width:300px}
.crm-root .crm-project-table th:nth-child(2){width:280px}
.crm-root .crm-project-table th:nth-child(3){width:150px}
.crm-root .crm-project-table th:nth-child(4){width:190px}
.crm-root .crm-project-table th:nth-child(5){width:180px}
.crm-root .crm-project-table th:nth-child(6){width:130px}
.crm-root .crm-project-table th:nth-child(7){width:140px}
.crm-root .crm-project-table th:nth-child(8){width:150px}
.crm-root .crm-project-table th:nth-child(9){width:220px}
.crm-root .crm-project-table .crm-project-link{display:block;width:100%;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;box-sizing:border-box}
.crm-root .crm-project-table .crm-project-link *{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere}
@media(max-width:1400px){main>header{flex-wrap:wrap;gap:12px}.head-actions{flex-wrap:wrap;max-width:100%;gap:6px}}
