html[data-network=true] .wownex-header-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 10px 4px 5px;
  border: 1px solid #d8e2ed;
  border-radius: 24px;
  color: #0b2549;
  background: #fff;
  font-size: var(--app-type-control, 1rem);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

html[data-network=true] .wownex-header-profile:hover,
html[data-network=true] .wownex-header-profile[aria-current=page] {
  border-color: #c8d9ec;
  background: #edf3fa;
}

html[data-network=true] .wownex-header-profile:focus-visible {
  outline: 2px solid #305b88;
  outline-offset: 2px;
}

.wownex-header-profile-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #12375d;
  background: #e6eef7;
}

.wownex-header-profile-icon > svg {
  width: 18px;
  height: 18px;
}

.wownex-header-profile-icon > svg[hidden] {
  display: none;
}

.wownex-ally-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  color: #304b68;
  font-size: var(--app-type-control, .9375rem);
  line-height: 1.35;
  text-decoration: none;
}

.portal-access-panel > .wownex-ally-entry {
  margin-top: 5px;
  border-top: 1px solid #e1e7ee;
}

.wownex-ally-entry > svg { flex: none; }
.wownex-ally-entry strong { font-weight: 600; }
.wownex-ally-entry small {
  display: block;
  margin-top: 2px;
  color: #55677a;
  font-size: var(--app-type-meta, .875rem);
}

.wownex-ally-entry:hover { background: #edf3fa; }
.wownex-ally-entry:focus-visible {
  outline: 2px solid #305b88;
  outline-offset: 2px;
}

.wownex-welcome-ally {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  text-align: left;
}

@media (min-width: 901px) {
  html[data-network=true] .wownex-app-header-inner:has(> .wownex-header-profile) {
    gap: 12px;
  }

  html[data-network=true] .wownex-app-header-inner:has(> .wownex-header-profile) > .wow-notices {
    margin-inline-start: 0;
  }

  html[data-network=true] .wownex-header-profile {
    order: 4;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] {
    --wownex-rail-top: calc(var(--wownex-menu-header-bottom, 88px) + 14px);
    box-sizing: border-box;
    top: var(--wownex-rail-top);
    max-height: calc(100dvh - var(--wownex-rail-top) - 12px);
    overflow: visible;
    gap: 5px;
    padding: 0;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] > [data-rail-profile],
  html[data-network=true] .wownex-network-nav[data-workspace-rail] > [data-bottom-more] {
    flex: none;
  }

  .wownex-network-nav[data-workspace-rail] > .wownex-rail-views {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
    scrollbar-color: #acbac9 transparent;
    scrollbar-gutter: stable;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] :is([data-rail-profile], .wownex-rail-views > a, [data-bottom-more]) {
    flex-shrink: 0;
    min-height: 44px;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: var(--app-type-control, 1rem);
    line-height: 1.35;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] :is([data-rail-profile], .wownex-rail-views > a, [data-bottom-more]) > .portal-icon {
    width: 21px;
    height: 21px;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] > [data-rail-profile] {
    order: 0;
    margin-bottom: 2px;
    border: 1px solid #d7e1ed;
    background: #fff;
    color: #0b2549;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] :is([data-rail-profile], .wownex-rail-views > a, [data-bottom-more]):hover {
    background: #e6edf5;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] :is([data-rail-profile], .wownex-rail-views > a)[aria-current=page],
  html[data-network=true] .wownex-network-nav[data-workspace-rail] > [data-bottom-more][aria-expanded=true] {
    color: #0b2549;
    background: #dfeaf7;
    box-shadow: inset 2px 0 #547aa2;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] .wownex-rail-views > a[data-network-view=search][aria-current=page] {
    border-inline-start: 0;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] :is(a, button):focus-visible {
    outline: 2px solid #305b88;
    outline-offset: -2px;
  }

  .wownex-network-nav[data-workspace-rail][data-more-open] > .wownex-rail-views {
    z-index: 2;
  }

  html[data-network=true] .wownex-network-nav[data-workspace-rail] > [data-bottom-panel] {
    box-sizing: border-box;
    position: absolute;
    inset-block: auto 0;
    inset-inline: calc(100% + 10px) auto;
    width: 260px;
    max-height: min(100%, 22rem);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 6px;
    border: 1px solid #d8e2ed;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px #102f4f21;
  }
}

@media (max-width: 900px) {
  html[data-network=true] .wownex-app-header-inner:has(> .wownex-header-profile) {
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content) 44px 44px;
    gap: clamp(4px, 1.5vw, 8px);
  }

  html[data-network=true] .wownex-app-header-inner:has(> .wownex-header-profile) > .wow-notices {
    grid-area: 1 / 3;
  }

  html[data-network=true] .wownex-header-profile {
    grid-area: 1 / 4;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    gap: 0;
  }

  .wownex-header-profile-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
