/* Golden AI - correcciones finales de interfaz */

/* Footer de usuario estable en Chrome / Safari / Firefox */
.sidebar-panel .profile {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) 38px !important;
  align-items: center !important;
  column-gap: 10px !important;

  width: 100% !important;
  min-width: 0 !important;

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

  padding: 8px 10px !important;
  box-sizing: border-box !important;

  overflow: visible !important;
}

.sidebar-panel .profile .avatar {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  flex: none !important;
}

.sidebar-panel .profile .profile-copy {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;

  min-width: 0 !important;
  width: auto !important;
  height: auto !important;

  overflow: visible !important;
}

.sidebar-panel .profile .profile-name {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;

  line-height: 1.2 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sidebar-panel .profile .profile-company {
  display: block !important;
  margin: 2px 0 0 !important;
  padding: 0 !important;

  line-height: 1.2 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.sidebar-panel .profile [data-golden-logout] {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;

  margin: 0 !important;

  align-self: center !important;
  justify-self: end !important;
}
/* =========================================================
   Safari / WebKit sidebar footer fix
   ========================================================= */

/* La altura debe incluir el padding de la sidebar. */
.sidebar {
  box-sizing: border-box !important;
  height: 100vh !important;
  height: 100dvh !important;
}

/* El panel puede repartir correctamente su espacio interno. */
.sidebar-panel {
  min-height: 0 !important;
}

/* La navegación absorbe el espacio sobrante y es la que debe
   encogerse/scrollar, no el bloque del usuario. */
.sidebar-panel .nav-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* Safari no puede comprimir el footer. */
.sidebar-panel .profile {
  flex: 0 0 62px !important;

  height: 62px !important;
  min-height: 62px !important;
  max-height: 62px !important;

  box-sizing: border-box !important;
  overflow: visible !important;
}

/* Evita clipping vertical de las dos líneas. */
.sidebar-panel .profile-copy {
  min-height: 32px !important;
  overflow: visible !important;
}

.sidebar-panel .profile-name,
.sidebar-panel .profile-company {
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Fuerza métricas verticales predecibles en WebKit. */
.sidebar-panel .profile-name {
  line-height: 15px !important;
}

.sidebar-panel .profile-company {
  line-height: 13px !important;
  margin-top: 2px !important;
}
/* =========================================================
   Safari / WebKit repaint fix para perfil inferior
   ========================================================= */

.sidebar-panel .profile {
  position: relative !important;
  z-index: 5 !important;

  -webkit-transform: translateZ(0);
  transform: translateZ(0);

  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;

  isolation: isolate;
}

.sidebar-panel .profile .profile-copy {
  position: relative !important;
  z-index: 6 !important;

  opacity: 1 !important;
  visibility: visible !important;

  -webkit-transform: translateZ(0);
  transform: translateZ(0);

  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.sidebar-panel .profile .profile-name,
.sidebar-panel .profile .profile-company {
  position: relative !important;
  z-index: 7 !important;

  opacity: 1 !important;
  visibility: visible !important;

  -webkit-text-fill-color: currentColor !important;

  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.sidebar-panel .profile .profile-name {
  color: var(--text) !important;
}

.sidebar-panel .profile .profile-company {
  color: var(--muted) !important;
}
