/*
 * HotelariaWeb panel shell
 *
 * The outer Gentelella class names remain for backwards compatibility, but
 * the sidebar itself is intentionally isolated under the hw-* namespace.
 */

.panel-shell-v2 {
  --hw-sidebar-width: 252px;
  --hw-sidebar-collapsed-width: 76px;
  --hw-sidebar-bg: #2d1338;
  --hw-sidebar-bg-soft: #3a1747;
  --hw-sidebar-text: #e9dfee;
  --hw-sidebar-muted: #a994b2;
  --hw-sidebar-active: #b15bbe;
  --hw-sidebar-hover: rgba(255, 255, 255, 0.08);
  --hw-topbar-height: 62px;
  --hw-shell-transition: 180ms ease;
}

.panel-shell-v2 .container.body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
}

.panel-shell-v2 .main_container {
  display: grid !important;
  grid-template-columns: var(--hw-sidebar-width) minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--hw-sidebar-bg);
  transition: grid-template-columns var(--hw-shell-transition);
}

.panel-shell-v2.panel-sidebar-collapsed .main_container {
  grid-template-columns: var(--hw-sidebar-collapsed-width) minmax(0, 1fr);
}

.panel-shell-v2 .hw-sidebar {
  position: sticky !important;
  top: 0;
  z-index: 1030;
  display: block;
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0, rgba(177, 91, 190, 0.14), transparent 32%),
    var(--hw-sidebar-bg);
  color: var(--hw-sidebar-text);
}

.panel-shell-v2 .hw-sidebar__scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.panel-shell-v2 .hw-sidebar__scroll::-webkit-scrollbar {
  width: 5px;
}

.panel-shell-v2 .hw-sidebar__scroll::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
}

.panel-shell-v2 .right_col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  margin-left: 0 !important;
  padding: 0 !important;
}

.panel-shell-v2 .main_container .top_nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  width: 100%;
  margin-left: 0 !important;
}

.panel-shell-v2 .nav_menu {
  float: none;
  min-height: var(--hw-topbar-height);
  height: auto !important;
  margin: 0;
  padding: 0 0.65rem;
  gap: 0.25rem;
}

.panel-shell-v2 .nav_menu > * {
  min-width: 0;
}

.panel-shell-v2 .panel-top-tabs {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.panel-shell-v2 .panel-top-tabs::-webkit-scrollbar {
  display: none;
}

.panel-shell-v2 .panel-top-tabs > nav,
.panel-shell-v2 .panel-top-tabs > div {
  display: flex;
  align-items: stretch;
  width: max-content;
  min-width: 100%;
  height: 100%;
}

.panel-shell-v2 .panel-top-tabs .btn-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: stretch;
  margin: 0 15px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #596273;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.panel-shell-v2 .panel-top-tabs .btn-tab:hover,
.panel-shell-v2 .panel-top-tabs .btn-tab:focus-visible {
  border-bottom-color: rgba(177, 91, 190, 0.35);
  color: #252b36;
  text-decoration: none;
  outline: none;
}

.panel-shell-v2 .panel-top-tabs .btn-tab.active,
.panel-shell-v2 .panel-top-tabs .btn-tab[aria-current="page"] {
  border-bottom-color: var(--primary);
  color: #252b36;
  font-weight: 600;
}

.panel-shell-v2 .panel-mobile-sidebar-control {
  display: none;
  flex: 0 0 auto;
  width: auto;
  padding: 0;
}

.panel-shell-v2 #mobile_menu_toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  transition:
    background-color var(--hw-shell-transition),
    color var(--hw-shell-transition);
}

.panel-shell-v2 #mobile_menu_toggle .bi {
  font-size: 1rem;
  line-height: 1;
}

.panel-shell-v2 #mobile_menu_toggle:hover,
.panel-shell-v2 #mobile_menu_toggle:focus-visible {
  background: #f0ebf2;
  color: var(--hw-sidebar-active);
  outline: none;
}

.panel-shell-v2 .panel-user-menu {
  flex: 0 0 auto;
  padding-left: 0.4rem;
}

.panel-shell-v2 .panel-user-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.panel-shell-v2 .panel-user-trigger:hover,
.panel-shell-v2 .panel-user-trigger:focus-visible,
.panel-shell-v2 .panel-user-trigger[aria-expanded="true"] {
  background: #f0ebf2;
  outline: none;
}

.panel-shell-v2 .panel-user-trigger .user-avatar-initials {
  width: 32px;
  height: 32px;
  background: #f2e5f4;
  color: #9850a5;
  font-size: 0.72rem;
}

