/* R48 shared surfaces and a single contextual sidebar. Loaded after legacy themes. */
body.crm-unified,body.workspace-home-body,body.crm-workbooks{--crm-ink:#193d43;--crm-muted:#526c70;--crm-line:#d0e0de;--crm-wash:#eaf4f1;--crm-surface:#f8fcfa;--crm-accent:var(--brand-primary,#006d69);font-family:Calibri,Carlito,"Segoe UI",Arial,sans-serif;font-style:italic;color:var(--crm-ink);background:#eef4f2}
body.crm-unified .app-shell{display:block!important;padding:0!important}
body.crm-unified .app-main{margin:0!important;width:100%!important;padding:0!important;min-width:0}
body.crm-unified .app-main>.topbar{gap:10px;padding:10px 18px;min-height:64px;background:#f8fcfaed;border-color:var(--crm-line);box-shadow:0 2px 12px #173f4310;flex-wrap:wrap;z-index:40}
body.crm-unified .home-link{display:inline-flex!important;align-items:center;gap:7px;padding:8px 10px;color:var(--crm-accent);font-weight:700;text-decoration:none;white-space:nowrap}
body.crm-unified .topbar .global-search{flex:1 1 210px;max-width:none;margin:0;min-width:150px;border-color:var(--crm-line);background:#fff;border-radius:10px}
body.crm-unified .top-actions{margin-left:auto;gap:8px;flex-wrap:wrap}
body.crm-unified .module-view-toggle{display:inline-flex;align-items:center;gap:7px;padding:8px 10px}
body.crm-unified .module-switcher{position:relative;flex-shrink:0}
body.crm-unified .module-switcher>summary{display:flex;align-items:center;gap:8px;padding:8px 11px;list-style:none}
body.crm-unified .module-switcher-panel{position:absolute;top:calc(100% + 10px);left:0;width:min(530px,calc(100vw - 32px));max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain;border:1px solid var(--crm-line);border-radius:16px;padding:10px;background:#f8fcfa;box-shadow:0 14px 40px #163e432b;z-index:60}
body.crm-unified .module-primary{display:block;gap:5px;max-height:none;padding:0!important;overflow:visible}
body.crm-unified .module-primary .nav-search{grid-column:1/-1;display:flex;padding:2px 2px 10px;background:#f8fcfa;top:-10px}
body.crm-unified .module-primary>a{display:flex;align-items:center;gap:9px;padding:9px 10px!important;border:1px solid transparent!important;border-radius:10px;color:var(--crm-ink);text-decoration:none;min-width:0;white-space:normal;line-height:1.35;background:transparent;box-shadow:none;text-shadow:none}
body.crm-unified .module-primary .nav-label{display:block!important;white-space:normal;overflow-wrap:anywhere;font-size:13px}
body.crm-unified .module-primary .nav-icon{display:grid;place-items:center;flex:0 0 22px;width:22px;height:22px;background:transparent;box-shadow:none;color:var(--crm-accent)}
body.crm-unified .module-primary>a:hover{background:var(--crm-wash)}
body.crm-unified .module-primary>a.active{background:#deeeea!important;box-shadow:inset 3px 0 var(--crm-accent)!important;color:var(--crm-accent)}
body.crm-unified #nav-module-filter-empty{grid-column:1/-1;margin:10px}
body.crm-unified .module-layout.has-module-nav{display:grid;grid-template-columns:218px minmax(0,1fr);gap:0}
body.crm-unified .module-layout.module-nav-collapsed{grid-template-columns:minmax(0,1fr)}
body.crm-unified .module-layout>.content{padding:18px 28px 80px 18px!important;width:100%;min-width:0}
body.crm-unified .module-navigation{position:sticky;top:82px;margin:18px 0 18px 14px;padding:10px;background:#f9fcfa;border:1px solid var(--crm-line);border-radius:14px;max-height:calc(100dvh - 104px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body.crm-unified .module-navigation-toggle{font-size:14px!important;display:flex;align-items:center;justify-content:space-between;padding:9px 10px!important;gap:10px;min-width:0;white-space:normal}
body.crm-unified .module-navigation-toggle svg{flex:0 0 18px;transform:none!important}
body.crm-unified .module-nav-title{min-width:0;overflow-wrap:anywhere;text-align:left}
body.crm-unified .module-nav-caption{color:var(--crm-muted);font-size:10px;margin:16px 9px 6px;letter-spacing:.08em}
body.crm-unified .module-view-tabs,body.crm-unified .module-section-links{display:grid;gap:4px}
body.crm-unified :is(.module-view-tabs,.module-section-links)>a{padding:9px 10px;font-size:13px;line-height:1.4;color:var(--crm-ink);border:1px solid transparent;border-radius:9px;white-space:normal;overflow-wrap:anywhere;max-width:100%}
body.crm-unified :is(.module-view-tabs,.module-section-links)>a:hover{background:var(--crm-wash)}
body.crm-unified :is(.module-view-tabs,.module-section-links)>a.active{background:#deeeea!important;color:var(--crm-accent)!important;box-shadow:inset 3px 0 var(--crm-accent)!important}
/* These selectors must outrank legacy !important flex declarations. */
body.crm-unified #main-content .page-heading>.header-nav[hidden],body.crm-unified .module-navigation[hidden],body.crm-unified #module-navigation-body[hidden],body.crm-unified .module-primary [hidden]{display:none!important}
body.crm-unified #main-content .page-heading>.header-nav:not([hidden]){position:static!important;transform:none!important;margin:10px 0 0!important;width:100%!important;max-width:100%!important;padding:0!important;gap:7px!important;border:0!important;box-shadow:none!important;background:transparent!important}
body.crm-unified #main-content .page-heading>.executive-header:has(+.header-nav),body.crm-unified #main-content :is(.executive-header,.page-head){background:linear-gradient(125deg,#fcfefd,#e7f2ee)!important;color:var(--crm-ink)!important;border:1px solid var(--crm-line)!important;min-height:0!important;padding:15px 18px!important;border-radius:14px!important;box-shadow:0 4px 16px #173f430a!important;gap:12px}
body.crm-unified #main-content :is(.executive-header,.page-head) :is(h1,h2,p,.eyebrow,.header-scope){color:var(--crm-ink)!important;text-shadow:none}
body.crm-unified #main-content :is(.executive-header,.page-head) h1{font-size:24px;line-height:1.2;margin:0 0 4px}
body.crm-unified #main-content .executive-header p{font-size:13px;line-height:1.45;margin:3px 0}
body.crm-unified #main-content .page-heading{margin-bottom:14px}
body.crm-unified #main-content :is(.panel-head,.section-head){background:#edf5f1!important;color:var(--crm-ink)!important;border:1px solid #dce9e3;border-radius:10px;padding:9px 12px;box-shadow:none;flex-wrap:wrap;gap:8px}
body.crm-unified #main-content :is(.panel-head,.section-head) :is(h2,h3,p,small,.eyebrow){color:var(--crm-ink)!important}
body.crm-unified #main-content :is(.panel-head,.section-head) h2{font-size:17px;line-height:1.3}
/* Cover anchor buttons and disclosure controls as well as <button>. */
body.crm-unified .app-main :is(button,a.button,a.secondary,a.mini,a.filter,summary,.header-nav a,.tabs a,.compact-tabs a):not(.danger):not(.reject):not(.delete):not(.link-button){background:linear-gradient(145deg,#fff,#e9f1ed)!important;border:1px solid #c7dad3!important;color:var(--crm-ink)!important;border-radius:10px!important;text-shadow:none!important;box-shadow:2px 3px 7px #183f4310,inset 1px 1px #fff!important;font-family:inherit;font-style:inherit;transition:background .16s,box-shadow .16s,transform .16s}
body.crm-unified #main-content .header-nav :is(a.active,button.active,[aria-current="page"],[aria-pressed="true"]),body.crm-unified .app-main :is(.tabs,.compact-tabs) a.active{background:#deeeea!important;color:var(--crm-accent)!important;border-color:#8ebcb0!important;box-shadow:inset 0 -2px var(--crm-accent)!important}
body.crm-unified .app-main :is(button,a.button,a.secondary,a.mini,summary):hover:not(:disabled){border-color:#98bfb3!important;box-shadow:2px 4px 9px #173f4320!important}
body.crm-unified :is(a,button,summary,input,select,textarea):focus-visible{outline:2px solid var(--crm-accent)!important;outline-offset:3px}
body.crm-unified .topbar .user-menu summary{min-height:36px;padding:5px 9px;gap:8px}
body.crm-unified .topbar .avatar{background:#deeee8;color:var(--crm-accent);border:1px solid #c8dfd5}
body.crm-unified .toolbar :is(input,select){min-height:36px;max-width:100%;height:auto}
body.crm-unified .toolbar{gap:8px;align-items:center}
body.crm-unified .toolbar .filter{flex:0 1 170px}
body.crm-unified .pd-shortcuts{gap:8px}
body.crm-unified .pd-shortcuts .button{padding:8px 12px;min-height:34px}
body.crm-unified .form-grid{gap:18px 20px}
body.crm-unified .form-grid>label{min-width:0;line-height:1.4;gap:7px}
html.embedded-workflow body.crm-unified .module-navigation,html.embedded-workflow body.crm-unified .module-view-toggle{display:none!important}
html.embedded-workflow body.crm-unified .module-layout.has-module-nav{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
html.embedded-workflow body.crm-unified .module-layout>.content{padding:12px!important}
/* Home uses the CRM palette and three compact sections per desktop row. */
body.workspace-home-body{padding:8px}
#workspace-home{--dh-ink:var(--crm-ink);--dh-muted:var(--crm-muted);--dh-teal:var(--crm-accent);background:#eef4f2;border:1px solid #cddfd7;border-radius:18px;min-height:calc(100dvh - 16px)}
#workspace-home::before,#workspace-home::after{display:none}
#workspace-home .dh-header{margin:12px 14px 0;padding:10px 14px;gap:16px;min-height:54px;border:1px solid var(--crm-line);background:#f8fcfa;box-shadow:0 3px 12px #173f4310;border-radius:12px}
#workspace-home .dh-logo{background:var(--crm-accent);box-shadow:0 3px 10px #173f4320}
#workspace-home .dh-search{background:#fff;border-color:var(--crm-line);padding:7px 10px}
#workspace-home .dh-intro{padding:12px 20px;gap:12px}
#workspace-home h1{font-size:24px;letter-spacing:-.3px}
#workspace-home .dh-sections{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 14px 12px}
#workspace-home .dh-banner,#workspace-home .dh-banner:nth-child(even){display:block;position:relative;padding:13px 15px;min-height:0;background:#fbfdfb;border:1px solid var(--crm-line);border-radius:14px;box-shadow:3px 4px 12px #2347350d,inset 1px 1px #fff;--dh-accent:var(--crm-accent);--dh-wash:#e7f2ed}
#workspace-home .dh-banner:hover{transform:translateY(-2px);box-shadow:3px 7px 17px #173f4319}
#workspace-home .dh-copy h2{font-size:19px;line-height:1.2;letter-spacing:-.2px;min-height:36px;display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding-right:54px;margin:0 0 9px;color:var(--crm-ink)}
#workspace-home .dh-art{position:absolute;right:12px;top:8px;width:54px;height:44px;order:0}
#workspace-home .dh-art::before{width:44px;height:42px;background:#e1eee7}
#workspace-home .dh-art::after{width:40px;height:4px;bottom:0}
#workspace-home .dh-scene{transform:scale(.31)}
#workspace-home .dh-custom-section-icon{width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#fff,#deeee7);color:var(--crm-accent);box-shadow:2px 3px 7px #173f4318}
#workspace-home .dh-custom-section-icon svg{width:28px;height:28px}
#workspace-home .dh-links{display:grid;grid-template-columns:minmax(0,1fr);gap:5px}
#workspace-home .dh-link{display:flex;width:100%;min-height:30px;padding:5px 10px;font-size:13px;line-height:1.3;gap:7px;border-radius:9px;background:linear-gradient(145deg,#fff,#e9f1ed);border:1px solid #ceded5;box-shadow:2px 3px 6px #173f430d,inset 1px 1px #fff;color:var(--crm-ink)}
#workspace-home .dh-link:hover{border-color:#94b9aa;background:#e4f0e9;color:var(--crm-accent)}
#workspace-home .dh-button-icon{flex-basis:16px;color:var(--crm-accent)}
#workspace-home .dh-button-icon svg{width:16px;height:16px}
#workspace-home .dh-access-badge{font-size:9px;padding:2px 5px;background:#e2eee8;color:var(--crm-accent);border:1px solid #bed8cc;border-radius:5px;white-space:nowrap}
#workspace-home .dh-motion{padding:6px 10px;min-height:30px;background:#f8fcfa;border-color:#c7dad3;color:var(--crm-accent)}
#workspace-home .dh-footer{padding:4px 20px 12px;gap:10px;color:var(--crm-muted);font-size:12px}
#workspace-home .dh-profile-popover{background:#f8fcfa;border-color:var(--crm-line)}
#workspace-home a:focus-visible,#workspace-home button:focus-visible,#workspace-home summary:focus-visible{outline-color:var(--crm-accent)}
@media(min-width:1100px) and (max-height:800px){#workspace-home .dh-header{margin-top:8px;padding-block:8px}#workspace-home .dh-intro{padding-block:9px}#workspace-home .dh-banner{padding:11px 13px}#workspace-home .dh-copy h2{min-height:30px;margin-bottom:7px;font-size:18px}#workspace-home .dh-link{min-height:28px;padding-block:4px}#workspace-home .dh-footer{padding-bottom:8px}}
@media(max-width:1099px){#workspace-home .dh-sections{grid-template-columns:repeat(2,minmax(0,1fr))}body.crm-unified .module-layout.has-module-nav{grid-template-columns:195px minmax(0,1fr)}body.crm-unified .module-layout.module-nav-collapsed{grid-template-columns:minmax(0,1fr)}}
@media(max-width:850px){body.crm-unified .app-main>.topbar{padding:9px 12px;gap:7px}body.crm-unified .topbar .global-search{order:3;flex-basis:100%}body.crm-unified .topbar .top-actions{gap:5px}body.crm-unified .module-layout.has-module-nav{display:block}body.crm-unified .module-navigation{position:static;max-height:45dvh;margin:12px 12px 0}body.crm-unified .module-layout>.content{padding:14px 16px 76px!important}body.crm-unified .module-view-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}body.crm-unified .module-direct-actions{display:flex;flex-wrap:wrap}body.crm-unified .module-direct-actions .button{width:auto}body.crm-unified .module-switcher-panel{position:fixed;left:12px;right:12px;top:68px;width:auto;max-height:calc(100dvh - 90px)}body.crm-unified #main-content .executive-header{padding:13px 14px!important}}
@media(max-width:650px){#workspace-home .dh-sections{grid-template-columns:minmax(0,1fr)}#workspace-home .dh-header{margin:8px 8px 0;padding:10px;gap:10px}#workspace-home .dh-intro{padding:12px 16px}#workspace-home .dh-footer{flex-wrap:wrap}body.crm-unified .module-view-toggle{padding:8px!important}body.crm-unified .top-actions{flex:1 1 auto}body.crm-unified .module-primary{grid-template-columns:minmax(0,1fr)}}
@media(pointer:coarse){#workspace-home .dh-link,body.crm-unified .module-primary>a,body.crm-unified .module-view-tabs>a{min-height:44px}}
@media(prefers-reduced-motion:reduce){body.crm-unified .app-main :is(button,a.button,a.secondary,a.mini,summary){animation:none!important;transition:none!important;transform:none!important}#workspace-home .dh-banner:hover{transform:none}}

body.crm-workbooks .desk-top{background:#f8fcfa;border-color:var(--crm-line);color:var(--crm-ink)}
body.crm-workbooks :is(button,.btn){background:linear-gradient(145deg,#fff,#e9f1ed);border-color:#c7dad3;color:var(--crm-ink)}
body.crm-workbooks :is(button,.btn,input,select):focus-visible{outline:2px solid var(--crm-accent);outline-offset:3px}

body.crm-unified #personal-dashboard .pd-header-columns{background:#edf5f1}
