/**
 * VolyxHost — left rail shell layout
 */

:root {
  --vx-rail-w: 268px;
  --vx-top-h: 64px;
}

body.volyx-shell {
  overflow-x: hidden;
}

/* Rail */
.vx-rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: var(--vx-rail-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, #0c1018 0%, #090c12 100%);
  border-right: 1px solid rgba(232, 237, 245, 0.08);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-x: hidden;
}

.vx-rail-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.1rem 1rem;
  border-bottom: 1px solid rgba(232, 237, 245, 0.08);
}
.vx-rail-brand .volyx-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  min-width: 0;
}
.vx-rail-brand .volyx-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  background: #d6ff3f;
  color: #101408;
  font-family: var(--vx-display), Syne, sans-serif;
  font-weight: 800;
  flex-shrink: 0;
}
.vx-rail-brand .volyx-brand-text {
  font-family: var(--vx-display), Syne, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: #f4f1e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-rail-brand .logo-img {
  max-height: 34px;
  width: auto;
}
.vx-rail-close {
  background: transparent;
  border: 0;
  color: #9aa6bb;
  font-size: 1.1rem;
  padding: 0.35rem;
}

.vx-rail-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0.9rem 0.35rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 237, 245, 0.08);
}
.vx-rail-user .volyx-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  margin: 0;
  background: rgba(214, 255, 63, 0.14);
  color: #d6ff3f;
  font-weight: 800;
}
.vx-rail-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.vx-rail-hello {
  font-weight: 700;
  color: #f4f1e8;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-rail-account-link {
  font-size: 0.78rem;
  color: #9aa6bb !important;
  text-decoration: none !important;
}
.vx-rail-account-link:hover {
  color: #d6ff3f !important;
}

.vx-rail-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0.75rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 255, 63, 0.25) transparent;
}
.vx-rail-label {
  margin: 1rem 0.65rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #667086;
}
.vx-rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.vx-rail-list > li {
  margin: 0.15rem 0;
  position: relative;
  max-width: 100%;
  overflow: hidden;
}
.vx-rail-list > li > a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.85rem;
  border-radius: 11px;
  color: #c2cad8 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  box-sizing: border-box !important;
  max-width: 100%;
  width: 100%;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.vx-rail-list > li > a:hover {
  background: rgba(214, 255, 63, 0.07);
  color: #fff !important;
  border-color: rgba(214, 255, 63, 0.22);
  box-shadow: inset 3px 0 0 #d6ff3f;
}
.vx-rail-list > li.show > a,
.vx-rail-list > li.vx-open > a,
.vx-rail-list > li.active > a {
  background: rgba(214, 255, 63, 0.1);
  color: #fff !important;
  border-color: rgba(214, 255, 63, 0.28);
  box-shadow: inset 3px 0 0 #d6ff3f;
}
.vx-rail-list > li > a .badge {
  margin-left: auto;
  background: rgba(214, 255, 63, 0.18) !important;
  color: #d6ff3f !important;
}
.vx-rail-list .dropdown-toggle::after {
  margin-left: auto;
  opacity: 0.55;
}
.vx-rail-list .dropdown-menu,
#vxRail .dropdown-menu,
#vxRailNav .dropdown-menu,
#vxRail .dropdown-menu.show,
#vxRailNav .dropdown-menu.show,
#vxRail #nav .dropdown-menu {
  position: static !important;
  float: none !important;
  transform: none !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  will-change: auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0.3rem 0 0.4rem !important;
  padding: 0.3rem !important;
  background: rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(214, 255, 63, 0.14) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  display: none;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.vx-rail-list > li.show > .dropdown-menu,
