#mestoAgentLink.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 44px;
  padding: .55rem 1.1rem;
  border: 1px solid #927bff;
  border-radius: 14px;
  background: linear-gradient(115deg, #242953, #523698 60%, #275c70);
  box-shadow: 0 3px 12px #39297840;
  color: white;
  font-weight: 700;
  text-decoration: none;
}
#mestoAgentLink::before {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  background: linear-gradient(135deg, #c9fffb, #ad9aff);
  clip-path: polygon(50% 0, 65% 35%, 100% 50%, 65% 65%, 50% 100%, 35% 65%, 0 50%, 35% 35%);
}
#mestoAgentLink:hover { filter: brightness(1.1); }
#mestoAgentLink:focus-visible { outline: 3px solid #7354d9; outline-offset: 3px; }

header.top .avatar,
body:has(#dashboard.active) header.top #findServicesNav { display: none !important; }
header.top .modes, header.top .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
header.top .actions { margin-inline-start: auto; justify-content: flex-end; }
@media (max-width: 800px) {
  header.top { flex-wrap: wrap; }
  header.top .modes { flex: 1 1 100%; }
}
/* Cabinet chrome has its own layout; seller storefronts keep their theme. */
html body:has(#platform) header.top {
  display:grid!important; grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center; gap:12px!important; padding:12px 16px!important;
  height:auto!important; max-height:none!important; background:#fff!important;
  border:0!important; box-shadow:0 4px 20px #203b6b10!important;
}
html body:has(#platform) header.top .logo {grid-area:auto!important}
html body:has(#platform) header.top .mark {
  background:linear-gradient(145deg,#5098ff,#2355ca)!important;color:white!important;
}
html body:has(#platform) header.top :is(.modes,.actions) {
  display:flex!important; flex-wrap:wrap!important; min-width:0!important;
  overflow:visible!important; width:auto!important;grid-area:auto!important;
  align-items:center!important; gap:8px!important; padding:0!important;
}
html body:has(#platform) header.top :is(.modes,.actions)>* {
  flex:0 1 auto!important; min-width:0!important; max-width:100%!important;
}
html body:has(#platform) header.top :is(.modes,.actions) :is(a,button,select),
html body #platform .growth-actions .btn {
  border:0!important; border-radius:12px!important; min-height:44px;
  background:linear-gradient(#fff,#f0f4fb)!important; color:#203657!important;
  box-shadow:0 2px 4px #243e6424,inset 0 1px 0 #ffffff!important;
  white-space:normal!important; overflow-wrap:break-word;line-height:1.25!important;
}
html body:has(#platform) header.top #mestoAgentLink,
html body #platform .growth-actions .btn.lime,
html body #dashboard .btn.lime {
  background:linear-gradient(160deg,#3477e8,#194eb4)!important;color:#fff!important;
  border:0!important;box-shadow:0 3px 8px #204ba632!important;
}
html body:has(#platform) header.top [data-screen].active {background:#dceaff!important;color:#103e8d!important}
html body #platform .growth-switch a {border-color:#3f79d3!important}
html body:has(#platform) header.top[data-authenticated="true"] #findServicesNav {display:none!important}
@media(max-width:1150px){
  html body:has(#platform) header.top {grid-template-columns:auto minmax(0,1fr)!important; position:relative!important}
  html body:has(#platform) header.top .logo {grid-area:1/1!important}
  html body:has(#platform) header.top .actions {grid-area:1/2!important;justify-content:flex-end!important}
  html body:has(#platform) header.top .modes {grid-area:2/1/3/-1!important}
}
@media(max-width:650px){
  html body:has(#platform) header.top {padding:12px!important;gap:12px 6px!important}
  html body:has(#platform) header.top .modes {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:minmax(44px,auto); margin:0!important;
  }
  html body:has(#platform) header.top .modes>* {
    display:flex;justify-content:center;align-items:center;text-align:center;
    width:100%!important;height:100%!important;margin:0!important;padding:8px!important;
    box-sizing:border-box!important;font-size:13px!important;
  }
  html body:has(#platform) header.top .actions {margin:0!important}
}
@media(max-width:650px){
 html body:has(#platform) header.top nav.modes.modes {
   display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
   width:100%!important;max-width:none!important;overflow:visible!important;
 }
 html body:has(#platform) header.top nav.modes.modes > * {min-width:0!important;max-width:100%!important;width:100%!important}
 html body:has(#platform) header.top nav.modes #mestoWorkspaceLink {display:flex!important}
}
