/* R54: compact teal workspaces, a single view control and hanging notes. */
/* Yellow is an action accent on teal, not a sidebar or content-panel fill. */
body.crm-unified .app-main #main-content :is(.executive-header,.page-head) :is(button,a.button,a.secondary,a.mini):not(.danger):not(.reject):not(.delete):not(.link-button),
body.crm-unified .app-main>.topbar>.module-switcher>summary#module-launcher,
body.crm-unified .workflow-dialog-bar>button{background:#f4ca28!important;color:#173c43!important;border:1px solid #dfb91c!important;text-shadow:none!important;box-shadow:inset 0 1px #fff6b2,0 2px 4px #102f3920!important}
body.crm-unified .app-main #main-content :is(.executive-header,.page-head) :is(button,a.button,a.secondary,a.mini):hover:not(:disabled):not(.danger):not(.reject):not(.delete):not(.link-button),
body.crm-unified .app-main>.topbar>.module-switcher>summary#module-launcher:hover,
body.crm-unified .workflow-dialog-bar>button:hover{background:#ffe169!important}
body.crm-unified #main-content :is(.executive-header,.page-head) :is(button,a.button,a.secondary,a.mini) .crm-action-icon,
body.crm-unified .app-main>.topbar>.module-switcher>summary#module-launcher>svg{color:#173c43!important}
body.crm-unified #main-content :is(.executive-header,.page-head) :is(button,a.button,a.secondary,a.mini) .crm-icon-accent{stroke:#173c43!important}
body.crm-unified .app-main>.topbar{gap:8px;padding:6px 12px}
body.crm-unified .topbar .global-search{flex:1 1 220px;max-width:560px}

/* Grouped, searchable module menu. All destinations remain real links. */
body.crm-unified .topbar .module-switcher-panel{width:min(380px,calc(100vw - 24px));max-height:min(430px,calc(100dvh - 88px));padding:10px;overflow:auto}
body.crm-unified .topbar .module-primary{display:block;padding:0;margin:0}
body.crm-unified .topbar .module-primary .nav-search{position:sticky;top:-10px;z-index:2;display:flex;align-items:center;gap:4px;padding:5px 0 8px;margin:0;background:#f8fcfa;border:0}
body.crm-unified .topbar .module-primary .nav-search input{width:100%;min-width:0;min-height:36px;margin:0;padding:7px 10px;font-size:13px;box-shadow:none;border:1px solid #adcac7;border-radius:8px;background:#fff;color:#193d43;outline-offset:1px}
body.crm-unified .topbar .module-primary .module-filter-clear{flex:0 0 30px;min-height:32px;padding:2px!important;font-size:20px;box-shadow:none!important}
body.crm-unified .topbar .module-primary .module-group{margin:0;border:0;border-bottom:1px solid #dbe6e3;border-radius:0;padding:0;box-shadow:none;background:transparent}
body.crm-unified .app-main>.topbar #workspace-modules .module-primary .module-group>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:34px;padding:7px 4px!important;margin:0;list-style:none;font-size:12px;font-weight:600;background:transparent!important;color:#24545b!important;border:0!important;border-radius:0;box-shadow:none!important;text-shadow:none!important}
body.crm-unified .module-group>summary::after{content:'›';font-size:17px;line-height:1;transform:rotate(0);transition:transform .18s}
body.crm-unified .module-group[open]>summary::after{transform:rotate(90deg)}
body.crm-unified .module-group>summary::-webkit-details-marker{display:none}
body.crm-unified .module-group-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:2px 0 8px}
body.crm-unified .topbar .module-primary .module-group-links>a{display:flex;align-items:center;gap:7px;min-width:0;min-height:33px;padding:5px 6px!important;margin:0;border:1px solid #d8e5e1!important;border-radius:6px;background:#f8fbfa!important;color:#244d54!important;font-size:12px;line-height:1.25;box-shadow:none!important;text-shadow:none!important;white-space:normal}
body.crm-unified .topbar .module-primary .module-group-links>a.active{background:#e4f1ef!important;box-shadow:inset 3px 0 #287e80!important}
body.crm-unified .module-primary .nav-label{min-width:0;overflow-wrap:anywhere}
body.crm-unified .module-primary .nav-icon{flex:0 0 18px}
body.crm-unified .module-primary [hidden]{display:none!important}

/* Form density follows usable width: three/four compact columns on laptops. */
body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients) .form-grid{grid-template-columns:repeat(var(--form-columns,3),minmax(0,1fr))!important;gap:10px 14px!important}
body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients)[data-form-columns="3"] .form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,max(220px,calc(25% - 10.5px))),1fr))!important}
body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients) .editor-section{padding:12px!important}
body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients) .section-head{margin-bottom:9px!important;padding-bottom:6px!important}
body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients) textarea{min-height:68px!important}
body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients) .field-wide{grid-column:1/-1}
body.crm-unified .workflow-dialog{width:min(1240px,94vw);max-width:94vw}
html.embedded-workflow body.crm-unified #main-content .form-step-nav:not([hidden]){display:flex!important;flex-wrap:wrap;gap:4px;margin:0 0 8px}
html.embedded-workflow body.crm-unified #main-content .form-step-nav button{min-height:32px;padding:5px 8px;font-size:12px}
html.embedded-workflow body.crm-unified #main-content .form-step-nav button.active{background:#e4f1ef!important;color:#164c52!important}
html.embedded-workflow body.crm-unified #main-content .premium-form .recovery-status{margin:4px 0 8px!important;font-size:12px}
/* Keep small action controls from claiming a whole filter column. */
body.crm-unified #main-content .toolbar>:is(button,a.button,a.secondary){flex:0 0 auto;min-width:0;width:auto}

