/* Kovesis 0.2 — company/user-selectable palettes, accessible body text and responsive analytics */
body.buc-app {
 --buc-accent:#0a80db;--buc-accent-ink:#ffffff;
 --buc-soft-accent:color-mix(in srgb,var(--buc-accent) 13%,transparent);
 --buc-elevated:#242a2e;--buc-input:#1b2023;--buc-sidebar:#102426;
 --buc-top-bg:#202427;--buc-subtle:#1b2023;--buc-ink:var(--buc-text);
 color-scheme:dark;
}
body.buc-app[data-buc-theme="light"]{
 --buc-bg:#f5f7f9;--buc-panel:#ffffff;--buc-panel2:#f1f4f6;
 --buc-line:#dbe2e8;--buc-text:#1a2b35;--buc-muted:#526775;
 --buc-elevated:#f8fafb;--buc-input:#ffffff;--buc-sidebar:#ffffff;
 --buc-top-bg:#ffffff;--buc-subtle:#f0f4f6;
 --buc-blue:#0a80db;color-scheme:light;
}
body.buc-app[data-buc-font="large"]{font-size:16.5px}
body.buc-app[data-buc-density="compact"] .buc-panel,
body.buc-app[data-buc-density="compact"] .buc-stat{padding:14px}
body.buc-app[data-buc-density="compact"] .buc-body{padding-top:19px}
body.buc-app[data-buc-density="compact"] .buc-line{padding-top:8px;padding-bottom:8px}
body.buc-app[data-buc-corners="square"] .buc-panel,
body.buc-app[data-buc-corners="square"] .buc-stat,
body.buc-app[data-buc-corners="square"] .buc-resource,
body.buc-app[data-buc-corners="square"] .buc-day,
body.buc-app[data-buc-corners="square"] .buc-client-head,
body.buc-app[data-buc-corners="square"] .buc-modal{border-radius:4px}
body.buc-app .buc-primary{background:var(--buc-accent)!important;color:var(--buc-accent-ink)!important;border-color:var(--buc-accent)!important}
body.buc-app .buc-primary:hover{filter:brightness(.92)}
body.buc-app .buc-eyebrow, body.buc-app .buc-small-number,
body.buc-app .buc-link,body.buc-app .buc-brandmark span,
body.buc-app .buc-subtabs button.chosen{color:var(--buc-accent)!important}
body.buc-app .buc-link:hover{background:var(--buc-soft-accent)}
body.buc-app .buc-nav.current,body.buc-app .buc-nav:hover{background:var(--buc-soft-accent)!important;color:var(--buc-text)!important}
body.buc-app .buc-subtabs button.chosen{border-bottom-color:var(--buc-accent)}
body.buc-app input:focus,body.buc-app select:focus,body.buc-app textarea:focus,
body.buc-app .buc-rich:focus{outline:2px solid var(--buc-accent);outline-offset:1px}
body.buc-app .buc-swatch input{accent-color:var(--buc-accent)}
/* Semantic surface and border overrides for all screens, including popups and side sheets. */
body.buc-app .buc-top,body.buc-app .buc-client-head{background:var(--buc-top-bg);border-color:var(--buc-line)}
body.buc-app .buc-side{background:var(--buc-sidebar);border-color:var(--buc-line)}
body.buc-app .buc-stat,body.buc-app .buc-panel,
body.buc-app .buc-calendar,body.buc-app .buc-resource,
body.buc-app .buc-programs>div,body.buc-app .buc-modal,
body.buc-app .buc-note-sheet,body.buc-app .buc-auth{background:var(--buc-panel);border-color:var(--buc-line);color:var(--buc-text)}
body.buc-app .buc-toolbar,body.buc-app .buc-table th,
body.buc-app .buc-messages,body.buc-app .buc-rich,
body.buc-app .buc-note-tools button,body.buc-app .buc-note-tools select{background:var(--buc-subtle);border-color:var(--buc-line);color:var(--buc-text)}
body.buc-app .buc-table td,body.buc-app .buc-line,body.buc-app .buc-subtabs,
body.buc-app .buc-weekdays span,body.buc-app .buc-day,
body.buc-app .buc-cal-empty{border-color:var(--buc-line)}
body.buc-app .buc-bubble{background:var(--buc-panel2);color:var(--buc-text)}
body.buc-app .buc-bubble.mine{background:var(--buc-soft-accent);color:var(--buc-text)}
body.buc-app .buc-day:hover,body.buc-app .buc-table tbody tr:hover{background:var(--buc-soft-accent)}
body.buc-app .buc-resource:hover,body.buc-app .buc-toolbar button:hover{border-color:var(--buc-accent)}
body.buc-app .buc-app form label,body.buc-app form label{color:var(--buc-text)}
body.buc-app form input:not([type=checkbox]):not([type=file]),
body.buc-app form select,body.buc-app form textarea,
body.buc-app .buc-toolbar input,body.buc-app .buc-toolbar select,
body.buc-app .buc-toolbar button,body.buc-app .buc-report-controls input,
body.buc-app .buc-report-controls select,body.buc-app .buc-report-actions select{
 background:var(--buc-input);color:var(--buc-text);border:1px solid var(--buc-line);
}
body.buc-app .buc-ghost,body.buc-app .buc-actions button{background:var(--buc-panel2);border-color:var(--buc-line)!important;color:var(--buc-text)!important}
body.buc-app .buc-ghost:hover{border-color:var(--buc-accent)!important}
body.buc-app .buc-muted,body.buc-app .buc-page-title p,body.buc-app .buc-stat-label,
body.buc-app .buc-stat small,body.buc-app .buc-resource small,
body.buc-app .buc-info small,body.buc-app .buc-programs small,
body.buc-app .buc-table th,body.buc-app .buc-weekdays span,
body.buc-app .buc-daynum,body.buc-app .buc-subtabs button,
body.buc-app .buc-nav,body.buc-app .buc-nav small,
body.buc-app .buc-note-foot span{color:var(--buc-muted)!important}
body.buc-app .buc-brandmark{background:var(--buc-panel2);border-color:var(--buc-line);color:var(--buc-text)}
body.buc-app .buc-pill{background:var(--buc-soft-accent);color:var(--buc-text)}
body.buc-app .buc-resource-icon{background:var(--buc-soft-accent);color:var(--buc-accent)}
body.buc-app .buc-modal header,body.buc-app .buc-note-sheet header{background:var(--buc-accent);color:var(--buc-accent-ink)}
body.buc-app .buc-modal header h2,body.buc-app .buc-note-sheet header h3{color:var(--buc-accent-ink)}
body.buc-app .buc-modal header button,body.buc-app .buc-note-sheet header button{color:var(--buc-accent-ink)}
body.buc-app .buc-auth-wrap{background:var(--buc-bg)}
body.buc-app .buc-auth h1,body.buc-app .buc-auth p{color:var(--buc-text)}
body.buc-app .buc-auth-footer{border-color:var(--buc-line);color:var(--buc-muted)}
body.buc-app .buc-badge{color:var(--buc-text)}
body.buc-app .buc-badge span{color:var(--buc-accent)}
body.buc-app .buc-date-note{color:var(--buc-muted)}
body.buc-app[data-buc-theme="light"] .buc-subtabs button.chosen{color:var(--buc-accent)!important}
body.buc-app[data-buc-theme="light"] .buc-note-curtain,body.buc-app[data-buc-theme="light"] .buc-overlay{background:#172c3d78}
body.buc-app[data-buc-theme="light"] .buc-cal-event{background:var(--buc-soft-accent)!important;color:var(--buc-text)!important;border-color:var(--buc-accent)}
body.buc-app[data-buc-theme="light"] .buc-mfa-banner{background:#e5f5f3;color:#254942}
body.buc-app[data-buc-theme="light"] .buc-chip{background:#e8f1f1;color:#235c63}
body.buc-app[data-buc-theme="light"] .buc-chart-axis{color:var(--buc-muted)}
body.buc-app[data-buc-theme="light"] .buc-note-tools,body.buc-app[data-buc-theme="light"] .buc-client-head .buc-subtabs{border-color:var(--buc-line)}
/* Report controls, charts, tables, and export layout */
.buc-report-controls{display:flex;flex-wrap:wrap;align-items:end;gap:12px;background:var(--buc-panel);border:1px solid var(--buc-line);border-radius:var(--buc-round);padding:16px;margin-bottom:22px}
.buc-report-controls>label{font-size:12px;font-weight:700;min-width:140px;flex:1;max-width:270px}
.buc-report-controls select,.buc-report-controls input{display:block;width:100%;margin-top:6px;padding:10px 11px;border-radius:7px;min-height:42px}
.buc-report-controls>button{min-height:42px}
.buc-report-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.buc-mini-finance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:-1px 0 20px}
.buc-report-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:19px}
.buc-chart-card{min-width:0;overflow:hidden}
.buc-report-chart-grid .buc-chart-card:first-child{grid-column:1/-1}
.buc-graph-scroll{width:100%;overflow:auto}
.buc-chart-line{display:block;width:100%;height:230px;color:var(--buc-muted);min-width:320px;overflow:visible}
.buc-chart-axis{display:flex;align-items:center;justify-content:space-between;color:var(--buc-muted);font-size:11px;margin:2px 20px 3px}
.buc-chart-empty{min-height:190px;display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--buc-muted);text-align:center;padding:22px}
.buc-bar-list{display:grid;gap:13px;margin:14px 0 4px}
.buc-bar-line{display:grid;grid-template-columns:minmax(80px,145px) minmax(100px,1fr) 38px;gap:12px;align-items:center;font-size:12px}
.buc-bar-line>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--buc-text)}
.buc-bar-line strong{text-align:right;font-size:12px;font-variant-numeric:tabular-nums}
.buc-bar-track{height:12px;border-radius:10px;background:var(--buc-panel2);overflow:hidden}
.buc-bar-track span{display:block;height:100%;background:var(--buc-accent);border-radius:10px;min-width:0;transition:width .25s}
.buc-donut-wrap{display:grid;grid-template-columns:185px minmax(0,1fr);gap:16px;align-items:center}
.buc-donut-wrap svg{width:185px;height:185px}
.buc-donut-num{fill:var(--buc-text);font-size:22px;font-weight:850}
.buc-chart-legend{display:grid;gap:9px;font-size:12px}
.buc-chart-legend>div{display:flex;gap:8px;align-items:center}
.buc-chart-legend strong{margin-left:auto;font-variant-numeric:tabular-nums}
.buc-legend-dot{height:10px;width:10px;display:inline-block;border-radius:4px;flex-shrink:0}
.buc-report-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center;margin:19px 0}
.buc-report-actions select{flex:1;min-width:170px;padding:10px 13px;min-height:43px;border-radius:7px}
.buc-report-table tr:hover{cursor:default!important}
.buc-report-builder{margin-bottom:24px}
.buc-error-line{color:#ef737d;border:1px solid currentColor;padding:12px;border-radius:8px;margin-bottom:16px}
.buc-print-head{display:none}
/* Theme editor and swatch preview */
.buc-theme-form{min-width:0}
.buc-theme-preview{background:var(--buc-panel2);padding:13px;border-radius:10px;display:flex;align-items:center;gap:11px;margin-bottom:14px;border:1px solid var(--buc-line)}
.buc-theme-preview-logo{width:43px;height:43px;border-radius:10px;background:var(--buc-accent);color:var(--buc-accent-ink);font-weight:900;display:flex;align-items:center;justify-content:center;font-size:22px}
.buc-theme-preview-logo span{font-style:italic}
.buc-theme-preview strong,.buc-theme-preview small{display:block}
.buc-theme-preview small{font-size:10px;color:var(--buc-muted)}
.buc-preview-marker{margin-left:auto;color:var(--buc-accent);font-size:9px;font-weight:800;letter-spacing:1px}
.buc-theme-head{font-size:12px;text-transform:uppercase;letter-spacing:.7px;font-weight:800;margin:20px 0 9px}
.buc-theme-options{display:flex;gap:8px;flex-wrap:wrap}
.buc-theme-choice{display:flex;gap:8px;align-items:center;padding:9px;border:1px solid var(--buc-line);border-radius:8px;cursor:pointer;font-size:12px}
.buc-theme-choice input{accent-color:var(--buc-accent)}
.buc-swatches{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
.buc-swatch{width:31px;height:31px;display:block;border-radius:50%;background:var(--swatch);cursor:pointer;position:relative;border:2px solid var(--buc-panel)}
.buc-swatch input{opacity:0;width:100%;height:100%;position:absolute;inset:0;cursor:pointer}
.buc-swatch:has(input:checked){outline:2px solid var(--buc-text);outline-offset:2px}
.buc-theme-form input[type="color"]{width:85px!important;height:44px;min-height:44px;padding:3px!important;cursor:pointer}
.buc-theme-form .buc-check{margin:14px 0}
@media(max-width:1000px){.buc-report-chart-grid{grid-template-columns:1fr}.buc-donut-wrap{grid-template-columns:150px 1fr}.buc-donut-wrap svg{width:150px;height:150px}}
@media(max-width:680px){.buc-report-stats{grid-template-columns:repeat(2,1fr)}.buc-report-controls>label{min-width:140px}.buc-report-actions select{flex-basis:100%}.buc-donut-wrap{grid-template-columns:1fr}.buc-donut-wrap svg{justify-self:center}.buc-bar-line{grid-template-columns:90px minmax(40px,1fr) 28px;gap:6px}.buc-mini-finance{grid-template-columns:1fr}.buc-preview-marker{display:none}}
@media print{
 @page{size:A4 portrait;margin:14mm}
 body.buc-app{background:#fff!important;color:#000!important;font:10pt Arial,sans-serif!important}
 body.buc-app .buc-side,body.buc-app .buc-top,body.buc-app .buc-report-controls,body.buc-app .buc-report-actions,
 body.buc-app .buc-toast,body.buc-app .buc-sos,body.buc-app .buc-alert-stripe,
 body.buc-app .buc-page-title,body.buc-app .buc-mfa-banner{display:none!important}
 .buc-main,.buc-body,.buc-shell{margin:0!important;padding:0!important;max-width:none!important;display:block!important}
 .buc-report-chart-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
 .buc-panel,.buc-stat{break-inside:avoid;background:#fff!important;color:#111!important;border:1px solid #ddd!important;box-shadow:none!important;padding:10px!important}
 .buc-print-head{display:block!important;margin:0 0 16px;color:#111}
 .buc-print-head h2{font-size:18pt;margin:0}
 .buc-print-head p{font-size:9pt}
 .buc-stat strong{color:#111!important}
 .buc-bar-track{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .buc-donut-wrap svg,.buc-chart-line{-webkit-print-color-adjust:exact;print-color-adjust:exact}
 .buc-chart-legend,.buc-bar-line,.buc-chart-axis,.buc-muted{color:#333!important}
}
/* Staff workflow checklist */
.buc-workflow-checklist{display:grid;gap:9px;margin:15px 0 16px}
.buc-workflow-checklist label{display:flex;align-items:flex-start;gap:10px;line-height:1.45;border:1px solid var(--buc-line);border-radius:8px;padding:10px 12px;background:var(--buc-panel2)}
.buc-workflow-checklist input{margin-top:3px;accent-color:var(--buc-accent);width:17px;height:17px;flex-shrink:0}
.buc-workflow-checklist label:has(input:checked){background:var(--buc-soft-accent);border-color:var(--buc-accent)}
.buc-workflow-checklist label:has(input:checked) span{text-decoration:line-through;opacity:.8}
/* v0.3 clinical notes and incident reporting */
.buc-clinical-template{font-size:13px;line-height:1.65;color:var(--buc-text)}
.buc-clinical-template>h2{font-size:22px;letter-spacing:-.6px;border-bottom:3px solid var(--buc-accent);padding-bottom:12px;margin:6px 0 14px}
.buc-clinical-template>p{color:var(--buc-muted)}
.buc-clinical-section{border:1px solid var(--buc-line);border-radius:10px;padding:13px 15px;margin:13px 0;background:var(--buc-panel2);min-width:0}
.buc-clinical-section h3{font-size:11px;letter-spacing:1.1px;text-transform:uppercase;color:var(--buc-accent);margin:1px 0 12px}
.buc-clinical-section table{width:100%;border-collapse:collapse}
.buc-clinical-section th,.buc-clinical-section td{padding:11px 9px;border-bottom:1px solid var(--buc-line);vertical-align:top;font-size:12px;line-height:1.45}
.buc-clinical-section th{width:44%;text-align:left;font-weight:650}
.buc-clinical-section td{color:var(--buc-muted)}
.buc-clinical-section tr:last-child th,.buc-clinical-section tr:last-child td{border-bottom:0}
.buc-rich .buc-clinical-section table{width:100%}
.buc-rich .buc-clinical-section td{min-width:120px}
.buc-text-preview{white-space:normal}
.buc-text-preview .buc-clinical-template{padding:7px}
.buc-bell{position:relative;font-size:22px!important;padding:5px 12px!important}
.buc-bell-dot{position:absolute;top:0;right:2px;min-width:16px;height:16px;border-radius:16px;background:var(--buc-accent);color:var(--buc-accent-ink);font-size:10px;font-weight:750;line-height:16px}
.buc-assess-picker>input{background:var(--buc-panel2);border:1px solid var(--buc-line);color:var(--buc-text);width:100%;padding:13px 14px;border-radius:9px;outline:none}
.buc-assess-list{display:grid;gap:8px;margin-top:14px;max-height:53vh;overflow:auto}
.buc-assess-option{width:100%;border-radius:9px;border:1px solid var(--buc-line);display:flex;align-items:center;gap:12px;padding:13px 14px;background:var(--buc-panel2);text-align:left;color:var(--buc-text);cursor:pointer}
.buc-assess-option:hover{border-color:var(--buc-accent)}
.buc-assess-option span:nth-child(2){flex:1}
.buc-assess-option strong,.buc-assess-option small{display:block}
.buc-assess-option small{color:var(--buc-muted);font-size:11px;margin-top:4px}
.buc-assess-icon{background:var(--buc-soft-accent);color:var(--buc-accent);border-radius:9px;width:36px;height:36px;display:grid;place-items:center;font-size:20px}
.buc-assessment-progress-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px;color:var(--buc-muted);font-size:12px}
.buc-assessment-progress{height:7px;border-radius:7px;background:var(--buc-line);overflow:hidden}
.buc-assessment-progress i{height:100%;background:var(--buc-accent);display:block;transition:width .2s}
.buc-assessment-session h3{font-size:21px;margin:26px 0 16px;line-height:1.4}
.buc-assess-scale{display:flex;justify-content:space-between;color:var(--buc-muted);font-size:12px}
.buc-assessment-choices{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;margin:12px 0 18px}
.buc-assessment-choices button{border:1px solid var(--buc-line);background:var(--buc-panel2);min-width:42px;height:45px;border-radius:10px;color:var(--buc-text)}
.buc-assessment-choices button.selected,.buc-assessment-choices button:hover{border-color:var(--buc-accent);background:var(--buc-soft-accent)}
.buc-assessment-session .buc-selected{background:var(--buc-soft-accent)}
.buc-assessment-nav{display:flex;justify-content:space-between;gap:10px;margin-top:26px}
.buc-assessment-response-list{max-height:42vh;overflow:auto;margin:15px 0;border-top:1px solid var(--buc-line)}
.buc-assessment-response-list>div{display:flex;gap:12px;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--buc-line);font-size:12px}
.buc-assessment-response-list strong{color:var(--buc-accent);min-width:32px;text-align:right}
.buc-assessment-score{background:var(--buc-panel2);padding:17px 22px;border-radius:12px;display:flex;justify-content:space-between;align-items:center}
.buc-assessment-score h2{font-size:31px;margin:0}
.buc-assessment-score small{color:var(--buc-muted);font-size:12px}
.buc-warning-panel{background:#b1571233;border:1px solid #d3863c;padding:13px;border-radius:8px;margin:15px 0}
.buc-graph-metrics{display:grid;gap:8px;min-width:180px}
.buc-graph-row{display:grid;grid-template-columns:minmax(100px,1fr) minmax(50px,2fr) 55px;gap:9px;align-items:center;font-size:11px}
.buc-graph-row strong{font-size:11px}
.buc-graph-bar{background:var(--buc-line);height:8px;border-radius:6px;overflow:hidden}
.buc-graph-bar i{display:block;background:var(--buc-accent);height:100%;border-radius:6px}
.buc-notification-list{max-height:60vh;overflow:auto;display:grid;gap:8px}
.buc-notification{width:100%;display:flex;text-align:left;gap:11px;border:1px solid var(--buc-line);padding:12px;border-radius:9px;background:var(--buc-panel2)}
.buc-notification.new{border-color:var(--buc-accent)}
.buc-notification strong,.buc-notification small{display:block}
.buc-notification small{color:var(--buc-muted)}
.buc-incident-case>.buc-panel{padding:14px}
.buc-incident-case form{margin:15px 0}
.buc-case-header{display:flex;align-items:center;justify-content:space-between}
.buc-case-header h3{font-size:21px;margin:0}
.buc-report-statement{white-space:pre-wrap;font-size:13px;margin:10px 0}
.buc-incident-case .buc-perm-grid{max-height:210px;overflow:auto}
.buc-incident-case .buc-clinical-section{margin-top:20px}
.buc-note-sheet .buc-clinical-template>h2{color:var(--buc-text)!important}
@media(min-width:850px){.buc-modal:has(.buc-incident-case),.buc-modal:has(.buc-assessment-session),.buc-modal:has(.buc-assess-picker),.buc-modal:has(.buc-assessment-review){width:min(820px,96vw)}}
@media(max-width:600px){.buc-assessment-choices button{min-width:36px}.buc-assessment-session h3{font-size:18px}.buc-graph-row{grid-template-columns:80px 1fr 45px}.buc-bell{font-size:17px!important}.buc-clinical-section th,.buc-clinical-section td{display:block;width:100%;padding:7px}}
/* Structured clinical template gallery and visual editor */
.buc-clinical-gallery{grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:20px}
.buc-note-resource{display:flex;flex-direction:column;gap:9px;padding:10px!important;text-align:left!important;border-radius:13px;align-items:stretch;background:var(--buc-panel);min-height:280px}
.buc-note-resource>strong{font-size:13px;line-height:1.35;padding:1px 8px}
.buc-note-resource>small{padding:0 8px 8px;color:var(--buc-muted);font-size:11px}
.buc-resource-preview{flex:1;display:flex;flex-direction:column;border-radius:9px;min-height:175px;background:var(--buc-panel2);border:1px solid var(--buc-line);padding:14px 16px;gap:9px;overflow:hidden}
.buc-preview-kicker{color:var(--buc-accent);letter-spacing:1px;font-size:9px;font-weight:800}
.buc-preview-title{font-size:14px;font-weight:750;line-height:1.25;min-height:34px}
.buc-preview-lines{display:grid;gap:7px}
.buc-preview-lines span{font-size:10px;border-left:3px solid var(--buc-accent);background:var(--buc-bg);padding:4px 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.buc-preview-bottom{display:flex;gap:4px;margin-top:auto}
.buc-preview-bottom i{height:3px;border-radius:4px;background:var(--buc-line);flex:1}
.buc-preview-bottom i:first-child{background:var(--buc-accent)}
.buc-note-resource[hidden]{display:none!important}
.buc-template-editor{min-height:320px;max-height:52vh;overflow-y:auto;margin:12px 0 17px}
.buc-template-editor .buc-clinical-template{padding:7px}

/* v0.4: resilient dialogs and genuine internal scrolling */
body.buc-app .buc-overlay{
 position:fixed;inset:0;z-index:150;display:flex;align-items:center;justify-content:center;
 overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:16px;
}
body.buc-app .buc-modal{
 display:flex;flex-direction:column;width:min(720px,100%);max-height:calc(100dvh - 32px);
 min-height:0;overflow:hidden;overscroll-behavior:contain;margin:auto;
}
body.buc-app .buc-modal:has(.buc-assessment-session),
body.buc-app .buc-modal:has(.buc-assess-picker),
body.buc-app .buc-modal:has(.buc-assessment-review),
body.buc-app .buc-modal:has(.buc-incident-case){width:min(930px,100%)}
body.buc-app .buc-modal>header{position:relative;z-index:1;flex:0 0 auto;min-height:58px}
body.buc-app .buc-modal-body{
 flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
 scrollbar-width:thin;touch-action:pan-y;scroll-behavior:auto;
}
body.buc-app .buc-modal-body input,body.buc-app .buc-modal-body textarea{max-width:100%}
body.buc-app .buc-note-curtain{z-index:180}
body.buc-app .buc-note-sheet{
 top:max(10px,env(safe-area-inset-top));bottom:0;z-index:181;width:min(920px,100vw);
 display:flex;flex-direction:column;min-height:0;overflow:hidden;
}
body.buc-app .buc-note-sheet>header{flex:0 0 auto;min-height:58px}
body.buc-app .buc-note-tools{flex:0 0 auto}
body.buc-app .buc-note-sheet form{
 display:block;min-height:0;flex:1 1 auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
 touch-action:pan-y;scrollbar-width:thin;padding:18px 26px 30px;
}
body.buc-app .buc-note-sheet .buc-rich{
 display:block;flex:none;min-height:260px;height:min(41vh,430px);overflow:auto;
 margin:12px 0 20px;touch-action:pan-y;overscroll-behavior:contain;
}
body.buc-app .buc-note-sheet .buc-note-foot{
 position:sticky;bottom:-30px;z-index:2;flex-wrap:wrap;background:var(--buc-panel);
 padding:15px 2px;border-top:1px solid var(--buc-line);margin-top:20px;
}
body.buc-app .buc-note-sheet .buc-note-foot span{flex:1 1 180px}
body.buc-app .buc-note-edit-label{font-size:12px;font-weight:700;color:var(--buc-muted)}
.buc-modal-body,.buc-note-sheet form{scrollbar-color:var(--buc-accent) transparent}

/* v0.4: client record layout with wider pathways and compact sidebar */
.buc-client-layout{display:grid;grid-template-columns:minmax(0,2.15fr) minmax(260px,.85fr);gap:20px;align-items:start}
.buc-client-primary,.buc-client-aside{min-width:0}
.buc-client-aside .buc-panel{padding:18px}
.buc-client-aside .buc-info{font-size:12px}
.buc-client-aside .buc-panel-title h3{font-size:15px}
.buc-client-aside .buc-line{flex-wrap:wrap;font-size:12px}
.buc-client-aside .buc-actions-stack{display:grid;grid-template-columns:1fr;align-items:stretch}
.buc-client-aside .buc-actions-stack button{width:100%;justify-content:flex-start}
.buc-pathway-panel{padding:0!important;overflow:hidden}
.buc-pathway-panel>.buc-panel-title{display:none}
.buc-pathway{padding:22px;display:grid;gap:16px}
.buc-pathway>.buc-panel,.buc-pathway>.buc-progress-split .buc-panel{margin-bottom:0}
.buc-pathway-title{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:15px}
.buc-pathway-title h3{font-size:21px;margin:4px 0 0}
.buc-pathway-title small{color:var(--buc-muted)}
.buc-range{display:flex;flex-wrap:wrap;gap:3px;background:var(--buc-panel2);border:1px solid var(--buc-line);border-radius:10px;padding:4px}
.buc-range button{padding:7px 10px;border:0;border-radius:7px;background:transparent;color:var(--buc-muted)!important;font-size:12px!important}
.buc-range button.current{background:var(--buc-accent);color:var(--buc-accent-ink)!important;font-weight:700}
.buc-progress-summary{display:grid;grid-template-columns:1.45fr 1fr 1fr;gap:10px}
.buc-progress-summary>div{border:1px solid var(--buc-line);background:var(--buc-panel2);border-radius:12px;padding:18px 16px;min-width:0}
.buc-progress-summary small,.buc-progress-summary span{display:block;color:var(--buc-muted);font-size:11px}
.buc-progress-summary strong{display:block;font-size:24px;line-height:1.4}
.buc-progress-summary .buc-progress-big strong{font-size:34px;color:var(--buc-accent)}
.buc-progress-summary em{font-size:12px;color:var(--buc-muted);font-weight:400;font-style:normal}
.buc-progress-split{display:grid;grid-template-columns:1fr 1fr;gap:14px;min-width:0}
.buc-progress-split>.buc-panel{padding:17px;min-width:0}
.buc-progress-graph{width:100%;max-height:270px;overflow-x:auto}
.buc-progress-graph svg{display:block;width:100%;min-width:380px;max-height:250px}
.buc-progress-legend{display:flex;flex-wrap:wrap;gap:7px 13px;margin-top:10px}
.buc-progress-legend span{font-size:10px;color:var(--buc-muted);display:inline-flex;gap:5px;align-items:center}
.buc-progress-legend i{width:9px;height:9px;display:inline-block;border-radius:50%;flex-shrink:0}
.buc-mini-kpi{font-size:11px;color:var(--buc-muted);margin-top:14px;text-align:center}
.buc-task-totals{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.buc-task-totals span{font-size:12px;color:var(--buc-muted)}
.buc-task-totals b{font-size:27px;color:var(--buc-text);display:block}
.buc-task-track{height:9px;margin:18px 0 3px;background:var(--buc-line);border-radius:10px;overflow:hidden}
.buc-task-track i{height:100%;background:var(--buc-accent);display:block}
.buc-path-task{padding:10px 4px;border-bottom:1px solid var(--buc-line)}
.buc-path-task label{display:flex;align-items:center;gap:12px;cursor:pointer}
.buc-path-task input{accent-color:var(--buc-accent);width:17px;height:17px}
.buc-path-task span{display:flex;flex-direction:column}
.buc-path-task small{font-size:11px;color:var(--buc-muted)}
.buc-assessment-mini{display:grid;gap:14px}
.buc-assessment-mini-group{border:1px solid var(--buc-line);border-radius:10px;padding:12px}
.buc-assessment-mini-head{display:flex;gap:10px;justify-content:space-between;margin-bottom:10px;flex-wrap:wrap}
.buc-assessment-mini-head small{color:var(--buc-muted)}
.buc-mini-score{display:grid;grid-template-columns:95px minmax(45px,1fr) 75px;gap:11px;align-items:center;padding:6px 0;font-size:11px}
.buc-mini-score strong{text-align:right}
/* Five check-in score rows sit below the rich text, not within it. */
.buc-checkin{border:1px solid var(--buc-line);background:var(--buc-panel2);padding:18px;border-radius:12px}
.buc-checkin-head{display:flex;justify-content:space-between;gap:15px;margin-bottom:12px;align-items:flex-start}
.buc-checkin-head h4{font-size:18px;margin:4px 0}
.buc-checkin-head p{font-size:12px;color:var(--buc-muted);margin:0}
.buc-checkin-average{font-size:26px;font-weight:800;white-space:nowrap;color:var(--buc-accent)}
.buc-checkin-average small{font-size:11px;font-weight:400;color:var(--buc-muted)}
.buc-checkin-row{margin:0;padding:12px 0;border:0;border-top:1px solid var(--buc-line)}
.buc-checkin-row legend{font-weight:700;font-size:13px;float:left;width:100%}
.buc-checkin-row>small{display:block;clear:both;color:var(--buc-muted);font-size:11px;margin:3px 0 10px}
.buc-score-choices{display:grid;grid-template-columns:repeat(5,minmax(35px,1fr));gap:8px}
.buc-score-choices label{display:block;cursor:pointer}
.buc-score-choices input{position:absolute;opacity:0;width:1px;height:1px}
.buc-score-choices span{display:flex;justify-content:center;align-items:center;padding:9px 0;background:var(--buc-panel);border:1px solid var(--buc-line);border-radius:9px;font-weight:700}
.buc-score-choices input:checked+span{background:var(--buc-accent);border-color:var(--buc-accent);color:var(--buc-accent-ink)}
.buc-score-choices input:focus-visible+span{outline:3px solid var(--buc-accent);outline-offset:2px}
@media(max-width:1150px){.buc-client-layout{grid-template-columns:minmax(0,1.7fr) minmax(230px,.85fr)}.buc-progress-split{grid-template-columns:1fr}}
@media(max-width:840px){.buc-client-layout{grid-template-columns:1fr}.buc-client-aside{display:grid;grid-template-columns:1fr 1fr;gap:12px}.buc-client-aside>.buc-panel{margin-bottom:0}}
@media(max-width:560px){body.buc-app .buc-modal{max-height:calc(100dvh - 14px)}body.buc-app .buc-overlay{padding:7px}body.buc-app .buc-note-sheet{top:0;width:100vw}.buc-pathway{padding:13px}.buc-client-aside{grid-template-columns:1fr}.buc-progress-summary{grid-template-columns:1fr 1fr}.buc-progress-summary>div:first-child{grid-column:1/-1}.buc-checkin{padding:12px}.buc-checkin-head{flex-wrap:wrap}.buc-score-choices{gap:4px}}
.buc-score-choices label{position:relative}
.buc-score-choices input{position:absolute;inset:0;width:100%;height:100%;opacity:0;z-index:1;cursor:pointer;margin:0}
.buc-signed-checkin{border-top:2px solid var(--buc-accent);padding:12px 0;margin-top:20px}
.buc-signed-checkin h3{margin:5px 0 10px}
.buc-signed-checkin ul{columns:2;padding-left:22px}
.buc-signed-checkin li{break-inside:avoid;margin:4px 0}
.buc-signed-checkin p{font-size:12px;color:var(--buc-muted)}
@media(max-width:560px){.buc-signed-checkin ul{columns:1}}

/* v0.4.1: hard-lock the underlying page; all dialogs own their scroll region. */
html:has(body.buc-app.buc-scroll-locked),body.buc-app.buc-scroll-locked{overscroll-behavior:none!important;}
body.buc-app.buc-scroll-locked{height:100dvh!important;overflow:hidden!important;}
body.buc-app #buc-modal:has(.buc-overlay),body.buc-app #buc-sheet:has(.buc-note-sheet){position:relative;z-index:200;}
body.buc-app .buc-overlay{overflow:hidden!important;overscroll-behavior:none!important;padding:12px!important;align-items:center!important;justify-content:center!important;touch-action:none;}
body.buc-app .buc-modal{height:auto;max-height:calc(100dvh - 24px)!important;min-height:0;overflow:hidden!important;}
body.buc-app .buc-modal-body{flex:1 1 auto;min-height:0;max-height:calc(100dvh - 82px);overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:pan-y!important;}
body.buc-app .buc-note-sheet form{min-height:0;overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:pan-y!important;}
body.buc-app .buc-note-curtain{overscroll-behavior:none!important;touch-action:none;}
/* 24-hour cell-based day calendar */
body.buc-app .buc-day[data-day]{cursor:pointer;transition:background-color .12s ease;}
body.buc-app .buc-day[data-day]:focus-visible{outline:2px solid var(--buc-accent);outline-offset:-3px;}
body.buc-app .buc-day-layout{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:18px;align-items:start;}
body.buc-app .buc-day-schedule,body.buc-app .buc-day-appointments{margin:0;min-width:0;}
body.buc-app .buc-day-schedule{padding:0;overflow:hidden;}
body.buc-app .buc-day-schedule-head{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:15px 20px;background:var(--buc-panel2);border-bottom:1px solid var(--buc-line);font-size:13px;}
body.buc-app .buc-day-legend{font-size:11px;color:var(--buc-muted);display:inline-flex;align-items:center;gap:7px;}
body.buc-app .buc-day-legend i{width:12px;height:12px;border-left:3px solid var(--buc-accent);background:var(--buc-soft-accent);}
body.buc-app .buc-day-legend i.busy{background:color-mix(in srgb,var(--buc-accent) 25%,var(--buc-panel2));border-color:var(--buc-accent);}
body.buc-app .buc-day-scroller{max-height:min(68vh,660px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;touch-action:pan-y;scrollbar-color:var(--buc-accent) transparent;}
body.buc-app .buc-day-rows{min-width:0;user-select:none;}
body.buc-app .buc-day-row{height:32px;display:grid;grid-template-columns:80px minmax(0,1fr);cursor:crosshair;position:relative;font-size:12px;}
body.buc-app .buc-day-hour{color:var(--buc-muted);text-align:right;padding:2px 12px 0 0;position:relative;top:-7px;white-space:nowrap;font-size:10px;}
body.buc-app .buc-day-cell{border-left:1px solid var(--buc-line);border-bottom:1px solid color-mix(in srgb,var(--buc-line) 55%,transparent);background:var(--buc-panel);padding:5px 12px;position:relative;min-width:0;}
body.buc-app .buc-day-row:nth-child(4n + 1) .buc-day-cell{border-top:1px solid var(--buc-line);}
body.buc-app .buc-day-row.buc-office-hours .buc-day-cell{background:color-mix(in srgb,var(--buc-accent) 3%,var(--buc-panel));}
body.buc-app .buc-day-row.buc-work-boundary .buc-day-cell{border-top:3px solid var(--buc-accent);}
body.buc-app .buc-day-guide{font-size:10px;line-height:1;color:var(--buc-accent);font-style:normal;font-weight:800;letter-spacing:.3px;position:relative;top:-3px;}
body.buc-app .buc-day-row.buc-day-busy .buc-day-cell{background:color-mix(in srgb,var(--buc-accent) 17%,var(--buc-panel));box-shadow:inset 4px 0 0 var(--buc-accent);}
body.buc-app .buc-day-row.buc-day-selected .buc-day-cell{background:color-mix(in srgb,var(--buc-accent) 44%,var(--buc-panel));box-shadow:inset 5px 0 0 var(--buc-accent);}
body.buc-app .buc-day-row:focus-visible{outline:2px solid var(--buc-accent);outline-offset:-2px;}
body.buc-app .buc-day-event-label{font-size:11px;font-weight:700;color:var(--buc-text);white-space:nowrap;max-width:95%;overflow:hidden;text-overflow:ellipsis;display:inline-block;}
body.buc-app .buc-day-selection-status{padding:13px 20px;color:var(--buc-text);font-size:13px;font-weight:700;border-top:1px solid var(--buc-line);background:var(--buc-panel2);}
body.buc-app .buc-day-appointments>h3{margin-top:0;font-size:16px;}
body.buc-app .buc-day-appt-item{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;padding:13px;border-radius:8px;background:var(--buc-panel2);border:1px solid var(--buc-line);margin:9px 0;}
body.buc-app .buc-day-appt-item strong{font-size:12px;color:var(--buc-accent);}
body.buc-app .buc-day-appt-item span{font-weight:650;white-space:normal;}
body.buc-app .buc-day-appt-item small{color:var(--buc-muted);font-size:11px;}
@media(max-width:900px){body.buc-app .buc-day-layout{grid-template-columns:1fr;}body.buc-app .buc-day-scroller{max-height:55vh;}}
@media(max-width:560px){body.buc-app .buc-day-row{grid-template-columns:65px minmax(0,1fr);}body.buc-app .buc-day-hour{font-size:9px;padding-right:6px;}body.buc-app .buc-day-cell{padding:5px 7px;}body.buc-app .buc-day-schedule-head{padding:10px;}body.buc-app .buc-day-guide{font-size:9px;}}
/* v0.4.2 – make the 24-hour day grid a reliable, independently scrollable viewport. */
body.buc-app .buc-day-layout{align-items:stretch;}
body.buc-app .buc-day-schedule{display:flex;flex-direction:column;min-width:0;min-height:0;}
body.buc-app #buc-day-scroller{
  position:relative;display:block;flex:none;height:min(65dvh,700px)!important;
  max-height:none!important;min-height:180px;overflow-y:scroll!important;
  overflow-x:hidden!important;overscroll-behavior-y:contain!important;
  touch-action:pan-y!important;-webkit-overflow-scrolling:touch;
  scrollbar-width:auto;scrollbar-color:var(--buc-accent) var(--buc-panel2);
}
body.buc-app #buc-day-scroller::-webkit-scrollbar{width:13px;}
body.buc-app #buc-day-scroller::-webkit-scrollbar-track{background:var(--buc-panel2);}
body.buc-app #buc-day-scroller::-webkit-scrollbar-thumb{background:var(--buc-accent);border:3px solid var(--buc-panel2);border-radius:12px;}
body.buc-app .buc-day-rows{position:relative;}
body.buc-app .buc-day-jumps{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto;}
body.buc-app .buc-day-jumps button{padding:5px 10px;border-radius:7px;border:1px solid var(--buc-line);background:var(--buc-panel);color:var(--buc-text);font-size:12px;}
body.buc-app .buc-day-jumps button:hover,body.buc-app .buc-day-jumps button:focus-visible{border-color:var(--buc-accent);}
body.buc-app .buc-day-row{touch-action:pan-y;}
/* Same containment and inertial touch scrolling for session notes, assessments and incident reports. */
body.buc-app .buc-modal-body,body.buc-app .buc-note-sheet form,body.buc-app .buc-scroll,body.buc-app .buc-messages{
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;
}
/* Shared referral directory */
body.buc-app .buc-referral-toolbar input{flex:1;min-width:170px;}
body.buc-app .buc-referral-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr));gap:16px;align-items:stretch;}
body.buc-app .buc-referral-card{display:flex;flex-direction:column;gap:10px;margin:0;padding:20px;min-width:0;}
body.buc-app .buc-referral-heading{display:flex;gap:12px;align-items:center;}
body.buc-app .buc-referral-heading strong{display:block;font-weight:750;font-size:16px;line-height:1.3;overflow-wrap:anywhere;}
body.buc-app .buc-referral-heading small{display:block;font-size:12px;color:var(--buc-muted);margin-top:4px;}
body.buc-app .buc-referral-icon{display:grid;place-items:center;flex:none;width:43px;height:43px;border-radius:11px;border:1px solid var(--buc-line);color:var(--buc-accent);background:var(--buc-soft-accent);font-size:23px;}
body.buc-app .buc-referral-card .buc-muted{margin:0;overflow-wrap:anywhere;}
body.buc-app .buc-referral-details{display:flex;flex-direction:column;gap:5px;color:var(--buc-muted);font-size:12px;overflow-wrap:anywhere;flex:1;}
body.buc-app .buc-referral-card .buc-actions{margin-top:auto;}
body.buc-app .buc-referral-card .buc-actions button{font-size:12px;padding:8px 10px;}
body.buc-app .buc-pre-line{white-space:pre-wrap;overflow-wrap:anywhere;}
body.buc-app .buc-referral-confirm{display:flex;align-items:flex-start;gap:12px;line-height:1.45;}
body.buc-app .buc-referral-confirm input{margin-top:5px;flex-shrink:0;}
body.buc-app .buc-referral-grid [hidden]{display:none!important;}
@media(max-width:900px){body.buc-app #buc-day-scroller{height:55dvh!important;}}
@media(max-width:600px){body.buc-app .buc-day-jumps{width:100%;margin:0;}body.buc-app .buc-day-schedule-head{gap:8px;}body.buc-app .buc-referral-grid{grid-template-columns:1fr;}}
@media(prefers-reduced-motion:reduce){body.buc-app *,body.buc-app *::before,body.buc-app *::after{scroll-behavior:auto!important;}}
/* Kovesis 0.5.1 — compact, recessed navigation and modern system UI typography. */
/* Use the latest native variable/system fonts first: no third-party requests in a clinical workspace. */
body.buc-app {
 --buc-sidebar-ink:var(--buc-accent-ink,#12212a);
 --buc-sidebar-soft:color-mix(in srgb,var(--buc-sidebar-ink) 11%,transparent);
 font-family:"Segoe UI Variable Text","Inter","SF Pro Text","Roboto","Segoe UI",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
 font-size:14px;
 line-height:1.52;
 letter-spacing:-.008em;
 font-weight:400;
}
body.buc-app .buc-side {
 background:var(--buc-accent)!important;
 border-color:color-mix(in srgb,var(--buc-sidebar-ink) 22%,transparent)!important;
 width:82px;
 flex:0 0 82px;
 padding:12px 6px;
 gap:3px;
 box-shadow:1px 0 12px #00000012;
 overflow-x:hidden;
 overflow-y:auto;
 overscroll-behavior:contain;
 scrollbar-width:thin;
 scrollbar-color:color-mix(in srgb,var(--buc-sidebar-ink) 24%,transparent) transparent;
}
body.buc-app .buc-nav {
 display:flex;
 flex:0 0 auto;
 align-items:center;
 justify-content:center;
 flex-direction:column;
 width:66px;
 min-height:54px;
 padding:5px 2px;
 gap:2px;
 border:1px solid transparent;
 border-radius:11px;
 background:transparent;
 color:var(--buc-sidebar-ink)!important;
 transform:none;
 text-shadow:none;
 box-shadow:none;
 transition:background-color .14s ease,box-shadow .14s ease,border-color .14s ease,transform .10s ease;
}
body.buc-app .buc-nav span {
 display:grid;
 place-items:center;
 width:24px;
 height:24px;
 flex:0 0 24px;
 color:inherit;
}
body.buc-app .buc-nav svg {
 width:21px;
 height:21px;
 stroke:currentColor;
 stroke-width:2.15;
}
body.buc-app .buc-nav small {
 display:block;
 font-family:inherit;
 font-size:10px;
 font-weight:520!important;
 line-height:1.15;
 letter-spacing:-.01em;
 color:var(--buc-sidebar-ink)!important;
 max-width:62px;
 overflow:hidden;
 text-overflow:ellipsis;
 white-space:nowrap;
}
body.buc-app .buc-nav:hover:not(.current) {
 background:color-mix(in srgb,var(--buc-sidebar-ink) 8%,transparent)!important;
 color:var(--buc-sidebar-ink)!important;
 transform:none;
}
body.buc-app .buc-nav.current {
 background:color-mix(in srgb,var(--buc-sidebar-ink) 13%,transparent)!important;
 color:var(--buc-sidebar-ink)!important;
 border-color:color-mix(in srgb,var(--buc-sidebar-ink) 12%,transparent);
 box-shadow:inset 0 2px 5px color-mix(in srgb,var(--buc-sidebar-ink) 24%,transparent),inset 0 1px 1px color-mix(in srgb,var(--buc-sidebar-ink) 11%,transparent);
 transform:none;
}
body.buc-app .buc-nav.current small {font-weight:650!important}
body.buc-app .buc-nav.current svg {stroke-width:2.35}
body.buc-app .buc-nav:active {
 transform:translateY(1px);
 box-shadow:inset 0 3px 7px color-mix(in srgb,var(--buc-sidebar-ink) 28%,transparent);
}
body.buc-app .buc-nav:focus-visible {
 outline:2px solid var(--buc-sidebar-ink);
 outline-offset:1px;
}
body.buc-app .buc-brandmark {
 display:flex;
 align-items:center;
 justify-content:center;
 flex-shrink:0;
 width:44px;
 height:40px;
 min-height:40px;
 margin:2px 0 9px;
 padding:0;
 font-size:20px;
 font-weight:780;
 letter-spacing:-1.25px;
 background:color-mix(in srgb,#fff 22%,transparent)!important;
 color:var(--buc-sidebar-ink)!important;
 border:1px solid color-mix(in srgb,var(--buc-sidebar-ink) 18%,transparent)!important;
 border-radius:12px;
 box-shadow:0 1px 2px #0000000c;
}
body.buc-app .buc-brandmark span {color:var(--buc-sidebar-ink)!important}
body.buc-app .buc-side-bottom {
 margin-top:auto;
 margin-bottom:4px;
 padding:8px 0 2px;
 transform:none;
 line-height:1;
 opacity:.78;
 white-space:nowrap;
}
body.buc-app .buc-logo-mini {
 color:var(--buc-sidebar-ink)!important;
 font-weight:580!important;
 letter-spacing:-.02em;
 font-size:9px;
}
body.buc-app .buc-sos {left:89px}
body.buc-app .buc-alert-stripe {left:82px}
@media(max-height:780px) {
 body.buc-app .buc-side {padding-top:8px;gap:2px}
 body.buc-app .buc-nav {min-height:50px;padding:4px 2px}
 body.buc-app .buc-brandmark {margin-bottom:5px}
}
@media(max-width:780px) {
 body.buc-app .buc-side {width:68px;flex-basis:68px;padding:10px 4px}
 body.buc-app .buc-nav {width:58px;min-height:51px;padding:4px 1px}
 body.buc-app .buc-nav svg {width:20px;height:20px}
 body.buc-app .buc-nav small {font-size:9px;max-width:55px}
 body.buc-app .buc-sos {left:74px}
 body.buc-app .buc-alert-stripe {left:68px}
}
@media(max-width:600px) {
 body.buc-app .buc-side {width:62px;flex-basis:62px;padding:9px 3px}
 body.buc-app .buc-nav {width:54px;min-height:50px}
 body.buc-app .buc-nav small {font-size:8.7px;max-width:52px}
 body.buc-app .buc-sos {left:68px}
 body.buc-app .buc-alert-stripe {left:62px}
}
@media(prefers-reduced-motion:reduce) {
 body.buc-app .buc-nav {transition:none!important}
}
/* All content areas must inherit the active palette; never hard-code black text on dark surfaces. */
body.buc-app .buc-panel *,body.buc-app .buc-stat *,body.buc-app .buc-modal-body *,body.buc-app .buc-client-head *,body.buc-app .buc-day-appointments *,body.buc-app .buc-chat-main *{border-color:var(--buc-line)}
body.buc-app .buc-panel h2,body.buc-app .buc-panel h3,body.buc-app .buc-panel h4,body.buc-app .buc-panel strong,body.buc-app .buc-stat strong,body.buc-app .buc-client-head h2,body.buc-app .buc-chat-head strong,body.buc-app .buc-modal-body strong,body.buc-app .buc-page-title h2,body.buc-app .buc-top h1{color:var(--buc-text)!important}
body.buc-app .buc-panel p:not(.buc-muted),body.buc-app .buc-modal-body p:not(.buc-muted),body.buc-app .buc-panel label,body.buc-app .buc-info strong,body.buc-app .buc-line>div,body.buc-app .buc-day-appt-item{color:var(--buc-text)}
body.buc-app input::placeholder,body.buc-app textarea::placeholder{color:var(--buc-muted);opacity:.9}
body.buc-app .buc-chat-layout{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:16px;min-height:580px}
body.buc-app .buc-chat-contacts{min-width:0;max-height:75vh;overflow:auto;padding:16px}
body.buc-app #buc-chat-search{width:100%;background:var(--buc-input);color:var(--buc-text);border:1px solid var(--buc-line);padding:11px;border-radius:10px;margin-bottom:11px}
body.buc-app .buc-chat-contact{display:flex;align-items:center;gap:10px;width:100%;background:transparent;border:0;border-radius:12px;padding:10px;text-align:left;color:var(--buc-text);margin-bottom:5px;cursor:pointer}
body.buc-app .buc-chat-contact:hover,body.buc-app .buc-chat-contact.chosen{background:var(--buc-soft-accent)}
body.buc-app .buc-chat-contact>span:nth-child(2){flex:1;min-width:0}
body.buc-app .buc-chat-contact strong,body.buc-app .buc-chat-contact small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.buc-app .buc-chat-contact small{font-size:11px;color:var(--buc-muted)}
body.buc-app .buc-chat-contact em{font-size:11px;background:var(--buc-accent);color:var(--buc-accent-ink);padding:3px 7px;border-radius:50%}
body.buc-app .buc-chat-main{display:flex;flex-direction:column;min-width:0;max-height:75vh;padding:0!important;overflow:hidden}
body.buc-app .buc-chat-head{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;border-bottom:1px solid var(--buc-line);gap:9px;flex-wrap:wrap}
body.buc-app .buc-chat-head small{display:block;color:var(--buc-muted)}
body.buc-app .buc-chat-history{flex:1;min-height:160px;overflow-y:auto;overscroll-behavior:contain;padding:20px 17px;background:var(--buc-bg)}
body.buc-app .buc-chat-message{max-width:min(76%,600px);width:max-content;overflow-wrap:anywhere;border-radius:15px 15px 15px 4px;background:var(--buc-panel2);color:var(--buc-text);padding:12px 14px;margin-bottom:12px}
body.buc-app .buc-chat-message.mine{margin-left:auto;border-radius:15px 15px 4px 15px;background:var(--buc-soft-accent)}
body.buc-app .buc-chat-message small{display:block;color:var(--buc-muted);font-size:11px;margin-bottom:4px}
body.buc-app .buc-chat-attachment{display:block;margin-top:7px;padding:8px;border:1px solid var(--buc-line);border-radius:9px;color:var(--buc-accent);background:var(--buc-panel)}
body.buc-app .buc-chat-compose{padding:12px 16px;border-top:1px solid var(--buc-line)}
body.buc-app .buc-chat-compose textarea{display:block;width:100%;min-height:65px;padding:12px;border-radius:11px;border:1px solid var(--buc-line);background:var(--buc-input);color:var(--buc-text)}
body.buc-app .buc-chat-compose-tools,body.buc-app .buc-chat-compose-actions,.buc-teams-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:5px 0 9px}
body.buc-app .buc-chat-compose-tools button,.buc-chat-upload{border:1px solid var(--buc-line);padding:6px 9px;background:var(--buc-panel2);border-radius:8px;color:var(--buc-text);cursor:pointer}
body.buc-app .buc-chat-compose-actions{justify-content:space-between}
body.buc-app .buc-chat-compose-actions small{color:var(--buc-muted);font-size:11px}
body.buc-app .buc-teams-actions{padding:7px 17px;background:var(--buc-subtle);font-size:12px;margin:0}
body.buc-app .buc-teams-actions a{color:var(--buc-accent)}
body.buc-app .buc-emoji-picker{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}
body.buc-app .buc-emoji-picker button{font-size:24px;padding:8px;cursor:pointer;border:1px solid var(--buc-line);background:var(--buc-panel2);border-radius:8px}
body.buc-app .buc-doc-tools{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-bottom:18px}
body.buc-app .buc-doc-tools label{font-size:11px;min-width:160px;color:var(--buc-muted)}
body.buc-app .buc-doc-tools select{display:block;padding:9px;width:100%;background:var(--buc-input);color:var(--buc-text);border:1px solid var(--buc-line);border-radius:7px}
body.buc-app .buc-doc-folder{padding:9px 0;border-bottom:1px solid var(--buc-line)}
body.buc-app .buc-doc-folder-head{display:flex;gap:10px;align-items:center;color:var(--buc-text);padding:10px 12px;background:var(--buc-panel2);border-radius:9px}
body.buc-app .buc-doc-folder-head small{color:var(--buc-muted);margin-left:auto}
body.buc-app .buc-doc-item{align-items:center}
body.buc-app .buc-doc-item>div:first-child{flex:1;min-width:0}
body.buc-app .buc-doc-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
body.buc-app .buc-doc-tags span{font-size:10px;background:var(--buc-soft-accent);padding:2px 7px;border-radius:20px}
body.buc-app .buc-doc-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
body.buc-app .buc-place-panel{padding:15px;background:var(--buc-panel2);border:1px solid var(--buc-line);border-radius:12px;margin:7px 0 18px}
body.buc-app .buc-place-results{max-height:250px;overflow:auto;overscroll-behavior:contain}
body.buc-app .buc-place-results button{display:grid;text-align:left;width:100%;background:var(--buc-panel);border:1px solid var(--buc-line);border-radius:9px;padding:10px;margin-top:7px;color:var(--buc-text)}
body.buc-app .buc-place-results small,body.buc-app .buc-place-results span{color:var(--buc-muted)}
body.buc-app .buc-appt-hero{padding:17px;background:var(--buc-soft-accent);border-radius:12px;margin-bottom:16px}
body.buc-app .buc-appt-hero h3{margin:10px 0 0}
body.buc-app .buc-appt-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body.buc-app .buc-appt-info>div{padding:12px;background:var(--buc-panel2);border-radius:10px;min-width:0;overflow-wrap:anywhere}
body.buc-app .buc-appt-info small{display:block;color:var(--buc-muted);margin-bottom:3px}
body.buc-app .buc-person-link{border:0;background:none;color:var(--buc-accent);font-weight:800;padding:2px 0;cursor:pointer;text-align:left}
#buc-call-dock{position:fixed;right:16px;bottom:16px;width:min(480px,calc(100vw - 32px));background:var(--buc-panel);color:var(--buc-text);border:2px solid var(--buc-accent);box-shadow:0 14px 48px #0008;z-index:999999;border-radius:16px;padding:10px}
#buc-call-dock .buc-call-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
#buc-call-dock .buc-call-media{display:flex;gap:5px;margin-top:8px}
#buc-call-dock video{width:50%;height:150px;border-radius:10px;background:#101820;object-fit:cover}
@media(max-width:900px){body.buc-app .buc-chat-layout{grid-template-columns:1fr}body.buc-app .buc-chat-contacts{max-height:190px}body.buc-app .buc-chat-main{min-height:420px}}
@media(max-width:600px){body.buc-app .buc-appt-info{grid-template-columns:1fr}}
/* Editor content colour must follow active theme, even for imported HTML templates. */
body.buc-app[data-buc-theme="dark"] .buc-rich,
body.buc-app[data-buc-theme="dark"] .buc-rich :is(h1,h2,h3,h4,h5,h6,p,span,strong,em,li,td,th,label),
body.buc-app[data-buc-theme="dark"] .buc-resource-preview :is(h1,h2,h3,h4,h5,h6,p,span,strong,em,li,td,th),
body.buc-app[data-buc-theme="dark"] .buc-text-preview :is(h1,h2,h3,h4,h5,h6,p,span,strong,em,li,td,th){color:var(--buc-text)!important}
body.buc-app[data-buc-theme="dark"] .buc-rich :is(table,td,th),
body.buc-app[data-buc-theme="dark"] .buc-resource-preview :is(table,td,th){background:var(--buc-panel2)!important;border-color:var(--buc-line)!important}
body.buc-app[data-buc-theme="light"] .buc-rich :is(h1,h2,h3,h4,h5,h6,p,span,strong,em,li,td,th){color:var(--buc-text)!important}

/* v0.5.2 - compact unread counters and persistent multi-chat staff messenger */
body.buc-app .buc-nav .buc-nav-icon{position:relative;display:inline-flex;align-items:center;justify-content:center}
body.buc-app .buc-nav .buc-nav-unread{
 position:absolute;top:-9px;right:-10px;z-index:2;display:flex;justify-content:center;align-items:center;
 min-width:17px;height:17px;padding:0 3px;border-radius:100px;background:#fff0f0;color:#8c1936!important;
 font-size:10px;line-height:1;font-weight:750;font-style:normal;box-shadow:0 1px 4px #19253255;border:1px solid #a91831;
}
body.buc-app #buc-floating-messenger{position:fixed;right:18px;bottom:16px;z-index:155;display:flex;flex-direction:column;align-items:flex-end;gap:10px;pointer-events:none;color:var(--buc-text);font-family:Inter,"Segoe UI Variable","Segoe UI",system-ui,sans-serif;line-height:1.4}
body.buc-app #buc-floating-messenger *,body.buc-app #buc-floating-messenger *::before,body.buc-app #buc-floating-messenger *::after{box-sizing:border-box}
body.buc-app #buc-floating-messenger button,body.buc-app #buc-floating-messenger input,body.buc-app #buc-floating-messenger textarea{font-family:inherit}
body.buc-app #buc-floating-messenger button{cursor:pointer}
body.buc-app #buc-floating-messenger button:focus-visible,body.buc-app #buc-floating-messenger textarea:focus-visible,body.buc-app #buc-floating-messenger input:focus-visible{outline:2px solid var(--buc-accent);outline-offset:2px}
body.buc-app .buc-fm-launcher{pointer-events:auto;display:grid;place-items:center;width:48px;height:48px;position:relative;background:var(--buc-accent);color:var(--buc-accent-ink);border:1px solid color-mix(in srgb,var(--buc-accent-ink) 26%,transparent);border-radius:16px;box-shadow:0 5px 18px #0005, inset 0 1px 0 #ffffff26;transition:transform .15s ease,filter .15s ease}
body.buc-app .buc-fm-launcher:hover{transform:translateY(-2px);filter:brightness(1.04)}
body.buc-app .buc-fm-launcher svg{width:23px;height:23px}
body.buc-app .buc-fm-launcher-unread{position:absolute;right:-7px;top:-7px;min-width:19px;height:19px;border-radius:100px;background:#f3f3f8;color:#78162b;border:1px solid #c3435a;padding:1px 4px;font-size:10px;font-weight:800;font-style:normal;line-height:16px;text-align:center;box-shadow:0 1px 5px #0005}
body.buc-app .buc-fm-stack{display:flex;flex-direction:row-reverse;align-items:flex-end;gap:9px;max-width:calc(100vw - 30px);pointer-events:none;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding:6px 4px;}
body.buc-app .buc-fm-stack>*{pointer-events:auto;flex-shrink:0}
body.buc-app .buc-fm-window,body.buc-app .buc-fm-picker{display:flex;flex-direction:column;width:318px;max-width:calc(100vw - 44px);height:440px;max-height:min(440px,calc(100dvh - 105px));background:var(--buc-panel);border:1px solid var(--buc-line);box-shadow:0 13px 40px #0007;border-radius:15px;overflow:hidden;color:var(--buc-text)}
body.buc-app .buc-fm-head{height:49px;min-height:49px;display:flex;align-items:center;gap:8px;padding:7px 8px 7px 11px;background:var(--buc-panel2);border-bottom:1px solid var(--buc-line);color:var(--buc-text)}
body.buc-app .buc-fm-head strong{font-size:12.5px;font-weight:620;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--buc-text)}
body.buc-app .buc-fm-avatar{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:var(--buc-soft-accent);color:var(--buc-text);font-weight:650;font-size:12px}
body.buc-app .buc-fm-head-action{display:grid;place-items:center;flex:none;width:25px;height:26px;border:none;border-radius:7px;background:transparent;color:var(--buc-text);font-weight:500;font-size:20px;line-height:1}
body.buc-app .buc-fm-head-action:hover{background:var(--buc-soft-accent)}
body.buc-app .buc-fm-count{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 4px;font-size:10px;font-weight:750;border-radius:50px;background:var(--buc-accent);color:var(--buc-accent-ink)}
body.buc-app .buc-fm-history{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;background:var(--buc-bg);padding:11px 10px;scrollbar-width:thin;scrollbar-color:var(--buc-accent) transparent}
body.buc-app .buc-fm-bubble{width:fit-content;max-width:93%;padding:8px 10px;margin-bottom:9px;border:1px solid var(--buc-line);border-radius:11px 11px 11px 3px;background:var(--buc-panel);color:var(--buc-text);overflow-wrap:anywhere;font-size:12.5px}
body.buc-app .buc-fm-bubble.mine{margin-left:auto;border-radius:11px 11px 3px 11px;background:var(--buc-soft-accent)}
body.buc-app .buc-fm-timestamp{display:block;font-size:10px;color:var(--buc-muted);margin-bottom:4px}
body.buc-app .buc-fm-attachment{display:block;margin-top:6px;padding:6px;border:1px solid var(--buc-line);border-radius:7px;color:var(--buc-text);font-size:11px;text-decoration:none}
body.buc-app .buc-fm-attachment:hover{border-color:var(--buc-accent)}
body.buc-app .buc-fm-empty{font-size:12px;color:var(--buc-muted);padding:12px;margin:0}
body.buc-app .buc-fm-compose{padding:7px 9px 9px;background:var(--buc-panel);border-top:1px solid var(--buc-line);flex:none;position:relative}
body.buc-app .buc-fm-compose-tools{display:flex;gap:5px;align-items:center;height:27px;margin-bottom:5px}
body.buc-app .buc-fm-compose-tools button,body.buc-app .buc-fm-compose-tools label{width:27px;height:26px;display:grid;place-items:center;background:var(--buc-panel2);border:1px solid var(--buc-line);border-radius:6px;color:var(--buc-text);font-size:14px;cursor:pointer;padding:0}
body.buc-app .buc-fm-compose-tools button:hover,body.buc-app .buc-fm-compose-tools label:hover{background:var(--buc-soft-accent)}
body.buc-app .buc-fm-file-label{font-size:10px;color:var(--buc-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
body.buc-app .buc-fm-compose textarea{display:block;resize:vertical;width:100%;min-height:54px;max-height:115px;border-radius:9px;border:1px solid var(--buc-line);background:var(--buc-input);color:var(--buc-text);font-size:12.5px;padding:9px;line-height:1.4}
body.buc-app .buc-fm-compose-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:6px;gap:9px}
body.buc-app .buc-fm-compose-bottom span{font-size:10px;color:var(--buc-muted)}
body.buc-app .buc-fm-send{background:var(--buc-accent);color:var(--buc-accent-ink);border:0;border-radius:7px;padding:6px 14px;font-size:12px;font-weight:600}
body.buc-app .buc-fm-send:disabled{opacity:.55;cursor:wait}
body.buc-app .buc-fm-emoji{display:flex;flex-wrap:wrap;gap:2px;padding:5px;background:var(--buc-panel2);border:1px solid var(--buc-line);border-radius:8px;margin-bottom:4px}
body.buc-app .buc-fm-emoji[hidden]{display:none}
body.buc-app .buc-fm-emoji button{width:27px;height:27px;border:0;background:transparent;border-radius:5px;font-size:16px}
body.buc-app .buc-fm-emoji button:hover{background:var(--buc-soft-accent)}
body.buc-app .buc-fm-minimized{display:flex;align-items:center;gap:7px;max-width:200px;min-width:118px;height:41px;padding:6px 10px;background:var(--buc-panel);color:var(--buc-text);border:1px solid var(--buc-line);box-shadow:0 6px 20px #0006;border-radius:10px}
body.buc-app .buc-fm-mini-name{font-size:11px;flex:1;text-align:left;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
body.buc-app .buc-fm-picker{height:340px;max-height:calc(100dvh - 105px);}
body.buc-app .buc-fm-search{width:calc(100% - 20px);margin:11px 10px 6px!important;padding:8px 10px!important;font-size:12px!important;background:var(--buc-input)!important;color:var(--buc-text)!important;border:1px solid var(--buc-line)!important;border-radius:8px!important}
body.buc-app .buc-fm-contacts{flex:1;min-height:0;overflow:auto;padding:3px 8px 12px;overscroll-behavior:contain}
body.buc-app .buc-fm-contact{display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:0;background:transparent;border-radius:9px;padding:8px 6px;color:var(--buc-text)}
body.buc-app .buc-fm-contact:hover{background:var(--buc-soft-accent)}
body.buc-app .buc-fm-contact-info{flex:1;min-width:0}
body.buc-app .buc-fm-contact-info strong{display:block;font-size:12px;color:var(--buc-text);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.buc-app .buc-fm-contact-info small{display:block;font-size:10px;color:var(--buc-muted)}
@media(max-width:750px){body.buc-app #buc-floating-messenger{right:9px;bottom:9px}body.buc-app .buc-fm-stack{max-width:calc(100vw - 15px);gap:6px}body.buc-app .buc-fm-window,body.buc-app .buc-fm-picker{width:min(318px,calc(100vw - 25px));max-height:calc(100dvh - 90px)}body.buc-app .buc-fm-launcher{width:45px;height:45px}}
@media(prefers-reduced-motion:reduce){body.buc-app .buc-fm-launcher{transition:none}}

/* v0.6.3 - compact accessible staff selectors and management broadcasts */
body.buc-app .buc-chat-staff-toggle{display:flex;justify-content:space-between;align-items:center;width:100%;margin:4px 0 8px;padding:10px 12px;text-align:left;background:var(--buc-input);border:1px solid var(--buc-line);color:var(--buc-text);font-weight:600;font-size:12px;border-radius:10px;cursor:pointer}
body.buc-app .buc-chat-staff-toggle:hover,body.buc-app .buc-chat-staff-toggle:focus-visible{border-color:var(--buc-accent)}
body.buc-app #buc-chat-staff-dropdown[hidden]{display:none}
body.buc-app #buc-chat-contact-list{max-height:304px;overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain;touch-action:pan-y;}
body.buc-app #buc-chat-contact-list .buc-chat-contact{min-height:58px;padding:7px 9px;margin:0 0 3px}
body.buc-app .buc-chat-broadcast,body.buc-app .buc-fm-broadcast{display:flex;gap:5px;align-items:center;width:100%;min-height:42px;text-align:left;padding:9px 10px;border:1px solid var(--buc-accent);border-radius:10px;color:var(--buc-text);background:var(--buc-soft-accent);font-size:12px;font-weight:650;cursor:pointer;margin-bottom:8px}
body.buc-app .buc-chat-broadcast:hover,body.buc-app .buc-fm-broadcast:hover{filter:brightness(.97)}
body.buc-app .buc-chat-broadcast span,body.buc-app .buc-fm-broadcast span{font-size:9px;opacity:.75;font-weight:550;margin-left:auto}
body.buc-app .buc-fm-broadcast{width:calc(100% - 18px);margin:9px 9px 0;flex:none}
body.buc-app .buc-fm-contacts{flex:none;height:auto;max-height:301px;min-height:0;overflow-y:auto;scrollbar-width:thin;padding-bottom:8px}
body.buc-app .buc-fm-picker{height:auto;max-height:min(405px,calc(100dvh - 105px))}
body.buc-app .buc-fm-contact{min-height:56px;padding:8px 7px}
body.buc-app .buc-picker-photo{display:inline-flex;flex:0 0 33px;width:33px;height:33px;border-radius:50%;overflow:hidden}
body.buc-app .buc-picker-photo img{width:100%;height:100%;object-fit:cover}
body.buc-app .buc-fm-contact-info strong{font-weight:625;font-size:12px}
body.buc-app .buc-fm-contact-info small{font-size:10.5px}
@media(max-width:750px){body.buc-app .buc-fm-contacts{max-height:272px}}

/* v0.6.3 — branded company invitation and password-setup (no WordPress login). */
body.buc-app .buc-branded-auth{min-height:100dvh;background:radial-gradient(ellipse at 8% 14%,color-mix(in srgb,var(--buc-invite-accent) 13%,transparent),transparent 45%),#f5f7fb;color:#1e293b;color-scheme:light;display:grid;place-items:center;padding:24px 12px;font-family:Inter,"Segoe UI Variable",system-ui,sans-serif;}
body.buc-app .buc-invite-shell{width:min(100%,470px);display:flex;flex-direction:column;gap:18px}
body.buc-app .buc-invite-lockup{display:flex;align-items:center;gap:13px;padding:0 8px;color:#172b42}
body.buc-app .buc-invite-lockup strong{font-size:19px;font-weight:700;letter-spacing:-.4px;display:block}
body.buc-app .buc-invite-lockup small{font-size:11px;color:#607487}
body.buc-app .buc-invite-logo{max-width:92px;max-height:68px;object-fit:contain;border-radius:10px}
body.buc-app .buc-invite-card{background:#fff;box-shadow:0 16px 50px rgba(24,43,68,.10);border:1px solid #e4ebf2;border-radius:18px;padding:32px}
body.buc-app .buc-invite-label{font-size:10px;letter-spacing:1.25px;color:var(--buc-invite-accent);font-weight:760}
body.buc-app .buc-invite-card h1{font-size:26px;line-height:1.15;color:#19283b;letter-spacing:-.8px;margin:12px 0 9px;font-weight:720}
body.buc-app .buc-invite-card p{color:#5d7083;font-size:13px;line-height:1.6;margin:0 0 25px}
body.buc-app .buc-invite-card label{display:block;margin:0 0 14px;color:#293e51;font-weight:600;font-size:12px}
body.buc-app .buc-invite-card input{display:block;width:100%;font-size:14px;margin:7px 0 0;background:#fff;border:1px solid #d6e0eb;border-radius:9px;padding:12px 14px;color:#19283b}
body.buc-app .buc-invite-card input:focus{outline:2px solid var(--buc-invite-accent);outline-offset:1px}
body.buc-app .buc-invite-submit{display:block;text-align:center;width:100%;padding:13px 16px;background:var(--buc-invite-accent);color:#fff!important;border:0;border-radius:10px;font-size:13px;font-weight:650;cursor:pointer;text-decoration:none;margin-top:20px;}
body.buc-app .buc-invite-tip{display:block;font-size:11px;line-height:1.5;color:#798b9d;margin-top:13px}
body.buc-app .buc-invite-footer{text-align:center;font-size:11px;color:#7e8d9d}
body.buc-app .buc-auth .buc-invite-lockup{margin-bottom:22px}
@media(max-width:480px){body.buc-app .buc-invite-card{padding:24px}body.buc-app .buc-invite-card h1{font-size:23px}}

/* Keep standard staff/client sign-in and MFA consistent with invitation branding. */
body.buc-app .buc-branded-auth .buc-auth{background:#fff;border:1px solid #e4ebf2;border-radius:18px;box-shadow:0 16px 50px rgba(24,43,68,.1);color:#1e293b;width:min(100%,450px);padding:32px}
body.buc-app .buc-branded-auth .buc-auth h1{color:#19283b;font-size:25px;font-weight:700;letter-spacing:-.5px}
body.buc-app .buc-branded-auth .buc-auth p,body.buc-app .buc-branded-auth .buc-auth label{color:#43566a}
body.buc-app .buc-branded-auth .buc-auth input{background:#fff!important;border:1px solid #d6e0eb!important;color:#19283b!important}
body.buc-app .buc-branded-auth .buc-auth button.buc-primary{background:var(--buc-invite-accent)!important;border-color:var(--buc-invite-accent)!important;color:#fff!important}
body.buc-app .buc-branded-auth .buc-auth .buc-auth-footer{color:#718093}
body.buc-app .buc-branded-auth .buc-auth .buc-ghost{background:#eef2f6!important;color:#20364e!important;border-color:#d6e0e8!important}