.panel-shell-v2 .nav-content-container {
  display: flex !important;
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: flex-start !important;
  min-width: 0;
}

.panel-shell-v2 .middle_navigation {
  flex: 0 0 auto;
  overflow-y: auto;
}

.panel-shell-v2 .content-container {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

/* Brand */
.panel-shell-v2 .hw-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--hw-topbar-height);
  padding: 10px 14px;
}

.panel-shell-v2 .hw-sidebar__brand-link {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.panel-shell-v2 .hw-sidebar__logo {
  display: block;
  width: auto;
  max-width: 154px;
  max-height: 36px;
  object-fit: contain;
}

.panel-shell-v2 .hw-sidebar__toggle {
  display: inline-grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #cdbfd3;
  cursor: pointer;
  place-items: center;
  transition:
    background-color var(--hw-shell-transition),
    border-color var(--hw-shell-transition),
    color var(--hw-shell-transition);
}

.panel-shell-v2 .hw-sidebar__toggle:hover,
.panel-shell-v2 .hw-sidebar__toggle:focus-visible {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

.panel-shell-v2 .hw-sidebar__toggle i {
  font-size: 0.8rem;
  transition: transform var(--hw-shell-transition);
}

.panel-shell-v2 .hw-sidebar__brand-mark {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c16ccd, #7d3e92);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 1.3rem;
}

/* Menu */
.panel-shell-v2 .hw-sidebar__nav {
  padding: 4px 12px 24px;
}

.panel-shell-v2 .hw-menu-section {
  margin: 0 0 20px;
}

.panel-shell-v2 .hw-menu-section__title {
  margin: 0 8px 7px;
  color: var(--hw-sidebar-muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.085em;
  line-height: 1.4;
  text-transform: uppercase;
}

.panel-shell-v2 .hw-menu,
.panel-shell-v2 .hw-submenu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-shell-v2 .hw-menu__item {
  position: relative;
  margin: 2px 0;
}

.panel-shell-v2 .hw-menu__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--hw-sidebar-text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--hw-shell-transition),
    color var(--hw-shell-transition);
}

.panel-shell-v2 .hw-menu__link:hover,
.panel-shell-v2 .hw-menu__link:focus-visible {
  background: var(--hw-sidebar-hover);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.panel-shell-v2 .hw-menu__icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  color: #cbbbd2;
}

.panel-shell-v2 .hw-menu__icon > .bi:first-child {
  font-size: 1.18rem;
  line-height: 1;
}

.panel-shell-v2 .hw-menu__lock {
  position: absolute;
  right: -5px;
  bottom: -5px;
  padding: 1px;
  border-radius: 50%;
  background: var(--hw-sidebar-bg);
  color: #f5bd3d;
  font-size: 0.58rem;
  line-height: 1;
}

.panel-shell-v2 .hw-menu__label {
  flex: 1 1 auto;
  min-width: 0;
}

.panel-shell-v2 .hw-menu__caret {
  flex: 0 0 auto;
  color: var(--hw-sidebar-muted);
  font-size: 0.78rem;
  transition: transform var(--hw-shell-transition);
}

.panel-shell-v2 .hw-menu__toggle[aria-expanded="true"] .hw-menu__caret {
  transform: rotate(90deg);
}

.panel-shell-v2 .hw-menu__item.current-page > .hw-menu__link,
.panel-shell-v2 .hw-menu__link[aria-current="page"],
.panel-shell-v2 .hw-menu__item.is-open > .hw-menu__toggle {
  background: rgba(177, 91, 190, 0.24);
  color: #fff;
}

.panel-shell-v2 .hw-menu__item.current-page > .hw-menu__link::before,
.panel-shell-v2 .hw-menu__link[aria-current="page"]::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #d27add;
  content: "";
}

.panel-shell-v2 .hw-menu__item.current-page > .hw-menu__link .hw-menu__icon,
.panel-shell-v2 .hw-menu__link[aria-current="page"] .hw-menu__icon {
  color: #fff;
}

/* Submenu */
.panel-shell-v2 .hw-submenu {
  padding: 4px 0 5px 46px;
}

.panel-shell-v2 .hw-submenu[hidden] {
  display: none !important;
}

.panel-shell-v2 .hw-submenu__item {
  position: relative;
}

.panel-shell-v2 .hw-submenu__item::before {
  position: absolute;
  top: 17px;
  left: -15px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #72597d;
  content: "";
}

