:root {
  --hp-rail-width: 264px;
  --hp-rail-black: #02050a;
  --hp-rail-cobalt: #071a36;
  --hp-rail-blue: #2ba8ff;
  --hp-rail-text: #f4f8ff;
  --hp-rail-muted: #94a8c0;
  --hp-rail-line: rgba(94, 174, 255, .2);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

.hp-site-shell {
  display: grid;
  grid-template-columns: var(--hp-rail-width) minmax(0, 1fr);
  min-height: calc(100vh - 41px);
}

.hp-site-sidebar {
  position: sticky;
  top: 0;
  z-index: 24;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-self: start;
  width: var(--hp-rail-width);
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 14px 16px;
  color: var(--hp-rail-text);
  background:
    linear-gradient(160deg, rgba(19, 73, 142, .34), transparent 34%),
    radial-gradient(circle at 50% 14%, rgba(43, 168, 255, .12), transparent 12rem),
    linear-gradient(180deg, var(--hp-rail-cobalt), var(--hp-rail-black) 58%);
  border-right: 1px solid var(--hp-rail-line);
  box-shadow: 18px 0 55px rgba(0, 0, 0, .32);
  isolation: isolate;
}

.hp-site-sidebar::after {
  position: absolute;
  inset: auto 18px 64px auto;
  z-index: -1;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(43, 168, 255, .08);
  border-radius: 50%;
  box-shadow: 18px -10px 0 -12px rgba(43, 168, 255, .08),
    -18px 10px 0 -12px rgba(43, 168, 255, .06);
  content: "";
}

.hp-rail-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  color: var(--hp-rail-text);
  text-decoration: none;
}

.hp-rail-brand img {
  border-radius: 11px;
  box-shadow: 0 0 24px rgba(43, 168, 255, .24);
}

.hp-rail-brand span { display: grid; min-width: 0; gap: 3px; }
.hp-rail-brand strong {
  font: 900 20px/1 Bahnschrift, "Segoe UI Variable Display", "Segoe UI", sans-serif;
  letter-spacing: .025em;
}
.hp-rail-brand em { color: #61c5ff; font-style: normal; }
.hp-rail-brand small {
  overflow: hidden;
  color: var(--hp-rail-muted);
  font: 700 11px/1.25 "Segoe UI Variable Text", "Segoe UI", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-rail-group { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.hp-rail-group h2 {
  margin: 0 9px 2px;
  color: #7891ae;
  font: 800 10px/1.2 "Segoe UI Variable Text", "Segoe UI", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hp-rail-nav { display: grid; gap: 3px; }

/* Secondary pages stay one click away without competing with product tasks. */
.hp-rail-help { min-width: 0; margin-top: 8px; }
.hp-rail-help summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  margin: 0 2px;
  padding: 8px 11px;
  list-style: none;
  color: #aabbd0;
  border: 1px solid var(--hp-rail-line);
  border-radius: 9px;
  background: rgba(43, 168, 255, .035);
  font: 750 13px/1.35 "Segoe UI Variable Text", "Segoe UI", sans-serif;
  cursor: pointer;
}
.hp-rail-help summary::-webkit-details-marker { display: none; }
.hp-rail-help summary::after {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  margin: -3px 3px 0 0;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.hp-rail-help[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.hp-rail-help summary:hover, .hp-rail-help[open] summary { color: #eef7ff; border-color: #3178aa; }
.hp-rail-help[data-active] summary { color: #78d9ff; }
.hp-rail-help-links {
  display: grid;
  gap: 3px;
  margin: 6px 0 0 12px;
  padding-left: 6px;
  border-left: 1px solid rgba(43, 168, 255, .24);
}

.hp-rail-link,
.hp-context-slot .admin-section-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0 2px;
  padding: 8px 11px;
  color: var(--hp-rail-muted);
  border: 1px solid transparent;
  border-radius: 9px;
  font: 750 13px/1.25 "Segoe UI Variable Text", "Segoe UI", sans-serif;
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease,
    border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.hp-rail-link:hover,
.hp-context-slot .admin-section-nav a:hover,
.hp-rail-link[aria-current="page"],
.hp-context-slot .admin-section-nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(20, 111, 211, .35), rgba(43, 168, 255, .1));
  border-color: rgba(63, 178, 255, .42);
  box-shadow: 0 0 0 1px rgba(43, 168, 255, .07), 0 0 20px rgba(30, 132, 239, .16);
  transform: translateX(2px);
}

.hp-rail-link[aria-current="page"]::before,
.hp-context-slot .admin-section-nav a[aria-current="page"]::before {
  position: absolute;
  left: -5px;
  width: 3px;
  height: 22px;
  border-radius: 9px;
  background: #55c2ff;
  box-shadow: 0 0 12px #149ef1;
  content: "";
}

/* Keep the selected tab's light inside its bounds at every viewport width. */
.hp-rail-link[aria-current="page"] {
  transform: none;
  border-color: rgba(91, 208, 255, .68);
  background: linear-gradient(110deg, rgba(10, 110, 155, .40), rgba(15, 51, 97, .48));
  box-shadow: inset 0 0 16px rgba(36, 160, 240, .12), 0 0 12px rgba(36, 160, 240, .17);
}
.hp-rail-link[aria-current="page"]::before { display: none; }

.hp-rail-link:focus-visible,
.hp-account-link:focus-visible,
.hp-rail-brand:focus-visible,
.hp-menu-toggle:focus-visible,
.hp-rail-help summary:focus-visible,
.hp-context-slot a:focus-visible,
.hp-context-slot button:focus-visible,
.hp-context-slot input:focus-visible {
  outline: 2px solid #70ccff;
  outline-offset: 2px;
}

.hp-context-slot { display: grid; gap: 10px; }
.hp-context-slot:empty { display: none; }
.hp-context-slot .admin-command-bar {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px 0 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--hp-rail-line);
  border-radius: 0;
  box-shadow: none;
}
.hp-context-slot .admin-section-nav { display: grid; gap: 3px; }
.hp-context-slot .admin-global-search { display: grid; gap: 6px; }
.hp-context-slot .admin-global-search input,
.hp-context-slot .admin-global-search button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
}

.hp-rail-account { margin-top: auto; padding-top: 6px; }
.hp-account-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: #03111f;
  background: linear-gradient(135deg, #79d3ff, #2ca8ff);
  border: 1px solid #91dcff;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 105, 206, .2);
  font-weight: 900;
  text-decoration: none;
}
.hp-account-link:hover { color: #01070d; filter: brightness(1.08); }
.hp-rail-detail {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0 4px;
  color: #647b95;
  font-size: 10px;
}
.hp-rail-detail span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #45d79c;
  box-shadow: 0 0 10px rgba(69, 215, 156, .65);
}

.hp-site-stage { min-width: 0; }
.hp-site-main { min-width: 0; overflow-x: clip; }
.hp-mobile-header { display: none; }
.hp-menu-backdrop { display: none; }

@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .hp-site-sidebar {
    background:
      linear-gradient(160deg, rgba(19, 73, 142, .32), transparent 34%),
      rgba(2, 8, 18, .96);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}

@media (max-width: 820px) {
  .hp-site-shell { display: block; min-height: 100vh; }
  .hp-site-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--hp-rail-line);
  }
  .hp-mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 8px 12px;
    background: #050d18;
    border-bottom: 1px solid var(--hp-rail-line);
  }
  .site-shell-js .hp-mobile-header { display: flex; }
  .hp-mobile-brand {
    overflow: hidden;
    color: var(--hp-rail-text);
    font: 900 16px/1 Bahnschrift, "Segoe UI", sans-serif;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hp-mobile-brand span { color: #61c5ff; }
  .hp-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 42px;
    padding: 8px 11px;
    color: var(--hp-rail-text);
    background: #0b203c;
    border: 1px solid #245b91;
    border-radius: 9px;
    font-weight: 850;
  }
  .site-shell-js .hp-site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 42;
    width: min(86vw, 320px);
    height: 100dvh;
    max-height: 100vh;
    border-right: 1px solid var(--hp-rail-line);
    border-bottom: 0;
    box-shadow: 22px 0 70px rgba(0, 0, 0, .62);
    transform: translateX(-105%);
    visibility: hidden;
    transition: transform 190ms ease, visibility 0s linear 190ms;
  }
  .site-shell-js .hp-site-sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .site-shell-js .hp-menu-backdrop:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 41;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(0, 3, 8, .72);
    border: 0;
  }
  body.hp-drawer-open { overflow: hidden; }
  .hp-site-main { overflow-x: hidden; }
  .hp-site-main > *, .hp-site-stage > footer { max-width: 100%; }
  .hp-site-main table { display: block; max-width: 100%; overflow-x: auto; }
}

