/* V83 — final frame share + one integrated System navigation item. */

/* Hide only the legacy injected controls. Do NOT hide their parent LI because
   Notifications can live in the same LI in older patches. */
#v80-system-nav,
#v56-advanced-nav,
#v59-advanced-nav,
#v51-admin-tools-btn,
[data-v83-system-duplicate="1"]{
  display:none!important;
}

/* One system item, styled exactly like the normal admin navigation rows. */
.v83-system-li{list-style:none!important;margin:0!important;padding:0!important}
.v83-system-nav{
  width:100%;
  display:flex;
  align-items:center;
  gap:.75rem;
  min-height:40px;
  padding:.625rem .75rem;
  border:0;
  border-radius:.75rem;
  background:transparent;
  color:var(--color-muted-foreground,#8f99a8);
  font:600 .875rem/1.25rem inherit;
  text-align:right;
  cursor:pointer;
  transition:background-color .16s ease,color .16s ease,transform .12s ease;
}
.v83-system-nav i{width:1rem;min-width:1rem;text-align:center;font-size:1rem;line-height:1;color:inherit}
.v83-system-nav:hover{background:var(--sidebar-accent,rgba(255,255,255,.055));color:var(--color-foreground,#fff)}
.v83-system-nav:active{transform:scale(.985)}
.v83-system-nav.is-active{background:color-mix(in oklab,var(--color-primary,#ef1d2d) 15%,transparent);color:var(--color-primary,#ef1d2d)}

/* System is no longer a separate full-screen page. V82 still owns all API,
   WaSender and switch logic; V83 simply hosts that same working UI inside the
   regular admin <main>, next to the normal sidebar/header. */
main.admin-mobile-main.v83-system-host-active{
  position:relative!important;
  overflow:visible!important;
}
main.admin-mobile-main.v83-system-host-active > :not(#v80-system-page){display:none!important}

#v80-system-page.v83-system-embedded{
  --v80-sidebar-width:0px!important;
  position:static!important;
  inset:auto!important;
  top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;
  z-index:auto!important;
  width:100%!important;
  max-width:none!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  overscroll-behavior:auto!important;
  -webkit-overflow-scrolling:auto!important;
}
#v80-system-page.v83-system-embedded .v80-system-shell{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0 0 calc(28px + env(safe-area-inset-bottom))!important;
}
#v80-system-page.v83-system-embedded .v80-system-head{
  padding-top:0!important;
}
#v80-system-page.v83-system-embedded .v80-back{display:none!important}

/* Keep settings comfortable inside the normal admin content width. */
@media (min-width:1025px){
  #v80-system-page.v83-system-embedded .v80-system-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #v80-system-page.v83-system-embedded .v80-wa-card{grid-column:1/-1!important}
}

@media (max-width:1024px){
  #v80-system-page.v83-system-embedded .v80-system-shell{width:100%!important;padding-top:0!important}
  #v80-system-page.v83-system-embedded .v80-system-head h1{font-size:22px!important}
  #v80-system-page.v83-system-embedded .v80-system-grid{grid-template-columns:1fr!important}
  #v80-system-page.v83-system-embedded .v80-wa-card{grid-column:auto!important}
}
