/* STARS RCM PRO v4.5.3-uat1 — clickable company identity in the main topbar */
.topbar .tt.company-profile-slot {
  display: flex;
  align-items: center;
  min-width: 0;
  line-height: 1;
}

.company-profile-link,
.company-profile-static {
  display: inline-flex;
  align-items: center;
  max-width: min(240px, 46vw);
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  border-radius: 12px;
  outline: 0;
}

.company-profile-link {
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.company-profile-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.company-profile-link:active { transform: scale(.98); }

.company-profile-link:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 48%, transparent);
}

.company-profile-logo-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-width: 66px;
  max-width: 205px;
  padding: 5px 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.company-profile-logo {
  display: block !important;
  width: auto !important;
  height: 30px !important;
  max-width: 184px !important;
  max-height: 30px !important;
  object-fit: contain !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.company-profile-fallback {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}

.company-profile-fallback-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--border));
  border-radius: 11px;
  color: #171000;
  background: var(--accent);
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .05em;
}

.company-profile-fallback-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-profile-link::after {
  content: '↗';
  align-self: flex-start;
  margin: 1px 0 0 -7px;
  padding: 2px 4px;
  border-radius: 7px;
  color: #171000;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  font-size: 8px;
  font-weight: 1000;
}

.sid-company-profile-field input { text-transform: none !important; }

@media (max-width: 520px) {
  .company-profile-link,
  .company-profile-static { max-width: 39vw; }
  .company-profile-logo-shell {
    height: 36px;
    min-width: 54px;
    max-width: 142px;
    padding: 4px 7px;
  }
  .company-profile-logo {
    height: 27px !important;
    max-width: 128px !important;
    max-height: 27px !important;
  }
  .company-profile-fallback-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .company-profile-link { transition: none; }
}
