/* Shared workspace composition. Existing routes, controls, status colors and modules remain native. */
:root{--bchat-own-bg:#d8f3dc;--bchat-own-ink:#123b27;--bchat-own-muted:#285d3a;--bchat-own-hover:#bee4c8;--bws-cover:#e5e7eb;--bws-cover-ink:#4b5563;--bws-canvas:#f2f6f9;--bws-surface:#fff;--bws-surface2:#eaf1f6;--bws-ink:#0c334d;--bws-muted:#485c6b;--bws-line:#c7d4de;--bws-outline:#687d8c;--bws-link:#006093;--bws-blue:#10a0d4;--bws-onblue:#04304c;--bws-tonal:#e3f3fa;--bws-positive:#166534;--bws-positive-bg:#eaf6ee;--bws-warning:#854d0e;--bws-warning-bg:#fff3dc;--bws-shadow:0 1px 2px #0c334d30,0 2px 5px #0c334d18}
html[data-bayshore-theme=dark]{--bchat-own-bg:#245b3b;--bchat-own-ink:#f2fff5;--bchat-own-muted:#cfecd7;--bchat-own-hover:#326d49;--bws-cover:#374151;--bws-cover-ink:#e5e7eb;--bws-canvas:#101f2b;--bws-surface:#172b3a;--bws-surface2:#20394a;--bws-ink:#edf5fa;--bws-muted:#b2c5d3;--bws-line:#355365;--bws-outline:#91a6b6;--bws-link:#91d7fa;--bws-tonal:#203e52;--bws-positive:#86efac;--bws-positive-bg:#193e30;--bws-warning:#fcd34d;--bws-warning-bg:#45371e;--bws-shadow:0 1px 2px #0006,0 2px 5px #0003}
html[data-bayshore-md3=refined]{--bm-refined-canvas:var(--bws-canvas);--bm-refined-card:var(--bws-surface);--bm-refined-row:var(--bws-surface);--bm-refined-gap:1rem;--bm-card-inset:1rem;--bm-card-gap:.75rem}
html[data-bayshore-md3=refined][data-bayshore-theme=dark]{--md-surface:var(--bws-surface);--md-surface-2:var(--bws-surface2);--md-on-surface:var(--bws-ink);--md-on-surface-variant:var(--bws-muted);--md-outline-variant:var(--bws-line);--bm-refined-canvas:var(--bws-canvas);--bm-refined-card:var(--bws-surface);--bm-refined-row:var(--bws-surface)}
html[data-bayshore-md3=refined] body :is(#wrapper,.content){background:var(--bws-canvas)!important}
html[data-bayshore-md3=refined] body .content{padding:1.5rem}
html[data-bayshore-md3=refined] body .panel_s>.panel-body{padding:1rem}
html[data-bayshore-md3=refined] body .bm-page-heading{margin-bottom:1rem;padding-block:0}
html[data-bayshore-md3=refined] body .bm-page-heading h1{font-size:1.5rem;line-height:1.3;margin-bottom:.25rem}
html[data-bayshore-md3=refined] body :is(#header,#menu){background:var(--bws-surface)!important}
html[data-bayshore-md3=refined] body #menu{border-inline-end:1px solid var(--bws-line)}
html[data-bayshore-md3=refined] body #header{border-bottom:1px solid var(--bws-line);box-shadow:none}
html[data-bayshore-md3=refined] body #side-menu>li>a{padding-block:.625rem;min-height:2.5rem;font-size:.8125rem}
html[data-bayshore-md3=refined] body #side-menu .nav-second-level>li>a{padding-block:.5rem;font-size:.8125rem}
html[data-bayshore-md3=refined] body :is(.dataTables_wrapper,.bb-shell) table.table{border-collapse:collapse!important;border-spacing:0!important}
html[data-bayshore-md3=refined] body :is(.dataTables_wrapper,.bb-shell) table.table>tbody>tr>td{padding:.625rem .75rem!important;border-block-end:1px solid var(--bws-line)!important;border-radius:0!important;box-shadow:none!important;height:auto!important;line-height:1.45;font-size:.8125rem}
html[data-bayshore-md3=refined] body :is(.dataTables_wrapper,.bb-shell) table.table>thead>tr>th{padding:.625rem .75rem!important;font-size:.75rem}
html[data-bayshore-md3=refined] body.dashboard .top_stats_wrapper{min-height:7rem!important;padding:.875rem 1rem!important}
html[data-bayshore-md3=refined] body.dashboard .top_stats_wrapper>div:first-child{gap:.375rem!important}
html[data-bayshore-md3=refined] body.dashboard .top_stats_wrapper>div:first-child>span{font-size:1.5rem!important;line-height:1.75rem!important}
html[data-bayshore-md3=refined] body.dashboard .top_stats_wrapper>div:first-child>div>svg{width:2rem!important;height:2rem!important;min-width:2rem!important;padding:.375rem!important}
html[data-bayshore-md3=refined] body.dashboard .top_stats_wrapper>.progress{margin-block-start:.625rem!important}
.bws-content{max-width:1800px;margin-inline:auto;color:var(--bws-ink)}
.bws-content *,.bws-portal *{box-sizing:border-box}
.bws-content :is(h1,h2,h3,p),.bws-portal :is(h1,h2,h3,p){margin:0}
.bws-content h1,.bws-portal h1{font-size:1.5rem;line-height:1.25;font-weight:650;letter-spacing:-.025em;color:var(--bws-ink)}
.bws-content h2,.bws-portal h2{font-size:1rem;line-height:1.5;font-weight:600;color:var(--bws-ink)}
.bws-content h3,.bws-portal h3{font-size:.875rem;line-height:1.45;font-weight:600;color:var(--bws-ink)}
.bws-content :is(a,button):focus-visible,.bws-portal :is(a,button,input,select,summary):focus-visible{outline:3px solid var(--bws-link);outline-offset:3px}
html body .bws-content a,html body .bws-portal a{color:var(--bws-link)}
html[data-bayshore-theme=dark] body .bws-content a,html[data-bayshore-theme=dark] body .bws-portal a{color:var(--bws-link)!important}
.bws-page-heading{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.25rem}
.bws-page-heading h1+p{margin-top:.375rem}
.bws-eyebrow{font-size:.625rem;text-transform:uppercase;letter-spacing:.12em;color:var(--bws-link);margin-bottom:.375rem!important;font-weight:600}
.bws-muted{color:var(--bws-muted)!important;line-height:1.5}
.bws-small{font-size:.75rem}
.bws-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:-1px}
.bws-stack{display:grid;gap:1rem;min-width:0;align-content:start}
html body .bws-card{min-width:0;background:var(--bws-surface)!important;border:1px solid transparent;border-radius:12px;box-shadow:var(--bws-shadow);color:var(--bws-ink)!important}
.bws-card-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.875rem 1rem}
.bws-card-body{padding:0 1rem 1rem}
.bws-card-body>p{margin-bottom:.75rem}
.bws-people-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.bws-person-card{padding:1rem;border:1px solid var(--bws-line);border-radius:12px;background:var(--bws-surface);overflow-wrap:anywhere}
.bws-person-card h2{margin:.75rem 0 .25rem}
.bws-person-card>.btn{margin-top:1rem}
.bws-person-heading{display:flex;align-items:center;justify-content:space-between}
.bws-avatar{width:36px;height:36px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:var(--bws-tonal);color:var(--bws-link);font-size:.75rem;font-weight:600;flex-shrink:0}
.bws-avatar-large{width:72px;height:72px;font-size:1.625rem;border-radius:22px;background:var(--bws-blue);color:var(--bws-onblue);border:4px solid var(--bws-surface)}
.bws-more{position:relative;flex-shrink:0;margin-inline-start:auto;width:36px;height:36px}
.bws-more summary{list-style:none;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:12px;cursor:pointer;font-size:1.5rem;color:var(--bws-muted)}
.bws-more summary::-webkit-details-marker{display:none}
.bws-more[open]{z-index:8}
.bws-more[open]>:not(summary){position:absolute;display:grid;top:100%;right:0;background:var(--bws-surface2);padding:6px;min-width:210px;max-width:calc(100vw - 32px);text-align:start;border-radius:12px;box-shadow:var(--bws-shadow);border:1px solid var(--bws-line)}
.bws-more>nav>a,.bws-more>div>button{display:block;padding:10px 12px;border:0;border-radius:6px;text-align:start;white-space:normal;height:auto;min-height:40px}
.bws-more>nav>a:hover,.bws-more summary:hover{background:var(--bws-canvas)}
.bws-filter{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center;margin:.5rem 0 1.25rem}
.bws-filter input{max-width:400px}
.bws-tabs{display:flex;gap:1.375rem;overflow-x:auto;border-bottom:1px solid var(--bws-line);padding:0 1.25rem;scrollbar-width:thin}
.bws-tabs>a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:.625rem 0;white-space:nowrap;border-bottom:3px solid transparent;font-size:.8125rem;color:var(--bws-muted)!important}
html[data-bayshore-theme=dark] body .bws-tabs>a{color:var(--bws-muted)!important}
.bws-tabs>a[aria-current=page],html[data-bayshore-theme=dark] body .bws-tabs>a[aria-current=page]{border-color:var(--bws-blue);font-weight:600;color:var(--bws-link)!important}
.bws-profile-header{overflow:visible;margin-bottom:1.25rem}
.bws-cover{height:70px;position:relative;overflow:hidden;background:var(--bws-cover);border-radius:12px 12px 0 0}
.bws-cover:after{content:none}
.bws-cover>span{position:absolute;right:20px;top:22px;color:var(--bws-cover-ink);font-size:.6875rem;letter-spacing:.08em;text-transform:uppercase}
.bws-identity{position:relative;display:flex;align-items:center;gap:1rem;padding:0 1.25rem 1rem;margin-top:-25px}
.bws-identity>div{padding-top:28px;min-width:0}
.bws-identity h2{font-size:1.5rem;font-weight:650;overflow-wrap:anywhere}
.bws-identity>.bws-more{margin-top:1.5rem}
.bws-profile-counts{display:flex;gap:1.75rem;margin-inline-start:auto;flex-shrink:0}
.bws-profile-counts strong{display:block;font-size:1.125rem}
.bws-profile-counts span{font-size:.6875rem;color:var(--bws-muted)}
.bws-profile-layout{display:grid;grid-template-columns:240px minmax(0,1fr) 260px;gap:1.125rem;align-items:start}
.bws-details{margin:0 0 1rem;overflow-wrap:anywhere}
.bws-details dt{font-size:.6875rem;color:var(--bws-muted);font-weight:500;margin-top:.875rem}
.bws-details dt:first-child{margin-top:0}
.bws-details dd{font-size:.8125rem;margin:.25rem 0 0;white-space:pre-wrap}
.bws-related-links>a{display:flex;gap:.75rem;align-items:center;justify-content:space-between;padding:.625rem 0;border-bottom:1px solid var(--bws-line);font-size:.8125rem}
.bws-related-links>a:last-child{border:0}
.bws-update-prompt{padding:1rem}
.bws-update-prompt h2{margin:.25rem 0 .5rem}
.bws-update-prompt p{font-size:.8125rem}
.bws-actions{display:flex;gap:.5rem;flex-wrap:wrap;align-items:center;margin-top:.875rem}
.bws-content .btn,.bws-portal .btn{min-height:40px;padding:.5625rem 1rem;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;font-size:.875rem;line-height:1.25rem;white-space:normal}
html body .bws-content .btn-primary,html[data-bayshore-theme=dark] body .bws-content .btn-primary,html body .bws-portal .btn-primary{color:var(--bws-onblue)!important;background:var(--bws-blue)!important;border-color:transparent!important}
html body .bws-content .btn-default,html[data-bayshore-theme=dark] body .bws-content .btn-default,html body .bws-portal .btn-default{color:var(--bws-link)!important;background:var(--bws-tonal)!important;border-color:transparent!important}
.bws-content .bws-small-button{min-height:32px;padding:.3125rem .75rem;font-size:.8125rem}
.bws-timeline{list-style:none;padding:0 0 0 .5rem;margin:0}
.bws-timeline>li{display:flex;gap:1rem;padding:0 0 1.25rem 1.125rem;border-inline-start:1px solid var(--bws-line);position:relative}
.bws-timeline>li:last-child{padding-bottom:.25rem}
.bws-timeline>li>div{min-width:0;overflow-wrap:anywhere}
.bws-timeline-dot{position:absolute;width:9px;height:9px;border-radius:50%;left:-5px;top:6px;background:var(--bws-blue);box-shadow:0 0 0 5px var(--bws-surface)}
.bws-timeline h3{margin:.25rem 0 .375rem}
.bws-timeline>li>div>p:not(.bws-muted){font-size:.8125rem}
.bws-contacts>div{display:flex;gap:.625rem;align-items:center;margin-bottom:.875rem;font-size:.8125rem}
.bws-tag{display:inline-block;padding:.1875rem .5rem;border-radius:6px;font-size:.6875rem;line-height:1.4;color:var(--bws-link);background:var(--bws-tonal);white-space:normal}
.bws-positive{color:var(--bws-positive);background:var(--bws-positive-bg)}
.bws-warning{color:var(--bws-warning);background:var(--bws-warning-bg)}
.bws-total{font-size:1.75rem;font-weight:600}
.bws-table-scroll{overflow:auto;margin:.875rem 0;max-width:100%}
.bws-table{width:100%;border-collapse:collapse;font-size:.8125rem}
.bws-table caption{text-align:start;color:var(--bws-muted);font-size:.75rem;padding:.375rem 0 .625rem}
.bws-table :is(td,th){padding:.75rem .625rem;border-bottom:1px solid var(--bws-line);text-align:start;vertical-align:top}
.bws-table th{font-weight:550}
.bws-table thead th{font-size:.6875rem;color:var(--bws-muted);font-weight:500}
.bws-table tbody tr:last-child>*{border:0}
.bws-pagination{display:flex;align-items:center;gap:.75rem;justify-content:flex-end;margin-top:1rem;flex-wrap:wrap}
.bws-empty{padding:1.25rem 0;color:var(--bws-muted);font-size:.875rem}
.bws-assignment{margin-top:1rem;border-top:1px solid var(--bws-line);padding-top:1rem}
.bws-assignment>summary{cursor:pointer;color:var(--bws-link);padding:.625rem 0;font-weight:550}
.bws-assignment>p{font-size:.8125rem;margin:.5rem 0 .875rem}
.bws-assignment-form{max-width:600px;display:grid;gap:.625rem}
.bws-checkbox{display:flex;align-items:start;gap:.625rem;font-weight:400;font-size:.8125rem;margin:.5rem 0}
.bws-checkbox>input{width:18px;height:18px;flex-shrink:0;margin:.125rem 0 0;accent-color:var(--bws-blue)}
.bws-revoke{display:flex;gap:1rem;align-items:center;justify-content:space-between;border-top:1px solid var(--bws-line);padding-top:.75rem;margin-top:.75rem;font-size:.8125rem}
.bchat{display:grid;grid-template-columns:260px minmax(0,1fr);gap:1rem;min-width:0}
.bchat-sidebar{padding:1rem;max-height:calc(100vh - 220px);min-height:380px;overflow-y:auto}
.bchat-sidebar nav h2{font-size:.6875rem;text-transform:uppercase;letter-spacing:.08em;color:var(--bws-muted);margin:1.25rem 0 .5rem}
.bchat-sidebar nav a{display:flex;align-items:center;gap:.625rem;padding:.625rem 0;min-height:42px;border-bottom:2px solid transparent;font-size:.8125rem;overflow-wrap:anywhere}
.bchat-sidebar nav a[aria-current=page]{border-bottom-color:var(--bws-blue);font-weight:600}
.bchat-sidebar nav a>span:not(.bws-avatar){min-width:0;flex:1}
.bchat-sidebar .bws-avatar{width:28px;height:28px;font-size:.625rem;border-radius:9px}
.bchat-count{margin-inline-start:auto;min-width:20px;padding:.125rem .375rem;border-radius:6px;color:var(--bws-link);background:var(--bws-tonal);font-size:.625rem;text-align:center}
.bchat-boundary{border-top:1px solid var(--bws-line);padding-top:1rem;margin-top:1rem!important;color:var(--bws-muted);font-size:.6875rem;line-height:1.5}
.bchat-conversation{display:flex;flex-direction:column;height:calc(100vh - 220px);min-height:520px;position:relative;min-width:0}
.bchat-header{display:flex;align-items:center;gap:1rem;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--bws-line);flex-shrink:0}
.bchat-header>div{min-width:0;flex:1;overflow-wrap:anywhere}
.bchat-header p{font-size:.6875rem;margin-top:.25rem}
#bchat-connection{font-size:.625rem;color:var(--bws-muted);flex-shrink:0}
#bchat-connection[data-state=live]{color:var(--bws-positive)}
#bchat-error{margin:.75rem 1rem 0}
.bchat-history{padding:1rem 1.25rem;flex:1;min-height:140px;overflow:auto;overscroll-behavior:contain}
#bchat-messages{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:1rem}
.bchat-message{display:flex;gap:.625rem;align-self:flex-start;max-width:84%;min-width:0}
.bchat-bubble{min-width:0;background:var(--bws-surface2);padding:.75rem .875rem;border-radius:0 12px 12px}
.bchat-message.is-own{align-self:flex-end;flex-direction:row-reverse}
.bchat-message.is-own .bchat-bubble{background:var(--bchat-own-bg);color:var(--bchat-own-ink);border-radius:12px 0 12px 12px}
.bws-content .bchat-message.is-own :is(.bchat-message-text,.bchat-message-meta strong){color:var(--bchat-own-ink)!important}
.bws-content .bchat-message.is-own :is(.bchat-message-meta time,.bws-more summary){color:var(--bchat-own-muted)!important}
.bws-content .bchat-message.is-own.is-hidden .bchat-message-text{color:var(--bchat-own-muted)!important}
.bchat-message.is-own .bws-more summary:hover{background:var(--bchat-own-hover)}
.bchat-message.is-own .bws-more summary:focus-visible{outline:3px solid var(--bchat-own-ink)!important;outline-offset:2px!important}
.bchat-message.is-hidden .bchat-message-text{font-style:italic;color:var(--bws-muted)}
.bchat-message-meta{display:flex;align-items:center;gap:.75rem;font-size:.6875rem;flex-wrap:wrap;margin-bottom:.3125rem}
.bchat-message-meta strong{font-size:.75rem;font-weight:550}
.bchat-message-meta time{color:var(--bws-muted);font-size:.625rem}
.bchat-message-meta .bws-more summary{width:32px;height:32px;min-height:32px;font-size:1.25rem}
.bchat-message-text{font-size:.875rem;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.bchat-new{align-self:center;margin:.25rem}
#bchat-compose{padding:.875rem 1rem 1rem;border-top:1px solid var(--bws-line);flex-shrink:0}
#bchat-compose>label{font-size:.75rem;font-weight:500;margin-bottom:.375rem}
#bchat-body{display:block;width:100%;resize:vertical;min-height:64px;max-height:180px;padding:.625rem .75rem;border:1px solid var(--bws-outline);border-radius:12px;background:var(--bws-surface);color:var(--bws-ink);font:inherit;font-size:.875rem}
#bchat-body::placeholder{color:var(--bws-muted);opacity:1}
.bchat-compose-actions{display:flex;justify-content:space-between;align-items:center;gap:.75rem;margin-top:.625rem}
.bchat-compose-actions>span{font-size:.625rem;line-height:1.5}
.bb-contractor-portal{background:var(--bws-canvas)!important;color:var(--bws-ink)!important}
.bb-contractor-portal>header{background:var(--bws-surface)!important;color:var(--bws-ink)!important;border-color:var(--bws-line)!important;padding:16px 24px}
.bb-contractor-portal main.bws-portal-main{max-width:1400px;margin:24px auto;padding-inline:24px}
.bb-contractor-portal.bws-portal :is(input,select,textarea){background:var(--bws-surface);color:var(--bws-ink)}
.bb-contractor-portal.bws-portal .bws-tabs a{background:transparent;border-inline:0;border-top:0;border-radius:0;box-shadow:none}
.bws-portal-grid{display:grid;grid-template-columns:260px minmax(0,1fr);gap:1rem;align-items:start}
.bws-portal .bws-profile-header{margin-top:0}
.bws-native-profile-link{margin:0 0 .875rem;display:flex;justify-content:flex-end}
@media(min-width:1600px){.bws-profile-layout{grid-template-columns:270px minmax(0,1fr) 290px}}
@media(max-width:1250px){.bws-people-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.bws-profile-layout{grid-template-columns:220px minmax(0,1fr)}.bws-profile-layout>aside:last-child{grid-column:1/-1;grid-template-columns:1fr 1fr}.bws-profile-counts{gap:1rem}.bws-profile-counts span{font-size:.625rem}}
@media(max-width:1000px){.bws-people-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bws-profile-counts{display:none}.bchat{grid-template-columns:210px minmax(0,1fr)}.bchat-header{flex-wrap:wrap}.bchat-conversation{min-height:550px}.bchat-message{max-width:95%}}
@media(max-width:767px){html[data-bayshore-md3=refined] body .content{padding:1rem}.bws-page-heading{align-items:start;flex-wrap:wrap;gap:.75rem}.bws-profile-layout,.bws-portal-grid{display:flex;flex-direction:column}.bws-profile-layout>*,.bws-portal-grid>*{width:100%}.bws-profile-layout>aside:first-child{order:2}.bws-profile-layout>div{order:1}.bws-profile-layout>aside:last-child{order:3;display:grid;grid-template-columns:1fr}.bws-identity{padding:0 .875rem .875rem;gap:.625rem;flex-wrap:wrap}.bws-identity h2{font-size:1.25rem}.bws-avatar-large{width:60px;height:60px;font-size:1.25rem;border-radius:18px}.bws-cover{height:56px}.bws-cover>span{font-size:.625rem;top:16px;right:12px}.bws-tabs{padding-inline:.875rem;gap:1.125rem}.bws-tabs>a{min-height:48px}.bws-people-grid{gap:.75rem}.bws-person-card{padding:.875rem}.bws-filter input{max-width:none;flex:1 1 180px}.bchat{display:flex;flex-direction:column}.bchat-sidebar{min-height:0;max-height:250px;padding:.875rem}.bchat-sidebar nav{display:flex;gap:1rem;overflow:auto;align-items:center}.bchat-sidebar nav h2,.bchat-boundary{display:none}.bchat-sidebar nav a{white-space:nowrap;flex-shrink:0}.bchat-sidebar>input{margin-bottom:.5rem}.bchat-conversation{height:70vh;min-height:520px}.bchat-header{padding:.875rem}.bchat-history{padding:.875rem}.bchat-compose-actions{flex-wrap:wrap}.bchat-compose-actions .btn{margin-inline-start:auto}.bchat-message>.bws-avatar{display:none}.bchat-message{max-width:95%}.bb-contractor-portal main.bws-portal-main{padding-inline:16px}.bws-revoke{flex-wrap:wrap}}
@media(max-width:440px){.bws-people-grid{grid-template-columns:1fr}.bws-identity>.bws-more{margin-top:0}.bws-identity>div{padding-top:26px}.bws-card-heading{flex-wrap:wrap}}
@media(pointer:coarse){.bws-more{width:48px;height:48px}.bchat-message-meta .bws-more summary{width:48px;height:48px;min-height:48px}.bws-content .btn,.bws-portal .btn,.bws-more summary,.bchat-sidebar nav a{min-height:48px}.bws-more summary{min-width:48px}html[data-bayshore-md3=refined] body #side-menu>li>a,html[data-bayshore-md3=refined] body #side-menu .nav-second-level>li>a{min-height:48px}}
@media(prefers-reduced-motion:no-preference){.bws-card,.bws-tabs>a{transition:background-color .15s ease}.bws-more summary{transition:background-color .15s ease}}

.bb-contractor-portal.bws-portal :is(.card,.status){background:var(--bws-surface);border-color:var(--bws-line);color:var(--bws-ink)}
.bb-contractor-portal.bws-portal :is(input,select,textarea){border:1px solid var(--bws-outline)}
.bb-contractor-portal.bws-portal main>h1{margin-block:1rem}
.bb-contractor-portal.bws-portal .bws-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.bb-contractor-portal.bws-portal .bws-portal-grid{margin-top:1rem}

.bchat [hidden],.bws-content [hidden],.bws-portal [hidden]{display:none!important}

/* Communication entry points share the compact action scale and status roles. */
.bws-person-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin-top:1rem}
.bws-profile-message{margin-inline-start:auto;margin-top:1.5rem}
.bws-project-chat{display:inline-flex;align-items:center;min-height:32px;margin-inline-start:.5rem;padding:.25rem .375rem;border-radius:6px}
.bws-project-chat:focus-visible{outline:3px solid var(--bws-link);outline-offset:2px}
#side-menu a.bws-chat-nav{position:relative}
#side-menu a.bws-chat-nav.bws-chat-has-unread{padding-inline-end:2.75rem!important}
#side-menu a.bws-chat-nav>.bws-chat-unread{position:absolute;right:14px;top:50%;transform:translateY(-50%);display:inline-grid;place-items:center;min-width:20px;min-height:20px;padding:0 .25rem;border-radius:6px;font-size:.6875rem;line-height:1rem;font-weight:600;background:var(--bws-blue)!important;color:var(--bws-onblue)!important}
#side-menu a.bws-chat-nav>.bws-chat-unread[hidden]{display:none!important}
.bws-chat-entry{padding:1rem}
.bws-chat-entry p{margin:.5rem 0 1rem}
@media(max-width:767px){.bws-profile-message{margin-top:.5rem}.bws-project-chat{min-height:48px}}
@media(pointer:coarse){.bws-project-chat{min-height:48px}}
/* Native staff feed in the profile's main column. The global feed remains unchanged elsewhere. */
.bws-feed-heading{display:flex;justify-content:space-between;align-items:start;gap:1rem;margin-bottom:.875rem}
.bws-feed-heading h2{font-size:1.125rem}
.bws-feed-heading .bws-muted{margin-top:.25rem}
.bws-team-timeline{min-width:0}
.bws-team-timeline [hidden]{display:none!important}
html[data-bayshore-md3=refined] body .bws-feed-slot #newsfeed{position:static!important;inset:auto!important;width:100%!important;height:auto!important;min-height:0;max-height:none;overflow:visible!important;padding:0!important;z-index:auto!important;background:transparent!important;animation:none!important}
.bws-feed-slot #newsfeed>.row{margin:0!important}
.bws-feed-slot #newsfeed>.row>[class*=col-]{float:none;width:100%;max-width:100%;margin:0;padding:0}
.bws-feed-slot #newsfeed .panel_s{border-radius:12px;background:var(--bws-surface);box-shadow:var(--bws-shadow);margin-bottom:1rem}
html[data-bayshore-md3=refined] body .bws-feed-slot #newsfeed .panel_s>.panel-body{box-shadow:none!important;border-radius:12px 12px 0 0!important;background:var(--bws-surface)!important;padding:1rem!important}
.bws-feed-slot #newsfeed .close_newsfeed{display:none!important}
.bws-feed-slot #newsfeed #post{margin-top:.75rem;min-height:76px;resize:vertical;max-height:260px;font-size:.875rem;line-height:1.5}
.bws-feed-slot #newsfeed #new-post-form{min-width:0}
.bws-feed-slot #newsfeed #new-post-form hr{margin:.75rem 0}
.bws-feed-slot #newsfeed .bootstrap-select{max-width:100%;margin:.5rem 0 0}
.bws-feed-slot #newsfeed #new-post-form>.btn{margin:0 .375rem .375rem 0;float:none!important}
.bws-feed-slot #newsfeed .dropzone-previews{margin-top:.75rem!important}
.bws-feed-slot #newsfeed .post-content{overflow-wrap:anywhere;color:var(--bws-ink)}
.bws-feed-slot #newsfeed .post-time-ago{position:static;display:block;font-size:.6875rem;color:var(--bws-muted)}
.bws-feed-slot #newsfeed .newsfeed_post .dropdown{right:1rem;top:1rem}
.bws-feed-slot #newsfeed .btn-post-options{margin:0}
.bws-feed-slot #newsfeed .media-body{min-width:0}
html[data-bayshore-md3=refined] body .bws-feed-slot #newsfeed .newsfeed_post .panel-footer{border:0!important;border-top:1px solid var(--bws-line)!important;background:var(--bws-surface)!important;color:var(--bws-ink)!important;padding:.75rem 1rem!important}
.bws-feed-slot #newsfeed .newsfeed_post>div:last-child{border-radius:0 0 12px 12px}
.bws-feed-slot #newsfeed .user-post-like .bws-ack{min-height:36px;gap:.5rem;font-size:.8125rem}
html body .bws-feed-slot #newsfeed .bws-ack[aria-pressed=true]{color:var(--bws-link)!important;background:var(--bws-tonal)!important;border-color:var(--bws-blue)!important}
.bws-feed-slot #newsfeed .comment-input{display:flex;gap:.5rem;align-items:start;overflow:visible}
.bws-feed-slot #newsfeed .comment-input input{min-width:0;flex:1;height:40px;font-size:.8125rem}
.bws-feed-slot #newsfeed .comment-input>.btn{flex-shrink:0}
.bws-feed-slot #newsfeed .post-content ul:has(>.post-image-wrapper){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:.5rem}
.bws-feed-slot #newsfeed .post-image-wrapper{float:none;width:auto;max-height:none;min-width:0;border:1px solid var(--bws-line);border-radius:8px;background:var(--bws-surface2);margin:0!important}
.bws-feed-slot #newsfeed .post-image-wrapper img{width:100%;height:155px;object-fit:contain}
.bws-feed-slot #newsfeed :is(.comment,.post-likes){font-size:.8125rem}
.bws-feed-slot #newsfeed .comment-content{margin-bottom:.375rem}
.bws-feed-slot #newsfeed :is(.staff-profile-image-small,.comment-image img){width:32px;height:32px;border-radius:10px;object-fit:cover}
.bws-feed-status:empty{display:none}
@media(max-width:650px),(pointer:coarse){.bws-feed-slot #newsfeed :is(.bws-ack,.bws-comment-submit){min-height:48px}.bws-feed-heading{flex-wrap:wrap}.bws-feed-slot #newsfeed .comment-input{flex-wrap:wrap}.bws-feed-slot #newsfeed .comment-input input{flex-basis:60%;min-height:48px}}
.bws-feed-slot #newsfeed .comment-input{width:auto!important;max-width:100%;min-width:0}
.bws-feed-slot #newsfeed #post{padding:.75rem!important}
html[data-bayshore-md3=refined] body .bws-feed-slot #newsfeed>.row>[class*=col-]>.panel_s:first-child>.panel-body{border-radius:12px!important}

/* Explicit audiences, personal widget choices and contextual communication tabs. */
.bws-widget-area [hidden]{display:none!important}
.bws-widget-picker>summary{padding:1rem;cursor:pointer;font-weight:650;min-height:48px;color:var(--bws-link)}
.bws-widget-picker label{align-items:center;min-height:40px}
.bws-widget-picker input[type=checkbox]{appearance:auto!important;accent-color:var(--bws-link);width:1.125rem;height:1.125rem;flex:none}
.bws-widget-picker .bws-card-body{padding-top:0}
.bws-announcements{display:grid;gap:1rem;margin-block:1rem}
.bws-announcements h3{font-size:1rem;margin:.5rem 0;line-height:1.4}
.bws-announcements .bws-tag{font-weight:700}
.bws-post-audience{margin:.75rem 0!important;padding:.5rem .75rem;background:var(--bws-surface2);border-radius:8px}
.bws-composer-audience{margin:.75rem 0 0!important}
.bws-mail-picker{display:flex;align-items:end;gap:.75rem;flex-wrap:wrap;margin-block:1rem}
.bws-mail-picker label{width:100%;margin:0}
.bws-mail-picker select{flex:1 1 240px;min-width:0;max-width:100%}
.bws-mail-list{list-style:none;padding:0;margin:1rem 0}
.bws-mail-list li+li{border-top:1px solid var(--bws-line)}
.bws-mail-list a{display:grid;gap:.25rem;padding:1rem 0;overflow-wrap:anywhere}

.bws-widget-picker>summary:focus-visible{outline:3px solid var(--bws-link);outline-offset:3px}

/* Chat captions remain outside each bubble; typing is short-lived metadata only. */
.bchat-message-content{min-width:0;max-width:100%}
.bchat-receipt{display:flex;align-items:center;gap:5px;margin-top:5px;color:var(--bws-muted);font-size:.75rem;line-height:1.4}
.bchat-message.is-own .bchat-receipt{justify-content:flex-end}
.bchat-receipt[data-state=read]{color:var(--bws-link)}
#bchat-typing{display:flex;align-items:center;gap:8px;padding:8px 1rem;color:var(--bws-muted);font-size:.75rem;line-height:1.5;flex-shrink:0;overflow-wrap:anywhere}
#bchat-typing[hidden]{display:none}
.bchat-dots{display:inline-flex;gap:4px;align-items:center;flex-shrink:0}
.bchat-dots i{width:5px;height:5px;border-radius:50%;background:currentColor;animation:bchat-dot 1.2s ease-in-out infinite}
.bchat-dots i:nth-child(2){animation-delay:.15s}.bchat-dots i:nth-child(3){animation-delay:.3s}
@keyframes bchat-dot{0%,60%,100%{opacity:.55;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.bchat-status-help{padding:0 1rem .5rem;color:var(--bws-muted);font-size:.75rem;line-height:1.5;flex-shrink:0}
.bchat-status-help summary{display:flex;align-items:center;min-height:40px;cursor:pointer;width:fit-content}
.bchat-status-help summary:focus-visible{outline:2px solid var(--bws-link);outline-offset:2px}
.bchat-status-help p{margin:0 0 .5rem;max-width:72ch}
@media(pointer:coarse){.bchat-status-help summary{min-height:48px}}
@media(prefers-reduced-motion:reduce){.bchat-dots i{animation:none;opacity:1}}

.bchat-status-help summary::before{content:"▸";margin-inline-end:6px}.bchat-status-help[open] summary::before{content:"▾"}

/* The profile Email tab reuses the real authenticated Mail workspace. */
.bws-mail-workspace{min-width:0;border:1px solid var(--bws-line);border-radius:12px;overflow:hidden;background:var(--bws-surface)}
.bws-mail-workspace-heading{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;padding:.75rem 1rem;border-bottom:1px solid var(--bws-line)}
.bws-mail-workspace-heading h2{font-size:1rem;margin:0}.bws-mail-workspace-heading>a{margin-inline-start:auto}
.bws-mail-frame{display:block;width:100%;height:75dvh;min-height:640px;border:0;background:var(--bws-surface)}

/* Owner-resizable chat sections; no message or transport changes. */
.bchat[data-chat-layout] .bchat-conversation{min-height:max(520px,var(--bchat-layout-min,520px))}
.bchat[data-chat-layout] .bchat-header{height:var(--bchat-header-height,auto);box-sizing:border-box;border-bottom:0}
.bchat[data-chat-layout] #bchat-body{height:var(--bchat-editor-height,64px);max-height:none;resize:none;box-sizing:border-box}
.bchat[data-chat-layout] #bchat-compose{border-top:0}
.bchat-resize{height:14px;min-height:14px;flex:0 0 14px;display:flex;align-items:center;justify-content:center;cursor:row-resize;touch-action:none;user-select:none;border-block:1px solid var(--bws-line);background:var(--bws-surface)}
.bchat-resize[hidden],.bchat-layout-reset[hidden]{display:none!important}
.bchat-resize>span{width:54px;height:4px;border-radius:3px;background:var(--bws-link);pointer-events:none}
.bchat-resize:hover,.bchat-resize:focus-visible{background:var(--bws-tonal)}
.bchat-resize:focus-visible{outline:2px solid var(--bws-link);outline-offset:-2px}
.bchat-resizing{user-select:none;cursor:row-resize}
.bchat-layout-reset{font-size:.6875rem;white-space:nowrap}
@media(pointer:coarse){.bchat-resize{height:24px;min-height:24px;flex-basis:24px}}
/* Native To Do: contrasting heading and separate grip/checkbox/text columns. */
.todo-body>h4.tw-bg-warning-400{background:#c63609!important;color:#fff!important}
.todo-body ul.todo>li:not(.no-todos){margin:0;padding:12px 16px}
.todo-body ul.todo>li>.media{display:flex;align-items:flex-start;gap:12px;margin:0}
.todo-body ul.todo>li>.media>.media-left{display:grid;grid-template-columns:24px 24px;column-gap:10px;align-items:center;flex:0 0 58px;width:58px;padding:0!important}
.todo-body .todo-dragger{position:static;z-index:auto;width:24px;height:32px;background-position:center center;touch-action:none}
.todo-body .todo-checkbox{float:none;padding:0!important;margin:0!important;width:24px;height:32px;display:flex;align-items:center;justify-content:center}
.todo-body .todo-checkbox>input[type=checkbox]{position:static!important;opacity:1!important;margin:0!important;appearance:auto!important;width:20px!important;height:20px!important;flex:none;cursor:pointer}
.todo-body .todo-checkbox>label{display:none}
.todo-body .media-body{min-width:0;flex:1;width:auto}
.todo-body .todo-description{padding:4px 0 0;overflow-wrap:anywhere}

/* Native client summary cards render configured status colors as inline text. */
body.customers dl.tw-grid > a.tw-border > div > dt.tw-font-medium[style*="color:"] {
    color: var(--bws-ink) !important;
}

body.customers .fc-daygrid-day:not(.fc-day-today) .fc-daygrid-day-number {
    color: var(--bws-ink) !important;
}

body.customers .fc-daygrid-day.fc-day-other .fc-daygrid-day-top {
    opacity: 1;
}

body.customers .fc-daygrid-day.fc-day-other .fc-daygrid-day-number {
    color: var(--bws-muted) !important;
}

body.customers .dropzone .dz-default.dz-message > span {
    color: var(--bws-link) !important;
}

body.bb-contractor-portal button.reveal {
    min-inline-size: 44px;
}

html[data-bayshore-theme=dark] body.bb-contractor-portal :is(.muted, .details dt) {
    color: var(--bws-muted);
}

html[data-bayshore-theme=dark] body.bb-contractor-portal a:not(.btn, .button) {
    color: var(--bws-link);
}

html[data-bayshore-theme=dark] body.bb-contractor-portal a:not(.btn, .button):hover {
    color: var(--bws-ink);
}

html[data-bayshore-theme=dark] body.bb-contractor-portal button.reveal {
    background: var(--bws-surface);
    border-color: var(--bws-outline);
    color: var(--bws-ink);
}

html[data-bayshore-theme=dark] body.bb-contractor-portal button.reveal:is(:hover, :focus-visible) {
    background: var(--bws-surface2);
}

html[data-bayshore-theme=dark] body.bb-contractor-portal .error {
    background: #462431;
    border-color: #f2a2b5;
    color: #ffe4ea;
}

html[data-bayshore-theme=dark] body.bb-contractor-portal .error-text {
    color: #f2a2b5;
}

html[data-bayshore-theme=dark] body.bb-contractor-portal .success {
    background: var(--bws-positive-bg);
    color: var(--bws-positive);
}
