/*
 * Anguo shared system header, v1.
 *
 * This stylesheet is intentionally namespaced. Connected applications keep
 * ownership of authentication and account actions; this component owns the
 * shared navigation and account presentation.
 */
.anguo-shell-v1,
.anguo-shell-v1 * {
  box-sizing: border-box;
}

.anguo-shell-v1 {
  --anguo-shell-height: 52px;
  --anguo-shell-bg: rgba(4, 6, 8, 0.92);
  --anguo-shell-line: rgba(255, 255, 255, 0.1);
  --anguo-shell-text: #f1f4f6;
  --anguo-shell-muted: #89949f;
  --anguo-shell-divider: #66717c;
  --anguo-shell-active: #22cc78;
  --anguo-shell-active-soft: #58efa2;
  --anguo-shell-glow: rgba(34, 204, 120, 0.55);
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  display: flex;
  width: 100vw;
  max-width: none;
  height: var(--anguo-shell-height);
  margin: 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(18px, 2.8vw, 42px);
  border-bottom: 1px solid var(--anguo-shell-line);
  background: var(--anguo-shell-bg);
  color: var(--anguo-shell-text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.anguo-shell-v1[data-active-system="operations"] {
  --anguo-shell-active: #22cc78;
  --anguo-shell-active-soft: #58efa2;
  --anguo-shell-glow: rgba(34, 204, 120, 0.55);
}

.anguo-shell-v1[data-active-system="main"] {
  --anguo-shell-active: #ff2e4d;
  --anguo-shell-active-soft: #ff7185;
  --anguo-shell-glow: rgba(255, 46, 77, 0.68);
}

.anguo-shell-v1[data-active-system="finance"] {
  --anguo-shell-active: #168cff;
  --anguo-shell-active-soft: #52c7ff;
  --anguo-shell-glow: rgba(22, 140, 255, 0.62);
}

.anguo-shell-v1[data-active-system="boss"] {
  --anguo-shell-active: #9b7cff;
  --anguo-shell-active-soft: #dfd4ff;
  --anguo-shell-glow: rgba(124, 58, 237, 0.38);
}

.anguo-shell-v1[data-active-system="pe"] {
  --anguo-shell-active: #d9a441;
  --anguo-shell-active-soft: #ffd36b;
  --anguo-shell-glow: rgba(217, 164, 65, 0.62);
}

.anguo-shell-v1__brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--anguo-shell-text);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.anguo-shell-v1 .anguo-shell-v1__brand,
.anguo-shell-v1 .anguo-shell-v1__brand:visited,
.anguo-shell-v1 .anguo-shell-v1__brand:hover,
.anguo-shell-v1 .anguo-shell-v1__brand:focus-visible,
.anguo-shell-v1 .anguo-shell-v1__brand:active {
  border: 0;
  color: var(--anguo-shell-text);
  text-decoration: none;
}

.anguo-shell-v1__mark {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  background: linear-gradient(145deg, #f5f7f8 5%, #d6dcdf 36%, #aab5bb 70%, #e3e7e9 100%);
  -webkit-mask: url("./anguo-mark.svg") center / 115% no-repeat;
  mask: url("./anguo-mark.svg") center / 115% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.58)) drop-shadow(0 0 5px rgba(218, 229, 234, 0.09));
}

.anguo-shell-v1__wordmark {
  font-family: "Segoe UI Variable Display", "Inter", "Segoe UI", sans-serif;
  color: var(--anguo-shell-text);
  font-weight: 850;
  font-stretch: 94%;
  letter-spacing: 0.015em;
  font-kerning: normal;
  text-rendering: geometricPrecision;
}

.anguo-shell-v1__links {
  --anguo-shell-link-gap: clamp(12px, 1.3vw, 22px);
  display: flex;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  align-items: stretch;
  justify-content: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
}

.anguo-shell-v1__account[data-empty="true"] {
  visibility: hidden;
  pointer-events: none;
}

.anguo-shell-v1__account {
  display: flex;
  width: 260px;
  min-width: 260px;
  height: 100%;
  flex: 0 0 260px;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--anguo-shell-line);
}

.anguo-shell-v1__avatar,
.anguo-shell-v1__account-action {
  width: auto;
  min-width: 0;
  margin: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
  box-shadow: none;
}

.anguo-shell-v1__avatar {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  overflow: visible;
  padding: 0;
  border-radius: 50%;
  background: #232a31;
  color: #f4f6f8;
}

.anguo-shell-v1__avatar-fallback,
.anguo-shell-v1__avatar-image {
  grid-area: 1 / 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.anguo-shell-v1__avatar-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--anguo-shell-active), var(--anguo-shell-active-soft));
  color: #07100c;
  font-size: 12px;
  font-weight: 750;
}

.anguo-shell-v1__avatar-image {
  z-index: 1;
  display: block;
  object-fit: cover;
  background: #171c21;
}

.anguo-shell-v1__avatar-edit {
  position: absolute;
  z-index: 2;
  right: -3px;
  bottom: -2px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1px solid #3c4650;
  border-radius: 50%;
  background: #151a20;
  color: #c8d0d6;
  font-size: 8px;
  line-height: 1;
}