@media (max-width: 360px) {
  .hp-site-sidebar { padding-inline: 10px; }
  .hp-mobile-header { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hp-site-sidebar, .hp-rail-link, .hp-rail-help summary::after, .hp-context-slot .admin-section-nav a {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  .hp-site-sidebar, .hp-account-link, .hp-menu-toggle { forced-color-adjust: auto; }
  .hp-rail-link[aria-current="page"],
  .hp-context-slot .admin-section-nav a[aria-current="page"] { outline: 2px solid LinkText; }
}

/* The selected ring follows all four edges, including inside clipped mobile rails. */
.hp-rail-account { position:sticky; bottom:22px; z-index:3; background:var(--site-sidebar-bg,#080f17); padding-block:8px; }
.hp-mobile-account, .hp-mobile-dock { display:none; }
@media(max-width:820px) {
  html.site-shell-js { scroll-padding-bottom:calc(82px + env(safe-area-inset-bottom)); }
  .site-shell-js body { padding-bottom:calc(66px + env(safe-area-inset-bottom)); }
  .hp-mobile-dock { display:flex; align-items:center; position:fixed; inset:auto 0 0; z-index:64; min-height:66px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:#050d18; border-top:1px solid #275278; box-shadow:0 -6px 24px #0004; }
  .hp-mobile-account { display:inline-flex; align-items:center; min-height:44px; box-sizing:border-box; border:1px solid #3978a4; border-radius:7px; background:#102637; color:#e3f3ff; padding:10px 15px; font:600 13px/1.3 system-ui,sans-serif; text-decoration:none; }
  .site-shell-js #hp-support-launcher { right:12px; bottom:calc(10px + env(safe-area-inset-bottom)); min-height:44px; box-sizing:border-box; }
  .hp-site-main :is(input,select,textarea,button,a[href]) { scroll-margin-block:82px; }
  .hp-mobile-account:focus-visible { outline:2px solid #91d4ff; outline-offset:3px; }
  .hp-drawer-open :is(.hp-mobile-dock,#hp-support-launcher) { visibility:hidden; }
}
.hp-rail-link[aria-current="page"],
.hp-context-slot .admin-section-nav a[aria-current="page"] {
  box-sizing:border-box; transform:none; border-color:#4aafff;
  box-shadow:inset 0 0 0 1px #6ec5ff44,inset 0 0 14px #2475c53b,0 0 12px #2475c54d;
}
.hp-rail-link[aria-current="page"]::before,
.hp-context-slot .admin-section-nav a[aria-current="page"]::before {
  inset:1px; width:auto; height:auto; border:1px solid #58bdff38;
  border-radius:inherit; background:transparent; box-shadow:inset 0 0 8px #2475c53b;
  pointer-events:none;
}
