.hub-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(235, 245, 250, 0.12);
  background: color-mix(in srgb, #101820 88%, transparent);
  color: #f5f8fa;
  backdrop-filter: blur(20px);
}

.hub-shell-inner {
  width: min(1440px, calc(100% - 64px));
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: 24px;
}

.hub-shell-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.hub-shell-mark {
  width: 19px;
  height: 19px;
  border-radius: 5px 11px 11px 11px;
  background: #ff7166;
  transform: rotate(-10deg);
}

.hub-shell-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(235, 245, 250, 0.14);
  border-radius: 999px;
  background: rgba(27, 42, 53, 0.72);
}

.hub-shell-link {
  padding: 9px 15px;
  border-radius: 999px;
  color: #b8c3ca;
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.hub-shell-link:hover {
  color: #f5f8fa;
  transform: translateY(-1px);
}

.hub-shell-link.is-active {
  background: #f5f8fa;
  color: #14232d;
}

.hub-shell-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.hub-shell-theme,
.hub-shell-profile,
.hub-shell-signout {
  appearance: none;
  border: 1px solid rgba(235, 245, 250, 0.14);
  background: rgba(27, 42, 53, 0.78);
  color: inherit;
  cursor: pointer;
}

.hub-shell-theme {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.05rem;
}

.hub-shell-profile {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px 5px 6px;
  border-radius: 999px;
  font-weight: 650;
}

.hub-shell-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ff7166;
  color: #14232d;
  font-size: 0.76rem;
  font-weight: 800;
}

.hub-shell-profile-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-shell-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(235, 245, 250, 0.14);
  border-radius: 18px;
  background: #1b2a35;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.34);
}

.hub-shell-menu[hidden] {
  display: none;
}

.hub-shell-role {
  margin: 0 0 4px;
  color: #ff9a92;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-shell-email {
  margin: 0 0 13px;
  overflow-wrap: anywhere;
  color: #b8c3ca;
  font-size: 0.82rem;
}

.hub-shell-signout {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  text-align: left;
  font-weight: 650;
}

.hub-shell-signout:hover,
.hub-shell-theme:hover,
.hub-shell-profile:hover {
  border-color: rgba(255, 113, 102, 0.48);
  background: rgba(255, 113, 102, 0.1);
}

[data-theme="light"] .hub-shell {
  border-bottom-color: rgba(20, 35, 45, 0.12);
  background: color-mix(in srgb, #f3f6f8 88%, transparent);
  color: #14232d;
}

[data-theme="light"] .hub-shell-nav,
[data-theme="light"] .hub-shell-theme,
[data-theme="light"] .hub-shell-profile {
  border-color: rgba(20, 35, 45, 0.13);
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .hub-shell-link {
  color: #5f6d76;
}

[data-theme="light"] .hub-shell-link:hover {
  color: #14232d;
}

[data-theme="light"] .hub-shell-link.is-active {
  background: #14232d;
  color: #f5f8fa;
}

@media (max-width: 980px) {
  .hub-shell-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 0;
  }

  .hub-shell-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hub-shell-nav::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 620px) {
  .hub-shell-inner {
    width: min(100% - 28px, 1440px);
  }

  .hub-shell-theme {
    display: none;
  }

  .hub-shell-profile-name {
    display: none;
  }

  .hub-shell-profile {
    padding-right: 5px;
  }

  .hub-shell-link {
    padding: 8px 13px;
    font-size: 0.8rem;
  }
}
