/* Cloud Design v1.3.12 — navigation clarity
   One rule everywhere: "Панель" = staff workspace, Cloud Design logo / "На сайт" = public website. */

.workspace-drawer-v1312 .workspace-brand-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:6px 6px 12px;
  margin:0 0 8px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.workspace-drawer-v1312 .workspace-brand-home{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:auto!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:inherit!important;
  text-decoration:none!important;
  transform:none!important;
  opacity:.94;
  transition:opacity .18s ease,transform .18s ease!important;
}
.workspace-drawer-v1312 .workspace-brand-home:hover{opacity:1;transform:translateY(-1px)!important;background:transparent!important}
.workspace-drawer-v1312 .workspace-brand-home:active{transform:translateY(0)!important}
.workspace-drawer-v1312 .workspace-brand-home img{
  display:block;
  width:min(170px,100%);
  height:auto;
  max-height:34px;
  object-fit:contain;
  object-position:left center;
}
.workspace-drawer-v1312 .workspace-brand-close{
  display:none;
  width:38px;
  height:38px;
  min-width:38px;
  padding:0;
  border:1px solid rgba(255,255,255,.08);
  border-radius:11px;
  background:rgba(255,255,255,.035);
  color:#c9cbe0;
  font:400 1.35rem/1 system-ui,sans-serif;
  cursor:pointer;
}
.workspace-drawer-v1312 .workspace-site-link .workspace-nav-icon{color:#c7b8ff}

/* "Главная" used to be ambiguous in an admin workspace. "Панель" is now the staff home. */
.workspace-drawer-v1312 a[href*="/staff/"]:focus-visible,
.workspace-drawer-v1312 .workspace-brand-home:focus-visible,
.workspace-drawer-v1312 .workspace-site-link:focus-visible{
  outline:2px solid rgba(174,145,255,.85)!important;
  outline-offset:2px!important;
}

@media (min-width:901px){
  .workspace-drawer-v1312 .workspace-brand-row{
    position:sticky;
    top:0;
    z-index:4;
    margin:-2px -2px 10px;
    padding:8px 8px 12px;
    background:linear-gradient(180deg,rgba(15,17,29,.99) 82%,rgba(15,17,29,.94));
  }
  .workspace-drawer-v1312 .workspace-brand-home img{width:164px;max-height:31px}
}

@media (max-width:900px){
  /* The drawer gets one compact brand row instead of another navigation bar.
     Logo is the conventional, predictable escape back to the public site. */
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 .workspace-brand-row{
    position:sticky!important;
    top:0!important;
    z-index:5!important;
    margin:0 -12px 4px!important;
    padding:12px 12px 10px!important;
    min-height:55px!important;
    background:linear-gradient(180deg,rgba(16,18,31,1) 82%,rgba(16,18,31,.97))!important;
    border-bottom:1px solid rgba(255,255,255,.065)!important;
  }
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 .workspace-brand-home{
    display:inline-flex!important;
    width:auto!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 .workspace-brand-home img{
    width:154px!important;
    max-width:58vw!important;
    max-height:29px!important;
  }
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 .workspace-brand-close{
    display:grid!important;
    place-items:center!important;
    flex:0 0 38px!important;
  }

  /* User identity is useful, but must not pretend to be a second sticky header/menu. */
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 .workspace-drawer-head{
    position:static!important;
    top:auto!important;
    z-index:auto!important;
    margin:0 -12px 4px!important;
    padding:8px 12px 7px!important;
    background:transparent!important;
  }

  /* Legacy mobile rules target every anchor in the drawer; keep the brand logo exempt. */
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 a.workspace-brand-home,
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 a.workspace-brand-home:hover,
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 a.workspace-brand-home:active{
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  /* Public site is deliberately NOT another bottom-tab: it lives behind the familiar logo
     and the explicit compact "На сайт" item in Menu. Everyday workspace tabs remain five. */
  body.has-mobile-workspace .mobile-admin-bottom-nav small{letter-spacing:-.02em!important}
}

@media (max-width:430px){
  body.has-mobile-workspace .workspace-nav.workspace-drawer-v1312 .workspace-brand-home img{
    width:146px!important;
    max-width:56vw!important;
  }
}
