/* ===== User Bar — shared across all auth'd pages ===== */

#userBar {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 1000;
}

.ub-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  border-radius: 40px;
  border: 1px solid #26262e;
  background: #141417;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}
.ub-trigger:hover {
  border-color: #7c6ef0;
  background: color-mix(in srgb, #7c6ef0 10%, #141417);
}

.ub-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #26262e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #e8e8f0;
  letter-spacing: 0;
}
.ub-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.ub-name {
  font-size: 13px;
  font-weight: 500;
  color: #e8e8f0;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ub-chevron {
  color: #6b6b80;
  transition: transform 0.2s;
  flex-shrink: 0;
  font-size: 10px;
  line-height: 1;
}
.ub-open .ub-chevron { transform: rotate(180deg); }

/* ── Dropdown ── */
.ub-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #141417;
  border: 1px solid #26262e;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}
.ub-open .ub-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ub-dd-header {
  padding: 12px 14px 10px;
}
.ub-dd-name {
  font-size: 13px;
  font-weight: 600;
  color: #e8e8f0;
  margin-bottom: 2px;
}
.ub-dd-email {
  font-size: 12px;
  color: #6b6b80;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ub-divider {
  height: 1px;
  background: #26262e;
  margin: 0;
}

.ub-signout {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: #e8e8f0;
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.ub-signout:hover {
  background: #1c1c21;
  color: #e05560;
}