.vx-rail-list > li.vx-open > .dropdown-menu {
  display: block !important;
}
.vx-rail-list .dropdown-menu .dropdown-divider,
.vx-rail-list .dropdown-menu .nav-divider,
.vx-rail-list .dropdown-menu div.dropdown-divider {
  border-top: 1px solid rgba(232, 237, 245, 0.08) !important;
  margin: 0.3rem 0.35rem !important;
  opacity: 1;
  height: 0;
  overflow: hidden;
}
/* WHMCS nests <li class="dropdown-item"><a class="dropdown-item"> — style only the link */
.vx-rail-list .dropdown-menu > li,
.vx-rail-list .dropdown-menu li.dropdown-item {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0.1rem 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.vx-rail-list .dropdown-menu a,
.vx-rail-list .dropdown-menu a.dropdown-item,
.vx-rail-list .dropdown-menu .dropdown-item > a {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 9px !important;
  color: #c2cad8 !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: 0.55rem 0.7rem !important;
  margin: 0 !important;
  font-size: 0.88rem !important;
  text-decoration: none !important;
  white-space: normal !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.vx-rail-list .dropdown-menu a:hover,
.vx-rail-list .dropdown-menu a.dropdown-item:hover,
.vx-rail-list .dropdown-menu .dropdown-item > a:hover {
  background: rgba(214, 255, 63, 0.1) !important;
  border-color: rgba(214, 255, 63, 0.22) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.vx-rail-list .collapsable-dropdown {
  display: none !important;
}

.vx-rail-foot {
  padding: 0.75rem;
  border-top: 1px solid rgba(232, 237, 245, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.vx-rail-foot-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 11px;
  color: #c2cad8 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
}
.vx-rail-foot-link:hover {
  background: rgba(214, 255, 63, 0.08);
  color: #fff !important;
}
.vx-rail-foot-link .badge {
  margin-left: auto;
  background: #d6ff3f !important;
  color: #101408 !important;
}
.vx-rail-logout:hover {
  background: rgba(255, 92, 106, 0.12) !important;
  color: #ff8a95 !important;
}

/* Stage */
.vx-stage {
  margin-left: var(--vx-rail-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.vx-topbar {
  position: sticky;
  top: 0;
  z-index: 1500;
  height: var(--vx-top-h);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.25rem;
  background: rgba(7, 9, 12, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 237, 245, 0.08);
}

.vx-menu-btn,
.vx-top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid rgba(232, 237, 245, 0.1);
  background: #121821 !important;
  color: #e8edf5 !important;
  position: relative;
  padding: 0;
}
.vx-menu-btn:hover,
.vx-top-icon:hover {
  border-color: rgba(214, 255, 63, 0.35);
  color: #d6ff3f !important;
}

.vx-top-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.vx-top-search i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #667086;
  pointer-events: none;
}
.vx-top-search .form-control {
  padding-left: 2.35rem !important;
  height: 42px;
  border-radius: 12px !important;
  background: #121821 !important;
  border: 1px solid rgba(232, 237, 245, 0.1) !important;
  color: #e8edf5 !important;
}

.vx-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.vx-top-icon .volyx-notify-count,
.vx-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: #d6ff3f !important;
  color: #101408 !important;
  border: 0 !important;
}
.vx-top-user {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.55rem 0.25rem 0.25rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 237, 245, 0.1);
  background: #121821;
  color: #e8edf5 !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.9rem;
}
.vx-top-user .volyx-avatar {
  margin: 0;
  background: rgba(214, 255, 63, 0.14);
  color: #d6ff3f;
}
.vx-btn-login {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 1rem;
  border-radius: 11px;
  background: #d6ff3f;
  color: #101408 !important;
  font-weight: 800;
  text-decoration: none !important;
}

.vx-pad {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  max-width: 1400px;
}
.volyx-breadcrumb {
  padding-top: 0.85rem;
  padding-bottom: 0;
  background: transparent !important;
}
.volyx-main {
  flex: 1;
  padding-top: 1rem;
}

/* Homepage still full-bleed inside stage */
body.volyx-page-homepage .vx-pad,
body.volyx-page-homepage .volyx-main-home {
  max-width: none;
}
body.volyx-page-homepage .vx-home-wrap {
  margin: 0;
}

/* Hide old header remnants if any */
body.volyx-shell .volyx-header,
body.volyx-shell .volyx-navbar,
body.volyx-shell .volyx-main-nav,
body.volyx-shell .volyx-topbar:not(.vx-topbar) {
  /* no-op: old classes replaced */
}

.vx-shell-overlay {
  position: fixed;
  inset: 0;
  z-index: 1900;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.vx-shell-overlay[hidden] {
  display: none !important;
}

body.volyx-shell .volyx-footer {
  margin-left: 0;
}

@media (max-width: 1199.98px) {
  .vx-rail {
    transform: translateX(-105%);
  }
  body.vx-rail-open .vx-rail {
    transform: translateX(0);
  }
  .vx-stage {
    margin-left: 0;
  }
  .vx-top-search {
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .vx-shell-overlay {
    display: none !important;
  }
}