/* The supplied home composition, with the site's existing teal frame. */
#workspace-home .dh-sections{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(150px,auto);gap:12px;padding:0 16px 12px}
#workspace-home .dh-banner,#workspace-home .dh-banner:nth-child(even){display:grid;grid-template-columns:88px minmax(0,1fr);grid-template-rows:auto 1fr;align-items:center;align-content:start;gap:8px 12px;min-height:150px;padding:0 12px 10px;overflow:hidden}
#workspace-home .dh-banner .dh-copy{display:contents}
#workspace-home .dh-banner .dh-copy h2{grid-column:1/-1;grid-row:1;margin:0 -12px;padding:8px 12px;min-height:36px;border-radius:10px 10px 0 0;font-size:17px;line-height:1.25;background:var(--crm-header);color:#fff}
#workspace-home .dh-banner .dh-art,#workspace-home .dh-banner:nth-child(even) .dh-art{position:relative;inset:auto;grid-column:1;grid-row:2;order:0;width:88px;height:94px;margin:0;opacity:1;overflow:visible}
#workspace-home .dh-banner .dh-art::before{width:82px;height:80px;background:#e6f1ef}
#workspace-home .dh-banner .dh-art::after{display:block;width:72px}
#workspace-home .dh-banner .dh-scene{transform:scale(.47)}
#workspace-home .dh-banner .dh-links{grid-column:2;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 7px;margin:0;align-self:center}
#workspace-home .dh-banner .dh-link{min-height:31px;padding:5px 7px;font-size:12px;line-height:1.25;gap:5px;border-radius:7px}
#workspace-home .dh-banner .dh-link-label{gap:6px;min-width:0}
#workspace-home .dh-banner .dh-button-icon{flex:0 0 19px;width:19px;height:19px;padding:1px}
#workspace-home .dh-banner:nth-child(even){grid-template-columns:minmax(0,1fr) 88px}
#workspace-home .dh-banner:nth-child(even) .dh-art{grid-column:2}
#workspace-home .dh-banner:nth-child(even) .dh-links{grid-column:1}
#workspace-home .dh-custom-section-icon{width:62px;height:62px;border-radius:15px}
#workspace-home .dh-custom-section-icon svg{width:40px;height:40px}
#workspace-home .dh-header{margin:10px 16px 0;padding:7px 12px}
#workspace-home .dh-intro{padding:10px 18px;min-height:44px}
#workspace-home .dh-footer{padding-bottom:8px;margin:0 18px}

