// Lean admin header — single flex row, no collapse animation, no
// nested grids. Matches the `LayoutStateService`-driven sidebar's
// rail metrics so the brand sits flush above the navigation column.
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
  padding: 0 1rem;
  background-color: var(--color-brand-primary-600, #1d4ed8);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;

  &:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    border-radius: 0.25rem;
  }
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  height: 1.75rem;
  width: 1.75rem;
}

// "Admin" pill — distinct color from the wordmark so it reads as a
// status badge even in dense headers. Keeps the surface
// immediately recognisable per ADR-0020 §"Discoverability for
// auditors".
.brand-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background-color: var(--color-brand-accent-300, #f59e0b);
  color: #1f2937;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.25rem;
}

.auth-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  // The admin header sits on `--color-brand-primary-600`; a brand
  // primary avatar inside the user menu trigger would barely read.
  // Override the shared avatar tokens to a translucent white block
  // matching the inline avatar this widget replaced.
  lib-user-menu {
    --user-menu-avatar-bg: rgba(255, 255, 255, 0.2);
    --user-menu-avatar-fg: #ffffff;
  }
}

.auth-status--loading {
  font-size: 0.875rem;
  opacity: 0.8;
}

.auth-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  background-color: transparent;
  color: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;

  &:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
  }
}

.btn--primary {
  background-color: var(--color-brand-accent-300, #f59e0b);
  color: #1f2937;
  border-color: transparent;
}

.btn--secondary {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.4);

  &:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
}