.panel-shell-v2 .hw-submenu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  color: #cdbfd3;
  font-size: 0.76rem;
  line-height: 1.35;
  text-decoration: none;
}

.panel-shell-v2 .hw-submenu__link:hover,
.panel-shell-v2 .hw-submenu__link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.panel-shell-v2 .hw-submenu__item.current-page > .hw-submenu__link,
.panel-shell-v2 .hw-submenu__link[aria-current="page"] {
  color: #fff;
  font-weight: 500;
}

.panel-shell-v2 .hw-submenu__item.current-page::before {
  background: #d27add;
}

.panel-shell-v2 .hw-submenu__lock {
  color: #f5bd3d;
  font-size: 0.65rem;
}

/* Compact desktop state */
@media (min-width: 992px) {
  .panel-shell-v2.panel-sidebar-collapsed .hw-sidebar__brand {
    justify-content: center;
    padding-right: 0;
    padding-left: 0;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-sidebar__brand-link {
    display: none;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-sidebar__toggle i {
    transform: rotate(180deg);
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-sidebar__nav {
    padding-right: 10px;
    padding-left: 10px;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-menu-section {
    margin-bottom: 12px;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-menu-section__title,
  .panel-shell-v2.panel-sidebar-collapsed .hw-menu__label,
  .panel-shell-v2.panel-sidebar-collapsed .hw-menu__caret,
  .panel-shell-v2.panel-sidebar-collapsed .hw-submenu {
    display: none !important;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-menu__link {
    justify-content: center;
    min-height: 48px;
    padding: 10px;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-menu__icon {
    flex-basis: 28px;
    width: 28px;
  }

  .panel-shell-v2.panel-sidebar-collapsed .hw-menu__icon > .bi:first-child {
    font-size: 1.28rem;
  }
}

/* Mobile off-canvas navigation */
.panel-sidebar-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .panel-shell-v2 .main_container,
  .panel-shell-v2.panel-sidebar-collapsed .main_container {
    display: block !important;
    background: #fafafa;
  }

  .panel-shell-v2 .hw-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    z-index: 1050;
    display: block !important;
    width: min(88vw, 320px);
    max-width: 320px;
    transform: translateX(-102%);
    visibility: hidden;
    box-shadow: 12px 0 32px rgba(17, 24, 39, 0.28);
    transition:
      transform var(--hw-shell-transition),
      visibility var(--hw-shell-transition);
  }

  .panel-shell-v2.shell-sidebar-open {
    overflow: hidden;
  }

  .panel-shell-v2.shell-sidebar-open .hw-sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  .panel-shell-v2 .panel-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: block;
    border: 0;
    background: rgba(17, 24, 39, 0.5);
    opacity: 0;
    visibility: hidden;
    cursor: pointer;
    transition:
      opacity var(--hw-shell-transition),
      visibility var(--hw-shell-transition);
  }

  .panel-shell-v2.shell-sidebar-open .panel-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .panel-shell-v2 .hw-sidebar__brand {
    height: var(--hw-topbar-height);
    padding: 10px 14px;
  }

  .panel-shell-v2 .hw-sidebar__logo {
    max-width: 154px;
    max-height: 36px;
  }

  .panel-shell-v2 .panel-mobile-sidebar-control {
    display: block;
  }

  .panel-shell-v2 .hw-sidebar__nav {
    padding-right: 12px;
    padding-left: 12px;
  }

  .panel-shell-v2 .middle_navigation {
    flex-basis: min(42vw, 190px);
  }

  .panel-shell-v2 .content-container {
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .panel-shell-v2 .nav_menu {
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .panel-shell-v2 .nav-content-container {
    display: block !important;
  }

  .panel-shell-v2 .middle_navigation {
    width: 100%;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #ddd;
  }

  .panel-shell-v2 .middle_navigation a {
    width: auto;
  }
}

/* Minimal/hashed pages do not reserve shell space. */
.panel-shell-v2.panel-shell-minimal .main_container {
  display: block !important;
  background: #fafafa;
}

.panel-shell-v2.panel-shell-minimal .hw-sidebar,
.panel-shell-v2.panel-shell-minimal .top_nav,
.panel-shell-v2.panel-shell-minimal .panel-sidebar-backdrop {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .panel-shell-v2 .main_container,
  .panel-shell-v2 .hw-sidebar,
  .panel-shell-v2 .panel-sidebar-backdrop,
  .panel-shell-v2 .hw-menu__caret {
    transition: none;
  }
}
