/* Keep logo, scrollable navigation and account controls on one header row. */
#crmSidebar.side{display:flex;flex-wrap:nowrap;align-items:center;gap:8px 16px;height:auto;overflow:visible;box-sizing:border-box}
#crmSidebar.side .brand{order:0;max-width:100%}
#crmSidebar.side .side-foot{order:2;flex:0 0 auto;margin-left:0}
#crmSidebar.side nav{order:1;flex:1 1 0;width:auto;min-width:0;max-width:100%}
#crmSidebar .nav-group-tabs{flex-wrap:nowrap;justify-content:flex-start;justify-content:safe center;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding:2px 2px 7px;scroll-padding-inline:2px;box-sizing:border-box}
#crmSidebar .nav-group-tab{flex:0 0 auto;margin:0;white-space:nowrap;text-align:center}
#crmSidebar .nav-group-tab:focus-visible{outline:2px solid #a7dfc8;outline-offset:2px}
#crmSidebar .nav-group-panels{box-sizing:border-box;max-width:100%;max-height:60dvh;overflow-y:auto}
@media(max-width:760px){
  #crmSidebar.side{padding:8px 10px}
  #crmSidebar .nav-group-tabs{gap:4px}
  #crmSidebar .nav-group-tab{padding:9px 10px;min-height:44px}
}

/* Shortcuts and account actions share one toolbar row; scroll rather than wrap. */
.app main>header.top{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;gap:12px}
.app main>header.top .search{order:0;flex:0 0 clamp(220px,28vw,480px);width:clamp(220px,28vw,480px);min-width:220px;max-width:none}
.app main>header.top .crm-quick-links{order:1;flex:0 0 auto;flex-wrap:nowrap;margin:0;min-width:0}
.app main>header.top .crm-quick-links>button{flex:0 0 auto}
.app main>header.top .top-actions{order:2;flex:0 0 auto;flex-wrap:nowrap;justify-content:flex-start;margin:0}
.app main>header.top .top-actions>button,.app main>header.top .top-actions>div{flex:0 0 auto}

/* Center the shortcuts in the space between search and account actions. */
.app main>header.top{gap:10px;padding-top:6px;padding-bottom:6px;min-height:50px}
.app main>header.top .crm-quick-links{flex:1 0 auto;justify-content:center;gap:6px}
.app main>header.top .crm-quick-links>button{min-width:0!important;min-height:34px;padding:6px 10px;gap:5px;border-radius:8px;border-bottom-width:2px;font-size:calc(12px * var(--ui-scale,1));line-height:1.3;text-align:center;justify-content:center;box-shadow:0 2px 3px #183d5114}
.app main>header.top .crm-quick-links>button svg{width:16px;height:16px}
@media(max-width:760px){
 .app main>header.top .crm-quick-links>button{min-height:44px}
}
