/* Canonical Tenaro authenticated menu shell.
 * Role pages keep their own destinations; this file owns the shared visual contract.
 */
body.tenaro-menu-shell{
  --tenaro-menu-width:288px;
  --tenaro-menu-bg:#fff;
  --tenaro-menu-dark-bg:#08111c;
  --tenaro-menu-border:#e6edf3;
  --tenaro-menu-text:#5c6b7d;
  --tenaro-menu-strong:#102033;
  --tenaro-menu-label:#8a98a8;
  --tenaro-menu-hover:#f3f7f8;
  --tenaro-menu-active:#e8f7f5;
  --tenaro-menu-popup:#fff;
  --tenaro-menu-accent:var(--accent,#18b6a8);
  --tenaro-menu-logo-bg:transparent;
  --tenaro-menu-logo-padding:0px;
  --tenaro-menu-logo-radius:0px;
}
:root[data-theme="dark"] body.tenaro-menu-shell,
body.tenaro-menu-shell.theme-dark,
body.tenaro-menu-shell[data-theme="dark"]{
  --tenaro-menu-bg:var(--tenaro-menu-dark-bg);
  --tenaro-menu-border:#17283b;
  --tenaro-menu-text:#a8b5c7;
  --tenaro-menu-strong:#f3f8ff;
  --tenaro-menu-label:#708198;
  --tenaro-menu-hover:#111e2d;
  --tenaro-menu-active:#132b30;
  --tenaro-menu-popup:#0f1b2a;
  --tenaro-menu-logo-bg:linear-gradient(135deg,#18b6a8,#2563eb);
  --tenaro-menu-logo-padding:8px;
  --tenaro-menu-logo-radius:50%;
}
body.tenaro-menu-shell :is(.sidebar,.subscription-sidebar){
  box-sizing:border-box;
  width:var(--tenaro-menu-width)!important;
  max-width:var(--tenaro-menu-width);
  min-width:var(--tenaro-menu-width);
  height:100vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  flex:0 0 var(--tenaro-menu-width);
  background:var(--tenaro-menu-bg)!important;
  color:var(--tenaro-menu-text);
  border-right:1px solid var(--tenaro-menu-border);
  z-index:240;
  transition:transform .22s ease,background .2s ease,color .2s ease,border-color .2s ease;
}
body.tenaro-menu-shell :is(.sidebar,.subscription-sidebar) a{text-decoration:none}
body.tenaro-menu-shell :is(.sidebar-logo,.subscription-sidebar-logo){
  box-sizing:border-box;
  min-height:84px;
  padding:22px 16px 18px!important;
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
  border:0!important;
  background:var(--tenaro-menu-bg)!important;
}
body.tenaro-menu-shell :is(.logo-mark,.subscription-sidebar-logo .mark){
  box-sizing:border-box;
  width:44px!important;
  height:44px!important;
  min-width:44px;
  padding:var(--tenaro-menu-logo-padding)!important;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
  border:0!important;
  border-radius:var(--tenaro-menu-logo-radius)!important;
  background:var(--tenaro-menu-logo-bg)!important;
  box-shadow:none!important;
}
body.tenaro-menu-shell :is(.logo-mark,.subscription-sidebar-logo .mark) img{
  display:block;
  width:100%!important;
  height:100%!important;
  padding:0!important;
  border-radius:0!important;
  object-fit:contain;
}
body.tenaro-menu-shell :is(.logo-text,.subscription-sidebar-logo strong){
  display:block;
  color:var(--tenaro-menu-strong)!important;
  font-size:22px!important;
  line-height:1.15!important;
  font-weight:760!important;
  letter-spacing:-.035em!important;
  white-space:nowrap;
}
body.tenaro-menu-shell .logo-sub{display:none!important}
body.tenaro-menu-shell :is(.sidebar-nav-scroll,.sidebar-nav){
  box-sizing:border-box;
  display:block;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:rgba(148,163,184,.24) transparent;
  padding:0 4px 10px!important;
}
body.tenaro-menu-shell :is(.sidebar-section,.side-section){padding:12px 8px 2px!important}
body.tenaro-menu-shell :is(.sidebar-label,.side-label){
  padding:0 12px!important;
  margin:7px 0 8px!important;
  color:var(--tenaro-menu-label)!important;
  font-size:10px!important;
  line-height:1.2;
  font-weight:650!important;
  letter-spacing:.16em!important;
  text-transform:uppercase;
}
body.tenaro-menu-shell :is(.nav-item,.side-nav-item){
  box-sizing:border-box;
  display:flex!important;
  align-items:center;
  gap:12px!important;
  width:100%;
  min-height:42px;
  padding:9px 12px!important;
  position:relative;
  border:0;
  border-radius:14px;
  background:transparent;
  color:var(--tenaro-menu-text)!important;
  font-family:inherit;
  font-size:14px;
  line-height:1.2;
  font-weight:500!important;
  letter-spacing:-.01em;
  cursor:pointer;
  user-select:none;
  transition:background .15s ease,color .15s ease;
}
body.tenaro-menu-shell :is(.nav-item,.side-nav-item):hover{
  background:var(--tenaro-menu-hover)!important;
  color:var(--tenaro-menu-strong)!important;
}
body.tenaro-menu-shell :is(.nav-item,.side-nav-item).active{
  background:var(--tenaro-menu-active)!important;
  color:var(--tenaro-menu-strong)!important;
  box-shadow:none!important;
}
body.tenaro-menu-shell :is(.nav-item,.side-nav-item).active::before{
  content:"";
  position:absolute;
  left:-4px!important;
  top:10px!important;
  bottom:10px!important;
  width:3px!important;
  border-radius:999px;
  background:var(--tenaro-menu-accent);
}
body.tenaro-menu-shell .nav-item>svg,
body.tenaro-menu-shell .side-icon{
  box-sizing:border-box;
  width:18px!important;
  height:18px!important;
  min-width:18px;
  flex:0 0 18px;
  display:grid;
  place-items:center;
  color:currentColor;
}
body.tenaro-menu-shell .nav-item>svg,
body.tenaro-menu-shell .side-icon svg{
  width:18px!important;
  height:18px!important;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
body.tenaro-menu-shell .nav-badge{margin-left:auto}
body.tenaro-menu-shell :is(.sidebar-bottom,.sidebar-user){
  box-sizing:border-box;
  flex:0 0 auto;
  margin-top:0!important;
  padding:12px 14px calc(12px + env(safe-area-inset-bottom,0px))!important;
  position:relative;
  z-index:3;
  border-top:1px solid var(--tenaro-menu-border)!important;
  background:var(--tenaro-menu-bg)!important;
  transition:background .2s ease,border-color .2s ease;
}
body.tenaro-menu-shell :is(.user-chip,.sidebar-user-chip){
  box-sizing:border-box;
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  min-width:0;
  min-height:56px;
  padding:8px 2px!important;
  border-radius:12px;
  color:var(--tenaro-menu-strong)!important;
  background:transparent!important;
  box-shadow:none!important;
}
body.tenaro-menu-shell :is(.user-chip,.sidebar-user-chip):hover{background:var(--tenaro-menu-hover)!important}
body.tenaro-menu-shell :is(.avatar,.sidebar-avatar){
  box-sizing:border-box;
  width:40px!important;
  height:40px!important;
  min-width:40px;
  flex:0 0 40px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:50%!important;
  color:#fff!important;
  background:linear-gradient(135deg,#18b6a8,#2563eb)!important;
  object-fit:cover;
  font-size:12px;
  line-height:1;
  font-weight:800;
}
body.tenaro-menu-shell :is(.user-copy,.sidebar-user-copy,.user-chip>div:last-of-type,.sidebar-user-chip>span:last-child){
  display:block;
  min-width:0;
  flex:1 1 auto;
}
body.tenaro-menu-shell :is(.user-name,.sidebar-user-name){
  display:block;
  min-width:0;
  overflow:hidden;
  color:var(--tenaro-menu-strong)!important;
  font-size:13px!important;
  line-height:1.25;
  font-weight:750!important;
  white-space:nowrap;
  text-overflow:ellipsis;
}
body.tenaro-menu-shell :is(.user-role,.sidebar-user-role){
  display:block;
  min-width:0;
  margin-top:2px;
  overflow:hidden;
  color:var(--tenaro-menu-text)!important;
  font-size:10.5px!important;
  line-height:1.25;
  white-space:nowrap;
  text-overflow:ellipsis;
}
body.tenaro-menu-shell .logout-popup{
  background:var(--tenaro-menu-popup)!important;
  border:1px solid var(--tenaro-menu-border)!important;
  box-shadow:0 16px 40px rgba(15,23,42,.18)!important;
}
body.tenaro-menu-shell .logout-item{color:var(--tenaro-menu-strong)!important}
body.tenaro-menu-shell .logout-item:hover{background:var(--tenaro-menu-hover)!important}
body.tenaro-menu-shell .logout-item.danger{color:#dc2626!important}
@media(min-width:701px){
  body.tenaro-menu-shell :is(.app,.app-frame){display:flex!important}
  body.tenaro-menu-shell :is(.sidebar,.subscription-sidebar){
    position:sticky!important;
    inset:auto!important;
    top:0!important;
    height:100vh!important;
    transform:none!important;
    box-shadow:none!important;
  }
  body.tenaro-menu-shell :is(.overlay,.sidebar-overlay){display:none!important}
  body.tenaro-menu-shell :is(.hamburger,.menu-button){display:none!important}
}
@media(max-width:700px){
  body.tenaro-menu-shell :is(.sidebar,.subscription-sidebar){
    width:min(var(--tenaro-menu-width),88vw)!important;
    max-width:min(var(--tenaro-menu-width),88vw)!important;
    min-width:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    flex-basis:auto!important;
  }
  body.tenaro-menu-shell:has(.demo-mode-banner) .sidebar{
    top:104px!important;
    bottom:auto!important;
    height:calc(100dvh - 104px)!important;
    max-height:calc(100dvh - 104px)!important;
  }
  body.tenaro-menu-shell .subscription-sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:auto!important;
    height:100dvh!important;
  }
  body.tenaro-menu-shell .subscription-sidebar.open{transform:translateX(0)!important}
  body.tenaro-menu-shell :is(.sidebar-logo,.subscription-sidebar-logo){min-height:80px;padding:18px 16px 14px!important}
}
