/* Distinct destinations, grouped by purpose. Icons remain vectors at every size. */
.bh-group-operations{--bh-group-ink:#744d86;--bh-group-soft:#f2eaf7;--bh-group-line:#dfcce9}
.bh-group-crm{--bh-group-ink:#276f72;--bh-group-soft:#e9f5f3;--bh-group-line:#c8e4df}
.bh-group-setup{--bh-group-ink:#50688d;--bh-group-soft:#edf1f8;--bh-group-line:#d2dcea}
.bh-nav-group{padding:5px 5px 8px;margin:0 0 15px;border:1px solid var(--bh-group-line);border-radius:14px;background:linear-gradient(135deg,var(--bh-group-soft),transparent 85%)}
.bh-app .bh-nav-group .crm-nav-section{display:block;margin:0 0 6px;padding:10px 9px;border:0;border-left:3px solid var(--bh-group-ink);border-radius:8px;background:var(--bh-group-soft);color:var(--bh-group-ink);font-size:10px!important;font-weight:800;letter-spacing:.7px;line-height:1.5;white-space:normal}
.bh-app .bh-nav-group button{width:100%;min-height:44px;font-size:12px;margin:3px 0;padding:9px 8px;border-color:transparent;gap:9px;white-space:normal;color:var(--text,#3b3043)}
.bh-app .bh-nav-group button svg{width:29px;height:29px;min-width:29px;padding:5px;border-radius:8px;background:var(--bh-group-soft);color:var(--bh-group-ink)}
.bh-app .bh-nav-group button.active{border-left:3px solid var(--bh-group-ink);background-color:var(--bh-group-soft);color:var(--bh-group-ink)}
.bh-app .bh-nav-group button.active svg{background:var(--bh-group-ink);color:white}
.bh-menu-section{margin:0 0 16px;padding:12px;border:1px solid var(--bh-group-line);border-radius:15px;background:linear-gradient(125deg,var(--bh-group-soft),var(--panel,#fff) 90%)}
.bh-menu-section:last-child{margin-bottom:0}
.bh-menu-section>h3{margin:0 0 10px;padding:0 0 0 9px;border-left:3px solid var(--bh-group-ink);color:var(--bh-group-ink);font-size:10px;line-height:1.6;letter-spacing:.6px;font-weight:800}
.bh-section-menu .bh-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.bh-section-menu button.bh-menu-tile{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:center;gap:8px;text-align:left;min-width:0;min-height:66px;padding:10px 8px;font-size:12px;font-weight:600;line-height:1.35;border:1px solid var(--bh-group-line);background-color:var(--panel,#fff);border-radius:12px;white-space:normal;overflow-wrap:break-word;color:var(--text,#392e42)}
.bh-menu-tile .bh-tile-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;color:var(--bh-group-ink);background:var(--bh-group-soft)}
.bh-tile-icon svg{width:21px;height:21px;display:block}
.bh-section-menu button.bh-menu-tile.active{box-shadow:inset 0 0 0 1px var(--bh-group-ink);border-color:var(--bh-group-ink)}
body:not(.light) .bh-group-operations{--bh-group-ink:#cfadde;--bh-group-soft:#3b2b47;--bh-group-line:#60476f}
body:not(.light) .bh-group-crm{--bh-group-ink:#9ed8d1;--bh-group-soft:#203d3d;--bh-group-line:#39615e}
body:not(.light) .bh-group-setup{--bh-group-ink:#b2c9eb;--bh-group-soft:#2b374b;--bh-group-line:#465b7a}
body:not(.light) .bh-nav-group button.active svg{background:var(--bh-group-soft);color:var(--bh-group-ink)}
/* Soft moving light across buttons; their action colours stay recognisable. */
button,a.button,a.wf-print-link,.bh-hero-actions>a,.bh-header-more>summary{
 background-image:linear-gradient(115deg,#ffffff08 0%,#b49ac427 28%,#b3dcd821 50%,#ecc8c51c 72%,#ffffff08 100%)!important;
 background-size:240% 240%;animation:bh-button-flow 20s ease-in-out infinite;
 transition:box-shadow .2s ease,border-color .2s ease,filter .2s ease;
}
button.primary,a.button:not(.outline):not(.coral){background-color:var(--accent,#6b486e);background-image:linear-gradient(115deg,#ffffff06,#ffffff18,#d1a7b214,#ffffff06)!important;color:#fff}
button.danger{background-image:linear-gradient(115deg,#ef92900b,#ef929020,#ffffff03)!important}
button:disabled{animation:none;filter:saturate(.6)}
button:hover:not(:disabled),a.button:hover{box-shadow:0 4px 14px #87668b20}
button:focus-visible,a.button:focus-visible{outline:2px solid var(--accent,#906299);outline-offset:3px}
@keyframes bh-button-flow{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
/* Form actions and navigation tabs wrap; record tables keep their own scroll. */
@media(max-width:780px){
 .main,.main>* ,#page-content,#care-content,.panel{min-width:0;max-width:100%}
 .main .heading,.main .crm-page-title{flex-wrap:wrap;gap:12px}
 .main .heading>div,.main .crm-page-title>div{min-width:0;max-width:100%}
 .main .actions:not(.topbar .actions),.wf-actions,.form-footer{flex-wrap:wrap;max-width:100%;gap:8px}
 .main .actions:not(.topbar .actions)>button,.wf-actions>button,.form-footer>button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:break-word}
 .main .care-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));flex-wrap:wrap!important;overflow:visible!important;width:100%;padding:0;margin:0 0 18px;gap:8px}
 .care-tabs button{min-width:0!important;width:100%;padding:10px 8px;font-size:12px;min-height:42px;white-space:normal!important;line-height:1.35;flex-shrink:1}
 .crm-stage-tabs{display:flex;flex-wrap:wrap;overflow:visible!important;gap:7px;max-width:100%}
 .crm-stage-tabs button{flex:1 1 90px;min-width:0;max-width:100%;font-size:11px;white-space:normal;line-height:1.4}
 .wf-toolbar,.bh-calendar-tools,.bh-booking-filter{flex-wrap:wrap;max-width:100%;gap:8px}
 .wf-toolbar input,.bh-calendar-tools>.field,.bh-booking-filter>.field{min-width:0!important;max-width:100%;flex:1 1 150px}
 .main .actions:not(.topbar .actions)>input,.main .actions:not(.topbar .actions)>select{min-width:0;max-width:100%;flex:1 1 150px}
 .form-footer{display:flex;justify-content:flex-end}.form-footer>button{flex:1 1 100px}
 .bh-menu-section{padding:10px;margin-bottom:12px}.bh-section-menu button.bh-menu-tile{font-size:11.5px;min-height:68px;padding:9px 7px;grid-template-columns:28px minmax(0,1fr);gap:7px}
 .bh-menu-tile .bh-tile-icon{width:28px;height:30px;border-radius:8px}.bh-tile-icon svg{width:19px;height:19px}
 .bh-app dialog:has(.bh-section-menu){padding:16px;width:calc(100vw - 24px);max-width:560px;max-height:90dvh}
 .bh-app dialog:has(.bh-section-menu) .dialog-head h2{font-size:17px}
}
@media(prefers-reduced-motion:reduce){button,a.button,a.wf-print-link,.bh-hero-actions>a,.bh-header-more>summary{animation:none!important;transition:none!important}}
@media print{button,a.button{animation:none!important}}
/* Keep calendar cells and bottom mobile navigation calm and plain. */
.bh-month-grid button,.bh-calendar-tools button,.bh-booking-filter button,[data-schedule],.bh-agenda-day button{background-image:none!important;animation:none!important}
.bh-month-grid .bh-day{background-color:var(--panel,#fff)}
.bh-month-grid .bh-day.today{background-color:var(--panel2,#f3edf5)}
@media(max-width:780px){.mobile-nav button,.mobile-nav button.active,.bh-crew .mobile-nav button{background-image:none!important;animation:none!important}}
@media(max-width:780px){.bh-section-menu button,.bh-section-menu .bh-menu-section,.bh-header-dropdown>button,.bh-header-dropdown>a{background-image:none!important;animation:none!important}.bh-section-menu .bh-menu-section{background-color:var(--panel,#fff)}}
#page-content:has(#bh-calendar-grid) button,#page-content:has(#bh-calendar-grid) .bh-hero,#page-content:has(#bh-calendar-grid) .bh-clear{background-image:none!important;animation:none!important}
#page-content:has(#bh-calendar-grid) .bh-hero,#page-content:has(#bh-calendar-grid) .bh-clear{background-color:var(--panel2,#f3edf5)}
