.page-wrapper .page-body-wrapper .page-sidebar .sidebar-menu > li.has-flyout {
  position: relative;
}

.page-wrapper .page-body-wrapper .page-sidebar .sidebar-menu > li.has-flyout > .sidebar-submenu.flyout {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% - 8px);
  min-width: 240px;
  margin-left: 0;
  padding: 12px 16px;
  border-radius: 6px;
  background-color: #242934;
  box-shadow: 0 8px 20px rgba(22, 18, 18, 0.2);
  z-index: 1001;
  transform: none;
}

.page-wrapper .page-body-wrapper .page-sidebar .sidebar-menu > li.has-flyout:hover > .sidebar-submenu.flyout,
.page-wrapper .page-body-wrapper .page-sidebar .sidebar-menu > li.has-flyout:focus-within > .sidebar-submenu.flyout {
  display: block;
}

.page-wrapper .page-body-wrapper .page-sidebar .sidebar-menu > li.has-flyout > .sidebar-submenu.flyout > li > a {
  line-height: 1.8;
}

.flyout::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -16px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent #fefafa transparent;
  transform: rotate(-270deg);
}

@media (max-width: 991px) {
  .page-wrapper .page-body-wrapper .page-sidebar .sidebar-menu > li.has-flyout > .sidebar-submenu.flyout {
    position: static;
    top: auto;
    left: auto;
    min-width: 100%;
    padding: 0 0 0 12px;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
  }
}


/* drilldown styles */
/* Header */
.drilldown-header {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f3119d;
}

.drilldown-back {
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 10px;
  font-size: 14px;
  color: #f3119d;
}

/* Menu container */
.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Hide all submenus by default */
.sidebar-submenu {
  display: none;
}
.drilldown-title {
  font-weight: bold;
  color: #e5e5e5;
}



.sidebar-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.sidebar-modal-content {
    background: #fff;
    width: 400px;
    max-width: 90%;
    margin: 80px auto;
    padding: 20px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

.modal-close {
    float: right;
    font-size: 22px;
    cursor: pointer;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.has-modal > .sidebar-submenu {
    display: none !important;
}

.modal-row li {
    width: 100%;
    display: inline-block;
    line-height: 2.5;
    border-bottom: 1px solid #cfd4da1c;
}

#sidebarModal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    background: #242934;
}
#sidebarModal .modal-footer{
  background: #242934;
  border-top: 0px;
}

#sidebarModal .modal-header{
  background: #242934;
}



.child-modal a.sidebar-header{
    font-size: 14px;
    letter-spacing: 0.5px;
    padding-bottom: 12px;
    padding-top: 12px;
    text-transform: capitalize;
    font-weight: 600;
    color: #ffffff;
}
.child-modal a:hover{
    color: #f3119d;
}
.child-modal a:hover svg{
    color: #f3119d;
    fill: #f3119d !important;
}
.btn-modal:hover {
    background: #f3119d;
    color: #fff;
}
.child-modal a.sidebar-header svg{
    margin-right: 8px;
    fill: #ffffff;
    width: 12px;
    height: 12px;
}
.btn-modal {
    background: #353535;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
#sidebarModalLabel {
    color: #fff;
    text-align: center;
}
#sidebarModal .modal-header {
    border-bottom: 1px solid #333333;
    display: block;
}




/* Flyout styles */
.main-header-right .dropdown-toggle::after {
  display: none;
}
.profile-dropdown,
.profile-dropdown ul {
    position: relative;
    overflow: visible;
}

.profile-dropdown .dropdown-menu {
    position: relative;   /* 👈 KEY FIX */
    display: none;
    width: 100%;
    transform: none !important;
    inset: auto !important;
}

.profile-dropdown .flyout-menu
{
    position: absolute !important;
    display: none;
    width: 100%;
    transform: none !important;
    inset: auto !important;
    top: 0px !important;
    background: white;
    padding: 15px 20px;
    right: 138px !important;
}
.profile-dropdown .dropdown-menu.show{
    display: block;
}

.profile-dropdown .nav-item.open > .dropdown-menu {
    display: block;
}

.profile-dropdown .nav-item.open > .flyout-menu {
    display: block;
}


.profile-dropdown .submenu-wrapper {
    position: relative;
}

.profile-dropdown .submenu-wrapper .dropdown-menu {
    position: relative;
}

.profile-dropdown .dropdown-menu,
.profile-dropdown .flyout-menu {
    overflow: visible;
    transition: max-height 0.3s ease;
}

.profile-dropdown .nav-item.open > .dropdown-menu {
    max-height: 500px;
}

.profile-dropdown .dropdown-menu .show>.dropdown-menu {
    left: 100%;
    top: 0;
    margin-left: 10px;
    display: block;
    position: relative;

}

.profile-dropdown .dropdown-menu .dropdown-menu.show {
    display: block !important;
}

.profile-dropdown .nav-item.position-relative{
    position: relative;
}
.profile-dropdown .flyout-menu {
    position: absolute !important;
    display: none;
    /* width: 100%; */
    transform: none !important;
    /* inset: auto !important; */
    top: 0px !important;
    background: white !important;
    padding: 15px 20px;
    right: 138px !important;
    min-width: 160px;
}

.profile-dropdown .nav-item.position-relative:hover > .flyout-menu,.profile-dropdown .nav-item.position-relative.active > .flyout-menu {
    display: block;
}
.profile-dropdown .flyout-menu.list-unstyled::after{
    content: "";
    position: absolute;
    top: 10px;
    right: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: transparent transparent transparent #f8f8f9;
}


.profile-dropdown .drilldown-menu,
.profile-dropdown .drilldown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.profile-dropdown .drilldown-menu li a {
    display: block;
    /* padding: 10px 15px; */
    text-decoration: none;
    color: #333;
    /* border-bottom: 1px solid #eee; */
}

.profile-dropdown .drilldown-menu li a:hover {
    /* background: #f5f5f5; */
    color: #f3119d;
}

/* Submenus */
.profile-dropdown .drilldown-menu ul {
    position: relative;
    top: 0;
    left: 100%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
}

/* Active panel */
.profile-dropdown .drilldown-menu ul.active {
    left: 0;
}

.profile-dropdown .drilldown-menu {
    display: none;
}

.profile-dropdown .drilldown-menu.active {
    display: block;
}
.profile-dropdown .drilldown-back-color {
    color: #f3119d;
}
.modal-menu-list li {
    list-style-type: none;
    display: block;
    padding-top: 0;
}
.modal-menu-list>li>a{
  display: flex;
  align-items: center;
  gap: 15px;
}

.modal-menu-list>li>ul {
    padding-left: 10px;
}
.modal-menu-list>li>ul>li>a{
  display: flex;
  align-items: center;
  gap: 15px;
} 
.modal-menu-list>li>ul>li>a:hover,.modal-menu-list>li>a:hover {
  color: #f3119d;
}
.modal-menu-list>li>ul>li>a:hover svg,.modal-menu-list>li>a:hover svg {
  fill: #f3119d;
}