.anguo-shell-v1__avatar:hover .anguo-shell-v1__avatar-edit,
.anguo-shell-v1__avatar:focus-visible .anguo-shell-v1__avatar-edit {
  border-color: var(--anguo-shell-active);
  color: var(--anguo-shell-active-soft);
}

.anguo-shell-v1__identity {
  display: grid;
  min-width: 74px;
  max-width: 126px;
  gap: 3px;
}

.anguo-shell-v1__username {
  overflow: hidden;
  color: var(--anguo-shell-text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anguo-shell-v1__role {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 15px;
  align-items: center;
  overflow: hidden;
  padding: 0 6px;
  border: 1px solid rgba(137, 148, 159, 0.28);
  border-radius: 999px;
  background: rgba(137, 148, 159, 0.08);
  color: #9ca7b1;
  font-size: 9px;
  font-weight: 500;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anguo-shell-v1__role.is-super-administrator {
  border-color: rgba(255, 184, 92, 0.46);
  background: rgba(255, 184, 92, 0.14);
  color: #ffc273;
  box-shadow: 0 0 12px rgba(255, 174, 73, 0.13);
}

.anguo-shell-v1__account-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.anguo-shell-v1__account-action {
  display: inline-flex;
  height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(137, 148, 159, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  color: #aeb7bf;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.anguo-shell-v1__account-action:hover,
.anguo-shell-v1__account-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--anguo-shell-text);
  background: rgba(255, 255, 255, 0.06);
}

/* Beat host applications' broad page-level button rules. */
.anguo-shell-v1 .anguo-shell-v1__avatar {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 750;
}

.anguo-shell-v1 .anguo-shell-v1__account-action {
  width: auto;
  height: 25px;
  min-height: 0;
  margin: 0;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 400;
}

.anguo-shell-v1__links::-webkit-scrollbar {
  display: none;
}

.anguo-shell-v1__group {
  display: inline-flex;
  flex: 0 0 auto;
  height: 100%;
  align-items: stretch;
  gap: var(--anguo-shell-link-gap);
}

.anguo-shell-v1__divider {
  width: 1px;
  height: 18px;
  flex: 0 0 1px;
  align-self: center;
  margin: 0 clamp(10px, 0.8vw, 14px);
  background: linear-gradient(180deg, transparent, var(--anguo-shell-line) 24%, var(--anguo-shell-divider) 50%, var(--anguo-shell-line) 76%, transparent);
}

.anguo-shell-v1__links a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  height: 100%;
  align-items: center;
  padding: 0 2px;
  color: var(--anguo-shell-muted);
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 180ms ease;
}

.anguo-shell-v1__links a::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--anguo-shell-active), transparent);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: none;
}

.anguo-shell-v1__links a:hover,
.anguo-shell-v1__links a:focus-visible,
.anguo-shell-v1__links a[aria-current="page"] {
  color: var(--anguo-shell-text);
}

.anguo-shell-v1__links a:hover::after,
.anguo-shell-v1__links a:focus-visible::after {
  transform: scaleX(1);
}

.anguo-shell-v1__links a[aria-current="page"] {
  font-weight: 650;
}

.anguo-shell-v1__links a[aria-current="page"]::after {
  display: block;
  right: auto;
  bottom: -1px;
  left: 50%;
  width: 38px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--anguo-shell-active) 25%, var(--anguo-shell-active-soft) 50%, var(--anguo-shell-active) 75%, transparent 100%);
  box-shadow: none;
  filter: drop-shadow(0 0 7px var(--anguo-shell-active-soft)) drop-shadow(0 0 18px var(--anguo-shell-glow));
  transform: translateX(-50%);
  transform-origin: center;
  animation: none;
  transition: none;
  will-change: auto;
}

@media (max-width: 900px) {
  .anguo-shell-v1 {
    --anguo-shell-height: 50px;
    gap: 16px;
    padding: 0 14px;
  }

  .anguo-shell-v1__brand {
    gap: 7px;
    font-size: 11px;
  }

  .anguo-shell-v1__mark {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .anguo-shell-v1__links {
    --anguo-shell-link-gap: 18px;
  }

  .anguo-shell-v1__divider {
    height: 16px;
    margin-inline: 9px;
  }

  .anguo-shell-v1__links a {
    font-size: 8px;
  }

  .anguo-shell-v1__account {
    width: 154px;
    min-width: 154px;
    flex-basis: 154px;
    gap: 6px;
    padding-left: 9px;
  }

  .anguo-shell-v1__identity {
    display: none;
  }

  .anguo-shell-v1 .anguo-shell-v1__account-action {
    height: 24px;
    padding-inline: 6px;
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  .anguo-shell-v1 {
    padding-inline: 10px;
  }

  .anguo-shell-v1__brand {
    gap: 6px;
    font-size: 10px;
  }

  .anguo-shell-v1__links {
    justify-content: flex-start;
  }

  .anguo-shell-v1__wordmark {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .anguo-shell-v1,
  .anguo-shell-v1__links a,
  .anguo-shell-v1__links a::after {
    transition: none;
  }
}