/* Restore the hanging strip, with a reserved content gutter to prevent overlap. */
body.crm-unified .sticky-hanger{position:fixed;inset:86px 12px 88px auto!important;display:flex;flex-direction:column;align-items:center;gap:6px;width:56px;height:auto;max-height:calc(100dvh - 174px);z-index:45;pointer-events:none}
body.crm-unified .sticky-hanger>*{pointer-events:auto}
body.crm-unified .sticky-hanger .hanger-toggle{display:flex;flex-direction:column;gap:2px;width:50px;min-width:0;min-height:42px;padding:5px 3px!important;font-size:11px}
body.crm-unified .sticky-hanger .hanger-label{display:block;font-size:10px}
body.crm-unified .sticky-hanger .hanger-icon{display:none}
body.crm-unified .sticky-hanger .hanger-count{height:16px;font-size:11px}
body.crm-unified .sticky-hanger .hanger-panel{position:static;inset:auto;width:56px;min-height:0;max-width:none;max-height:100%;display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 2px 4px;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
body.crm-unified .sticky-hanger .hanger-panel[hidden]{display:none!important}
body.crm-unified .sticky-hanger .hanger-panel-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body.crm-unified .sticky-hanger .hanger-list{position:relative;display:flex;flex-direction:column;align-items:center;gap:15px;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;width:56px;padding:11px 5px 8px;scrollbar-width:thin}
body.crm-unified .sticky-hanger .hanger-list::before{display:block;content:'';position:absolute;top:0;bottom:0;left:27px;width:2px;background:#adc6bd;z-index:-1}
body.crm-unified .sticky-hanger .hanger-leaf{position:relative;display:flex;flex-direction:column;justify-content:center;flex:none;width:42px;min-height:45px;gap:2px;padding:5px 3px!important;border:0!important;border-radius:3px 3px 11px 3px!important;background:linear-gradient(140deg,#fffef8,var(--leaf,#cdebe0))!important;color:#173f48!important;box-shadow:1px 3px 5px #163e4728!important;text-shadow:none!important;transform-origin:50% 0;transform:none!important}
body.crm-unified .sticky-hanger .hanger-leaf::after{display:block;content:'';position:absolute;left:17px;top:-8px;width:6px;height:12px;border:2px solid #688a7e;border-radius:6px}
body.crm-unified .sticky-hanger .hanger-leaf span{display:block;flex:none;width:100%;font-size:9px;line-height:1.2;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
body.crm-unified .sticky-hanger .hanger-leaf strong{font-size:12px;color:#244d54}
body.crm-unified .sticky-hanger .hanger-add{width:50px;min-height:32px;padding:5px 3px!important;font-size:10px;line-height:1.2}
body.crm-unified .sticky-hanger .hanger-all{font-size:10px;line-height:1.2;text-align:center;padding:3px 0;color:#24545b}
body.crm-unified .sticky-hanger .hanger-empty{font-size:10px;text-align:center}
body.crm-unified .sticky-hanger small:not(:empty){position:absolute;right:64px;top:0;width:210px;padding:8px;border:1px solid #b8d3cb;border-radius:8px;background:#fff;color:#193d43;box-shadow:0 3px 12px #173f4820}
body.crm-unified:has(.chat-dock.open) .sticky-hanger{visibility:hidden}
@media(min-width:701px){body.crm-unified:has(.sticky-hanger:not([hidden])) .app-main{padding-right:0!important}body.crm-unified:has(.sticky-hanger:not([hidden])) .module-layout>.content{padding-right:80px!important}}
@media(prefers-reduced-motion:no-preference){body.crm-unified .sticky-hanger .hanger-leaf{animation:r54-note-sway 5.4s ease-in-out infinite!important}body.crm-unified .sticky-hanger .hanger-leaf:nth-child(even){animation-delay:-2.7s!important}body.crm-unified .sticky-hanger .hanger-leaf:is(:hover,:focus-visible,:active){animation-play-state:paused!important}}
@keyframes r54-note-sway{0%,100%{rotate:-2deg}50%{rotate:2deg}}
@media(prefers-reduced-motion:reduce){body.crm-unified .sticky-hanger .hanger-leaf{animation:none!important;transform:none!important;rotate:0deg!important}body.crm-unified .module-group>summary::after{transition:none}}
@media(max-width:1000px){#workspace-home .dh-banner,#workspace-home .dh-banner:nth-child(even){grid-template-columns:56px minmax(0,1fr);gap:7px}#workspace-home .dh-banner .dh-art,#workspace-home .dh-banner:nth-child(even) .dh-art{width:56px;grid-column:1}#workspace-home .dh-banner .dh-links,#workspace-home .dh-banner:nth-child(even) .dh-links{grid-column:2}#workspace-home .dh-banner .dh-scene{transform:scale(.34)}#workspace-home .dh-banner .dh-art::before{width:54px;height:70px}#workspace-home .dh-banner .dh-copy h2{font-size:16px}}
@media(max-width:760px){body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients)[data-form-columns] .form-grid{grid-template-columns:minmax(0,1fr)!important}#workspace-home .dh-sections{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto}#workspace-home .dh-banner,#workspace-home .dh-banner:nth-child(even){min-height:155px;grid-template-columns:64px minmax(0,1fr)}#workspace-home .dh-banner .dh-link{font-size:13px;min-height:36px}#workspace-home .dh-header{flex-wrap:wrap}body.crm-unified .topbar .module-switcher-panel{max-width:calc(100vw - 24px)}body.crm-unified .module-group-links{gap:5px}}
@media(max-width:700px){body.crm-unified .sticky-hanger{inset:auto 12px 80px auto!important;height:auto;max-height:calc(100dvh - 170px);width:50px}body.crm-unified .sticky-hanger .hanger-panel{position:absolute;bottom:0;right:62px;width:210px;max-height:calc(100dvh - 170px);padding:10px;background:#f8fcfa;border:1px solid #bdd6d2;border-radius:12px;box-shadow:0 5px 18px #173f4826;overflow:auto}body.crm-unified .sticky-hanger .hanger-list{display:grid;grid-template-columns:repeat(3,1fr);width:100%;gap:16px 8px;overflow:visible;padding:12px 4px}body.crm-unified .sticky-hanger .hanger-list::before{display:none}body.crm-unified .sticky-hanger .hanger-leaf{width:100%;min-height:48px}body.crm-unified .sticky-hanger .hanger-leaf::after{left:calc(50% - 4px)}body.crm-unified .sticky-hanger .hanger-add{width:100%}body.crm-unified .sticky-hanger .hanger-label{display:block}}
@media(pointer:coarse){body.crm-unified .module-group-links>a,body.crm-unified .module-group>summary,#workspace-home .dh-banner .dh-link{min-height:44px!important}body.crm-unified .sticky-hanger .hanger-toggle,body.crm-unified .sticky-hanger .hanger-leaf,body.crm-unified .sticky-hanger .hanger-add{min-height:44px!important}}

@media(min-width:761px){body.crm-unified #main-content .premium-form:is(.module-form-candidates,.module-form-clients)[data-form-columns="3"] .field-wide:has(textarea){grid-column:span 2}}
