.nexsett-family-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) auto minmax(220px, 1fr);
  min-height: 81px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(6,18,32,.97);
  padding: 4px clamp(16px,2.2vw,34px);
  backdrop-filter: blur(18px);
}

.nexsett-family-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 20px;
}

/* Shared Nexsett family logo render box: match CRM exactly. */
.nexsett-family-brand img {
  display: block;
  width: 190px;
  height: auto;
  max-width: none;
  max-height: none;
  flex: 0 0 190px;
  object-fit: contain;
  object-position: left center;
  filter: none;
}

.nexsett-family-brand > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  border-left: 1px solid #36526a;
  padding-left: 20px;
}

.nexsett-family-brand strong,
.nexsett-family-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nexsett-family-brand strong {
  color: #f5fbff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.05;
}

.nexsett-family-brand span {
  color: #72c7f4;
  font-size: 12px;
  line-height: 1.15;
}

.nexsett-app-switcher {
  display: flex !important;
  visibility: visible;
  opacity: 1;
  min-width: max-content;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
  padding: 4px;
}

.nexsett-app-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nexsett-app-link:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}

.nexsett-app-link.active {
  border-color: rgba(0,162,255,.38);
  background: rgba(0,162,255,.12);
  color: var(--text);
}

.nexsett-app-link.disabled {
  cursor: not-allowed;
  opacity: .38;
}

.nexsett-family-actions {
  justify-self: end;
}

.governance-strip {
  display: none;
}

.app-shell {
  padding-top: 0;
}

/* Specialist Navigator navigation belongs to the page, not a second sticky layer. */
.app-nav {
  position: relative;
  top: auto;
  z-index: auto;
  margin: 0 -2px 14px;
  border-bottom: 1px solid rgba(52,94,120,.38);
  background: transparent;
  padding: 8px 2px 10px;
  backdrop-filter: none;
}

/* Shared family footer: viewport-centred geometry prevents parent-container drift. */
.nexsett-family-footer {
  position: relative;
  left: 50%;
  width: min(1600px, calc(100vw - 68px));
  margin: 28px 0 0;
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.nexsett-family-footer-inner {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 14px 0 18px;
}

@media (max-width: 1080px) {
  .nexsett-family-header {
    grid-template-columns: minmax(300px,1fr) auto;
  }

  .nexsett-app-switcher {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
  }

  .nexsett-family-actions {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 760px) {
  .nexsett-family-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    gap: 10px;
    padding: 9px 14px;
  }

  .nexsett-family-brand {
    gap: 0;
  }

  .nexsett-family-brand img {
    width: 132px;
    height: auto;
    max-height: none;
    flex-basis: 132px;
  }

  .nexsett-family-brand > div {
    display: none;
  }

  .nexsett-app-switcher {
    margin: 0 -2px;
  }

  .nexsett-app-link {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .nexsett-family-actions .user-chip span:last-child {
    display: none;
  }

  .nexsett-family-footer {
    width: calc(100vw - 28px);
  }

  .nexsett-family-footer-inner {
    display: grid;
    justify-content: start;
  }
}
