.app-nav-slot,
.app-nav-user-slot {
  view-transition-name: none;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 140ms ease both app-page-out;
}

::view-transition-new(root) {
  animation: 180ms ease both app-page-in;
}

::view-transition-group(app-topbar) {
  animation-duration: 180ms;
}

@keyframes app-page-out {
  to {
    opacity: .84;
  }
}

@keyframes app-page-in {
  from {
    opacity: 0;
  }
}

.app-nav-slot {
  position: absolute;
  left: 50%;
  top: 50%;

  z-index: 2;

  transform:
    translate(-50%, -50%);

  opacity: 1;

  transition: none;

  pointer-events: auto;
}

.app-nav-stage {
  display: flex;
  align-items: center;
}

.app-nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  padding: 4px;

  border-radius: 999px;

  background:
    rgba(38, 38, 38, .88);

  border: 0;

  box-shadow:
    0 6px 18px
      rgba(0, 0, 0, .18);

  backdrop-filter:
    blur(16px);

  -webkit-backdrop-filter:
    blur(16px);

  white-space: nowrap;

  font-synthesis: none;
}

.app-nav-tabs {
  position: relative;

  display: flex;
  align-items: center;

  gap: 2px;

  min-width: 0;

  padding: 1px;

  overflow: hidden;
}

/*
 * IMPORTANT:
 * indicator is invisible until JS has
 * calculated the correct initial tab.
 *
 * This prevents the cyan pill from
 * flashing over the first tab on load.
 */
.app-nav-indicator {
  position: absolute;

  top: 1px;
  bottom: 1px;
  left: 0;

  width: 0;

  border-radius: 999px;

  background: #00E3E8;

  box-shadow:
    0 0 0 1px
      rgba(0, 227, 232, .18),
    0 4px 14px
      rgba(0, 227, 232, .12);

  transform:
    translateX(0);

  opacity: 0;

  transition: none;

  pointer-events: none;
}

.app-nav-tabs.is-ready
.app-nav-indicator {
  opacity: 1;

  transition:
    transform 280ms
      cubic-bezier(.22, 1, .36, 1),

    width 280ms
      cubic-bezier(.22, 1, .36, 1),

    opacity 120ms ease;
}

.app-nav-tabs:not(.is-ready)
.app-nav-link.is-active {
  color: #111;
  background: #00E3E8;
}

.app-nav-link {
  position: relative;
  z-index: 1;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 38px;
  min-height: 38px;

  padding:
    1px 16px 0;

  border-radius: 999px;

  color: #b7b7b7;

  font-family:
    'Inter',
    system-ui,
    sans-serif;

  font-size: 13px;
  font-weight: 600;

  line-height: 1;

  white-space: nowrap;
  text-decoration: none;

  transition:
    color 280ms
      cubic-bezier(.22, 1, .36, 1),

    opacity 280ms ease;
}

.app-nav-link:hover {
  color: #fff;
}

/*
 * Text transitions together with
 * the moving cyan indicator.
 */
.app-nav-link.is-active {
  color: #111;
}

.app-nav-user-slot {
  position: relative;
  z-index: 3;

  display: flex;
  align-items: center;

  flex: 0 0 auto;

  margin-left: auto;
  margin-right: 12px;
}

.app-nav-user {
  display: flex;
  align-items: center;

  gap: 9px;

  flex: 0 0 auto;

  min-width: 0;
  max-width: 280px;

  padding:
    3px 11px 3px 4px;

  border:
    1px solid #484848;

  border-radius: 999px;

  background: #2d2d2d;

  text-decoration: none;

  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.app-nav-user:hover {
  border-color: #606060;

  background: #333;

  transform:
    translateY(-1px);
}

.app-nav-avatar {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  border-radius: 50%;

  background: #00E3E8;

  color: #101414;

  font-size: 12px;
  font-weight: 800;

  letter-spacing: .02em;
}

.app-nav-user-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 1px;
}

.app-nav-user-name {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: #fff;

  font-size: 12px;
  font-weight: 700;

  line-height: 1.25;
}

.app-nav-user-position {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;

  color: #a0a0a0;

  font-size: 10.5px;
  font-weight: 500;

  line-height: 1.2;
}

/*
 * All three application headers use
 * one common physical height.
 */
.topbar {
  position: sticky !important;

  view-transition-name: app-topbar;

  top: 0;

  height: 64px !important;
  min-height: 64px !important;

  padding:
    0 24px !important;

  display: flex !important;
  align-items: center !important;

  box-sizing: border-box;

  z-index: 300 !important;
}

/*
 * Keep brand visually identical
 * on all screens.
 */
.topbar-brand,
.topbar .brand {
  font-size: 17px !important;

  font-weight: 800 !important;

  letter-spacing:
    -0.02em !important;

  line-height: 1 !important;

  flex: 0 0 auto;
}

/*
 * Existing actions/data stay above
 * content and outside nav.
 */
.topbar-actions,
.topbar-right {
  position: relative;

  z-index: 3;

  flex: 0 0 auto;
}

/*
 * Brand should never collide with
 * the centered navigation.
 */
.topbar-brand,
.topbar .brand {
  position: relative;

  z-index: 3;
}

@media (
  max-width: 1200px
) {
  .app-nav-link {
    padding:
      0 11px;

    font-size: 12px;
  }

  .app-nav-user {
    max-width: 205px;
  }

  .app-nav-user-name {
    font-size: 11px;
  }

  .app-nav-user-position {
    font-size: 9.5px;
  }
}

@media (
  max-width: 960px
) {
  /*
   * On narrow screens we allow the
   * application nav to become a
   * second visual layer instead of
   * overlapping the brand/actions.
   */
  .topbar {
    height: 64px !important;
  }

  .app-nav-user-copy {
    display: none;
  }

  .app-nav-user {
    padding-right: 4px;
  }

  .app-nav-link {
    padding:
      0 9px;

    font-size: 11px;
  }
}

@media screen and (max-width: 680px) {
  .topbar {
    height: 108px !important;
    min-height: 108px !important;
    padding: 8px 12px 48px !important;
  }

  .topbar-brand,
  .topbar .brand {
    font-size: 14px !important;
  }

  .app-nav-slot {
    top: auto;
    right: 8px;
    bottom: 6px;
    left: 8px;

    transform: none;
  }

  .app-nav-stage,
  .app-nav-shell,
  .app-nav-tabs {
    width: 100%;
  }

  .app-nav-shell {
    gap: 0;
    padding: 3px;
  }

  .app-nav-tabs {
    overflow: visible;
  }

  .app-nav-link {
    flex: 1 1 0;
    min-width: 0;

    height: 36px;
    min-height: 36px;

    padding: 0 6px;

    font-size: 10px;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .app-nav-user-slot {
    display: none;
  }

  .topbar-actions,
  .topbar-right {
    gap: 6px;
  }

  .topbar-action-btn {
    padding: 6px 8px;
  }

  .topbar-action-label {
    display: none;
  }
}

@media print {
  .app-nav-slot {
    display: none !important;
  }
}
